mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Merge pull request #1374 from Tria-plc/freight_feature/usermanagement
feat(clearance): preview charge documents before and after upload
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user