This commit is contained in:
Malai Raja
2023-12-22 19:00:13 +05:30
parent 9881ecda12
commit c975526536
2 changed files with 51 additions and 45 deletions

Submodule nearlexpressbuild updated: a31bad3ad7...c38817a742

View File

@@ -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}>
@@ -2100,9 +2067,48 @@ const Orders = () => {
</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 }}>