diff options
Diffstat (limited to 'lib/techsales-rfq/table/create-rfq-dialog.tsx')
| -rw-r--r-- | lib/techsales-rfq/table/create-rfq-dialog.tsx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/techsales-rfq/table/create-rfq-dialog.tsx b/lib/techsales-rfq/table/create-rfq-dialog.tsx index bacec02e..81c85649 100644 --- a/lib/techsales-rfq/table/create-rfq-dialog.tsx +++ b/lib/techsales-rfq/table/create-rfq-dialog.tsx @@ -237,8 +237,6 @@ export function CreateRfqDialog({ onCreated }: CreateRfqDialogProps) { const query = itemSearchQuery.toLowerCase().trim() filtered = filtered.filter(item => item.itemCode.toLowerCase().includes(query) || - item.itemName.toLowerCase().includes(query) || - (item.description && item.description.toLowerCase().includes(query)) || (item.itemList && item.itemList.toLowerCase().includes(query)) ) } @@ -334,7 +332,8 @@ export function CreateRfqDialog({ onCreated }: CreateRfqDialogProps) { const createPromises = rfqGroups.map(group => createTechSalesRfq({ biddingProjectId: data.biddingProjectId, - materialGroupCodes: [group.joinedItemCodes], // 그룹화된 자재코드들 + itemShipbuildingId: group.items[0].id, // 그룹의 첫 번째 아이템의 shipbuilding ID 사용 + materialGroupCodes: group.itemCodes, // 해당 그룹의 자재코드들 createdBy: Number(session.user.id), dueDate: data.dueDate, }) @@ -496,7 +495,7 @@ export function CreateRfqDialog({ onCreated }: CreateRfqDialogProps) { ) : selectedShipType ? ( selectedShipType ) : ( - "미선택 (전체)" + "전체조회: 선종을 선택해야 생성가능합니다." )} <ArrowUpDown className="ml-2 h-4 w-4 opacity-50" /> </Button> @@ -688,8 +687,8 @@ export function CreateRfqDialog({ onCreated }: CreateRfqDialogProps) { [...availableItems] .sort((a, b) => { // itemList 기준으로 정렬 (없는 경우 itemName 사용, 둘 다 없으면 맨 뒤로) - const aName = a.itemList || a.itemName || 'zzz' - const bName = b.itemList || b.itemName || 'zzz' + const aName = a.itemList || 'zzz' + const bName = b.itemList || 'zzz' return aName.localeCompare(bName, 'ko', { numeric: true }) }) .map((item) => { @@ -711,10 +710,10 @@ export function CreateRfqDialog({ onCreated }: CreateRfqDialogProps) { )} <div className="flex-1"> <div className="font-medium"> - {item.itemList || item.itemName || '아이템명 없음'} + {item.itemList || '아이템명 없음'} </div> <div className="text-sm text-muted-foreground"> - {item.itemCode} • {item.description || '설명 없음'} + {item.itemCode || '자재그룹코드 없음'} </div> <div className="text-xs text-muted-foreground"> 공종: {item.workType} • 선종: {item.shipTypes} @@ -749,7 +748,7 @@ export function CreateRfqDialog({ onCreated }: CreateRfqDialogProps) { variant="secondary" className="flex items-center gap-1" > - {item.itemList || item.itemName || '아이템명 없음'} ({item.itemCode}) + {item.itemList || '아이템명 없음'} ({item.itemCode}) <X className="h-3 w-3 cursor-pointer hover:text-destructive" onClick={() => handleRemoveItem(item.id)} |
