summaryrefslogtreecommitdiff
path: root/config/vendorCbeColumnsConfig.ts
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-03-26 00:37:41 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-03-26 00:37:41 +0000
commite0dfb55c5457aec489fc084c4567e791b4c65eb1 (patch)
tree68543a65d88f5afb3a0202925804103daa91bc6f /config/vendorCbeColumnsConfig.ts
3/25 까지의 대표님 작업사항
Diffstat (limited to 'config/vendorCbeColumnsConfig.ts')
-rw-r--r--config/vendorCbeColumnsConfig.ts156
1 files changed, 156 insertions, 0 deletions
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