Merge pull request #608 from Tria-plc/freight_feature/usermanagement

general contrat
This commit is contained in:
marshal
2026-07-10 21:00:01 +03:00
committed by GitHub
23 changed files with 639 additions and 89 deletions

View File

@@ -380,6 +380,31 @@ export function ClearanceReviewSection({
</Text>
</Group>
</Paper>
) : clearance.status !== "DOCUMENTS_UNDER_REVIEW" ? (
// Finalize is only valid from DOCUMENTS_UNDER_REVIEW (the API rejects
// any other status with a 409) — once the booking moved on, show the
// finalized state instead of a button that can only fail.
<Paper withBorder radius="md" p="md">
<Group gap={8} wrap="nowrap" style={{ minWidth: 0 }}>
<ThemeIcon
variant="light"
color={clearance.allApproved ? "edr-green" : "gray"}
radius="md"
size={28}
>
{clearance.allApproved ? (
<CheckCircle2 size={15} />
) : (
<FileCheck2 size={15} />
)}
</ThemeIcon>
<Text fz="12.5px" c="dimmed">
{clearance.allApproved
? "Clearance has been finalized. The customer can now pick a shipment day and proceed to operation."
: "Finalization unlocks once the customer submits their documents and every required document is approved."}
</Text>
</Group>
</Paper>
) : (
<Paper withBorder radius="md" p="md">
<Group justify="space-between" wrap="nowrap">