diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/poColumnsConfig.ts | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/config/poColumnsConfig.ts b/config/poColumnsConfig.ts index 606c6ab4..03091171 100644 --- a/config/poColumnsConfig.ts +++ b/config/poColumnsConfig.ts @@ -1,11 +1,15 @@ import { Contract } from "@/db/schema/contract" + +type VirtualColumns = 'esignStatus' +// Create a union type combining real and virtual columns export interface PoColumnConfig { - id: keyof Contract + id: keyof Contract | VirtualColumns label: string group?: string excelHeader?: string type?: string + customType?: string // Add this to the base interface } export const poColumnsConfig: PoColumnConfig[] = [ @@ -13,49 +17,49 @@ export const poColumnsConfig: PoColumnConfig[] = [ id: "id", label: "ID", excelHeader: "ID", - group: "Key Info", + // group: "Key Info", type: "number", }, { id: "projectId", label: "Project ID", excelHeader: "Project ID", - group: "Key Info", + // group: "Key Info", type: "number", }, { id: "vendorId", label: "Vendor ID", excelHeader: "Vendor ID", - group: "Key Info", + // group: "Key Info", type: "number", }, { id: "contractNo", label: "Form Code", excelHeader: "Form Code", - group: "Basic Info", + // group: "Basic Info", type: "text", }, { id: "contractName", label: "Contract Name", excelHeader: "Contract Name", - group: "Basic Info", + // group: "Basic Info", type: "text", }, { id: "status", label: "Status", excelHeader: "Status", - group: "Basic Info", + // group: "Basic Info", type: "text", }, { id: "esignStatus", // db에 없는 가상 컬럼 label: "E-Sign Status", excelHeader: "E-Sign Status", - group: "Basic Info", + // group: "Basic Info", type: "custom", // 커스텀 렌더링이 필요함을 나타냄 customType: "esignStatus", // 구분이 필요한 경우 추가 필드 }, @@ -63,126 +67,126 @@ export const poColumnsConfig: PoColumnConfig[] = [ id: "startDate", label: "Start Date", excelHeader: "Start Date", - group: "Dates", + // group: "Dates", type: "date", }, { id: "endDate", label: "End Date", excelHeader: "End Date", - group: "Dates", + // group: "Dates", type: "date", }, { id: "paymentTerms", label: "Payment Terms", excelHeader: "Payment Terms", - group: "PO Info", + // group: "PO Info", type: "text", }, { id: "deliveryTerms", label: "Delivery Terms", excelHeader: "Delivery Terms", - group: "PO Info", + // group: "PO Info", type: "text", }, { id: "deliveryDate", label: "Delivery Date", excelHeader: "Delivery Date", - group: "PO Info", + // group: "PO Info", type: "date", }, { id: "deliveryLocation", label: "Delivery Location", excelHeader: "Delivery Location", - group: "PO Info", + // group: "PO Info", type: "text", }, { id: "currency", label: "Currency", excelHeader: "Currency", - group: "Money", + // group: "Money", type: "text", }, { id: "totalAmount", label: "Total Amount", excelHeader: "Total Amount", - group: "Money", + // group: "Money", type: "number", }, { id: "discount", label: "Discount", excelHeader: "Discount", - group: "Money", + // group: "Money", type: "number", }, { id: "tax", label: "Tax", excelHeader: "Tax", - group: "Money", + // group: "Money", type: "number", }, { id: "shippingFee", label: "Shipping Fee", excelHeader: "Shipping Fee", - group: "Money", + // group: "Money", type: "number", }, { id: "netTotal", label: "Net Total", excelHeader: "Net Total", - group: "Money", + // group: "Money", type: "number", }, { id: "partialShippingAllowed", label: "Partial Shipping", excelHeader: "Partial Shipping", - group: "Options", + // group: "Options", type: "boolean", }, { id: "partialPaymentAllowed", label: "Partial Payment", excelHeader: "Partial Payment", - group: "Options", + // group: "Options", type: "boolean", }, { id: "remarks", label: "Remarks", excelHeader: "Remarks", - group: "Notes", + // group: "Notes", type: "text", }, { id: "version", label: "Version", excelHeader: "Version", - group: "Versioning", + // group: "Versioning", type: "number", }, { id: "createdAt", label: "Created At", excelHeader: "Created At", - group: "System Info", + // group: "System Info", type: "date", }, { id: "updatedAt", label: "Updated At", excelHeader: "Updated At", - group: "System Info", + // group: "System Info", type: "date", }, ]
\ No newline at end of file |
