From f40a079420853cf4af938384dcc9a76f5bd53cf7 Mon Sep 17 00:00:00 2001 From: Marshal Date: Tue, 28 Jul 2026 05:51:24 +0000 Subject: [PATCH] update contract document handling and improve clarity in UI messages --- .../contracts/ContractActionsToolbar.tsx | 11 +- .../contracts/ContractDocumentEditorModal.tsx | 102 ++++++++++++------ .../contracts/detail/RequestDetailCards.tsx | 4 + .../contracts/ContractRequestDetailPage.tsx | 18 +++- .../ContractCustomerAction.tsx | 5 +- .../src/pages/MyPortalPage/constants.ts | 4 +- .../components/ClearanceCard.tsx | 28 +++-- .../components/DocumentsTab.tsx | 10 +- .../components/StatusHero.tsx | 29 ++++- .../bookings/clearance/BookingActionModal.tsx | 7 +- .../bookings/clearance/ClearanceFlow.tsx | 7 +- .../bookings/clearance/bookingNextAction.ts | 89 +++++++++++---- .../pages/contracts/ContractDetailPage.tsx | 3 +- 13 files changed, 236 insertions(+), 81 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/components/contracts/ContractActionsToolbar.tsx b/apps/edr-freight-web/backoffice/src/components/contracts/ContractActionsToolbar.tsx index 8c4833550..d2a245f24 100644 --- a/apps/edr-freight-web/backoffice/src/components/contracts/ContractActionsToolbar.tsx +++ b/apps/edr-freight-web/backoffice/src/components/contracts/ContractActionsToolbar.tsx @@ -5,7 +5,7 @@ import { Button, Group, Modal, Stack, Text, Textarea } from "@mantine/core"; import { Check, Eye, - FilePen, + // FilePen, // ponytail: back with the "Edit contract articles" button FileSignature, MessageSquareWarning, PauseCircle, @@ -286,9 +286,9 @@ export function ContractActionsToolbar({ <> {canEditDocument - ? "It is your turn to approve. You can edit the articles before approving — the PDF is generated automatically once the last approver approves." + ? "It is your turn to approve — the PDF is generated automatically once the last approver approves." : draft?.nextApproverRole - ? `Awaiting ${draft.nextApproverRole}. Only the current approver can edit the document.` + ? `Awaiting ${draft.nextApproverRole}.` : "Awaiting approval."} + {/* Article editing is hidden for now (frontend only) — the approval + chain approves the document as accepted. Uncomment to restore. + {canEditDocument && (