customers

This commit is contained in:
joshikannan
2025-11-27 18:33:08 +05:30
parent e71e44319c
commit d73c714290
19 changed files with 595 additions and 2070 deletions

View File

@@ -34,7 +34,8 @@ import {
Badge,
Autocomplete,
TextField,
CircularProgress
CircularProgress,
Box
} from '@mui/material';
import { SearchOutlined } from '@ant-design/icons';
import dayjs from 'dayjs';
@@ -105,7 +106,8 @@ export default function OrdersDetails() {
{ id: 4, status: 'Picked', statusLow: 'picked' },
{ id: 5, status: 'Active', statusLow: 'active' },
{ id: 6, status: 'Delivered', statusLow: 'delivered' },
{ id: 7, status: 'Cancelled', statusLow: 'cancelled' }
{ id: 7, status: 'Skipped', statusLow: 'skipped' },
{ id: 8, status: 'Cancelled', statusLow: 'cancelled' }
];
// ============================================= || gettenantlocations (branches) || =============================================
@@ -405,12 +407,11 @@ export default function OrdersDetails() {
) : (
<Autocomplete
fullWidth
// disabled={!isAppLocation || !isClient}
sx={{ minWidth: 250, maxWidth: 400, flex: 1 }}
id="combo-box-demo"
options={tenantLocations || []}
getOptionLabel={(option) => `${option.locationname} (${option.suburb})` || ''}
renderInput={(params) => <TextField {...params} label={locoName} color="primary" />}
sx={{ minWidth: 250, maxWidth: 400, flex: 1 }}
onChange={(event, value, reason) => {
if (value) {
console.log('Business Locations', value);
@@ -426,8 +427,8 @@ export default function OrdersDetails() {
)}
<Autocomplete
fullWidth
sx={{ minWidth: 250, maxWidth: 400, flex: 1 }}
disablePortal
id="combo-box-demo"
options={status}
getOptionLabel={(option) => `${option.status}`}
@@ -575,12 +576,17 @@ export default function OrdersDetails() {
<Typography variant="body2" noWrap>
{row.orderid}
</Typography>
<Typography noWrap sx={{ fontSize: '11px' }}>
{dayjs(row.orderdate).utc().format('DD/MM/YYYY')}
</Typography>
<Typography noWrap sx={{ fontSize: '11px' }} variant="h5">
{dayjs(row.orderdate).utc().format('hh:mm A')}
</Typography>
<Tooltip title="Delivery Date">
<Box sx={{ cursor: 'pointer' }}>
<Typography noWrap sx={{ fontSize: '11px' }}>
{dayjs(row.deliverydate).utc().format('DD/MM/YYYY')}
</Typography>
<Typography noWrap sx={{ fontSize: '11px' }}>
{dayjs(row.deliverydate).utc().format('hh:mm A')}
</Typography>
</Box>
</Tooltip>
</TableCell>
<TableCell align="left">
<Stack direction={'row'} spacing={1}>
@@ -626,6 +632,7 @@ export default function OrdersDetails() {
{row.orderstatus === 'picked' && <Chip label="Picked" color="info" size="small" sx={{ minWidth: 80 }} />}
{row.orderstatus === 'active' && <Chip label="Active" color="info" size="small" sx={{ minWidth: 80 }} />}
{row.orderstatus === 'delivered' && <Chip label="Delivered" color="success" size="small" sx={{ minWidth: 80 }} />}
{row.orderstatus === 'skipped' && <Chip label="Skipped" color="secondary" size="small" sx={{ minWidth: 80 }} />}
{row.orderstatus === 'cancelled' && <Chip label="Cancelled" color="error" size="small" sx={{ minWidth: 80 }} />}
</Stack>