diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-08-11 09:00:38 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-08-11 09:00:38 +0000 |
| commit | eb654f88214095f71be142b989e620fd28db3f69 (patch) | |
| tree | aaad3074de4a6422a880b35f9e577d489b0a6c91 /lib/techsales-rfq | |
| parent | a383fd2a30f60360ebc0c1b897b3d43cbae178fa (diff) | |
(최겸) 기술영업 변경사항 반영, PQ/실사 변경사항 반영
Diffstat (limited to 'lib/techsales-rfq')
| -rw-r--r-- | lib/techsales-rfq/repository.ts | 3 | ||||
| -rw-r--r-- | lib/techsales-rfq/service.ts | 6 | ||||
| -rw-r--r-- | lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx | 10 |
3 files changed, 14 insertions, 5 deletions
diff --git a/lib/techsales-rfq/repository.ts b/lib/techsales-rfq/repository.ts index e41982b9..e6138651 100644 --- a/lib/techsales-rfq/repository.ts +++ b/lib/techsales-rfq/repository.ts @@ -558,7 +558,8 @@ export async function selectSingleTechSalesVendorQuotationWithJoin( status: techSalesVendorQuotations.status,
remark: techSalesVendorQuotations.remark,
rejectionReason: techSalesVendorQuotations.rejectionReason,
-
+ vendorFlags: techSalesVendorQuotations.vendorFlags, // 벤더 구분자 정보 추가
+
// 날짜 정보
submittedAt: techSalesVendorQuotations.submittedAt,
acceptedAt: techSalesVendorQuotations.acceptedAt,
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,
diff --git a/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx b/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx index 8bfb8299..249a2c74 100644 --- a/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx +++ b/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx @@ -643,9 +643,11 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps disabled={
selectedRows.length === 0 ||
isSendingRfq ||
- selectedRows.some(row => row.status !== "Assigned")
+ selectedRows.some(row => row.status !== "Assigned") ||
+ selectedRfq?.status === "Closed"
}
className="gap-2"
+ title={selectedRfq?.status === "Closed" ? "마감된 RFQ는 발송할 수 없습니다." : undefined}
>
{isSendingRfq ? (
<Loader2 className="size-4 animate-spin" aria-hidden="true" />
@@ -676,8 +678,9 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps variant="outline"
size="sm"
onClick={handleAddVendor}
- disabled={isAdddialogLoading}
+ disabled={isAdddialogLoading || selectedRfq?.status === "Closed"}
className="gap-2"
+ title={selectedRfq?.status === "Closed" ? "마감된 RFQ는 벤더를 추가할 수 없습니다." : undefined}
>
{isAdddialogLoading ? (
<Loader2 className="size-4 animate-spin" aria-hidden="true" />
@@ -698,8 +701,9 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps variant="outline"
size="sm"
onClick={handleAddVendor}
- disabled={isAdddialogLoading}
+ disabled={isAdddialogLoading || selectedRfq?.status === "Closed"}
className="mt-4 gap-2"
+ title={selectedRfq?.status === "Closed" ? "마감된 RFQ는 벤더를 추가할 수 없습니다." : undefined}
>
{isAdddialogLoading ? (
<Loader2 className="size-4 animate-spin" aria-hidden="true" />
|
