diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-28 00:18:32 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-28 00:18:32 +0000 |
| commit | 1d86653b12ec52cd6ba4b92a7b6a841506a190c5 (patch) | |
| tree | 4fd41bb6bc633ef1951cb26b2a84d589341c2c6b | |
| parent | 748bb1720fd81e97a84c3e92f89d606e976b52e3 (diff) | |
(대표님) Config 파트 커밋
| -rw-r--r-- | config/formListsColumnsConfig.ts | 5 | ||||
| -rw-r--r-- | config/menuConfig.ts | 38 | ||||
| -rw-r--r-- | config/vendorInvestigationsColumnsConfig.ts | 300 |
3 files changed, 221 insertions, 122 deletions
diff --git a/config/formListsColumnsConfig.ts b/config/formListsColumnsConfig.ts index cd8ad5cc..b79992aa 100644 --- a/config/formListsColumnsConfig.ts +++ b/config/formListsColumnsConfig.ts @@ -1,8 +1,7 @@ -import { TagTypeClassFormMappings } from "@/db/schema/vendorData" -import { ExtendedFormMappings } from "@/lib/form-list/validation" +import { FormListsView } from "@/db/schema/vendorData" export interface FormListsColumnConfig { - id: keyof ExtendedFormMappings + id: keyof FormListsView label: string group?: string excelHeader?: string diff --git a/config/menuConfig.ts b/config/menuConfig.ts index 4c37374d..a67efc35 100644 --- a/config/menuConfig.ts +++ b/config/menuConfig.ts @@ -100,12 +100,7 @@ export const mainNav: MenuSection[] = [ // description: "기술영업 협력업체 후보 관리", // group: "기술영업" // }, - // { - // title: "협력업체 관리(기술영업)", - // href: "/evcp/tech-vendors", - // description: "기술영업 협력업체 관리", - // group: "기술영업" - // }, + { title: "발굴업체 등록 관리", href: "/evcp/vendor-candidates", @@ -153,6 +148,37 @@ export const mainNav: MenuSection[] = [ useGrouping: true, // 그룹핑 적용 items: [ { + title: "아이템 리스트(기술영업)", + href: "/evcp/items-tech", + description: "기술영업 조선, 해양 Top, 해양 Hull 아이템 리스트", + // icon: "ListTodo", + group: "공통" + }, + { + title: "협력업체 리스트(기술영업)", + href: "/evcp/tech-vendors", + description: "기술영업 협력업체 관리", + group: "공통" + }, + { + title: "협력업체 NDA(기술영업)", + href: "/evcp/tech-vendors-nda", + description: "기술영업 협력업체 NDA 관리", + group: "공통" + }, + { + title: "프로젝트 AVL 리스트(기술영업)", + href: "/evcp/tech-project-avl", + description: "기술영업 프로젝트 AVL 리스트", + group: "공통" + }, + { + title: "협력업체 후보 관리(기술영업)", + href: "/evcp/tech-vendor-candidates", + description: "기술영업 협력업체 후보 관리", + group: "공통" + }, + { title: "Budgetary Quote", href: "/evcp/budgetary-tech-sales-ship", description: "RFQ 작성을 할 수 있고 현황을 파악", diff --git a/config/vendorInvestigationsColumnsConfig.ts b/config/vendorInvestigationsColumnsConfig.ts index 14fe77c1..edddbacb 100644 --- a/config/vendorInvestigationsColumnsConfig.ts +++ b/config/vendorInvestigationsColumnsConfig.ts @@ -1,125 +1,199 @@ -import { vendorInvestigationsView } from "@/db/schema/vendors" - /** - * Drizzle will infer `contacts` and `possibleItems` as a JSON string or `unknown`. - * We override those with arrays that have the structure we built in the view. + * Base type for vendor investigations view (simplified - investigation focused) */ -export type ContactItem = { - id: number - contactName: string - contactEmail: string - contactPhone: string | null - contactPosition: string | null - isPrimary: boolean - createdAt: Date - updatedAt: Date -} - -export type PossibleItem = { - id: number +export type VendorInvestigationsViewRaw = { + // Investigation fields + investigationId: number vendorId: number - itemCode: string - itemName: string + pqSubmissionId: number | null + requesterId: number | null + qmManagerId: number | null + investigationStatus: "PLANNED" | "IN_PROGRESS" | "COMPLETED" | "CANCELED" + evaluationType: "SITE_AUDIT" | "QM_SELF_AUDIT" | null + investigationAddress: string | null + investigationMethod: string | null + scheduledStartAt: Date | null + scheduledEndAt: Date | null + forecastedAt: Date | null + requestedAt: Date | null + confirmedAt: Date | null + completedAt: Date | null + evaluationScore: number | null + evaluationResult: "APPROVED" | "SUPPLEMENT" | "REJECTED" | null + investigationNotes: string | null createdAt: Date updatedAt: Date -} -// Drizzle-based type for the rest of the columns -type VendorInvestigationsViewRaw = typeof vendorInvestigationsView.$inferSelect + // Essential vendor fields only + vendorName: string + vendorCode: string + + + hasAttachments: boolean + + requesterName: string | null + requesterEmail: string | null + qmManagerName: string | null + qmManagerEmail: string | null +} /** - * Combine the Drizzle-inferred type with typed arrays + * Main type for the table (adds id for backward compatibility) */ -export interface VendorInvestigationsViewWithContacts - extends Omit< - VendorInvestigationsViewRaw, - "contacts" | "possibleItems" - > { - contacts: ContactItem[] - possibleItems: PossibleItem[] +export interface VendorInvestigationsViewWithContacts extends VendorInvestigationsViewRaw { + // Add id field for backward compatibility (maps to investigationId) + id: number } +// Column configuration type export interface VendorInvestigationsColumnConfig { - id: keyof VendorInvestigationsViewWithContacts - label: string - group?: string - excelHeader?: string - type?: string - } - - // Example column config for vendorInvestigationsView - export const vendorInvestigationsColumnsConfig: VendorInvestigationsColumnConfig[] = [ - { - id: "investigationId", - label: "Investigation ID", - excelHeader: "Investigation ID", - group: "Investigation", - }, - { - id: "investigationStatus", - label: "Status", - excelHeader: "Status", - group: "Investigation", - }, - { - id: "scheduledStartAt", - label: "Scheduled Start", - excelHeader: "Scheduled Start", - group: "Investigation", - }, - { - id: "scheduledEndAt", - label: "Scheduled End", - excelHeader: "Scheduled End", - group: "Investigation", - }, - { - id: "completedAt", - label: "Completed At", - excelHeader: "Completed At", - group: "Investigation", - }, - { - id: "investigationNotes", - label: "Notes", - excelHeader: "Investigation Notes", - group: "Investigation", - }, - { - id: "vendorName", - label: "Vendor Name", - excelHeader: "Vendor Name", - group: "Vendor Info", - }, - { - id: "vendorCode", - label: "Vendor Code", - excelHeader: "Vendor Code", - group: "Vendor Info", - }, - { - id: "vendorEmail", - label: "Email", - excelHeader: "Email", - group: "Vendor Info", - }, - { - id: "vendorPhone", - label: "Phone", - excelHeader: "Phone", - group: "Vendor Info", - }, - // ... add more as needed ... - { - id: "investigationCreatedAt", - label: "Created At", - excelHeader: "Created At", - // group: "Metadata", - }, - { - id: "investigationUpdatedAt", - label: "Updated At", - excelHeader: "Updated At", - // group: "Metadata", - }, - ]
\ No newline at end of file + id: keyof VendorInvestigationsViewWithContacts + label: string + group?: string + excelHeader?: string + type?: string +} + +// Simplified column configuration focusing on investigation data +export const vendorInvestigationsColumnsConfig: VendorInvestigationsColumnConfig[] = [ + // Investigation Basic Info + { + id: "investigationStatus", + label: "실사 상태", + excelHeader: "실사 상태", + // group: "Investigation", + }, + { + id: "vendorCode", + label: "협력사", + excelHeader: "협력사", + group: "협력업체", + }, + + { + id: "vendorName", + label: "협력사명", + excelHeader: "협력사명", + group: "Vendor", + }, + + { + id: "requesterName", + label: "의뢰자", + excelHeader: "의뢰자", + group: "실사", + }, + + { + id: "evaluationType", + label: "평가 유형", + excelHeader: "평가 유형", + group: "실사", + }, + + + { + id: "investigationAddress", + label: "실사 주소", + excelHeader: "실사 주소", + group: "실사", + }, + { + id: "investigationMethod", + label: "실사방법", + excelHeader: "실사방법", + group: "실사", + }, + { + id: "investigationNotes", + label: "QM 의견", + excelHeader: "QM 의견", + group: "실사", + }, + { + id: "qmManagerName", + label: "QM 담당자", + excelHeader: "QM 담당자", + group: "실사", + }, + { + id: "evaluationScore", + label: "평가점수", + excelHeader: "평가점수", + group: "실사", + }, + { + id: "evaluationResult", + label: "평가 결과", + excelHeader: "평가 결과", + group: "실사", + }, + { + id: "hasAttachments", + label: "첨부파일", + excelHeader: "첨부파일", + group: "실사", + }, + + // Schedule Group + { + id: "requestedAt", + label: "실사 의뢰일", + excelHeader: "실사 의뢰일", + group: "일정", + }, + { + id: "forecastedAt", + label: "실사 예정일", + excelHeader: "실사 예정일", + group: "일정", + }, + + { + id: "confirmedAt", + label: "실사 확정일", + excelHeader: "실사 확정일", + group: "일정", + }, + { + id: "completedAt", + label: "실제 실사일", + excelHeader: "실제 실사일", + group: "일정", + }, + // { + // id: "createdAt", + // label: "Created At", + // excelHeader: "Created At", + // }, + // { + // id: "updatedAt", + // label: "Updated At", + // excelHeader: "Updated At", + // }, + // Essential Vendor Info (minimal) + + + // References Group + // { + // id: "pqSubmissionId", + // label: "PQ Submission", + // excelHeader: "PQ Submission ID", + // group: "References", + // }, + // { + // id: "requesterId", + // label: "Requester", + // excelHeader: "Requester ID", + // group: "References", + // }, + // { + // id: "qmManagerId", + // label: "QM Manager", + // excelHeader: "QM Manager ID", + // group: "References", + // }, + + // Metadata (ungrouped) + +]
\ No newline at end of file |
