import { ImagePreviewButton } from '@/components/image-preview-button'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@/components/ui/table'; import { formatNumber } from '@/lib/format'; import { formatCurrency } from '@/lib/utils'; import type { Restock } from './columns'; export function RestockItemSubRow({ restock }: { restock: Restock }) { const items = restock.restock_items ?? []; return (
No Foto Produk Varian Harga Modal Qty Subtotal {items.length === 0 ? ( Tidak ada item. ) : ( items.map((item, index) => ( {index + 1} {item.product_variant?.photo_url ? ( ) : (
N/A
)}
{item.product_variant?.product?.name ?? '-'} {item.product_variant?.name ?? '-'} {formatCurrency(item.unit_price)} {formatNumber(item.quantity)} {formatCurrency(item.subtotal)}
)) )}
); }