mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-06 03:02:03 +00:00
# Conflicts: # e2e/__screenshots__/work-orders/work-orders.visual.spec.ts/wo-detail.png # src/app/(protected)/workorders/_components/list/table/cells/uplift-cell.tsx # src/app/(protected)/workorders/_components/list/table/wo-table-row-service-cells.tsx # src/app/(protected)/workorders/_components/uplifts/work-order-uplift-list-item.tsx # src/app/(protected)/workorders/_components/uplifts/work-order-uplifts-dialog-content.tsx # src/app/(protected)/workorders/_components/uplifts/work-order-uplifts-dialog.tsx # src/components/common/address-autocomplete-field.tsx # src/domain/work-orders/utils/uplift-display-utils.ts # src/test/app/(protected)/workorders/work-order-uplifts-affordances.test.tsx
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
export const UPLIFT_APPROVAL_TABS = ["pending", "approved", "rejected"] as const;
|
|
export type UpliftApprovalTab = (typeof UPLIFT_APPROVAL_TABS)[number];
|
|
|
|
export function isUpliftApprovalTab(value: string): value is UpliftApprovalTab {
|
|
return (UPLIFT_APPROVAL_TABS as readonly string[]).includes(value);
|
|
}
|
|
|
|
const PENDING_HEADER_CELLS = [
|
|
"Work Order",
|
|
"Service / Vendor",
|
|
"Amount",
|
|
"Approved on WO",
|
|
"Notes",
|
|
"Attachments",
|
|
"Requested By",
|
|
"Waiting",
|
|
"Actions",
|
|
] as const;
|
|
|
|
const APPROVED_HEADER_CELLS = [
|
|
"Work Order",
|
|
"Service / Vendor",
|
|
"Amount",
|
|
"Approved on WO",
|
|
"Notes",
|
|
"Attachments",
|
|
"Requested By",
|
|
"Approved By",
|
|
"Approved At",
|
|
"Actions",
|
|
] as const;
|
|
|
|
const REJECTED_HEADER_CELLS = [
|
|
"Work Order",
|
|
"Service / Vendor",
|
|
"Amount",
|
|
"Approved on WO",
|
|
"Notes",
|
|
"Attachments",
|
|
"Requested By",
|
|
"Rejected By",
|
|
"Rejected At",
|
|
"Rejection Reason",
|
|
] as const;
|
|
|
|
export const UPLIFT_APPROVAL_HEADER_CELLS: Record<UpliftApprovalTab, readonly string[]> = {
|
|
pending: PENDING_HEADER_CELLS,
|
|
approved: APPROVED_HEADER_CELLS,
|
|
rejected: REJECTED_HEADER_CELLS,
|
|
};
|