22122023
This commit is contained in:
Submodule nearlexpressbuild updated: a31bad3ad7...c38817a742
@@ -1892,8 +1892,8 @@ const Orders = () => {
|
||||
const fetchpercentage = async (tid) => {
|
||||
setLoading(true)
|
||||
try {
|
||||
// await axios.get(`${process.env.REACT_APP_URL2}/orders/orderlistsummary?fromdate=${startdate}&todate=${enddate}`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/getordersummary/?tenantid=${tid}&fromdate=${startdate}&todate=${enddate}`)
|
||||
// await axios.get(`${process.env.REACT_APP_URL}/orders/getordersummary/?tenantid=${tid}&fromdate=${startdate}&todate=${enddate}`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/getordersummary/?tenantid=${tid}`)
|
||||
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
@@ -1948,22 +1948,8 @@ const Orders = () => {
|
||||
<Stack direction={{ xs: 'column', md: 'row' }} justifyContent='space-between' alignItems='center' spacing={2}>
|
||||
<Stack direction='column' alignItems='flex-start' spacing={1}>
|
||||
<Typography variant="h3">Orders</Typography>
|
||||
{(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) &&
|
||||
<>
|
||||
<Stack direction='row' spacing={2}>
|
||||
<Chip label='Orders-All' color="primary" variant="light" size="small" />
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
|
||||
{/* </Stack> */}
|
||||
{/*
|
||||
<Stack direction='row' spacing={2}>
|
||||
@@ -2016,27 +2002,8 @@ const Orders = () => {
|
||||
|
||||
</Box>*/}
|
||||
|
||||
<Tooltip title='Order Filter'>
|
||||
<IconButton
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
color="secondary"
|
||||
variant="light"
|
||||
sx={{ color: 'text.primary', bgcolor: 'grey.200', display: { xs: 'none', md: 'flex' } }}
|
||||
|
||||
aria-haspopup="true"
|
||||
|
||||
|
||||
|
||||
|
||||
onClick={() => setOpen(true)} >
|
||||
<FilterList />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
</Stack>
|
||||
</Grid>
|
||||
{/* <Grid item xs={12} lg={3} sm={6}>
|
||||
@@ -2054,7 +2021,7 @@ const Orders = () => {
|
||||
|
||||
: modified} percentage={percentage2.toString()} color={theme.palette.secondary[600]} />
|
||||
</Grid> */}
|
||||
<Grid item xs={12} lg={3} sm={6}>
|
||||
<Grid item xs={12} lg={3} sm={6}>
|
||||
<HoverSocialCard primary="All orders" secondary={(allorders === '') ?
|
||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||
|
||||
@@ -2084,7 +2051,7 @@ const Orders = () => {
|
||||
|
||||
: coveredorders} percentage={percentage3.toString()} color={theme.palette.success.main} />
|
||||
</Grid>
|
||||
{/*
|
||||
{/*
|
||||
<Grid item xs={12} lg={3} sm={6}>
|
||||
<HoverSocialCard primary="Closed orders" secondary={(closed === '') ?
|
||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||
@@ -2092,17 +2059,56 @@ const Orders = () => {
|
||||
: closed} percentage={percentage4.toString()} color={theme.palette.warning.main} />
|
||||
</Grid>
|
||||
*/}
|
||||
<Grid item xs={12} lg={3} sm={6}>
|
||||
<HoverSocialCard primary="Cancelled Orders" secondary={(cancelled === '') ?
|
||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||
<Grid item xs={12} lg={3} sm={6}>
|
||||
<HoverSocialCard primary="Cancelled Orders" secondary={(cancelled === '') ?
|
||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||
|
||||
: cancelled} percentage={percentage4.toString()} color={theme.palette.secondary[600]} />
|
||||
</Grid>
|
||||
: cancelled} percentage={percentage4.toString()} color={theme.palette.secondary[600]} />
|
||||
</Grid>
|
||||
|
||||
|
||||
<Grid item md={8} sx={{ display: { sm: 'none', md: 'block', lg: 'none' } }} />
|
||||
{/* <Grid item md={8} sx={{ display: { sm: 'none', md: 'block', lg: 'none' } }} /> */}
|
||||
<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) &&
|
||||
<>
|
||||
<Stack direction='row' spacing={2}>
|
||||
<Chip label='Orders-All' color="primary" variant="light" size="small" />
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
|
||||
<Tooltip title='Order Filter'>
|
||||
<IconButton
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
color="secondary"
|
||||
variant="light"
|
||||
sx={{ color: 'text.primary', bgcolor: 'grey.200', display: { xs: 'none', md: 'flex' } }}
|
||||
|
||||
aria-haspopup="true"
|
||||
|
||||
|
||||
|
||||
|
||||
onClick={() => setOpen(true)} >
|
||||
<FilterList />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12}>
|
||||
<Box sx={{ overflow: "auto", border: 1, borderColor: 'grey.200', borderRadius: 2, backgroundColor: '#fff', minHeight: 350 }}>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user