From 17d8e1c90d85dd1c408259b98e55200579d9d967 Mon Sep 17 00:00:00 2001 From: Mohammad Khyata Date: Wed, 8 Apr 2026 15:04:01 +0300 Subject: [PATCH] fix build error --- apps/dashboard/modules/inspections/inspection-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/modules/inspections/inspection-form.tsx b/apps/dashboard/modules/inspections/inspection-form.tsx index 6ad79b4..fdc6801 100644 --- a/apps/dashboard/modules/inspections/inspection-form.tsx +++ b/apps/dashboard/modules/inspections/inspection-form.tsx @@ -112,7 +112,7 @@ function mapFormToPayload(values: InspectionFormValues) { department_id: toId(values.department), inspection_category_id: toId(values.inspection_category), employee_id: toId(values.employee), - job_card_id: toId(values.job_card) ?? null, + job_card_id: values.job_card?.value ?? undefined, labor_rate_id: values.labor_rate ? Number(values.labor_rate.value) : undefined, title: values.title, order_number: values.order_number || undefined, @@ -168,7 +168,7 @@ export function InspectionForm({ resourceId, initialData, onSuccess }: Inspectio mutationFn: (values: InspectionFormValues) => { const payload = mapFormToPayload(values) const promise = (isEditing && resourceId - ? api.inspections.update(resourceId, payload) + ? api.inspections.update(resourceId, payload as any) : api.inspections.create(payload)) as any toast.promise(promise, { loading: isEditing ? "Updating inspection..." : "Creating inspection...",