Merge pull request #1374 from Tria-plc/freight_feature/usermanagement

feat(clearance): preview charge documents before and after upload
This commit is contained in:
marshal
2026-08-21 10:11:23 +03:00
committed by GitHub

View File

@@ -13,7 +13,7 @@ import {
Text,
} from "@mantine/core";
import {
Check,
// Check,
CheckCircle2,
Download,
Eye,
@@ -41,28 +41,28 @@ import { downloadStoredFile } from "@/services/files.service";
import { CardTitle, SectionCard } from "./layout";
// Customer-facing labels for an invoice status (Freight.InvoiceStatus).
const INVOICE_STATUS_LABELS: Record<string, string> = {
DRAFT: "Draft",
ISSUED: "Issued",
PENDING: "Due",
PAYMENT_PROCESSING: "Payment processing",
PARTIALLY_PAID: "Partially paid",
PAID: "Paid",
OVERDUE: "Overdue",
CANCELLED: "Cancelled",
REFUNDED: "Refunded",
EXPIRED: "Expired",
};
// const INVOICE_STATUS_LABELS: Record<string, string> = {
// DRAFT: "Draft",
// ISSUED: "Issued",
// PENDING: "Due",
// PAYMENT_PROCESSING: "Payment processing",
// PARTIALLY_PAID: "Partially paid",
// PAID: "Paid",
// OVERDUE: "Overdue",
// CANCELLED: "Cancelled",
// REFUNDED: "Refunded",
// EXPIRED: "Expired",
// };
function invoiceStatusLabel(status: string): string {
return (
INVOICE_STATUS_LABELS[status] ??
status
.replace(/_/g, " ")
.toLowerCase()
.replace(/\b\w/g, (m) => m.toUpperCase())
);
}
// function invoiceStatusLabel(status: string): string {
// return (
// INVOICE_STATUS_LABELS[status] ??
// status
// .replace(/_/g, " ")
// .toLowerCase()
// .replace(/\b\w/g, (m) => m.toUpperCase())
// );
// }
/**
* Customs payments on a phased (customs) booking — duty / tax, the post-arrival