summaryrefslogtreecommitdiff
path: root/config/dashboard-table.ts
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-07-02 00:45:49 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-07-02 00:45:49 +0000
commit2acf5f8966a40c1c9a97680c8dc263ee3f1ad3d1 (patch)
treef406b5c86f563347c7fd088a85fd1a82284dc5ff /config/dashboard-table.ts
parent6a9ca20deddcdcbe8495cf5a73ec7ea5f53f9b55 (diff)
(대표님/최겸) 20250702 변경사항 업데이트
Diffstat (limited to 'config/dashboard-table.ts')
-rw-r--r--config/dashboard-table.ts96
1 files changed, 96 insertions, 0 deletions
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