diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 00:37:41 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 00:37:41 +0000 |
| commit | e0dfb55c5457aec489fc084c4567e791b4c65eb1 (patch) | |
| tree | 68543a65d88f5afb3a0202925804103daa91bc6f /config | |
3/25 까지의 대표님 작업사항
Diffstat (limited to 'config')
| -rw-r--r-- | config/data-table.ts | 94 | ||||
| -rw-r--r-- | config/equipClassColumnsConfig.ts | 44 | ||||
| -rw-r--r-- | config/euserColumnsConfig.ts | 58 | ||||
| -rw-r--r-- | config/faqDataConfig.ts | 304 | ||||
| -rw-r--r-- | config/formListsColumnsConfig.ts | 49 | ||||
| -rw-r--r-- | config/itemsColumnsConfig.ts | 42 | ||||
| -rw-r--r-- | config/language.ts | 13 | ||||
| -rw-r--r-- | config/menuConfig.ts | 274 | ||||
| -rw-r--r-- | config/permissionsConfig.ts | 10 | ||||
| -rw-r--r-- | config/poColumnsConfig.ts | 180 | ||||
| -rw-r--r-- | config/rfqHistoryColumnsConfig.ts | 73 | ||||
| -rw-r--r-- | config/rfqsColumnsConfig.ts | 64 | ||||
| -rw-r--r-- | config/rfqsVendorColumnsConfig.ts | 45 | ||||
| -rw-r--r-- | config/roleColumnsConfig.ts | 62 | ||||
| -rw-r--r-- | config/site.ts | 15 | ||||
| -rw-r--r-- | config/tagNumberingColumnsConfig.ts | 68 | ||||
| -rw-r--r-- | config/tasksColumnsConfig.ts | 52 | ||||
| -rw-r--r-- | config/userColumnsConfig.ts | 58 | ||||
| -rw-r--r-- | config/vendorCbeColumnsConfig.ts | 156 | ||||
| -rw-r--r-- | config/vendorColumnsConfig.ts | 70 | ||||
| -rw-r--r-- | config/vendorContactsColumnsConfig.ts | 70 | ||||
| -rw-r--r-- | config/vendorItemsColumnsConfig.ts | 59 | ||||
| -rw-r--r-- | config/vendorRfbColumnsConfig.ts | 95 | ||||
| -rw-r--r-- | config/vendorTbeColumnsConfig.ts | 241 |
24 files changed, 2196 insertions, 0 deletions
diff --git a/config/data-table.ts b/config/data-table.ts new file mode 100644 index 00000000..62c3c248 --- /dev/null +++ b/config/data-table.ts @@ -0,0 +1,94 @@ +import { Pickaxe, SquareSquare } from "lucide-react" + +export type DataTableConfig = typeof dataTableConfig + +export const dataTableConfig = { + featureFlags: [ + { + label: "Advanced table", + value: "advancedTable" as const, + icon: Pickaxe, + tooltipTitle: "Toggle advanced table", + tooltipDescription: "A filter and sort builder to filter and sort rows.", + }, + { + label: "Floating bar", + value: "floatingBar" as const, + icon: SquareSquare, + tooltipTitle: "Toggle floating bar", + tooltipDescription: "A floating bar that sticks to the top of the table.", + }, + ], + textOperators: [ + { label: "Contains", value: "iLike" as const }, + { label: "Does not contain", value: "notILike" as const }, + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + numericOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is less than", value: "lt" as const }, + { label: "Is less than or equal to", value: "lte" as const }, + { label: "Is greater than", value: "gt" as const }, + { label: "Is greater than or equal to", value: "gte" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + dateOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is before", value: "lt" as const }, + { label: "Is after", value: "gt" as const }, + { label: "Is on or before", value: "lte" as const }, + { label: "Is on or after", value: "gte" as const }, + { label: "Is between", value: "isBetween" as const }, + { label: "Is relative to today", value: "isRelativeToToday" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + selectOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + booleanOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + ], + joinOperators: [ + { label: "And", value: "and" as const }, + { label: "Or", value: "or" as const }, + ], + sortOrders: [ + { label: "Asc", value: "asc" as const }, + { label: "Desc", value: "desc" as const }, + ], + columnTypes: [ + "text", + "number", + "date", + "boolean", + "select", + "multi-select", + ] as const, + globalOperators: [ + "iLike", + "notILike", + "eq", + "ne", + "isEmpty", + "isNotEmpty", + "lt", + "lte", + "gt", + "gte", + "isBetween", + "isRelativeToToday", + "and", + "or", + ] as const, +} diff --git a/config/equipClassColumnsConfig.ts b/config/equipClassColumnsConfig.ts new file mode 100644 index 00000000..76b85744 --- /dev/null +++ b/config/equipClassColumnsConfig.ts @@ -0,0 +1,44 @@ +import { TagClasses } from "@/db/schema/vendorData" + +export interface EquipClassColumnConfig { + id: keyof TagClasses + label: string + group?: string + excelHeader?: string + type?: string +} + +export const equipclassColumnsConfig: EquipClassColumnConfig[] = [ + { + id: "code", + label: "Code", + excelHeader: "Code", + // group: "Basic Info", + }, + { + id: "label", + label: "Label", + excelHeader: "Label", + // group: "Basic Info", + }, + { + id: "tagTypeCode", + label: "Tag Type Code", + excelHeader: "Tag Type Code", + // group: "Basic Info", + }, + + + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata",a + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + // group: "Metadata", + }, +]
\ No newline at end of file diff --git a/config/euserColumnsConfig.ts b/config/euserColumnsConfig.ts new file mode 100644 index 00000000..4f2da5b8 --- /dev/null +++ b/config/euserColumnsConfig.ts @@ -0,0 +1,58 @@ +import { UserView } from "@/db/schema/users"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface UserColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof UserView; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const euserColumnsConfig: UserColumnConfig[] = [ + { + id: "user_name", + label: "User Name", + excelHeader: "User Name", + }, + { + id: "user_email", + label: "Email", + excelHeader: "Email", + }, + { + id: "company_name", + label: "Company Name", + excelHeader: "Company Name", + }, + { + id: "roles", + label: "Roles", + excelHeader: "Roles", + // type: "string[]", // 필요하면 추가 + }, + // 필요 시 createdAt도 조인해서 가져왔다면 아래처럼 추가 + { + id: "created_at", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata", + }, +];
\ No newline at end of file diff --git a/config/faqDataConfig.ts b/config/faqDataConfig.ts new file mode 100644 index 00000000..0dbe8398 --- /dev/null +++ b/config/faqDataConfig.ts @@ -0,0 +1,304 @@ +import { FaqCategory } from "@/components/faq/FaqCard"; + +interface LocalizedFaqCategories { + [lng: string]: FaqCategory[]; +} + +export const faqCategories: LocalizedFaqCategories = { + "ko": [ + { + "label": "일반", + "items": [ + { + "title": "EVCP 시스템이란 무엇인가요?", + "content": [ + "EVCP(Electric Vendor Control Platform)는 전자 조달 및 벤더 관리를 위한 B2B 플랫폼입니다.", + "조달/구매 프로세스 관리, 벤더 관리, 벤더 평가, RFQ 관리 등 구매 업무에 필요한 전반적인 기능을 제공합니다." + ] + }, + { + "title": "시스템 접속 문제가 있을 때는 어떻게 해야 하나요?", + "content": [ + "1. 브라우저 캐시 삭제 후 재시도", + "2. 다른 브라우저로 접속 시도", + "3. 시스템 관리자에게 문의 (admin@evcp.com)" + ] + } + ] + }, + { + "label": "조달/구매", + "items": [ + { + "title": "조달 요청은 어떻게 진행하나요?", + "content": [ + "1. 조달 요청서 작성 (품목, 수량, 납기일 등)", + "2. 구매 담당자 검토 및 승인", + "3. RFQ 프로세스 시작", + "4. 견적 평가 및 벤더 선정", + "5. 발주 및 계약 체결" + ] + }, + { + "title": "구매 프로세스의 주요 단계는 무엇인가요?", + "content": [ + "1. 구매 계획 수립", + "2. 조달 요청 접수 및 검토", + "3. 벤더 선정 및 RFQ 진행", + "4. 가격/납기 협상", + "5. 계약 체결 및 발주", + "6. 납품 관리 및 검수" + ] + } + ] + }, + { + "label": "벤더 관리", + "items": [ + { + "title": "새로운 벤더를 등록하려면 어떻게 해야 하나요?", + "content": [ + "1. 벤더 메뉴에서 '신규 벤더 등록' 버튼 클릭", + "2. 필수 정보 입력 (사업자등록번호, 회사명, 연락처 등)", + "3. 담당자 정보 등록", + "4. 공급 가능 품목 및 주요 실적 등록", + "5. 필요 서류 첨부 (사업자등록증, 공장등록증 등)" + ] + }, + { + "title": "벤더 관리에서 중요한 점은 무엇인가요?", + "content": [ + "1. 벤더 기본 정보의 정확성 유지", + "2. 공급 품목별 단가 관리", + "3. 계약 현황 및 이력 관리", + "4. 납품 실적 및 품질 이력 관리", + "5. 정기적인 벤더 평가 결과 반영" + ] + } + ] + }, + { + "label": "벤더 평가", + "items": [ + { + "title": "벤더 평가는 어떤 기준으로 진행되나요?", + "content": [ + "1. 품질 (불량률, 품질 관리 체계)", + "2. 납기 준수율", + "3. 가격 경쟁력", + "4. 기술력 및 생산능력", + "5. 협력도 및 대응성", + "6. 재무 건전성" + ] + }, + { + "title": "벤더 평가 결과는 어떻게 활용되나요?", + "content": [ + "1. 벤더 등급 조정 (A, B, C 등급)", + "2. 우선 협상 대상 선정", + "3. 개선 필요 항목 피드백", + "4. 계약 갱신 시 반영", + "5. 전략적 파트너십 구축 기준" + ] + } + ] + }, + { + "label": "시스템", + "items": [ + { + "title": "사용자 권한은 어떻게 설정하나요?", + "content": [ + "1. 시스템 설정 > 역할 관리에서 역할 생성", + "2. 해당 역할에 적절한 권한 할당", + "3. 사용자 관리에서 사용자에게 역할 할당" + ] + }, + { + "title": "시스템 사용 권한은 어떻게 구분되나요?", + "content": [ + "1. 구매 담당자: 조달/구매 프로세스 전반 관리", + "2. 벤더 관리자: 벤더 정보 및 평가 관리", + "3. 승인권자: 주요 의사결정 승인", + "4. 일반 사용자: 조달 요청 및 현황 조회", + "5. 시스템 관리자: 전체 시스템 관리" + ] + } + ] + } + ], + "en": [ + { + "label": "General", + "items": [ + { + "title": "What is eVCP System?", + "content": [ + "EVCP (Enterpise Vendor Co-work Platform) is a B2B platform for procurement and vendor management.", + "It provides comprehensive features needed for purchasing operations, including procurement process management, vendor management, vendor evaluation, and RFQ management." + ] + }, + { + "title": "What should I do if I have system access issues?", + "content": [ + "1. Clear browser cache and try again", + "2. Try accessing with a different browser", + "3. Contact system administrator (admin@evcp.com)" + ] + } + ] + }, + { + "label": "Procurement", + "items": [ + { + "title": "How do I proceed with a procurement request?", + "content": [ + "1. Create procurement request (items, quantity, delivery date, etc.)", + "2. Review and approval by purchasing manager", + "3. Start RFQ process", + "4. Quote evaluation and vendor selection", + "5. Place order and contract signing" + ] + }, + { + "title": "What are the main stages of the procurement process?", + "content": [ + "1. Procurement planning", + "2. Receipt and review of procurement request", + "3. Vendor selection and RFQ execution", + "4. Price/delivery negotiation", + "5. Order placement and contract signing", + "6. Delivery management and inspection" + ] + } + ] + }, + { + "label": "PO", + "items": [] + } + ], + "ja": [ + { + "label": "一般", + "items": [ + { + "title": "EVCPシステムとは何ですか?", + "content": [ + "EVCP(Electric Vendor Control Platform)は、電子調達およびベンダー管理のためのB2Bプラットフォームです。", + "調達/購買プロセス管理、ベンダー管理、ベンダー評価、RFQ管理など、購買業務に必要な総合的な機能を提供します。" + ] + }, + { + "title": "システムアクセスに問題がある場合はどうすればよいですか?", + "content": [ + "1. ブラウザのキャッシュを削除して再試行", + "2. 別のブラウザでアクセスを試行", + "3. システム管理者に問い合わせ(admin@evcp.com)" + ] + } + ] + }, + { + "label": "調達/購買", + "items": [ + { + "title": "調達要請はどのように進めればよいですか?", + "content": [ + "1. 調達要請書の作成(品目、数量、納期など)", + "2. 購買担当者の検討および承認", + "3. RFQプロセスの開始", + "4. 見積評価およびベンダー選定", + "5. 発注および契約締結" + ] + }, + { + "title": "購買プロセスの主要段階は何ですか?", + "content": [ + "1. 購買計画の策定", + "2. 調達要請の受付および検討", + "3. ベンダー選定およびRFG実施", + "4. 価格/納期交渉", + "5. 契約締結および発注", + "6. 納品管理および検収" + ] + } + ] + }, + { + "label": "ベンダー管理", + "items": [ + { + "title": "新規ベンダーの登録方法を教えてください。", + "content": [ + "1. ベンダーメニューで「新規ベンダー登録」ボタンをクリック", + "2. 必須情報の入力(事業者登録番号、会社名、連絡先など)", + "3. 担当者情報の登録", + "4. 供給可能品目および主要実績の登録", + "5. 必要書類の添付(事業者登録証、工場登録証など)" + ] + }, + { + "title": "ベンダー管理で重要なポイントは何ですか?", + "content": [ + "1. ベンダー基本情報の正確性維持", + "2. 供給品目別単価管理", + "3. 契約状況および履歴管理", + "4. 納品実績および品質履歴管理", + "5. 定期的なベンダー評価結果の反映" + ] + } + ] + }, + { + "label": "ベンダー評価", + "items": [ + { + "title": "ベンダー評価はどのような基準で行われますか?", + "content": [ + "1. 品質(不良率、品質管理体制)", + "2. 納期遵守率", + "3. 価格競争力", + "4. 技術力および生産能力", + "5. 協力度および対応性", + "6. 財務健全性" + ] + }, + { + "title": "ベンダー評価結果はどのように活用されますか?", + "content": [ + "1. ベンダー等級の調整(A、B、C等級)", + "2. 優先交渉対象の選定", + "3. 改善必要項目のフィードバック", + "4. 契約更新時の反映", + "5. 戦略的パートナーシップ構築基準" + ] + } + ] + }, + { + "label": "システム", + "items": [ + { + "title": "ユーザー権限はどのように設定しますか?", + "content": [ + "1. システム設定 > 役割管理で役割を作成", + "2. 該当役割に適切な権限を割り当て", + "3. ユーザー管理でユーザーに役割を割り当て" + ] + }, + { + "title": "システム使用権限はどのように区分されますか?", + "content": [ + "1. 購買担当者:調達/購買プロセス全般の管理", + "2. ベンダー管理者:ベンダー情報および評価管理", + "3. 承認権者:主要意思決定の承認", + "4. 一般ユーザー:調達要請および現況照会", + "5. システム管理者:全体システム管理" + ] + } + ] + } + ] +};
\ No newline at end of file diff --git a/config/formListsColumnsConfig.ts b/config/formListsColumnsConfig.ts new file mode 100644 index 00000000..1db4e650 --- /dev/null +++ b/config/formListsColumnsConfig.ts @@ -0,0 +1,49 @@ +import { TagTypeClassFormMappings } from "@/db/schema/vendorData" + +export interface FormListsColumnConfig { + id: keyof TagTypeClassFormMappings + label: string + group?: string + excelHeader?: string + type?: string +} + +export const formListsColumnsConfig: FormListsColumnConfig[] = [ + { + id: "formCode", + label: "Form Code", + excelHeader: "Form Code", + // group: "Basic Info", + }, + { + id: "formName", + label: "Form Name", + excelHeader: "Form Name", + // group: "Basic Info", + }, + { + id: "tagTypeLabel", + label: "Tag Type", + excelHeader: "Tag Type", + // group: "Basic Info", + }, + { + id: "classLabel", + label: "Class", + excelHeader: "Class", + // group: "Basic Info", + }, + + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata",a + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + // group: "Metadata", + }, +]
\ No newline at end of file diff --git a/config/itemsColumnsConfig.ts b/config/itemsColumnsConfig.ts new file mode 100644 index 00000000..f2b9a61b --- /dev/null +++ b/config/itemsColumnsConfig.ts @@ -0,0 +1,42 @@ +import { Item } from "@/db/schema/items" + +export interface ItemColumnConfig { + id: keyof Item + label: string + group?: string + excelHeader?: string + type?: string +} + +export const itemsColumnsConfig: ItemColumnConfig[] = [ + { + id: "itemCode", + label: "Item Code", + excelHeader: "Item Code", + // group: "Basic Info", + }, + { + id: "itemName", + label: "Item Name", + excelHeader: "Item Name", + // group: "Basic Info", + }, + { + id: "description", + label: "Description", + excelHeader: "Description", + // group: "Basic Info", + }, + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata",a + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + // group: "Metadata", + }, +]
\ No newline at end of file diff --git a/config/language.ts b/config/language.ts new file mode 100644 index 00000000..c4095801 --- /dev/null +++ b/config/language.ts @@ -0,0 +1,13 @@ +export const languages = [ + { value: "ko", labelKey: "languages.korean" }, + { value: "en", labelKey: "languages.english" }, + { value: "ja", labelKey: "languages.japanese" }, + ] + + + export const LOCALE_MAP: Record<string, string> = { + en: "en-US", + ko: "ko-KR", + ja: "ja-JP", + // 필요하면 더 추가... + }
\ No newline at end of file diff --git a/config/menuConfig.ts b/config/menuConfig.ts new file mode 100644 index 00000000..1ab2305e --- /dev/null +++ b/config/menuConfig.ts @@ -0,0 +1,274 @@ +export interface MenuItem { + title: string; + href: string; + description?: string; + label?: string; + disabled?: boolean; +} + +export interface MenuSection { + title: string; + items: MenuItem[]; +} + +export const mainNav: MenuSection[] = [ + + { + title: "기준 정보 관리", + items: [ + { + title: "아이템 리스트", + href: "/evcp/items", + description: "견적, 입찰, 계약에서 사용되는 아이템 리스트", + }, + { + title: "견적번호 관리", + href: "/evcp/estimatenumber", + description: "견적(RFQ) 생성 시 부여하는 일련번호 체계를 관리", + }, + { + title: "PQ(Pre-Qualification) 정보", + href: "/evcp/pq-criteria", + description: "PQ 항목 등을 관리", + }, + { + title: "Object Class", + href: "/evcp/equip-class", + description: "Equipment Class 리스트", + }, + { + title: "Tag Numbering", + href: "/evcp/tag-numbering", + description: "Tag Numbering을 위한 기준 정보", + }, + { + title: "Form 리스트", + href: "/evcp/form-list", + description: "벤더 데이터 입력을 위한 Form 리스트 확인", + }, + + + + ], + }, + { + title: "벤더 관리", + items: [ + { + title: "벤더 리스트", + href: "/evcp/vendors", + description: "업체에 대한 요약 정보를 출력", + }, + { + title: "벤더 실사", + href: "/evcp/vendor-investigation", + description: "실사가 필요한 벤더에 대한 일정 및 실사 내용 관리", + }, + { + title: "벤더 평가 기준 설정", + href: "/evcp/evaluationmetrics", + description: "품질, 납기, 가격 경쟁력, AS 대응력 설정", + }, + { + title: "벤더 정기 평가", + href: "/evcp/evaluation", + description: "벤더 평가를 실행", + }, + { + title: "벤더 Prequalification", + href: "/evcp/pq", + description: "벤더의 제출 PQ를 확인하고 통과 여부를 결정", + }, + { + title: "벤더 계약 정보", + href: "/evcp/vendorcontract", + description: "업체별 계약 정보를 출력", + }, + ], + }, + + { + title: "기술 영업", + items: [ + { + title: "Budgetary Quote", + href: "/evcp/budgetary", + description: "RFQ 작성을 할 수 있고 현황을 파악", + }, + { + title: "기술(품질) 평가 (TBE) - Budgetary Quote", + href: "/evcp/bqtbe", + description: "사양 충족 여부, 품질 요건 확인", + }, + { + title: "상업(가격) 평가 (CBE) - Budgetary Quote", + href: "/evcp/bqcbe", + description: "가격(네고), 납기, 계약조건(Incoterms 등) 종합 검토/CBE Report 작성", + }, + + ] + }, + { + title: "구매 관리", + items: [ + + { + title: "RFQ", + href: "/evcp/rfq", + description: "생성된 견적을 발행하고 관리", + }, + { + title: "입찰 관리", + href: "/evcp/bid", + description: "생성된 입찰을 발행하고 관리", + }, + { + title: "기술(품질) 평가 (TBE)", + href: "/evcp/tbe", + description: "S-EDP로부터 생성된 TBE와 업체의 응답에 대한 이력 관리", + }, + { + title: "상업(가격) 평가 (CBE)", + href: "/evcp/cbe", + description: "가격(네고), 납기, 계약조건(Incoterms 등) 종합 검토/CBE Report 작성", + }, + { + title: "PO 발행", + href: "/evcp/po", + description: "PO(구매 발주서) 확인/서명 요청/계약 내역 저장", + }, + { + title: "변경 PO 발행", + href: "/evcp/poa", + description: "변경 PO(구매 발주서) 생성/서명 요청/계약 내역 저장", + }, + + ], + }, + + { + title: "KPI 및 Report", + items: [ + { + title: "KPI", + href: "/evcp/kpi", + description: + "벤더별 성과지표, 기술 데이터 입력 정확도 등 KPI 설정 및 모니터링", + }, + { + title: "Report & Dashboard", + href: "/evcp/report", + description: + "프로젝트별, 벤더별 구매/품질/설계 데이터 성과 보고서, 대시보드", + }, + { + title: "기술 스펙 품질 분석", + href: "/evcp/analysis", + description: + "누락 빈도, 수정 횟수, 기준정보와의 일치도, 재작업 발생률 등 기술 데이터 품질 지표 추적", + }, + ], + }, +]; + +export const additionalNav: MenuItem[] = [ + { + title: "Q&A", + href: "/evcp/qna", + }, + { + title: "FAQ", + href: "/evcp/faq", + }, + { + title: "시스템 설정", + href: "/evcp/system", + }, +]; + +export const mainNavVendor: MenuSection[] = [ + + { + title: "구매 관리", + items: [ + { + title: "RFQ", + href: `/partners/rfq`, + description: "견적 요청에 대한 응답 작성", + }, + { + title: "RFB", + href: `/partners/rfb`, + description: "입찰 요청에 대한 응답 작성", + }, + { + title: "TBE", + href: `/partners/tbe`, + description: "TBE 요청에 대한 응답 작성", + }, + { + title: "PO", + href: `/partners/po`, + description: "발주 리스트 확인 및 전자서명", + }, + { + title: "PO Amendment", + href: `/partners/poa`, + description: "발주 리스트 확인 및 전자서명", + }, + ], + }, + { + title: "Engineering", + items: [ + { + title: "데이터 입력", + href: `/partners/vendor-data`, + description: "기준 정보에 입각한 벤더 데이터 입력", + }, + { + title: "데이터 리스트", + href: `/partners/vendor-data-list`, + description: "입력된 벤더 데이터를 도서/문서와 연계하여 리스트하여 출력", + }, + { + title: "문서/도서 리스트", + href: `/partners/document-list`, + description: "벤더의 제출 도서/문서의 리스트를 생성하고 관리", + }, + { + title: "문서/도서 업로드", + href: `/partners/documents`, + description: "벤더의 제출 도서/문서의 업로드 및 뷰어를 통한 열람 제공, 제출 문서를 생성", + }, + ], + }, + +]; + + + +export const additionalNavVendor: MenuItem[] = [ + + { + title: "Transmittal", + href: "/partners/tr", + }, + + { + title: "Dashboard", + href: "/partners/dashboard", + }, + { + title: "Q&A", + href: "/partners/qna", + }, + { + title: "FAQ", + href: "/partners/faq", + }, + { + title: "시스템 설정", + href: "/partners/system", + }, +];
\ No newline at end of file diff --git a/config/permissionsConfig.ts b/config/permissionsConfig.ts new file mode 100644 index 00000000..95c2fbce --- /dev/null +++ b/config/permissionsConfig.ts @@ -0,0 +1,10 @@ +export const permissionLabelMap: Record<string, string> = { + create: "생성 권한", + viewAll: "전체 레코드 보기", + viewOwn: "사용자 레코드 보기", + editAll: "전체 레코드 편집", + editOwn: "사용자 레코드 편집", + deleteAll: "전체 레코드 삭제", + deleteOwn: "사용자 레코드 삭제", + // 필요시 더 추가 + };
\ No newline at end of file diff --git a/config/poColumnsConfig.ts b/config/poColumnsConfig.ts new file mode 100644 index 00000000..6466f3e1 --- /dev/null +++ b/config/poColumnsConfig.ts @@ -0,0 +1,180 @@ +import { Contract } from "@/db/schema/contract" + +export interface PoColumnConfig { + id: keyof Contract + label: string + group?: string + excelHeader?: string + type?: string +} + +export const poColumnsConfig: PoColumnConfig[] = [ + { + id: "id", + label: "ID", + excelHeader: "ID", + group: "Key Info", + type: "number", + }, + { + id: "projectId", + label: "Project ID", + excelHeader: "Project ID", + group: "Key Info", + type: "number", + }, + { + id: "vendorId", + label: "Vendor ID", + excelHeader: "Vendor ID", + group: "Key Info", + type: "number", + }, + { + id: "contractNo", + label: "Form Code", + excelHeader: "Form Code", + group: "Basic Info", + type: "text", + }, + { + id: "contractName", + label: "Contract Name", + excelHeader: "Contract Name", + group: "Basic Info", + type: "text", + }, + { + id: "status", + label: "Status", + excelHeader: "Status", + group: "Basic Info", + type: "text", + }, + { + id: "startDate", + label: "Start Date", + excelHeader: "Start Date", + group: "Dates", + type: "date", + }, + { + id: "endDate", + label: "End Date", + excelHeader: "End Date", + group: "Dates", + type: "date", + }, + { + id: "paymentTerms", + label: "Payment Terms", + excelHeader: "Payment Terms", + group: "PO Info", + type: "text", + }, + { + id: "deliveryTerms", + label: "Delivery Terms", + excelHeader: "Delivery Terms", + group: "PO Info", + type: "text", + }, + { + id: "deliveryDate", + label: "Delivery Date", + excelHeader: "Delivery Date", + group: "PO Info", + type: "date", + }, + { + id: "deliveryLocation", + label: "Delivery Location", + excelHeader: "Delivery Location", + group: "PO Info", + type: "text", + }, + { + id: "currency", + label: "Currency", + excelHeader: "Currency", + group: "Money", + type: "text", + }, + { + id: "totalAmount", + label: "Total Amount", + excelHeader: "Total Amount", + group: "Money", + type: "number", + }, + { + id: "discount", + label: "Discount", + excelHeader: "Discount", + group: "Money", + type: "number", + }, + { + id: "tax", + label: "Tax", + excelHeader: "Tax", + group: "Money", + type: "number", + }, + { + id: "shippingFee", + label: "Shipping Fee", + excelHeader: "Shipping Fee", + group: "Money", + type: "number", + }, + { + id: "netTotal", + label: "Net Total", + excelHeader: "Net Total", + group: "Money", + type: "number", + }, + { + id: "partialShippingAllowed", + label: "Partial Shipping", + excelHeader: "Partial Shipping", + group: "Options", + type: "boolean", + }, + { + id: "partialPaymentAllowed", + label: "Partial Payment", + excelHeader: "Partial Payment", + group: "Options", + type: "boolean", + }, + { + id: "remarks", + label: "Remarks", + excelHeader: "Remarks", + group: "Notes", + type: "text", + }, + { + id: "version", + label: "Version", + excelHeader: "Version", + group: "Versioning", + type: "number", + }, + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + group: "System Info", + type: "date", + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + group: "System Info", + type: "date", + }, +]
\ No newline at end of file diff --git a/config/rfqHistoryColumnsConfig.ts b/config/rfqHistoryColumnsConfig.ts new file mode 100644 index 00000000..67ec7fbd --- /dev/null +++ b/config/rfqHistoryColumnsConfig.ts @@ -0,0 +1,73 @@ +import { RfqHistoryRow } from "@/lib/vendors/rfq-history-table/rfq-history-table"
+
+export interface RfqHistoryColumnConfig {
+ id: keyof RfqHistoryRow
+ label: string
+ group?: string
+ excelHeader?: string
+ type?: string
+ size?: number
+}
+
+export const rfqHistoryColumnsConfig: RfqHistoryColumnConfig[] = [
+ {
+ id: "rfqCode",
+ label: "RFQ Code",
+ excelHeader: "RFQ Code",
+ size: 120,
+ },
+ {
+ id: "projectCode",
+ label: "Project Code",
+ excelHeader: "Project Code",
+ size: 120,
+ },
+ {
+ id: "projectName",
+ label: "Project Name",
+ excelHeader: "Project Name",
+ size: 200,
+ },
+ {
+ id: "description",
+ label: "Description",
+ excelHeader: "Description",
+ size: 300,
+ },
+ {
+ id: "status",
+ label: "Status",
+ excelHeader: "Status",
+ size: 100,
+ },
+ {
+ id: "vendorStatus",
+ label: "Vendor Status",
+ excelHeader: "Vendor Status",
+ size: 120,
+ },
+ {
+ id: "totalAmount",
+ label: "Total Amount",
+ excelHeader: "Total Amount",
+ size: 120,
+ },
+ {
+ id: "leadTime",
+ label: "Lead Time",
+ excelHeader: "Lead Time",
+ size: 100,
+ },
+ {
+ id: "dueDate",
+ label: "Due Date",
+ excelHeader: "Due Date",
+ size: 120,
+ },
+ {
+ id: "createdAt",
+ label: "Created At",
+ excelHeader: "Created At",
+ size: 120,
+ },
+]
\ No newline at end of file diff --git a/config/rfqsColumnsConfig.ts b/config/rfqsColumnsConfig.ts new file mode 100644 index 00000000..3b713e96 --- /dev/null +++ b/config/rfqsColumnsConfig.ts @@ -0,0 +1,64 @@ +import { RfqWithItemCount } from "@/db/schema/rfq" + +export interface RfqColumnConfig { + id: keyof RfqWithItemCount + label: string + group?: string + excelHeader?: string + type?: string +} + +export const rfqsColumnsConfig: RfqColumnConfig[] = [ + // Basic Info + { + id: "projectName", + label: "Project Name", + excelHeader: "Project Name", + // group: "Basic Info", + }, + { + id: "rfqCode", + label: "RFQ Code", + excelHeader: "RFQ Code", + // group: "Basic Info", + }, + { + id: "description", + label: "RFQ description", + excelHeader: "RFQ description", + // group: "Basic Info", + }, + // { + // id: "projectCode", + // label: "Project Code", + // excelHeader: "Project Code", + // // group: "Basic Info", + // }, + + { + id: "status", + label: "Status", + excelHeader: "Status", + // group: "Basic Info", + }, + + { + id: "createdByEmail", + label: "Created By", + excelHeader: "Created By", + // group: "Metadata", + }, + + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata", + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + // group: "Metadata", + }, +]
\ No newline at end of file diff --git a/config/rfqsVendorColumnsConfig.ts b/config/rfqsVendorColumnsConfig.ts new file mode 100644 index 00000000..f31cc1c9 --- /dev/null +++ b/config/rfqsVendorColumnsConfig.ts @@ -0,0 +1,45 @@ +import { RfqWithAll } from "@/db/schema/rfq" + +export interface RfqColumnConfig { + id: keyof RfqWithAll + label: string + group?: string + excelHeader?: string + type?: string +} + +export const rfqsVendorColumnsConfig: RfqColumnConfig[] = [ + // Basic Info + { + id: "projectName", + label: "Project Name", + excelHeader: "Project Name", + // group: "Basic Info", + }, + { + id: "rfqCode", + label: "RFQ Code", + excelHeader: "RFQ Code", + // group: "Basic Info", + }, + { + id: "description", + label: "RFQ description", + excelHeader: "RFQ description", + // group: "Basic Info", + }, + + { + id: "rfqVendorStatus", + label: "RFQ Status", + excelHeader: "RFQ Status", + // group: "Basic Info", + }, + { + id: "dueDate", + label: "Due Date", + excelHeader: "Due Date", + // group: "Basic Info", + }, + +]
\ No newline at end of file diff --git a/config/roleColumnsConfig.ts b/config/roleColumnsConfig.ts new file mode 100644 index 00000000..6da8bf50 --- /dev/null +++ b/config/roleColumnsConfig.ts @@ -0,0 +1,62 @@ +import { RoleView } from "@/db/schema/users"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface ColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof RoleView; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const roleColumnsConfig: ColumnConfig[] = [ + { + id: "name", + label: "Role Name", + excelHeader: "Role Name", + }, + { + id: "description", + label: "Role Description", + excelHeader: "Role Description", + }, + { + id: "user_count", + label: "할당 User 수", + excelHeader: "Role에 할당된 User 수", + }, + + { + id: "created_at", + label: "생성일", + excelHeader: "생성일", + }, + + { + id: "domain", + label: "롤 도메인", + excelHeader: "롤 도메인", + }, + { + id: "company_name", + label: "회사명", + excelHeader: "회사명", + }, +];
\ No newline at end of file diff --git a/config/site.ts b/config/site.ts new file mode 100644 index 00000000..0af228c4 --- /dev/null +++ b/config/site.ts @@ -0,0 +1,15 @@ +export const siteConfig = { + name: "eVCP", + company:"SHI", + url: "https://evcp.shi.com", + // ogImage: "https://evcp.shi.com/og.jpg", + description: + "", + } + + export type SiteConfig = typeof siteConfig + + export const META_THEME_COLORS = { + light: "#ffffff", + dark: "#09090b", + }
\ No newline at end of file diff --git a/config/tagNumberingColumnsConfig.ts b/config/tagNumberingColumnsConfig.ts new file mode 100644 index 00000000..14d3fad1 --- /dev/null +++ b/config/tagNumberingColumnsConfig.ts @@ -0,0 +1,68 @@ +import { ViewTagSubfields } from "@/db/schema/vendorData" + +export interface TagNumberingColumnConfig { + id: keyof ViewTagSubfields + label: string + group?: string + excelHeader?: string + type?: string +} + +export const tagNumberingColumnsConfig: TagNumberingColumnConfig[] = [ + { + id: "tagTypeCode", + label: "Tag Type Code", + excelHeader: "Tag Type Code" + // group: "Basic Info", + }, + { + id: "tagTypeDescription", + label: "Tag Type Description", + excelHeader:"Tag Type Description", + // group: "Basic Info", + }, + { + id: "attributesId", + label: "Attributes Id", + excelHeader:"Attributes Id", + // group: "Basic Info", + }, + { + id: "attributesDescription", + label: "Attributes Description", + excelHeader:"Attributes Description", + // group: "Basic Info", + }, + + { + id: "expression", + label: "expression", + excelHeader:"expression", + // group: "Basic Info", + }, + { + id: "delimiter", + label: "delimiter", + excelHeader:"delimiter", + // group: "Basic Info", + }, + { + id: "sortOrder", + label: "Sort Order", + excelHeader:"Sort Order", + // group: "Basic Info", + }, + + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata",a + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + // group: "Metadata", + }, +]
\ No newline at end of file diff --git a/config/tasksColumnsConfig.ts b/config/tasksColumnsConfig.ts new file mode 100644 index 00000000..a9d1a5c2 --- /dev/null +++ b/config/tasksColumnsConfig.ts @@ -0,0 +1,52 @@ +// src/config/tasksColumnsConfig.ts +import type { Task } from "@/db/schema/tasks" + +export interface TaskColumnConfig { + id: keyof Task + label: string + group?: string + excelHeader?: string + type?: string +} + +export const tasksColumnsConfig: TaskColumnConfig[] = [ + // Basic Info + { + id: "code", + label: "Task", + excelHeader: "Task", + // group: "Basic Info", + }, + { + id: "title", + label: "Title", + excelHeader: "Title", + // group: "Basic Info", + }, + { + id: "status", + label: "Status", + excelHeader: "Status", + // group: "Basic Info", + }, + { + id: "priority", + label: "Priority", + excelHeader: "Priority", + // group: "Basic Info", + }, + + // Metadata + { + id: "archived", + label: "Archived", + excelHeader: "Archived", + group: "Metadata", + }, + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + group: "Metadata", + }, +]
\ No newline at end of file diff --git a/config/userColumnsConfig.ts b/config/userColumnsConfig.ts new file mode 100644 index 00000000..c843d235 --- /dev/null +++ b/config/userColumnsConfig.ts @@ -0,0 +1,58 @@ +import { UserView } from "@/db/schema/users"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface UserColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof UserView; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const userColumnsConfig: UserColumnConfig[] = [ + { + id: "user_name", + label: "User Name", + excelHeader: "User Name", + }, + { + id: "user_email", + label: "Email", + excelHeader: "Email", + }, + { + id: "company_name", + label: "Company", + excelHeader: "Company Name", + }, + { + id: "roles", + label: "Roles", + excelHeader: "Roles", + // type: "string[]", // 필요하면 추가 + }, + // 필요 시 createdAt도 조인해서 가져왔다면 아래처럼 추가 + { + id: "created_at", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata", + }, +];
\ No newline at end of file diff --git a/config/vendorCbeColumnsConfig.ts b/config/vendorCbeColumnsConfig.ts new file mode 100644 index 00000000..2d521125 --- /dev/null +++ b/config/vendorCbeColumnsConfig.ts @@ -0,0 +1,156 @@ +export interface VendorWithCbeFields { + /** 기존 row.id (vendor pk 등) */ + id: number | null + + /** vendorId 별도 관리 */ + vendorId: number + rfqId: number | null + + /** Vendor 기본정보 */ + vendorName: string + vendorCode: string | null + address: string | null + country: string | null + email: string | null + website: string | null + vendorStatus: string | null + + /** RFQ 별 Vendor 응답상태 */ + rfqVendorStatus: string | null + rfqVendorUpdated: Date | null + + /** RFQ 관련 정보 */ + rfqCode: string | null + projectCode: string | null + projectName: string | null + description: string | null + dueDate: Date | null + + /** CBE 평가 관련 필드들 */ + cbeId: number | null + cbeResult: string | null + cbeNote: string | null + cbeUpdated: Date | null + + /** 상업평가 시에 필요한 추가 정보(예: 총액/통화/조건 등) */ + totalCost: number | null + currency: string | null + paymentTerms: string | null + incoterms: string | null + deliverySchedule: string | null + + /** 추가로 원하는 필드들 (예: CBE 템플릿 파일 수, 응답 여부) */ + templateFileCount?: number + hasResponse?: boolean + + /** 댓글 목록 */ + comments: Array<{ + id: number + commentText: string + vendorId?: number + evaluationId?: number + createdAt?: Date + commentedBy?: number + }> + + /** 첨부파일 목록 */ + files: Array<{ + id: number + fileName: string + filePath?: string + vendorId?: number + evaluationId?: number + createdAt?: Date + uploadedAt?: Date + }> +} + + +export interface VendorCbeColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof VendorWithCbeFields; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +export const vendorCbeColumnsConfig: VendorCbeColumnConfig[] = [ + { + id: "vendorName", + label: "Vendor Name", + excelHeader: "Vendor Name", + }, + { + id: "vendorCode", + label: "Vendor Code", + excelHeader: "Vendor Code", + }, + { + id: "email", + label: "Email", + excelHeader: "Email", + }, + { + id: "rfqVendorStatus", + label: "RFQ Status", + excelHeader: "RFQ Status", + }, + // CBE 평가 관련 (group: "CBE Info") + { + id: "cbeResult", + label: "Result", + excelHeader: "CBE Result", + group: "CBE Info", + }, + { + id: "cbeNote", + label: "Note", + excelHeader: "CBE Note", + group: "CBE Info", + }, + { + id: "cbeUpdated", + label: "Updated At", + excelHeader: "CBE Updated At", + group: "CBE Info", + type: "date", + }, + // 필요 시 상업평가 추가 필드도 넣기 + { + id: "totalCost", + label: "Total Cost", + excelHeader: "Total Cost", + group: "CBE Info", + type: "number", + }, + { + id: "currency", + label: "Currency", + excelHeader: "Currency", + group: "CBE Info", + }, + { + id: "paymentTerms", + label: "Payment Terms", + excelHeader: "Payment Terms", + group: "CBE Info", + }, + { + id: "incoterms", + label: "Incoterms", + excelHeader: "Incoterms", + group: "CBE Info", + }, + // ... + ]
\ No newline at end of file diff --git a/config/vendorColumnsConfig.ts b/config/vendorColumnsConfig.ts new file mode 100644 index 00000000..f35ea0cb --- /dev/null +++ b/config/vendorColumnsConfig.ts @@ -0,0 +1,70 @@ +import { Vendor } from "@/db/schema/vendors"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface VendorColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof Vendor; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const vendorColumnsConfig: VendorColumnConfig[] = [ + { + id: "vendorName", + label: "Vendor Name", + excelHeader: "Vendor Name", + }, + { + id: "vendorCode", + label: "Vendor Code", + excelHeader: "Vendor Code", + }, + { + id: "address", + label: "address", + excelHeader: "address", + }, + { + id: "country", + label: "country", + excelHeader: "country", + // type: "string[]", // 필요하면 추가 + }, + // 필요 시 createdAt도 조인해서 가져왔다면 아래처럼 추가 + { + id: "email", + label: "email", + excelHeader: "email", + // group: "Metadata", + }, + { + id: "website", + label: "website", + excelHeader: "website", + // group: "Metadata", + }, + { + id: "status", + label: "status", + excelHeader: "status", + // group: "Metadata", + }, +];
\ No newline at end of file diff --git a/config/vendorContactsColumnsConfig.ts b/config/vendorContactsColumnsConfig.ts new file mode 100644 index 00000000..744c3a7d --- /dev/null +++ b/config/vendorContactsColumnsConfig.ts @@ -0,0 +1,70 @@ +import { Vendor, VendorContact } from "@/db/schema/vendors"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface VendorColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof VendorContact; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const vendorContactsColumnsConfig: VendorColumnConfig[] = [ + { + id: "contactName", + label: "Contact Name", + excelHeader: "Contact Name", + }, + { + id: "contactPosition", + label: "Contact Position", + excelHeader: "Contact Position", + }, + { + id: "contactEmail", + label: "Contact Email", + excelHeader: "Contact Email", + }, + { + id: "contactPhone", + label: "Contact Phone", + excelHeader: "Contact Phone", + // type: "string[]", // 필요하면 추가 + }, + // 필요 시 createdAt도 조인해서 가져왔다면 아래처럼 추가 + { + id: "isPrimary", + label: "isPrimary", + excelHeader: "isPrimary", + // group: "Metadata", + }, + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + // group: "Metadata", + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + // group: "Metadata", + }, +];
\ No newline at end of file diff --git a/config/vendorItemsColumnsConfig.ts b/config/vendorItemsColumnsConfig.ts new file mode 100644 index 00000000..75a85f5c --- /dev/null +++ b/config/vendorItemsColumnsConfig.ts @@ -0,0 +1,59 @@ +import { VendorItemsView } from "@/db/schema/vendors"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface VendorColumnConfig { + id: keyof VendorItemsView; + label: string; + group?: string; + excelHeader?: string; + type?: string; + // New properties for sizing + minWidth?: number; + maxWidth?: number; + defaultWidth?: number; + // Padding multiplier for extra space (1.0 = normal, 1.5 = more space, etc.) + paddingFactor?: number; +} +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const vendorItemsColumnsConfig: VendorColumnConfig[] = [ + { + id: "itemCode", + label: "Item Code", + excelHeader: "Item Code", + minWidth: 80, + paddingFactor: 1.2, + }, + { + id: "itemName", + label: "Item Name", + excelHeader: "Item Name", + minWidth: 120, + paddingFactor: 1.5, + }, + { + id: "description", + label: "Description", + excelHeader: "Description", + minWidth: 150, + paddingFactor: 2.0, // More padding for descriptions + }, + { + id: "createdAt", + label: "Created At", + excelHeader: "Created At", + minWidth: 120, + type: "date", + }, + { + id: "updatedAt", + label: "Updated At", + excelHeader: "Updated At", + minWidth: 120, + type: "date", + }, +];
\ No newline at end of file diff --git a/config/vendorRfbColumnsConfig.ts b/config/vendorRfbColumnsConfig.ts new file mode 100644 index 00000000..8b9a33c8 --- /dev/null +++ b/config/vendorRfbColumnsConfig.ts @@ -0,0 +1,95 @@ +export interface MatchedVendorRow { + /** 기존에 row.id 로 들어가는 필드 → 사실상 vendor의 pk */ + id: number + + /** vendorID 라고도 쓰는 중복 필드가 있다면 여기서 정리 */ + vendorID: number + + vendorName: string + vendorCode: string | null + address: string | null + country: string | null + email: string | null + website: string | null + vendorStatus: string | null + + rfqVendorStatus: string | null + rfqVendorUpdated: Date | null + + /** 추가로 붙는 필드 */ + comments: Array<{ + id: number + commentText: string + vendorId?: number + evaluationId?: number + createdAt?: Date + commentedBy?: number + }> +} + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface VendorRfqColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof MatchedVendorRow; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const vendorRfqColumnsConfig: VendorRfqColumnConfig[] = [ + { + id: "vendorName", + label: "Vendor Name", + excelHeader: "Vendor Name", + }, + { + id: "vendorCode", + label: "Vendor Code", + excelHeader: "Vendor Code", + }, + + + { + id: "email", + label: "Email", + excelHeader: "Email", + }, + + { + id: "vendorStatus", + label: "Vendor Status", + excelHeader: "Vendor Status", + }, + // 새로 추가 (rfq_vendors join 필드) + { + id: "rfqVendorStatus", + label: "RFQ Status", + excelHeader: "RFQ Status", + group: "RFQ Info", + }, + { + id: "rfqVendorUpdated", + label: "RFQ Updated At", + excelHeader: "RFQ Updated", + group: "RFQ Info", + type: "date", + }, + +]
\ No newline at end of file diff --git a/config/vendorTbeColumnsConfig.ts b/config/vendorTbeColumnsConfig.ts new file mode 100644 index 00000000..1299cebe --- /dev/null +++ b/config/vendorTbeColumnsConfig.ts @@ -0,0 +1,241 @@ + +export interface VendorWithTbeFields { + /** 기존에 row.id 로 들어가는 필드 → 사실상 vendor의 pk */ + id: number | null + + /** vendorID 라고도 쓰는 중복 필드가 있다면 여기서 정리 */ + vendorId: number + rfqId: number| null + + vendorName: string + vendorCode: string | null + address: string | null + country: string | null + email: string | null + website: string | null + vendorStatus: string | null + + rfqVendorStatus: string | null + rfqVendorUpdated: Date | null + + rfqCode: string | null + projectCode: string | null + projectName: string | null + description: string | null + dueDate: Date | null + + tbeResult: string | null + tbeNote: string | null + tbeUpdated: Date | null + + tbeId: number | null + + templateFileCount?: number; // TBE 템플릿 파일 수 + hasResponse?: boolean; // TBE 응답 파일 제출 여부 + + /** 추가로 붙는 필드 */ + comments: Array<{ + id: number + commentText: string + vendorId?: number + evaluationId?: number + createdAt?: Date + commentedBy?: number + }> + + /** TBE 파일 목록 */ + files: Array<{ + id: number + fileName: string + filePath?: string + vendorId?: number + evaluationId?: number + createdAt?: Date + uploadedAt?: Date + }> +} + + +export interface TbeVendorFields { + /** 기존에 row.id 로 들어가는 필드 → 사실상 vendor의 pk */ + id: number | null + + /** vendorID 라고도 쓰는 중복 필드가 있다면 여기서 정리 */ + vendorId: number + rfqId: number| null + + vendorName: string + vendorCode: string | null + address: string | null + country: string | null + email: string | null + website: string | null + vendorStatus: string | null + + vendorResponseId: number | null + rfqVendorStatus: string | null + rfqVendorUpdated: Date | null + + rfqCode: string | null + projectCode: string | null + projectName: string | null + description: string | null + dueDate: Date | null + + tbeResult: string | null + tbeNote: string | null + tbeUpdated: Date | null + + tbeId: number | null + + templateFileCount?: number; // TBE 템플릿 파일 수 + hasResponse?: boolean; // TBE 응답 파일 제출 여부 + + /** 추가로 붙는 필드 */ + comments: Array<{ + id: number + commentText: string + vendorId?: number + evaluationId?: number + createdAt?: Date + commentedBy?: number + }> + + +} + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface VendorTbeColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof VendorWithTbeFields; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const vendorTbeColumnsConfig: VendorTbeColumnConfig[] = [ + { + id: "vendorName", + label: "Vendor Name", + excelHeader: "Vendor Name", + }, + { + id: "vendorCode", + label: "Vendor Code", + excelHeader: "Vendor Code", + }, + + + { + id: "email", + label: "Email", + excelHeader: "Email", + }, + + // { + // id: "vendorStatus", + // label: "Vendor Status", + // excelHeader: "Vendor Status", + // }, + { + id: "rfqVendorStatus", + label: "RFQ Status", + excelHeader: "RFQ Status", + }, + // 새로 추가 (rfq_vendors join 필드) + { + id: "tbeResult", + label: "Result", + excelHeader: "TBE Result", + group: "TBE Info", + }, + { + id: "tbeNote", + label: "Note", + excelHeader: "TBE Note", + group: "TBE Info", + }, + { + id: "tbeUpdated", + label: "Updated At", + excelHeader: "TBE Updated At", + group: "TBE Info", + type: "date", + }, +] + +export const tbeVendorColumnsConfig: VendorTbeColumnConfig[] = [ + +// { +// id: "vendorCode", +// label: "Vendor Code", +// excelHeader: "Vendor Code", +// }, + + +// { +// id: "email", +// label: "Email", +// excelHeader: "Email", +// }, + + // { + // id: "vendorStatus", + // label: "Vendor Status", + // excelHeader: "Vendor Status", + // }, + { + id: "projectName", + label: "Project Name", + excelHeader: "Project Name", +}, + + { + id: "rfqCode", + label: "RFQ Code", + excelHeader: "RFQ Code", +}, + { + id: "rfqVendorStatus", + label: "RFQ Status", + excelHeader: "RFQ Status", + }, + // 새로 추가 (rfq_vendors join 필드) + { + id: "tbeResult", + label: "Result", + excelHeader: "TBE Result", + group: "TBE Info", + }, + { + id: "tbeNote", + label: "Note", + excelHeader: "TBE Note", + group: "TBE Info", + }, + { + id: "tbeUpdated", + label: "Updated At", + excelHeader: "TBE Updated At", + group: "TBE Info", + type: "date", + }, + +]
\ No newline at end of file |
