updated retail to retailer
Some checks failed
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled
Some checks failed
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled
This commit is contained in:
parent
a4c6bf8042
commit
9d10460f5b
@ -17,7 +17,7 @@
|
||||
name="keyword"
|
||||
content="Bootstrap,Admin,Template,Open,Source,CSS,SCSS,HTML,RWD,Dashboard,React"
|
||||
/>
|
||||
<title>Retail distributer</title>
|
||||
<title>Retailer</title>
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
</head>
|
||||
|
@ -164,7 +164,7 @@ const OrderDetails = () => {
|
||||
<TableCell>{row.SKU}</TableCell>
|
||||
<TableCell>{row.quantity}</TableCell>
|
||||
<TableCell>₹{row.price}</TableCell>
|
||||
<TableCell>₹{gstAmount}</TableCell>
|
||||
<TableCell>₹{gstAmount.toFixed(2)}</TableCell>
|
||||
<TableCell>₹{row.price * row.quantity}</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
@ -178,13 +178,13 @@ const OrderDetails = () => {
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} />
|
||||
<TableCell>
|
||||
Total GST:<strong> ₹ {gstTotal} </strong>
|
||||
Total GST:<strong> ₹ {gstTotal.toFixed(2)} </strong>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} />
|
||||
<TableCell>
|
||||
Grand Total: <strong> ₹ {grandTotal}</strong>
|
||||
Grand Total: <strong> ₹ {grandTotal.toFixed(2)}</strong>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
|
@ -119,7 +119,7 @@ const OrderConfirmation = ({ orderId, billTo, shipTo, paymentMode, cartItem }) =
|
||||
<TableCell>{row.SKU}</TableCell>
|
||||
<TableCell>{row.count}</TableCell>
|
||||
<TableCell>₹{row.price}</TableCell>
|
||||
<TableCell>₹{gstAmount}</TableCell>
|
||||
<TableCell>₹{gstAmount.toFixed(2)}</TableCell>
|
||||
<TableCell>₹{row.price * row.count}</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
@ -127,20 +127,20 @@ const OrderConfirmation = ({ orderId, billTo, shipTo, paymentMode, cartItem }) =
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} />
|
||||
<TableCell>
|
||||
Subtotal:<strong> ₹ {subtotal}</strong>
|
||||
Subtotal:<strong> ₹ {subtotaltoFixed(2)}</strong>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} />
|
||||
<TableCell>
|
||||
Total GST:<strong> ₹ {totalGST} </strong>
|
||||
Total GST:<strong> ₹ {totalGSTtoFixed(2)} </strong>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} />
|
||||
<TableCell>
|
||||
Grand Total: <strong> ₹ {subtotal + totalGST}</strong>
|
||||
Grand Total: <strong> ₹ {subtotal.toFixed(2) + totalGST.toFixed(2)}</strong>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
|
@ -137,7 +137,7 @@ const ShoppingCart = ({ handleTabChange }) => {
|
||||
</Box>
|
||||
</TableCell>
|
||||
<TableCell>₹{row.price}</TableCell>
|
||||
<TableCell>₹{gstAmount}</TableCell>
|
||||
<TableCell>₹{gstAmount.toFixed(2)}</TableCell>
|
||||
<TableCell>₹{row.price * row.count}</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
@ -151,7 +151,7 @@ const ShoppingCart = ({ handleTabChange }) => {
|
||||
<TableRow>
|
||||
<TableCell colSpan={5} />
|
||||
<TableCell>
|
||||
Total GST:<strong> ₹ {totalGST} </strong>
|
||||
Total GST:<strong> ₹ {totalGST.toFixed(2)} </strong>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
|
@ -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 = () => {
|
||||
<CircularProgress />
|
||||
) : (
|
||||
<>
|
||||
<Grid container spacing={2}>
|
||||
{products.map((item, i) => (
|
||||
<Grid key={i} item xs={12} sm={6} md={4} lg={4}>
|
||||
<ShopCard item={item} />
|
||||
</Grid>
|
||||
<TableContainer component={Paper} sx={{ mt: 3 }}>
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell sx={{ fontWeight: 'bold' }} align="center">
|
||||
Product Name
|
||||
</TableCell>
|
||||
<TableCell sx={{ fontWeight: 'bold' }} align="center">
|
||||
Category
|
||||
</TableCell>
|
||||
<TableCell sx={{ fontWeight: 'bold' }} align="center">
|
||||
Price
|
||||
</TableCell>
|
||||
<TableCell sx={{ fontWeight: 'bold' }} align="center">
|
||||
Action
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{products?.map((product) => (
|
||||
<TableRow key={product._id}>
|
||||
<TableCell size="small" align="center">
|
||||
{product?.name}
|
||||
</TableCell>
|
||||
<TableCell size="small" align="center">
|
||||
{product.category.categoryName}
|
||||
</TableCell>
|
||||
<TableCell size="small" align="center">
|
||||
₹{product.price}
|
||||
</TableCell>
|
||||
<TableCell size="small" align="center">
|
||||
<ShopCard item={product} />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</Grid>
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
|
||||
<Box mt={3} display="flex" justifyContent="center">
|
||||
<Pagination
|
||||
count={Math.ceil(totalData / itemsPerPage)}
|
||||
|
@ -18,27 +18,16 @@ const ShopCard = ({ item }) => {
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<Card>
|
||||
<CardMedia component="img" height="150" image={item?.image} alt={item?.name} />
|
||||
<CardContent>
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
{item?.name}
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
${item?.price}
|
||||
</Typography>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
fullWidth
|
||||
// fullWidth
|
||||
disabled={isProductInCart}
|
||||
onClick={handleAddToCart}
|
||||
sx={{ marginTop: '10px' }}
|
||||
>
|
||||
{isProductInCart ? 'Already in Cart' : 'Add to Cart'}
|
||||
</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user