View manual (offline) payment channel settings

Confirm offline (bank transfer) invoice payment
This commit is contained in:
Marshal
2026-08-20 06:57:57 +00:00
parent c38fcff00d
commit 4b07ff328d
10 changed files with 196 additions and 56 deletions

View File

@@ -209,6 +209,17 @@ 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}

View File

@@ -116,8 +116,14 @@ export function useClearanceFlow(booking: Freight.IBooking) {
// just sees that clearance is done and GL is preparing the booking.
const awaitingGlCompletion =
isReady && isBareInstance && Boolean(clearance?.includesCustoms);
// Documents stay open until the shipment is paid: a customs shipment keeps
// collecting paperwork (amended invoices, revised packing lists) well past
// clearance finalization. `documentsOpen` is the server's own predicate, so
// the upload control appears exactly when the API would accept a file.
// Older API builds omit the field — fall back to the previous rule there.
const canUpload =
status === "AWAITING_DOCUMENTS" || status === "DOCUMENTS_UNDER_REVIEW";
clearance?.documentsOpen ??
(status === "AWAITING_DOCUMENTS" || status === "DOCUMENTS_UNDER_REVIEW");
// The very first upload (nothing in review yet). Here every required document
// must be provided. Once GL has started reviewing (DOCUMENTS_UNDER_REVIEW) the
// customer is only re-uploading queried/pending docs, so we don't re-gate on