1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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",
},
// ...
]
|