From 05a4347271fcb1df69e3ad398f4089a8bc30fe37 Mon Sep 17 00:00:00 2001 From: beatz174-bit Date: Mon, 24 Nov 2025 07:28:54 +1000 Subject: [PATCH] Refine product row layout --- src/components/ProductRow.tsx | 71 +++++++++++++++++------------------ 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/components/ProductRow.tsx b/src/components/ProductRow.tsx index 38df5ba..4093441 100644 --- a/src/components/ProductRow.tsx +++ b/src/components/ProductRow.tsx @@ -1,6 +1,7 @@ import { + Box, + Button, Card, - CardActions, CardContent, Dialog, DialogContent, @@ -10,7 +11,6 @@ import { Stack, TextField, Typography, - Button, } from '@mui/material'; import DeleteIcon from '@mui/icons-material/Delete'; import EditIcon from '@mui/icons-material/Edit'; @@ -89,7 +89,7 @@ export const ProductRow = ({ product, categories, onSave, onDelete }: ProductRow return ( - + {isEditing ? ( @@ -133,44 +133,43 @@ export const ProductRow = ({ product, categories, onSave, onDelete }: ProductRow Scan Barcode )} + + + + + + + + ) : ( - -
- {product.name} - - {product.category} • {product.unit_type || DEFAULT_UNIT_TYPE} - -
- {product.barcode ? ( - - Barcode: {product.barcode} - - ) : null} + + + + + {product.name} + + + {product.category} • {product.unit_type || DEFAULT_UNIT_TYPE} + + + {product.barcode ? ( + + Barcode: {product.barcode} + + ) : null} + + + setIsEditing(true)} size="small"> + + + onDelete(product.id)} size="small"> + + + )}
- - {isEditing ? ( - <> - - - - - - - - ) : ( - <> - setIsEditing(true)}> - - - onDelete(product.id)}> - - - - )} - setIsScannerOpen(false)} fullWidth> Scan Barcode