diff options
Diffstat (limited to 'config/vendorCbeColumnsConfig.ts')
| -rw-r--r-- | config/vendorCbeColumnsConfig.ts | 370 |
1 files changed, 238 insertions, 132 deletions
diff --git a/config/vendorCbeColumnsConfig.ts b/config/vendorCbeColumnsConfig.ts index 2d521125..9fc50317 100644 --- a/config/vendorCbeColumnsConfig.ts +++ b/config/vendorCbeColumnsConfig.ts @@ -1,71 +1,74 @@ export interface VendorWithCbeFields { - /** 기존 row.id (vendor pk 등) */ - id: number | null + /** 주요 식별 정보 */ + responseId: number + vendorId: number + rfqId: number | null + + /** Vendor 기본정보 */ + vendorName: string + vendorCode: string | null + vendorStatus: string | null + + /** 응답 정보 */ + responseStatus: string | null + responseNotes: string | null // vendorResponseCBEView의 notes 필드와 매핑됨 + respondedBy: string | null + respondedAt: Date | null + + /** RFQ 관련 정보 */ + rfqCode: string | null + rfqDescription: string | null + rfqDueDate: Date | null + rfqStatus: string | null + rfqType: string | null + + /** 프로젝트 정보 */ + projectId: number | null + projectCode: string | null + projectName: string | null + + /** 상업 응답 상세 정보 */ + commercialResponseId: number | null + commercialResponseStatus: string | null + totalPrice: number | null + currency: string | null + paymentTerms: string | null + incoterms: string | null + deliveryPeriod: string | null + warrantyPeriod: string | null + validityPeriod: string | null + commercialNotes: string | 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 - }> + /** 첨부파일 개수 */ + attachmentCount: number + commercialAttachmentCount: number + technicalAttachmentCount: number + + /** 댓글 목록 */ + comments: Array<{ + id: number + commentText: string + vendorId?: number + cbeId?: number // evaluationId 대신 cbeId 사용 + createdAt: Date + commentedBy?: number + }> + + /** 첨부파일 목록 */ + files: Array<{ + id: number + fileName: string + filePath: string + fileType?: string + attachmentType?: string + description?: string + uploadedAt: Date + uploadedBy?: string + attachmentSource?: 'response' | 'commercial' // 첨부파일 출처 + }> } - export interface VendorCbeColumnConfig { /** * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 @@ -86,71 +89,174 @@ export interface VendorCbeColumnConfig { } 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 + { + id: "projectCode", + label: "Project Code", + excelHeader:"Project Code", + }, + { + id: "rfqCode", + label: "RFQ Code", + excelHeader:"RFQ Code", + }, + // 협력업체 기본 정보 + { + id: "vendorName", + label: "Vendor Name", + excelHeader: "Vendor Name", + // group: "Vendor Info", + }, + // { + // id: "vendorCode", + // label: "Vendor Code", + // excelHeader: "Vendor Code", + // group: "Vendor Info", + // }, + + // { + // id: "vendorStatus", + // label: "Vendor Status", + // excelHeader: "Vendor Status", + // group: "Vendor Info", + // }, + + + // 상업 응답 정보 (핵심 부분) + { + id: "commercialResponseStatus", + label: "Status", + excelHeader: "Status", + group: "Commercial Response", + type: "text", + }, + { + id: "totalPrice", + label: "Total Price", + excelHeader: "Total Price", + group: "Commercial Response", + type: "number", + }, + { + id: "currency", + label: "Currency", + excelHeader: "Currency", + group: "Commercial Response", + }, + { + id: "paymentTerms", + label: "Payment Terms", + excelHeader: "Payment Terms", + group: "Commercial Response", + }, + { + id: "incoterms", + label: "Incoterms", + excelHeader: "Incoterms", + group: "Commercial Response", + }, + { + id: "deliveryPeriod", + label: "Delivery Period", + excelHeader: "Delivery Period", + group: "Commercial Response", + }, + { + id: "warrantyPeriod", + label: "Warranty Period", + excelHeader: "Warranty Period", + group: "Commercial Response", + }, + { + id: "validityPeriod", + label: "Validity Period", + excelHeader: "Validity Period", + group: "Commercial Response", + }, + + +] + + + +export const vendorResponseCbeColumnsConfig: VendorCbeColumnConfig[] = [ + { + id: "projectName", + label: "Project Name", + excelHeader: "Project Name", + // group: "RFQ Info", + }, + { + id: "rfqCode", + label: "RFQ Code", + excelHeader: "RFQ Code", + // group: "RFQ Info", + }, + // { + // id: "rfqDescription", + // label: "Description", + // excelHeader: "RFQ Code", + // group: "RFQ Info", + // }, + + // { + // id: "rfqDueDate", + // label: "Due Date", + // excelHeader:"Due Date", + // group: "RFQ Info", + // }, + + + // 상업 응답 정보 (핵심 부분) + { + id: "commercialResponseStatus", + label: "Status", + excelHeader: "Status", + group: "Commercial Response", + type: "text", + }, + { + id: "totalPrice", + label: "Total Price", + excelHeader: "Total Price", + group: "Commercial Response", + type: "number", + }, + { + id: "currency", + label: "Currency", + excelHeader: "Currency", + group: "Commercial Response", + }, + { + id: "paymentTerms", + label: "Payment Terms", + excelHeader: "Payment Terms", + group: "Commercial Response", + }, + { + id: "incoterms", + label: "Incoterms", + excelHeader: "Incoterms", + group: "Commercial Response", + }, + { + id: "deliveryPeriod", + label: "Delivery Period", + excelHeader: "Delivery Period", + group: "Commercial Response", + }, + { + id: "warrantyPeriod", + label: "Warranty Period", + excelHeader: "Warranty Period", + group: "Commercial Response", + }, + { + id: "validityPeriod", + label: "Validity Period", + excelHeader: "Validity Period", + group: "Commercial Response", + }, + + +]
\ No newline at end of file |
