diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/candidatesColumnsConfig.ts | 64 | ||||
| -rw-r--r-- | config/menuConfig.ts | 19 | ||||
| -rw-r--r-- | config/rfqsColumnsConfig.ts | 14 | ||||
| -rw-r--r-- | config/vendorInvestigationsColumnsConfig.ts | 124 |
4 files changed, 209 insertions, 12 deletions
diff --git a/config/candidatesColumnsConfig.ts b/config/candidatesColumnsConfig.ts new file mode 100644 index 00000000..3eeb2d2a --- /dev/null +++ b/config/candidatesColumnsConfig.ts @@ -0,0 +1,64 @@ +import { VendorCandidates } from "@/db/schema/vendors" + +export interface CandidateColumnConfig { + id: keyof VendorCandidates + label: string + group?: string + excelHeader?: string + type?: string +} + +export const candidateColumnsConfig: CandidateColumnConfig[] = [ + // Basic Info + { + id: "companyName", + label: "Company Name", + excelHeader: "Company Name", + // group: "Basic Info", + }, + { + id: "contactEmail", + label: "Contact Email", + excelHeader: "Contact Email", + // group: "Basic Info", + }, + { + id: "contactPhone", + label: "Contact Phone", + excelHeader: "Contact Phone", + // group: "Basic Info", + }, + { + id: "country", + label: "Country", + excelHeader: "Country", + // group: "Basic Info", + }, + { + id: "source", + label: "Source", + excelHeader: "Source", + // group: "Basic Info", + }, + { + id: "status", + label: "Status", + excelHeader: "Status", + // group: "Basic Info", + }, + + + + { + 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/menuConfig.ts b/config/menuConfig.ts index 1ab2305e..9e054433 100644 --- a/config/menuConfig.ts +++ b/config/menuConfig.ts @@ -55,6 +55,11 @@ export const mainNav: MenuSection[] = [ title: "벤더 관리", items: [ { + title: "벤더 초청 관리", + href: "/evcp/vendor-candidates", + description: "수집활동을 통해 발굴한 벤더를 등록하고 관리하며 초청할 수 있음", + }, + { title: "벤더 리스트", href: "/evcp/vendors", description: "업체에 대한 요약 정보를 출력", @@ -79,11 +84,11 @@ export const mainNav: MenuSection[] = [ href: "/evcp/pq", description: "벤더의 제출 PQ를 확인하고 통과 여부를 결정", }, - { - title: "벤더 계약 정보", - href: "/evcp/vendorcontract", - description: "업체별 계약 정보를 출력", - }, + // { + // title: "벤더 계약 정보", + // href: "/evcp/vendorcontract", + // description: "업체별 계약 정보를 출력", + // }, ], }, @@ -271,4 +276,8 @@ export const additionalNavVendor: MenuItem[] = [ title: "시스템 설정", href: "/partners/system", }, + { + title: "Vendor Info", + href: "/partners/info", + }, ];
\ No newline at end of file diff --git a/config/rfqsColumnsConfig.ts b/config/rfqsColumnsConfig.ts index 3b713e96..59e35146 100644 --- a/config/rfqsColumnsConfig.ts +++ b/config/rfqsColumnsConfig.ts @@ -14,19 +14,19 @@ export const rfqsColumnsConfig: RfqColumnConfig[] = [ id: "projectName", label: "Project Name", excelHeader: "Project Name", - // group: "Basic Info", + group: "Basic Info", }, { id: "rfqCode", label: "RFQ Code", excelHeader: "RFQ Code", - // group: "Basic Info", + group: "Basic Info", }, { id: "description", label: "RFQ description", excelHeader: "RFQ description", - // group: "Basic Info", + group: "Basic Info", }, // { // id: "projectCode", @@ -39,26 +39,26 @@ export const rfqsColumnsConfig: RfqColumnConfig[] = [ id: "status", label: "Status", excelHeader: "Status", - // group: "Basic Info", + group: "Basic Info", }, { id: "createdByEmail", label: "Created By", excelHeader: "Created By", - // group: "Metadata", + group: "Metadata", }, { id: "createdAt", label: "Created At", excelHeader: "Created At", - // group: "Metadata", + group: "Metadata", }, { id: "updatedAt", label: "Updated At", excelHeader: "Updated At", - // group: "Metadata", + group: "Metadata", }, ]
\ No newline at end of file diff --git a/config/vendorInvestigationsColumnsConfig.ts b/config/vendorInvestigationsColumnsConfig.ts new file mode 100644 index 00000000..3d9a9825 --- /dev/null +++ b/config/vendorInvestigationsColumnsConfig.ts @@ -0,0 +1,124 @@ +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. + */ +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 + vendorId: number + itemCode: string + createdAt: Date + updatedAt: Date +} + +// Drizzle-based type for the rest of the columns +type VendorInvestigationsViewRaw = typeof vendorInvestigationsView.$inferSelect + +/** + * Combine the Drizzle-inferred type with typed arrays + */ +export interface VendorInvestigationsViewWithContacts + extends Omit< + VendorInvestigationsViewRaw, + "contacts" | "possibleItems" + > { + contacts: ContactItem[] + possibleItems: PossibleItem[] +} + +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 |
