diff --git a/src/app/(app)/quotes/approvals/page.tsx b/src/app/(app)/quotes/approvals/page.tsx index b120a24..f2866bd 100644 --- a/src/app/(app)/quotes/approvals/page.tsx +++ b/src/app/(app)/quotes/approvals/page.tsx @@ -264,42 +264,6 @@ export default function ApprovalsPage() { void ensureOutboundAttachments(quoteId); }; - /** - * Approve a partial quote. Marks priced items as - * `approved_in_batch`, flips status to `partial_approved`, then - * the rep still needs to send the email from the quote detail - * page (the existing approve modal flow). We do NOT send from - * here because the partial flow is more complex (operator - * needs to compose subject/body for the email) and reusing the - * existing modal keeps the partial path consistent with the - * full one. - * - * Surface: toast tells the rep "open the quote to send the - * partial" and the rep clicks the quote to continue. - */ - const handleApprovePartial = async (id: string) => { - setActionLoading(id); - try { - const res = await fetch( - `/api/v1/quotes/${id}/partial-approve`, - { method: "POST" } - ); - if (!res.ok) { - const err = (await res.json().catch(() => ({}))) as { error?: string }; - throw new Error(err.error || `Partial approve failed (HTTP ${res.status})`); - } - const data = (await res.json()) as { itemsMarked?: number }; - toast.success( - `${data.itemsMarked ?? 0} items marked approved — open the quote to send the email.` - ); - fetchApprovals(); - } catch (err: unknown) { - toast.error(err instanceof Error ? err.message : "Failed to partial-approve"); - } finally { - setActionLoading(""); - } - }; - const handleReject = async () => { if (!rejectId) return; setActionLoading(rejectId);