diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-03 01:59:36 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-03 01:59:36 +0000 |
| commit | de4c8a6a6b7c918a7a16fc34423d1143209c295f (patch) | |
| tree | 9fbf0b93e5cbe9c3a8ca18c8bcd4dda5bf9640c5 /lib/tech-vendors/items-table | |
| parent | deb2d31dba913a3b831523f41b9bf2e286c53af1 (diff) | |
(최겸) 기술영업 벤더 공종 조회 기능 추가
Diffstat (limited to 'lib/tech-vendors/items-table')
| -rw-r--r-- | lib/tech-vendors/items-table/add-item-dialog.tsx | 20 | ||||
| -rw-r--r-- | lib/tech-vendors/items-table/item-table-toolbar-actions.tsx | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/tech-vendors/items-table/add-item-dialog.tsx b/lib/tech-vendors/items-table/add-item-dialog.tsx index e4d74204..21875295 100644 --- a/lib/tech-vendors/items-table/add-item-dialog.tsx +++ b/lib/tech-vendors/items-table/add-item-dialog.tsx @@ -79,8 +79,8 @@ export function AddItemDialog({ vendorId }: AddItemDialogProps) { if (result.data) { console.log(`[AddItemDialog] 사용 가능한 아이템 목록:`, result.data) - setItems(result.data) - setFilteredItems(result.data) + setItems(result.data as ItemDropdownOption[]) + setFilteredItems(result.data as ItemDropdownOption[]) } else if (result.error) { console.error("[AddItemDialog] 아이템 조회 실패:", result.error) toast.error(result.error) @@ -113,8 +113,8 @@ export function AddItemDialog({ vendorId }: AddItemDialogProps) { const lowerSearch = searchTerm.toLowerCase() const filtered = items.filter(item => item.itemCode.toLowerCase().includes(lowerSearch) || - item.itemName.toLowerCase().includes(lowerSearch) || - (item.description && item.description.toLowerCase().includes(lowerSearch)) + item.itemList.toLowerCase().includes(lowerSearch) || + (item.subItemList && item.subItemList.toLowerCase().includes(lowerSearch)) ) console.log(`[AddItemDialog] 필터링 결과: ${filtered.length}개 아이템`) @@ -125,13 +125,13 @@ export function AddItemDialog({ vendorId }: AddItemDialogProps) { console.log(`[AddItemDialog] 아이템 선택: ${item.itemCode}`) form.setValue("itemCode", item.itemCode, { shouldValidate: true }) setSelectedItem({ - itemName: item.itemName, - description: item.description || "", + itemName: item.itemList, + description: item.subItemList || "", }) console.log(`[AddItemDialog] 선택된 아이템 정보:`, { itemCode: item.itemCode, - itemName: item.itemName, - description: item.description || "" + itemName: item.itemList, + description: item.subItemList || "" }) setCommandOpen(false) } @@ -241,7 +241,7 @@ export function AddItemDialog({ vendorId }: AddItemDialogProps) { {filteredItems.map((item) => ( <CommandItem key={item.itemCode} - value={`${item.itemCode} ${item.itemName}`} + value={`${item.itemCode} ${item.itemList}`} onSelect={() => handleSelectItem(item)} > <Check @@ -253,7 +253,7 @@ export function AddItemDialog({ vendorId }: AddItemDialogProps) { )} /> <span className="font-medium">{item.itemCode}</span> - <span className="ml-2 text-gray-500 truncate">- {item.itemName}</span> + <span className="ml-2 text-gray-500 truncate">- {item.itemList}</span> </CommandItem> ))} </CommandGroup> diff --git a/lib/tech-vendors/items-table/item-table-toolbar-actions.tsx b/lib/tech-vendors/items-table/item-table-toolbar-actions.tsx index 68a20816..b327ff56 100644 --- a/lib/tech-vendors/items-table/item-table-toolbar-actions.tsx +++ b/lib/tech-vendors/items-table/item-table-toolbar-actions.tsx @@ -65,7 +65,7 @@ export function TechVendorItemsTableToolbarActions({ table, vendorId, vendorType return ( <div className="flex items-center gap-2"> - <AddItemDialog vendorId={vendorId} vendorType={vendorType} /> + {/* <AddItemDialog vendorId={vendorId} vendorType={vendorType} /> */} {/** 3) Import 버튼 (파일 업로드) */} <Button variant="outline" size="sm" className="gap-2" onClick={handleImportClick}> |
