import { Text } from "@/components/ui/text"; import { ChecklistSection } from "@/app/v/[token]/dispatch/_components/checklist-section"; import { CommentsSection } from "@/app/v/[token]/dispatch/_components/comments-section"; import { SignoffSection } from "@/app/v/[token]/dispatch/_components/signoff-section"; import { UpliftRequestsSection } from "@/app/v/[token]/dispatch/_components/uplift-requests-section"; import { VendorPortalDocuments } from "@/app/v/_components/vendor-portal-documents"; import type { VendorPortalDispatchDetail, VendorPortalDocumentStatus, } from "@/domain/vendor-portal/types/vendor-portal"; type DispatchDetailSectionsProps = { token: string; dispatchId: number; data: VendorPortalDispatchDetail; locked: boolean; refresh: () => Promise; pollEvidenceDocument: (documentId: number) => Promise; updateLocal: ( updater: (current: VendorPortalDispatchDetail) => VendorPortalDispatchDetail, ) => void; }; export function DispatchDetailSections({ token, dispatchId, data, locked, refresh, pollEvidenceDocument, updateLocal, }: DispatchDetailSectionsProps) { return ( <>
Checklist updateLocal((current) => ({ ...current, checklist: (current.checklist ?? []).map((item) => item.id === updated.id ? { ...item, ...updated } : item, ), })) } />
Completion documents
NTE Uplift Requests
Customer Signoff void refresh()} />
Vendor Signoff void refresh()} />
Comments updateLocal((current) => ({ ...current, comments: [...(current.comments ?? []), comment], })) } />
); }