mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Merge pull request #1358 from Tria-plc/freight_feature/usermanagement
fix(portal): surface document upload on cleared bookings until payment
This commit is contained in:
@@ -66,7 +66,7 @@ export function ClearanceCard({ booking }: { booking: Freight.IBooking }) {
|
||||
isBookAction
|
||||
? "Book your shipment — enter the cargo details and pick a shipment day inside an open booking window."
|
||||
: "Pick a shipment day and proceed to operation."
|
||||
}`}
|
||||
} You can still add documents to this shipment until it is paid.`}
|
||||
</Alert>
|
||||
) : status === "DOCUMENTS_UNDER_REVIEW" ? (
|
||||
<Alert color="blue" radius="md" icon={<Clock size={18} />}>
|
||||
|
||||
@@ -95,7 +95,7 @@ export function ClearanceFlow({ booking, flow, footer }: ClearanceFlowProps) {
|
||||
{needsCompletion
|
||||
? "Clearance is finalized. Complete your booking now — enter the cargo details and pick a shipment day inside an open booking window."
|
||||
: awaitingGlCompletion
|
||||
? "Customs clearance is complete. Global Logistics is completing your booking (cargo details and shipment day) — you will be notified when payment is due."
|
||||
? "Customs clearance is complete. Global Logistics is completing your booking (cargo details and shipment day) — you will be notified when payment is due. You can still add documents below until the shipment is paid."
|
||||
: clearance.includesCustoms
|
||||
? "Customs clearance is complete and your cleared documents are available below. You can now proceed to operation."
|
||||
: "Your documents are approved. You can now proceed to operation."}
|
||||
@@ -209,17 +209,6 @@ export function ClearanceFlow({ booking, flow, footer }: ClearanceFlowProps) {
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* Clearance is done but the shipment is not paid yet: documents stay
|
||||
open, so say so — otherwise the upload box below reads as leftover UI. */}
|
||||
{canUpload && !isInitialUpload && status !== "DOCUMENTS_UNDER_REVIEW" ? (
|
||||
<Alert color="blue" variant="light" radius="md" mt="md" p="xs">
|
||||
<Text fz="12px">
|
||||
Need to send something else? You can still add documents to this
|
||||
shipment until it is paid.
|
||||
</Text>
|
||||
</Alert>
|
||||
) : null}
|
||||
|
||||
{canUpload ? (
|
||||
<ClearanceAdHocUploadSection
|
||||
rows={adHoc}
|
||||
|
||||
@@ -130,13 +130,14 @@ export function getBookingNextAction(
|
||||
booking: ActionBooking,
|
||||
): BookingNextAction | null {
|
||||
if (booking.status === "CLEARANCE_READY" && isBareInstance(booking)) {
|
||||
// Customs (Path B): GL completes the booking — the customer can only view
|
||||
// the finished clearance in the modal.
|
||||
// Customs (Path B): GL completes the booking, so there is no schedule step
|
||||
// for the customer here — but documents stay open until the shipment is
|
||||
// paid, so the modal is still an action surface, not a read-only view.
|
||||
if (booking.customsClearingEnabled) {
|
||||
return {
|
||||
kind: "SCHEDULE_OPERATION",
|
||||
label: "View clearance",
|
||||
title: "Clearance complete",
|
||||
label: "Documents",
|
||||
title: "Clearance documents",
|
||||
};
|
||||
}
|
||||
// Non-customs (Path A): straight to the booking form — cargo + shipment
|
||||
|
||||
Reference in New Issue
Block a user