mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 23:35:42 +00:00
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
|
isBookAction
|
||||||
? "Book your shipment — enter the cargo details and pick a shipment day inside an open booking window."
|
? "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."
|
: "Pick a shipment day and proceed to operation."
|
||||||
}`}
|
} You can still add documents to this shipment until it is paid.`}
|
||||||
</Alert>
|
</Alert>
|
||||||
) : status === "DOCUMENTS_UNDER_REVIEW" ? (
|
) : status === "DOCUMENTS_UNDER_REVIEW" ? (
|
||||||
<Alert color="blue" radius="md" icon={<Clock size={18} />}>
|
<Alert color="blue" radius="md" icon={<Clock size={18} />}>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function ClearanceFlow({ booking, flow, footer }: ClearanceFlowProps) {
|
|||||||
{needsCompletion
|
{needsCompletion
|
||||||
? "Clearance is finalized. Complete your booking now — enter the cargo details and pick a shipment day inside an open booking window."
|
? "Clearance is finalized. Complete your booking now — enter the cargo details and pick a shipment day inside an open booking window."
|
||||||
: awaitingGlCompletion
|
: 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
|
: clearance.includesCustoms
|
||||||
? "Customs clearance is complete and your cleared documents are available below. You can now proceed to operation."
|
? "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."}
|
: "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 ? (
|
{canUpload ? (
|
||||||
<ClearanceAdHocUploadSection
|
<ClearanceAdHocUploadSection
|
||||||
rows={adHoc}
|
rows={adHoc}
|
||||||
|
|||||||
@@ -130,13 +130,14 @@ export function getBookingNextAction(
|
|||||||
booking: ActionBooking,
|
booking: ActionBooking,
|
||||||
): BookingNextAction | null {
|
): BookingNextAction | null {
|
||||||
if (booking.status === "CLEARANCE_READY" && isBareInstance(booking)) {
|
if (booking.status === "CLEARANCE_READY" && isBareInstance(booking)) {
|
||||||
// Customs (Path B): GL completes the booking — the customer can only view
|
// Customs (Path B): GL completes the booking, so there is no schedule step
|
||||||
// the finished clearance in the modal.
|
// 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) {
|
if (booking.customsClearingEnabled) {
|
||||||
return {
|
return {
|
||||||
kind: "SCHEDULE_OPERATION",
|
kind: "SCHEDULE_OPERATION",
|
||||||
label: "View clearance",
|
label: "Documents",
|
||||||
title: "Clearance complete",
|
title: "Clearance documents",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Non-customs (Path A): straight to the booking form — cargo + shipment
|
// Non-customs (Path A): straight to the booking form — cargo + shipment
|
||||||
|
|||||||
Reference in New Issue
Block a user