From 2acf5f8966a40c1c9a97680c8dc263ee3f1ad3d1 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 2 Jul 2025 00:45:49 +0000 Subject: (대표님/최겸) 20250702 변경사항 업데이트 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/dashboard-table.ts | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 config/dashboard-table.ts (limited to 'config/dashboard-table.ts') diff --git a/config/dashboard-table.ts b/config/dashboard-table.ts new file mode 100644 index 00000000..ae74645c --- /dev/null +++ b/config/dashboard-table.ts @@ -0,0 +1,96 @@ +import { TableConfig } from "@/types/dashboard"; + +export const DASHBOARD_TABLES: TableConfig[] = [ + { + tableName: 'b_rfqs', + displayName: '검토용 견적', + domain: 'procurement', + statusField: 'status', + statusMapping: { + 'DRAFT': 'pending', + 'Doc. Received': 'in_progress', + 'PIC Assigned': 'in_progress', + 'Doc. Confirmed': 'in_progress', + 'Init. RFQ Sent': 'in_progress', + 'Init. RFQ Answered': 'in_progress', + 'TBE started': 'in_progress', + 'TBE finished': 'in_progress', + 'Final RFQ Sent': 'in_progress', + 'Quotation Received': 'in_progress', + 'Vendor Selected': 'completed' + }, + userFields: { + creator: 'created_by', + updater: 'updated_by', + // assignee: 'sent_by' + } + }, + { + tableName: 'procurement_rfqs', + displayName: '발주용 견적', + domain: 'procurement', + statusField: 'status', + statusMapping: { + 'RFQ Created': 'pending', + 'RFQ Vendor Assignned': 'in_progress', + 'RFQ Sent': 'in_progress', + 'Quotation Analysis': 'in_progress', + 'PO Transfer': 'completed', + 'PO Create': 'completed' + }, + userFields: { + creator: 'sent_by', + updater: 'updated_by', + // assignee: 'sent_by' + } + }, + { + tableName: 'evaluation_targets', + displayName: '협력업체 평가대상 관리', + domain: 'procurement', + statusField: 'status', + statusMapping: { + 'PENDING': 'pending', + 'EXCLUDED': 'completed', + 'CONFIRMED': 'completed' + }, + userFields: { + creator: 'confirmed_by', + // updater: 'updated_by', + // assignee: 'confirmed_by' + } + }, + + { + tableName: 'tech_sales_rfqs', + displayName: '기술영업 RFQ', + domain: 'sales', + statusField: 'status', + statusMapping: { + 'RFQ Created': 'pending', + 'RFQ Vendor Assignned': 'in_progress', + 'RFQ Sent': 'in_progress', + 'Quotation Analysist': 'in_progress', + 'Closed': 'completed' + }, + userFields: { + creator: 'created_by', + updater: 'updated_by', + // assignee: 'confirmed_by' + } + }, + + + ]; + + + export const getTablesByDomain = (domain: string): TableConfig[] => { + if (domain === 'evcp') { + return DASHBOARD_TABLES; // 모든 테이블 반환 + } + return DASHBOARD_TABLES.filter(table => table.domain === domain); + }; + + export const getAllDomains = (): string[] => { + return [...new Set(DASHBOARD_TABLES.map(table => table.domain))]; + }; \ No newline at end of file -- cgit v1.2.3