'use client'; import { Badge } from '@/components/ui/badge'; import { type TransferItemData, CATEGORY_LABELS, CONDITION_COLORS, CONDITION_LABELS, } from '@/lib/chuyen-nhuong-api'; interface TransferItemTableProps { items: TransferItemData[]; } function formatVND(value: string): string { return new Intl.NumberFormat('vi-VN').format(Number(value)) + ' \u20ab'; } export function TransferItemTable({ items }: TransferItemTableProps) { if (items.length === 0) { return
Chưa có danh sách vật phẩm.
; } return (| Tên | Loại | Tình trạng | Thương hiệu | SL | Giá yêu cầu | Giá AI |
|---|---|---|---|---|---|---|
|
{item.name} {item.modelName && ({item.modelName} )} |
{CATEGORY_LABELS[item.category]} |
|
{item.brand ?? '—'} | {item.quantity} | {formatVND(item.askingPriceVND)} | {item.aiEstimatePriceVND ? ( {formatVND(item.aiEstimatePriceVND)} ) : '—'} |