09012024
This commit is contained in:
@@ -191,12 +191,12 @@ const Orders = () => {
|
||||
label: 'S NO',
|
||||
|
||||
},
|
||||
{
|
||||
id: 'tenantname',
|
||||
numeric: false,
|
||||
disablePadding: false,
|
||||
label: 'CUSTOMER',
|
||||
},
|
||||
// {
|
||||
// id: 'tenantname',
|
||||
// numeric: false,
|
||||
// disablePadding: false,
|
||||
// label: 'CUSTOMER',
|
||||
// },
|
||||
{
|
||||
id: 'orderid',
|
||||
numeric: false,
|
||||
@@ -206,12 +206,12 @@ const Orders = () => {
|
||||
{
|
||||
id: 'eventname',
|
||||
disablePadding: false,
|
||||
label: 'Pickup Location',
|
||||
label: 'Pickup',
|
||||
},
|
||||
{
|
||||
id: 'eventname4',
|
||||
disablePadding: false,
|
||||
label: 'Delivery Location',
|
||||
label: 'Delivery',
|
||||
},
|
||||
// {
|
||||
// id: 'ordervalue',
|
||||
@@ -603,31 +603,8 @@ const Orders = () => {
|
||||
|
||||
|
||||
</TableCell>
|
||||
<TableCell align="left" sx={{ paddingLeft: '12px !important' }}>
|
||||
|
||||
<Stack direction="row" alignItems="center" spacing={1} justifyContent="flex-start">
|
||||
<Avatar
|
||||
alt=""
|
||||
size="sm"
|
||||
// src={row.profileimage}
|
||||
sx={{
|
||||
width: '25px',
|
||||
height: '25px'
|
||||
}}
|
||||
>
|
||||
|
||||
</Avatar>
|
||||
<Stack direction="column">
|
||||
<Typography variant="caption">{row.customername}</Typography>
|
||||
<Typography variant="caption" color="textSecondary">
|
||||
|
||||
{/* {row.identification}*/}
|
||||
{row.contactno}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<TableCell align='left'>
|
||||
<Typography variant='body2' noWrap>{row.orderid}</Typography>
|
||||
<Typography noWrap
|
||||
sx={{ fontSize: '11px' }}>
|
||||
@@ -640,31 +617,98 @@ const Orders = () => {
|
||||
{dayjs(row.deliverytime).utc().format('hh:mm A')}
|
||||
</Typography>
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<Stack direction='column'>
|
||||
{/* <Typography variant="caption" > {row.eventname}</Typography> */}
|
||||
<Tooltip title={row.pickupaddress}>
|
||||
<Typography variant="caption" color="textSecondary"
|
||||
>
|
||||
{/* {row.pickupaddress.slice(0, 20)} */}
|
||||
{row.locationsuburb || row.pickupaddress.slice(0, 20)}
|
||||
|
||||
{/* <TableCell align="left" sx={{ paddingLeft: '12px !important' }}>
|
||||
|
||||
<Stack direction="row" alignItems="center" spacing={1} justifyContent="flex-start">
|
||||
<Avatar
|
||||
alt=""
|
||||
size="sm"
|
||||
sx={{
|
||||
width: '25px',
|
||||
height: '25px'
|
||||
}}
|
||||
>
|
||||
|
||||
</Avatar>
|
||||
<Stack direction="column">
|
||||
<Typography variant="caption">{row.customername}</Typography>
|
||||
<Typography variant="caption" color="textSecondary">
|
||||
|
||||
{row.contactno}
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</TableCell> */}
|
||||
<TableCell align="left">
|
||||
<Stack direction={'row'} spacing={1}>
|
||||
<Avatar
|
||||
alt=""
|
||||
size="sm"
|
||||
sx={{
|
||||
width: '25px',
|
||||
height: '25px'
|
||||
}}
|
||||
>
|
||||
|
||||
</Avatar>
|
||||
<Stack direction="column">
|
||||
<Typography variant="caption">{row.pickupcustomer}</Typography>
|
||||
<Typography variant="caption" color="textSecondary">
|
||||
|
||||
{row.pickupcontactno}
|
||||
</Typography>
|
||||
<Tooltip title={row.pickupaddress}>
|
||||
<Typography variant="caption" color="textSecondary"
|
||||
>
|
||||
{/* {row.pickupaddress.slice(0, 20)} */}
|
||||
{row.pickupsuburb || row.pickupaddress.slice(0, 20)}
|
||||
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
</Stack>
|
||||
{/* <Stack direction='column'>
|
||||
|
||||
</Stack> */}
|
||||
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<Stack direction='column'>
|
||||
{/* <Typography variant="caption" > {row.eventname}</Typography> */}
|
||||
{/* <Stack direction='column'>
|
||||
<Tooltip title={row.deliveryaddress}>
|
||||
<Typography variant="caption" color="textSecondary"
|
||||
>
|
||||
{/* {row.deliveryaddress.slice(0, 20)} */}
|
||||
{row.customersuburb || row.deliveryaddress.slice(0, 20)}
|
||||
{row.customersuburb || row.deliveryaddress.slice(0, 20)}
|
||||
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Stack> */}
|
||||
<Stack direction={'row'} spacing={1}>
|
||||
<Avatar
|
||||
alt=""
|
||||
size="sm"
|
||||
sx={{
|
||||
width: '25px',
|
||||
height: '25px'
|
||||
}}
|
||||
>
|
||||
|
||||
</Avatar>
|
||||
<Stack direction="column">
|
||||
<Typography variant="caption">{row.deliverycustomer}</Typography>
|
||||
<Typography variant="caption" color="textSecondary">
|
||||
|
||||
{row.deliverycontactno}
|
||||
</Typography>
|
||||
<Tooltip title={row.deliveryaddress}>
|
||||
<Typography variant="caption" color="textSecondary"
|
||||
>
|
||||
{/* {row.pickupaddress.slice(0, 20)} */}
|
||||
{row.deliverysuburb || row.deliveryaddress.slice(0, 20)}
|
||||
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
</TableCell>
|
||||
@@ -1399,10 +1443,10 @@ const Orders = () => {
|
||||
|
||||
return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1421,8 +1465,8 @@ const Orders = () => {
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1438,10 +1482,10 @@ const Orders = () => {
|
||||
|
||||
return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.eventname.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordervalue.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1459,8 +1503,8 @@ const Orders = () => {
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1478,8 +1522,8 @@ const Orders = () => {
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1497,8 +1541,8 @@ const Orders = () => {
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1516,8 +1560,8 @@ const Orders = () => {
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1592,8 +1636,8 @@ const Orders = () => {
|
||||
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.customername.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -2072,44 +2116,44 @@ const Orders = () => {
|
||||
|
||||
|
||||
{/* <Grid item md={8} sx={{ display: { sm: 'none', md: 'block', lg: 'none' } }} /> */}
|
||||
<Grid item xs={12} sx={{mb:-3}}>
|
||||
<Grid item xs={12} sx={{ mb: -3 }}>
|
||||
<Stack direction={'row'} justifyContent={'space-between'}>
|
||||
{(startdate && enddate) &&
|
||||
<Stack direction='row' spacing={2}>
|
||||
<Chip label={`Orders-${datestatus}`} color="primary" variant="light" size="small" />
|
||||
<Chip label={<Typography noWrap color="secondary">{dayjs(startdate).format('DD/MM/YYYY')} - {dayjs(enddate).format('DD/MM/YYYY')}</Typography>} variant="combined" color='warning' size='small' />
|
||||
|
||||
|
||||
</Stack>
|
||||
}
|
||||
{(!startdate || !enddate) &&
|
||||
<>
|
||||
{(startdate && enddate) &&
|
||||
<Stack direction='row' spacing={2}>
|
||||
<Chip label='Orders-All' color="primary" variant="light" size="small" />
|
||||
<Chip label={`Orders-${(datestatus)?datestatus:''}`} color="primary" variant="light" size="small" />
|
||||
<Chip label={<Typography noWrap color="secondary">{dayjs(startdate).format('DD/MM/YYYY')} - {dayjs(enddate).format('DD/MM/YYYY')}</Typography>} variant="combined" color='warning' size='small' />
|
||||
|
||||
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
}
|
||||
{(!startdate || !enddate) &&
|
||||
<>
|
||||
<Stack direction='row' spacing={2}>
|
||||
<Chip label='Orders-All' color="primary" variant="light" size="small" />
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
|
||||
<Tooltip title='Order Filter'>
|
||||
<IconButton
|
||||
<Tooltip title='Order Filter'>
|
||||
<IconButton
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
color="secondary"
|
||||
variant="light"
|
||||
sx={{ color: 'text.primary', bgcolor: 'grey.200', display: { xs: 'none', md: 'flex' } }}
|
||||
color="secondary"
|
||||
variant="light"
|
||||
sx={{ color: 'text.primary', bgcolor: 'grey.200', display: { xs: 'none', md: 'flex' } }}
|
||||
|
||||
aria-haspopup="true"
|
||||
aria-haspopup="true"
|
||||
|
||||
|
||||
|
||||
|
||||
onClick={() => setOpen(true)} >
|
||||
<FilterList />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
onClick={() => setOpen(true)} >
|
||||
<FilterList />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user