diff options
Diffstat (limited to 'src/modules/result/components/ProductModal.tsx')
| -rw-r--r-- | src/modules/result/components/ProductModal.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/result/components/ProductModal.tsx b/src/modules/result/components/ProductModal.tsx index cfd7382..df0a911 100644 --- a/src/modules/result/components/ProductModal.tsx +++ b/src/modules/result/components/ProductModal.tsx @@ -36,7 +36,7 @@ const ProductModal = ({ modal }: Props) => { }) const response = await fetch(`/api/product?${searchParams}`) const data: { - products: (Product & { company: { id: number, name: string } })[], + products: (Product & { company: { id: number, name: string }, location?: { id: number, name: string } | null })[], page: number, totalPage: number } = await response.json() @@ -89,6 +89,7 @@ const ProductModal = ({ modal }: Props) => { <TableColumn>BARCODE</TableColumn> <TableColumn>ON-HAND QTY</TableColumn> <TableColumn>DIFFERENCE QTY</TableColumn> + <TableColumn>LOCATION</TableColumn> <TableColumn>COMPANY</TableColumn> </TableHeader> <TableBody items={data?.products || []}> @@ -99,6 +100,7 @@ const ProductModal = ({ modal }: Props) => { <TableCell>{product.barcode}</TableCell> <TableCell>{product.onhandQty}</TableCell> <TableCell>{product.differenceQty}</TableCell> + <TableCell>{(product as any).location?.name || '-'}</TableCell> <TableCell>{product.company.name}</TableCell> </TableRow> )} |
