22122023
This commit is contained in:
Submodule nearlexpressbuild updated: a31bad3ad7...c38817a742
@@ -1892,8 +1892,8 @@ const Orders = () => {
|
|||||||
const fetchpercentage = async (tid) => {
|
const fetchpercentage = async (tid) => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
try {
|
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) => {
|
.then((res) => {
|
||||||
console.log(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={{ xs: 'column', md: 'row' }} justifyContent='space-between' alignItems='center' spacing={2}>
|
||||||
<Stack direction='column' alignItems='flex-start' spacing={1}>
|
<Stack direction='column' alignItems='flex-start' spacing={1}>
|
||||||
<Typography variant="h3">Orders</Typography>
|
<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> */}
|
||||||
{/*
|
{/*
|
||||||
<Stack direction='row' spacing={2}>
|
<Stack direction='row' spacing={2}>
|
||||||
@@ -2016,27 +2002,8 @@ const Orders = () => {
|
|||||||
|
|
||||||
</Box>*/}
|
</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>
|
</Stack>
|
||||||
</Grid>
|
</Grid>
|
||||||
{/* <Grid item xs={12} lg={3} sm={6}>
|
{/* <Grid item xs={12} lg={3} sm={6}>
|
||||||
@@ -2054,7 +2021,7 @@ const Orders = () => {
|
|||||||
|
|
||||||
: modified} percentage={percentage2.toString()} color={theme.palette.secondary[600]} />
|
: modified} percentage={percentage2.toString()} color={theme.palette.secondary[600]} />
|
||||||
</Grid> */}
|
</Grid> */}
|
||||||
<Grid item xs={12} lg={3} sm={6}>
|
<Grid item xs={12} lg={3} sm={6}>
|
||||||
<HoverSocialCard primary="All orders" secondary={(allorders === '') ?
|
<HoverSocialCard primary="All orders" secondary={(allorders === '') ?
|
||||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||||
|
|
||||||
@@ -2084,7 +2051,7 @@ const Orders = () => {
|
|||||||
|
|
||||||
: coveredorders} percentage={percentage3.toString()} color={theme.palette.success.main} />
|
: coveredorders} percentage={percentage3.toString()} color={theme.palette.success.main} />
|
||||||
</Grid>
|
</Grid>
|
||||||
{/*
|
{/*
|
||||||
<Grid item xs={12} lg={3} sm={6}>
|
<Grid item xs={12} lg={3} sm={6}>
|
||||||
<HoverSocialCard primary="Closed orders" secondary={(closed === '') ?
|
<HoverSocialCard primary="Closed orders" secondary={(closed === '') ?
|
||||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||||
@@ -2092,17 +2059,56 @@ const Orders = () => {
|
|||||||
: closed} percentage={percentage4.toString()} color={theme.palette.warning.main} />
|
: closed} percentage={percentage4.toString()} color={theme.palette.warning.main} />
|
||||||
</Grid>
|
</Grid>
|
||||||
*/}
|
*/}
|
||||||
<Grid item xs={12} lg={3} sm={6}>
|
<Grid item xs={12} lg={3} sm={6}>
|
||||||
<HoverSocialCard primary="Cancelled Orders" secondary={(cancelled === '') ?
|
<HoverSocialCard primary="Cancelled Orders" secondary={(cancelled === '') ?
|
||||||
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
<Skeleton sx={{ width: '30px' }} animation="wave" />
|
||||||
|
|
||||||
: cancelled} percentage={percentage4.toString()} color={theme.palette.secondary[600]} />
|
: cancelled} percentage={percentage4.toString()} color={theme.palette.secondary[600]} />
|
||||||
</Grid>
|
</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}>
|
<Grid item xs={12}>
|
||||||
<Box sx={{ overflow: "auto", border: 1, borderColor: 'grey.200', borderRadius: 2, backgroundColor: '#fff', minHeight: 350 }}>
|
<Box sx={{ overflow: "auto", border: 1, borderColor: 'grey.200', borderRadius: 2, backgroundColor: '#fff', minHeight: 350 }}>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user