From 8477de41a9bb3a289a71e24b4a8ca118aa619c17 Mon Sep 17 00:00:00 2001 From: Marshal Date: Tue, 28 Jul 2026 05:10:01 +0000 Subject: [PATCH 1/2] changes --- apps/edr-freight-api/src/modules/contracts/contracts.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/edr-freight-api/src/modules/contracts/contracts.service.ts b/apps/edr-freight-api/src/modules/contracts/contracts.service.ts index 4ef525ff7..24aa2b597 100644 --- a/apps/edr-freight-api/src/modules/contracts/contracts.service.ts +++ b/apps/edr-freight-api/src/modules/contracts/contracts.service.ts @@ -10,7 +10,7 @@ import { DataSource } from 'typeorm'; import { insertWithGeneratedReference } from '@edr/api-common'; import { YardCountry } from '@edr/types'; - +// import { deriveTradeDirection } from '../../common/derive-trade-direction.util'; import { CompaniesService } from '../companies/companies.service'; import { ServiceType } from '../rule-engine/entities/service-type.entity'; From f40a079420853cf4af938384dcc9a76f5bd53cf7 Mon Sep 17 00:00:00 2001 From: Marshal Date: Tue, 28 Jul 2026 05:51:24 +0000 Subject: [PATCH 2/2] 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 && (