Commit 89697267 authored by Ben Anderson's avatar Ben Anderson

Added upc to products table

parent e49d9acc
...@@ -13,9 +13,9 @@ export default function ProductRow({ product, handleDelete }) { ...@@ -13,9 +13,9 @@ export default function ProductRow({ product, handleDelete }) {
}; };
const handleCloseDelete = (sku) => { const handleCloseDelete = (sku) => {
handleDelete(sku) handleDelete(sku);
handleClose(); handleClose();
} };
const handleShow = () => setShow(true); const handleShow = () => setShow(true);
const handleShowConfirm = () => setShowConfirm(true); const handleShowConfirm = () => setShowConfirm(true);
...@@ -24,6 +24,7 @@ export default function ProductRow({ product, handleDelete }) { ...@@ -24,6 +24,7 @@ export default function ProductRow({ product, handleDelete }) {
return ( return (
<tr> <tr>
<td onClick={handleShow}>{product.sku}</td> <td onClick={handleShow}>{product.sku}</td>
<td onClick={handleShow}>{product.upc}</td>
<td onClick={handleShow}>{product.productName}</td> <td onClick={handleShow}>{product.productName}</td>
<td onClick={handleShow}>${product.price}</td> <td onClick={handleShow}>${product.price}</td>
<td onClick={handleShow}>{product.category}</td> <td onClick={handleShow}>{product.category}</td>
...@@ -40,10 +41,14 @@ export default function ProductRow({ product, handleDelete }) { ...@@ -40,10 +41,14 @@ export default function ProductRow({ product, handleDelete }) {
<div className="modal-img"> <div className="modal-img">
<img src={product.productImageUrl} alt={product.productName} /> <img src={product.productImageUrl} alt={product.productName} />
</div> </div>
<h5>{product.sku}</h5>${product.price}<br /> <h5>{product.sku}</h5>${product.price}
{product.productDescription}<br /> <br />
In Stock: {product.availableStock}<br /> {product.productDescription}
Blocked Stock: {product.blockedStock}<br /> <br />
In Stock: {product.availableStock}
<br />
Blocked Stock: {product.blockedStock}
<br />
Fulfilled Stock: {product.fulfilledStock} Fulfilled Stock: {product.fulfilledStock}
</Modal.Body> </Modal.Body>
...@@ -65,7 +70,12 @@ export default function ProductRow({ product, handleDelete }) { ...@@ -65,7 +70,12 @@ export default function ProductRow({ product, handleDelete }) {
Cancel Cancel
</Button> </Button>
&nbsp;&nbsp; &nbsp;&nbsp;
<Button variant="danger" onClick={() => handleCloseDelete(product.sku)}>Yes, delete</Button> <Button
variant="danger"
onClick={() => handleCloseDelete(product.sku)}
>
Yes, delete
</Button>
</Alert> </Alert>
</Modal.Footer> </Modal.Footer>
</Modal> </Modal>
......
...@@ -30,6 +30,7 @@ export default function ProductTable({ productData }) { ...@@ -30,6 +30,7 @@ export default function ProductTable({ productData }) {
<thead> <thead>
<tr> <tr>
<th>SKU</th> <th>SKU</th>
<th>UPC</th>
<th>Product Name</th> <th>Product Name</th>
<th>Price</th> <th>Price</th>
<th>Category</th> <th>Category</th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment