fix(14): remove dead generate_new branch from assignQuoteToLead (CRM-12)

assignQuoteToLead's generate_new check was unreachable since
SendQuoteModal always passed false. Removes the field from both
the server schema and the modal's local schema/defaultValues/call site.
This commit is contained in:
2026-06-14 15:17:48 +02:00
parent 0378ba78a9
commit c8d53134ba
2 changed files with 0 additions and 9 deletions
-6
View File
@@ -115,7 +115,6 @@ export async function logActivity(data: z.infer<typeof createActivitySchema>) {
const assignQuoteSchema = z.object({
lead_id: z.string().min(1),
quote_token: z.string().optional(),
generate_new: z.boolean(),
});
export async function assignQuoteToLead(data: z.infer<typeof assignQuoteSchema>) {
@@ -126,11 +125,6 @@ export async function assignQuoteToLead(data: z.infer<typeof assignQuoteSchema>)
}
try {
if (parsed.data.generate_new) {
// Redirect handled on client; this is a no-op
return { success: true };
}
// Link quote to lead and update lead status
const token = parsed.data.quote_token;
const leadId = parsed.data.lead_id;