summaryrefslogtreecommitdiff
path: root/lib/rfq-last/vendor-response/rfq-items-dialog.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rfq-last/vendor-response/rfq-items-dialog.tsx')
-rw-r--r--lib/rfq-last/vendor-response/rfq-items-dialog.tsx46
1 files changed, 26 insertions, 20 deletions
diff --git a/lib/rfq-last/vendor-response/rfq-items-dialog.tsx b/lib/rfq-last/vendor-response/rfq-items-dialog.tsx
index daa692e9..9790a1bd 100644
--- a/lib/rfq-last/vendor-response/rfq-items-dialog.tsx
+++ b/lib/rfq-last/vendor-response/rfq-items-dialog.tsx
@@ -94,7 +94,7 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
if (result.success) {
setItems(result.data)
- setStatistics(result.statistics)
+ setStatistics(result.statistics ?? null)
} else {
toast.error(result.error || "품목을 불러오는데 실패했습니다")
setItems([])
@@ -118,17 +118,6 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
window.open(specUrl, '_blank', 'noopener,noreferrer')
}
- // 수량 포맷팅
- const formatQuantity = (quantity: number | null, uom: string | null) => {
- if (!quantity) return "-"
- return `${quantity.toLocaleString()}${uom ? ` ${uom}` : ""}`
- }
-
- // 중량 포맷팅
- const formatWeight = (weight: number | null, uom: string | null) => {
- if (!weight) return "-"
- return `${weight.toLocaleString()} ${uom || "KG"}`
- }
return (
<Dialog open={isOpen} onOpenChange={onClose}>
@@ -177,8 +166,10 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
<TableHead className="w-[60px]">구분</TableHead>
<TableHead className="w-[120px]">자재코드</TableHead>
<TableHead>자재명</TableHead>
- <TableHead className="w-[100px]">수량</TableHead>
- <TableHead className="w-[100px]">중량</TableHead>
+ <TableHead className="w-[80px]">수량</TableHead>
+ <TableHead className="w-[60px]">수량단위</TableHead>
+ <TableHead className="w-[80px]">중량</TableHead>
+ <TableHead className="w-[60px]">중량단위</TableHead>
<TableHead className="w-[100px]">납기일</TableHead>
<TableHead className="w-[100px]">PR번호</TableHead>
<TableHead className="w-[80px]">사양</TableHead>
@@ -197,6 +188,9 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
<TableCell><Skeleton className="h-8 w-full" /></TableCell>
<TableCell><Skeleton className="h-8 w-full" /></TableCell>
<TableCell><Skeleton className="h-8 w-full" /></TableCell>
+ <TableCell><Skeleton className="h-8 w-full" /></TableCell>
+ <TableCell><Skeleton className="h-8 w-full" /></TableCell>
+ <TableCell><Skeleton className="h-8 w-full" /></TableCell>
</TableRow>
))}
</TableBody>
@@ -213,8 +207,10 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
<TableHead className="w-[60px]">구분</TableHead>
<TableHead className="w-[120px]">자재코드</TableHead>
<TableHead>자재명</TableHead>
- <TableHead className="w-[100px]">수량</TableHead>
- <TableHead className="w-[100px]">중량</TableHead>
+ <TableHead className="w-[80px]">수량</TableHead>
+ <TableHead className="w-[60px]">수량단위</TableHead>
+ <TableHead className="w-[80px]">중량</TableHead>
+ <TableHead className="w-[60px]">중량단위</TableHead>
<TableHead className="w-[100px]">납기일</TableHead>
<TableHead className="w-[100px]">PR번호</TableHead>
<TableHead className="w-[100px]">사양</TableHead>
@@ -264,12 +260,22 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
</TableCell>
<TableCell>
<span className="text-sm font-medium">
- {formatQuantity(item.quantity, item.uom)}
+ {item.quantity ? item.quantity.toLocaleString() : "-"}
</span>
</TableCell>
<TableCell>
- <span className="text-sm">
- {formatWeight(item.grossWeight, item.gwUom)}
+ <span className="text-sm text-muted-foreground">
+ {item.uom || "-"}
+ </span>
+ </TableCell>
+ <TableCell>
+ <span className="text-sm font-medium">
+ {item.grossWeight ? item.grossWeight.toLocaleString() : "-"}
+ </span>
+ </TableCell>
+ <TableCell>
+ <span className="text-sm text-muted-foreground">
+ {item.gwUom || "-"}
</span>
</TableCell>
<TableCell>
@@ -313,7 +319,7 @@ export function RfqItemsDialog({ isOpen, onClose, rfqData }: RfqItemsDialogProps
<TableCell>
<div className="text-xs">
{[
- item.projectDef && `DEF: ${item.projectDef}`,
+ item.projectDef && `${item.projectDef}`,
item.projectSc && `SC: ${item.projectSc}`,
item.projectKl && `KL: ${item.projectKl}`,
item.projectLc && `LC: ${item.projectLc}`,