From 9d10460f5bf0cd8bd2c8afea16489a1bd6d12acf Mon Sep 17 00:00:00 2001 From: ROSHAN GARG Date: Mon, 4 Nov 2024 13:46:32 +0530 Subject: [PATCH] updated retail to retailer --- index.html | 2 +- src/views/orders/OrderDetails.js | 6 +-- src/views/pages/cart/orderConfirmation.js | 8 ++-- src/views/pages/cart/shopingCart.js | 4 +- src/views/shops/Shop.js | 54 +++++++++++++++++++---- src/views/shops/shopCard.js | 31 +++++-------- 6 files changed, 66 insertions(+), 39 deletions(-) diff --git a/index.html b/index.html index c0ef405..4bda2eb 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ name="keyword" content="Bootstrap,Admin,Template,Open,Source,CSS,SCSS,HTML,RWD,Dashboard,React" /> - Retail distributer + Retailer diff --git a/src/views/orders/OrderDetails.js b/src/views/orders/OrderDetails.js index 4c22591..a01ecb9 100644 --- a/src/views/orders/OrderDetails.js +++ b/src/views/orders/OrderDetails.js @@ -164,7 +164,7 @@ const OrderDetails = () => { {row.SKU} {row.quantity} ₹{row.price} - ₹{gstAmount} + ₹{gstAmount.toFixed(2)} ₹{row.price * row.quantity} ) @@ -178,13 +178,13 @@ const OrderDetails = () => { - Total GST: ₹ {gstTotal} + Total GST: ₹ {gstTotal.toFixed(2)} - Grand Total: ₹ {grandTotal} + Grand Total: ₹ {grandTotal.toFixed(2)} diff --git a/src/views/pages/cart/orderConfirmation.js b/src/views/pages/cart/orderConfirmation.js index 51c652d..0195c35 100644 --- a/src/views/pages/cart/orderConfirmation.js +++ b/src/views/pages/cart/orderConfirmation.js @@ -119,7 +119,7 @@ const OrderConfirmation = ({ orderId, billTo, shipTo, paymentMode, cartItem }) = {row.SKU} {row.count} ₹{row.price} - ₹{gstAmount} + ₹{gstAmount.toFixed(2)} ₹{row.price * row.count} ) @@ -127,20 +127,20 @@ const OrderConfirmation = ({ orderId, billTo, shipTo, paymentMode, cartItem }) = - Subtotal: ₹ {subtotal} + Subtotal: ₹ {subtotaltoFixed(2)} - Total GST: ₹ {totalGST} + Total GST: ₹ {totalGSTtoFixed(2)} - Grand Total: ₹ {subtotal + totalGST} + Grand Total: ₹ {subtotal.toFixed(2) + totalGST.toFixed(2)} diff --git a/src/views/pages/cart/shopingCart.js b/src/views/pages/cart/shopingCart.js index 211bd95..91401a0 100644 --- a/src/views/pages/cart/shopingCart.js +++ b/src/views/pages/cart/shopingCart.js @@ -137,7 +137,7 @@ const ShoppingCart = ({ handleTabChange }) => { ₹{row.price} - ₹{gstAmount} + ₹{gstAmount.toFixed(2)} ₹{row.price * row.count} ) @@ -151,7 +151,7 @@ const ShoppingCart = ({ handleTabChange }) => { - Total GST: ₹ {totalGST} + Total GST: ₹ {totalGST.toFixed(2)} diff --git a/src/views/shops/Shop.js b/src/views/shops/Shop.js index 9e11b71..92b100c 100644 --- a/src/views/shops/Shop.js +++ b/src/views/shops/Shop.js @@ -8,11 +8,17 @@ import { CircularProgress, Container, FormControl, - Grid, MenuItem, Pagination, Select, Typography, + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, + Paper, } from '@mui/material' import ShopCard from './shopCard' @@ -114,13 +120,45 @@ const Shop = () => { ) : ( <> - - {products.map((item, i) => ( - - - - ))} - + + + + + + Product Name + + + Category + + + Price + + + Action + + + + + {products?.map((product) => ( + + + {product?.name} + + + {product.category.categoryName} + + + ₹{product.price} + + + + + + ))} + +
+
+ { } return (
- - - - - {item?.name} - - - ${item?.price} - - - - +
) }