12122023
This commit is contained in:
Submodule nearlexpressbuild updated: c178408d13...7af311220e
@@ -7,7 +7,8 @@ import { DRAWER_WIDTH, ThemeMode } from 'config';
|
||||
|
||||
const openedMixin = (theme) => ({
|
||||
width: DRAWER_WIDTH,
|
||||
borderRight: `1px solid ${theme.palette.divider}`,
|
||||
// borderRight: `1px solid ${theme.palette.divider}`,
|
||||
borderRight: 'none',
|
||||
transition: theme.transitions.create('width', {
|
||||
easing: theme.transitions.easing.sharp,
|
||||
duration: theme.transitions.duration.enteringScreen
|
||||
@@ -22,7 +23,7 @@ const closedMixin = (theme) => ({
|
||||
easing: theme.transitions.easing.sharp,
|
||||
duration: theme.transitions.duration.leavingScreen
|
||||
}),
|
||||
overflowX: 'hidden',
|
||||
// overflowX: 'hidden',
|
||||
width: theme.spacing(7.5),
|
||||
borderRight: 'none',
|
||||
boxShadow: theme.customShadows.z1,
|
||||
|
||||
@@ -33,7 +33,10 @@ const MainDrawer = ({ window }) => {
|
||||
return (
|
||||
<Box component="nav" sx={{ flexShrink: { md: 0 }, zIndex: 1200 }} aria-label="mailbox folders">
|
||||
{!matchDownMD ? (
|
||||
<MiniDrawerStyled variant="permanent" open={drawerOpen} >
|
||||
<MiniDrawerStyled
|
||||
variant="permanent"
|
||||
open={drawerOpen}
|
||||
>
|
||||
{drawerHeader}
|
||||
{drawerContent}
|
||||
</MiniDrawerStyled>
|
||||
|
||||
@@ -50,7 +50,12 @@ const MobileSection = () => {
|
||||
<>
|
||||
<Box sx={{ flexShrink: 0, ml: 0.75 }}>
|
||||
<IconButton
|
||||
sx={{ color: 'text.primary', bgcolor: open ? iconBackColorOpen : iconBackColor }}
|
||||
// sx={{ color: 'text.primary', bgcolor: open ? iconBackColorOpen : iconBackColor }}
|
||||
sx={{ color: '#fff', bgcolor: 'transparent', ml: { xs: 0, lg: -2 },
|
||||
fontSize:'25px',
|
||||
':hover':{
|
||||
color: '#fff', bgcolor: 'transparent'
|
||||
} }}
|
||||
aria-label="open more menu"
|
||||
ref={anchorRef}
|
||||
aria-controls={open ? 'menu-list-grow' : undefined}
|
||||
|
||||
@@ -71,6 +71,7 @@ const Notification = () => {
|
||||
|
||||
return (
|
||||
<Box sx={{ flexShrink: 0, ml: 0.75 }}>
|
||||
<Tooltip title='Notifications'>
|
||||
<IconButton
|
||||
// color="secondary"
|
||||
// variant="light"
|
||||
@@ -103,6 +104,7 @@ const Notification = () => {
|
||||
<BellOutlined />
|
||||
</Badge>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Popper
|
||||
placement={matchesXs ? 'bottom' : 'bottom-end'}
|
||||
open={open}
|
||||
|
||||
@@ -96,6 +96,7 @@ navigate('/login')
|
||||
|
||||
return (
|
||||
<Box sx={{ flexShrink: 0, ml: 0.75 }}>
|
||||
<Tooltip title='Profile'>
|
||||
<ButtonBase
|
||||
sx={{
|
||||
p: 0.25,
|
||||
@@ -120,6 +121,7 @@ navigate('/login')
|
||||
</Typography>
|
||||
</Stack>
|
||||
</ButtonBase>
|
||||
</Tooltip>
|
||||
<Popper
|
||||
placement="bottom-end"
|
||||
open={open}
|
||||
|
||||
@@ -237,9 +237,14 @@ const navigate = useNavigate()
|
||||
|
||||
|
||||
<Notification />
|
||||
|
||||
{/* <Message /> */}
|
||||
{!matchesXs && <Profile />}
|
||||
{matchesXs && <MobileSection />}
|
||||
{/* {!matchesXs && <Profile />}
|
||||
{matchesXs && <MobileSection />} */}
|
||||
<Tooltip title='Notifications'>
|
||||
|
||||
<Profile />
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</>
|
||||
|
||||
@@ -167,7 +167,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
"contactno": '',
|
||||
"latitude": '',
|
||||
"longitude": ''
|
||||
}])
|
||||
// console.log(dayjs())
|
||||
}
|
||||
@@ -269,7 +271,7 @@ const Createorder = () => {
|
||||
"paymentstatus": 0,
|
||||
"deliverycharge": 0,
|
||||
"deliverytime": `${dayjs(startdate).format('YYYY-MM-DD')} ${dayjs(val.deliverytime.$d).format('HH:mm:ss')}`,
|
||||
"deliverylocationid": val.deliverylocationid, //
|
||||
"deliverylocationid": val.deliverylocationid,
|
||||
"deliveryaddress": val.address,
|
||||
"pickupaddress": tenantinfo.address,
|
||||
"pickuplat": tenantinfo.latitude,
|
||||
@@ -279,7 +281,10 @@ const Createorder = () => {
|
||||
"tenantuserid": parseInt(localStorage.getItem('tenantid')),
|
||||
"categoryid": tenantinfo.categoryid,
|
||||
"subcategoryid": tenantinfo.subcategoryid,
|
||||
"partnerid":tenantinfo.partnerid
|
||||
"partnerid": tenantinfo.partnerid,
|
||||
"deliverylat":val.latitude,
|
||||
"deliverylong":val.longitude
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
@@ -499,7 +504,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
"contactno": '',
|
||||
"latitude": '',
|
||||
"longitude": ''
|
||||
}])
|
||||
}}>Single</Button>
|
||||
<Button variant={(tabstatus == 1) ? 'contained' : 'outlined'} onClick={() => {
|
||||
@@ -511,7 +518,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
"contactno": '',
|
||||
"latitude": '',
|
||||
"longitude": ''
|
||||
}])
|
||||
}}>Multiple</Button>
|
||||
</ButtonGroup>
|
||||
@@ -822,7 +831,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": address.deliverylocationid,
|
||||
"clientname": address.firstname,
|
||||
"contactno": address.contactno
|
||||
"contactno": address.contactno,
|
||||
"latitude": address.latitude,
|
||||
"longitude": address.longitude
|
||||
}])
|
||||
} else {
|
||||
if (orderarr.find((val2) => val2.customerid == address.customerid)) {
|
||||
@@ -839,7 +850,9 @@ const Createorder = () => {
|
||||
"deliverytime": val2.deliverytime,
|
||||
"deliverylocationid": val2.deliverylocationid,
|
||||
"clientname": val2.clientname,
|
||||
"contactno": val2.contactno
|
||||
"contactno": val2.contactno,
|
||||
"latitude": val2.latitude,
|
||||
"longitude": val2.longitude
|
||||
})
|
||||
})
|
||||
setOrderarr([...arr1])
|
||||
@@ -851,7 +864,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
"contactno": '',
|
||||
"latitude": '',
|
||||
"longitude": ''
|
||||
}])
|
||||
}
|
||||
} else {
|
||||
@@ -864,7 +879,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": address.deliverylocationid,
|
||||
"clientname": address.firstname,
|
||||
"contactno": address.contactno
|
||||
"contactno": address.contactno,
|
||||
"latitude": address.latitude,
|
||||
"longitude": address.longitude
|
||||
})
|
||||
setOrderarr([...arr])
|
||||
}
|
||||
@@ -881,7 +898,9 @@ const Createorder = () => {
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": address.deliverylocationid,
|
||||
"clientname": address.firstname,
|
||||
"contactno": address.contactno
|
||||
"contactno": address.contactno,
|
||||
"latitude": address.latitude,
|
||||
"longitude": address.longitude
|
||||
}])
|
||||
|
||||
// console.log({
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// import React from 'react';
|
||||
// import Createstaff from 'pages/createstaff'
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
import { DeleteFilled, NotificationOutlined } from '@ant-design/icons';
|
||||
|
||||
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
@@ -64,7 +67,8 @@ import {
|
||||
|
||||
import {
|
||||
SearchOutlined, EnvironmentOutlined, UserOutlined,
|
||||
// MoreOutlined
|
||||
// MoreOutlined ,
|
||||
CloseOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { PopupTransition } from 'components/@extended/Transitions';
|
||||
|
||||
@@ -224,11 +228,11 @@ import {
|
||||
disablePadding: false,
|
||||
label: 'STATUS',
|
||||
},
|
||||
// {
|
||||
// id: 'action',
|
||||
// disablePadding: false,
|
||||
// label: 'ACTION',
|
||||
// }
|
||||
{
|
||||
id: 'action',
|
||||
disablePadding: false,
|
||||
label: 'ACTION',
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -294,6 +298,53 @@ import {
|
||||
const [dialogopen, setDialogopen] = useState(false);
|
||||
const [stafflist, setStafflist] = useState([])
|
||||
const [loading1, setLoading1] = useState(false)
|
||||
const [open,setOpen]=useState(false);
|
||||
const [orderheaderid,setOrderheaderid]=useState('')
|
||||
|
||||
const cancelorder = async () => {
|
||||
|
||||
await axios.put(`${process.env.REACT_APP_URL}/orders/updateorder`, {
|
||||
"orderheaderid": orderheaderid,
|
||||
"orderstatus": "cancelled",
|
||||
"cancelled": dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
|
||||
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
if (res.data.status) {
|
||||
// if (orderheaderid && tenantid) {
|
||||
// fetchorderdetails();
|
||||
// fetchorderaddons();
|
||||
// fetchorderattires();
|
||||
// }
|
||||
enqueueSnackbar('Order Cancelled Successfully', {
|
||||
variant: 'success', anchorOrigin: { vertical: 'top', horizontal: 'right' },
|
||||
autoHideDuration: 2000
|
||||
})
|
||||
handleClose(true);
|
||||
|
||||
if (localStorage.getItem('tenantid')) {
|
||||
setTenantid(localStorage.getItem('tenantid'))
|
||||
let val = localStorage.getItem('tenantid')
|
||||
|
||||
fetchtable(val);
|
||||
fetchpercentage(val);
|
||||
fetchtableuncovered(val);
|
||||
fetchtablecovered(val);
|
||||
fetchtablecancelled(val);
|
||||
fetchtableassigned(val);
|
||||
fetchtablepicked(val);
|
||||
fetchtablecreated(val);
|
||||
}
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
const fetchstafflist = async (odid) => {
|
||||
@@ -371,10 +422,73 @@ import {
|
||||
[order, orderBy, page, rowsPerPage],
|
||||
);
|
||||
|
||||
const handleClose = () => {
|
||||
setOpen(false);
|
||||
setOrderheaderid('')
|
||||
};
|
||||
|
||||
|
||||
function AlertCustomerDelete({
|
||||
// title,
|
||||
open, handleClose }) {
|
||||
// const [deletepassword, setDeletepassword] = useState('');
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
open={open}
|
||||
onClose={()=>handleClose(false)}
|
||||
// keepMounted
|
||||
// TransitionComponent={PopupTransition}
|
||||
maxWidth="xs"
|
||||
// aria-labelledby="column-delete-title"
|
||||
// aria-describedby="column-delete-description"
|
||||
>
|
||||
<DialogContent sx={{ mt: 2, my: 1 }}>
|
||||
<Stack alignItems="center" spacing={3.5}>
|
||||
<Avatar color="error" sx={{ width: 72, height: 72, fontSize: '1.75rem' }}>
|
||||
<DeleteFilled />
|
||||
</Avatar>
|
||||
{/* <Grid >
|
||||
<Chip label={orderid.slice(4)} variant="combined" color='warning' size='small' />
|
||||
</Grid> */}
|
||||
<Stack spacing={2}>
|
||||
<Typography variant="h4" align="center">
|
||||
Are you sure you want to cancel this order?
|
||||
</Typography>
|
||||
|
||||
{/* <Typography variant="h4" align="center">
|
||||
Please type in the order number to confirm.
|
||||
</Typography> */}
|
||||
|
||||
|
||||
</Stack>
|
||||
|
||||
<Stack direction="row" spacing={2} sx={{ width: 1 }}>
|
||||
<Button fullWidth color="error" variant="contained" onClick={() => {
|
||||
// if (deletepassword === orderid.slice(4)) {
|
||||
cancelorder();
|
||||
// }
|
||||
|
||||
}} autoFocus>
|
||||
Yes, Cancel
|
||||
</Button>
|
||||
<Button fullWidth onClick={() =>{
|
||||
handleClose(false)
|
||||
} } color="secondary" variant="outlined">
|
||||
No
|
||||
</Button>
|
||||
|
||||
</Stack>
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<Box sx={{ width: '100%' }}>
|
||||
<AlertCustomerDelete open={open} handleClose={handleClose} />
|
||||
|
||||
<TableContainer sx={{ width: '100%', borderBottom: 1, borderColor: 'divider' }}>
|
||||
|
||||
@@ -517,9 +631,14 @@ import {
|
||||
<Typography variant='body2' noWrap>{row.orderid}</Typography>
|
||||
<Typography noWrap
|
||||
sx={{ fontSize: '11px' }}>
|
||||
{dayjs(row.deliverydate).utc().format('MM/DD/YYYY hh:mm A')}
|
||||
{dayjs(row.deliverydate).utc().format('MM/DD/YYYY')}
|
||||
</Typography>
|
||||
<Typography noWrap
|
||||
sx={{ fontSize: '11px' }}
|
||||
variant='h5'
|
||||
>
|
||||
{dayjs(row.deliverydate).utc().format('hh:mm A')}
|
||||
</Typography>
|
||||
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<Stack direction='column'>
|
||||
@@ -648,25 +767,39 @@ import {
|
||||
|
||||
|
||||
|
||||
<TableCell>
|
||||
|
||||
{/* <Tooltip title='View'>
|
||||
{(row.orderstatus == 'created')&&
|
||||
|
||||
<>
|
||||
|
||||
<Tooltip title='Cancel'>
|
||||
<IconButton
|
||||
disabled
|
||||
// disabled
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
navigate(`/details`, {
|
||||
state: {
|
||||
orderheaderid: row.orderheaderid,
|
||||
tenantid: row.tenantid
|
||||
}
|
||||
})
|
||||
setOrderheaderid(row.orderheaderid)
|
||||
setOpen(true)
|
||||
// navigate(`/details`, {
|
||||
// state: {
|
||||
// orderheaderid: row.orderheaderid,
|
||||
// tenantid: row.tenantid
|
||||
// }
|
||||
// })
|
||||
}}>
|
||||
<EyeTwoTone twoToneColor={theme.palette.secondary.main} />
|
||||
{/* <EyeTwoTone twoToneColor={theme.palette.secondary.main} /> */}
|
||||
<CloseOutlined
|
||||
style={{
|
||||
color:theme.palette.error.main
|
||||
}}
|
||||
// twoToneColor={theme.palette.primary.main}
|
||||
/>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</>
|
||||
|
||||
</TableCell> */}
|
||||
}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow >
|
||||
<TableCell style={{ paddingBottom: 0, paddingTop: 0, paddingLeft: 0, paddingRight: 0 }} colSpan={8} sx={{ width: '100%' }}>
|
||||
@@ -1085,10 +1218,10 @@ import {
|
||||
const [completed, setCompleted] = useState('');
|
||||
const [closed, setClosed] = useState('');
|
||||
const [picked,setPicked] = useState('')
|
||||
const [created,setCreated]=useState('')
|
||||
|
||||
|
||||
|
||||
const [tabstatus, setTabstatus] = useState('All Orders');
|
||||
const [tabstatus, setTabstatus] = useState('Created');
|
||||
const [loading, setLoading] = useState(true)
|
||||
const theme = useTheme();
|
||||
let [rows, setRows] = useState([])
|
||||
@@ -1109,8 +1242,8 @@ import {
|
||||
|
||||
setTabvalue(i);
|
||||
|
||||
if (i === 0) setTabstatus('All orders')
|
||||
// if (i === 1) setTabstatus('Created')
|
||||
// if (i === 0) setTabstatus('All orders')
|
||||
if (i === 0) setTabstatus('Created')
|
||||
// if (i === 2) setTabstatus('Modified')
|
||||
if (i === 1) setTabstatus('Pending')
|
||||
|
||||
@@ -1195,11 +1328,11 @@ import {
|
||||
// if (tabstatus === 'Cancelled') setRows(orderarrcancelled)
|
||||
// if (tabstatus === 'Assigned') setRows(orderarrassigned)
|
||||
// if (tabstatus === 'Confirmed') setRows(orderarrconfirmed)
|
||||
// if (tabstatus === 'Modified') setRows(orderarrmodified)
|
||||
if (tabstatus === 'Created') setRows(orderarrcreated)
|
||||
|
||||
if (tabstatus === 'All orders') setRows(orderarr)
|
||||
if (tabstatus === 'Delivered') setRows(orderarrcovered)
|
||||
if (tabstatus === 'Pending') setRows(orderarrcreated)
|
||||
if (tabstatus === 'Pending') setRows(orderarruncovered)
|
||||
|
||||
// if (tabstatus === 'Active') setRows(orderarractive)
|
||||
// if (tabstatus === 'Pending') setRows(orderarruncovered)
|
||||
@@ -1256,9 +1389,10 @@ import {
|
||||
|
||||
return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
// || val.tenantname.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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1277,6 +1411,8 @@ import {
|
||||
|| 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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1292,9 +1428,10 @@ import {
|
||||
|
||||
return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.eventname.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.tenantname.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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1306,19 +1443,21 @@ import {
|
||||
|
||||
} else if (tabstatus === 'Pending') {
|
||||
if (searchword) {
|
||||
let arr = orderarruncovered.filter((val) => {
|
||||
let arr = orderarrcreated.filter((val) => {
|
||||
|
||||
return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| 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())
|
||||
|
||||
)
|
||||
})
|
||||
console.log(arr)
|
||||
setRows([...arr])
|
||||
} else {
|
||||
setRows([...orderarruncovered])
|
||||
setRows([...orderarrcreated])
|
||||
}
|
||||
|
||||
} else if (tabstatus === 'Cancelled') {
|
||||
@@ -1327,9 +1466,10 @@ import {
|
||||
|
||||
return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.eventname.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.tenantname.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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1347,6 +1487,8 @@ import {
|
||||
|| 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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1364,6 +1506,8 @@ import {
|
||||
|| 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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1383,6 +1527,7 @@ import {
|
||||
|| val.tenantname.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordervalue.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1402,6 +1547,7 @@ import {
|
||||
|| val.tenantname.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.ordervalue.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|
||||
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1416,6 +1562,8 @@ import {
|
||||
|| 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())
|
||||
|
||||
)
|
||||
})
|
||||
@@ -1501,6 +1649,9 @@ import {
|
||||
arr = [...arr, { ...val, sno: i + 1 }];
|
||||
})
|
||||
setArrcreated(arr)
|
||||
if(tabstatus == 'Created'){
|
||||
setRows(arr)
|
||||
}
|
||||
// }
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
@@ -1729,7 +1880,7 @@ import {
|
||||
setUncoveredorders(res.data.details.pending.toString())
|
||||
// setActiveorders(res.data.details.assigned.toString());
|
||||
setAssigned(res.data.details.accepted.toString());
|
||||
|
||||
setCreated(res.data.details.created.toString())
|
||||
setClosed(res.data.details.delivered.toString());
|
||||
setPicked(res.data.details.picked.toString())
|
||||
setPercentage1((Math.round((res.data.details.pending/ res.data.details.total) * 100) || 0).toString())
|
||||
@@ -1935,14 +2086,14 @@ import {
|
||||
|
||||
}}>
|
||||
<Tabs value={tabvalue} onChange={handleChangetab} variant="scrollable" scrollButtons="auto" >
|
||||
<Tab label="All orders"
|
||||
{/* <Tab label="All orders"
|
||||
iconPosition="end"
|
||||
icon={<Chip label={allorders} color="primary" variant="light" size="small" />}
|
||||
/>
|
||||
{/* <Tab label="Created"
|
||||
icon={<Chip label={modified} color="primary" variant="light" size="small" />}
|
||||
iconPosition="end"
|
||||
/> */}
|
||||
<Tab label="Created"
|
||||
icon={<Chip label={created} color="primary" variant="light" size="small" />}
|
||||
iconPosition="end"
|
||||
/>
|
||||
<Tab label="Pending"
|
||||
icon={<Chip label={uncoveredorders} color="primary" variant="light" size="small" />}
|
||||
iconPosition="end"
|
||||
@@ -2026,7 +2177,7 @@ import {
|
||||
|
||||
</Grid>
|
||||
|
||||
<Dialog open={open} >
|
||||
{/* <Dialog open={open} >
|
||||
<DialogTitle align='left'>
|
||||
<Typography variant='h4'>Select Filter Options</Typography>
|
||||
</DialogTitle>
|
||||
@@ -2116,7 +2267,7 @@ import {
|
||||
</Stack>
|
||||
|
||||
</Dialog>
|
||||
|
||||
*/}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user