shoc-frontend-new/src/app/(protected)/uplifts/_components/uplift-approval-tabs.ts
Arthur Bassi 94aa7a1d66 Merge remote-tracking branch 'origin/main' into feat/SH-388-uplift-slide-over
# 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
2026-09-28 14:08:51 -03:00

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,
};