summaryrefslogtreecommitdiff
path: root/lib/techsales-rfq/service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/techsales-rfq/service.ts')
-rw-r--r--lib/techsales-rfq/service.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/techsales-rfq/service.ts b/lib/techsales-rfq/service.ts
index 0d00a4e2..5ec02f63 100644
--- a/lib/techsales-rfq/service.ts
+++ b/lib/techsales-rfq/service.ts
@@ -911,6 +911,7 @@ export async function getTechSalesVendorQuotation(quotationId: number) {
status: quotation.status,
remark: quotation.remark,
rejectionReason: quotation.rejectionReason,
+ vendorFlags: quotation.vendorFlags,
submittedAt: quotation.submittedAt,
acceptedAt: quotation.acceptedAt,
createdAt: quotation.createdAt,
@@ -3132,6 +3133,7 @@ export async function getTechSalesRfqTechVendors(rfqId: number) {
validUntil: techSalesVendorQuotations.validUntil,
submittedAt: techSalesVendorQuotations.submittedAt,
createdAt: techSalesVendorQuotations.createdAt,
+ vendorFlags: techSalesVendorQuotations.vendorFlags, // 벤더 구분자 정보 추가
})
.from(techSalesVendorQuotations)
.innerJoin(techVendors, eq(techSalesVendorQuotations.vendorId, techVendors.id))
@@ -3794,9 +3796,10 @@ export async function getAcceptedTechSalesVendorQuotations(input: {
if (rfqItems.length === 0) {
// 아이템이 없는 경우 각 벤더별로 행 생성
- vendorQuotations.forEach((quotation) => {
+ vendorQuotations.forEach((quotation: any, vendorIndex: number) => {
expandedData.push({
...quotation.vendorQuotation,
+ uniqueKey: `${quotation.vendorQuotation.id}-${quotation.vendorQuotation.rfqId}-no-item-${vendorIndex}`, // 유니크 키 생성
rfqItems: [],
itemIndex: 0,
totalItems: 0,
@@ -3814,6 +3817,7 @@ export async function getAcceptedTechSalesVendorQuotations(input: {
vendorQuotations.forEach((quotation: { vendorQuotation: any; rfqItems: RfqItemInfo[] }, vendorIndex: number) => {
expandedData.push({
...quotation.vendorQuotation,
+ uniqueKey: `${quotation.vendorQuotation.id}-${quotation.vendorQuotation.rfqId}-item-${itemIndex}-vendor-${vendorIndex}`, // 유니크 키 생성
rfqItems: [rfqItem], // 단일 아이템만 포함
itemIndex: itemIndex,
totalItems: rfqItems.length,