This commit is contained in:
Malai Raja
2023-12-13 18:58:52 +05:30
parent e076b8942f
commit a38ff4f960

View File

@@ -631,7 +631,7 @@ import {
<Typography variant='body2' noWrap>{row.orderid}</Typography> <Typography variant='body2' noWrap>{row.orderid}</Typography>
<Typography noWrap <Typography noWrap
sx={{ fontSize: '11px' }}> sx={{ fontSize: '11px' }}>
{dayjs(row.deliverydate).utc().format('MM/DD/YYYY')} {dayjs(row.deliverydate).utc().format('DD/MM/YYYY')}
</Typography> </Typography>
<Typography noWrap <Typography noWrap
sx={{ fontSize: '11px' }} sx={{ fontSize: '11px' }}
@@ -773,9 +773,10 @@ import {
<> <>
<Tooltip title='Cancel'> <Tooltip title='Cancel'>
<IconButton <IconButton
// disabled // disabled={(row.orderstatus != 'created')}
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
setOrderheaderid(row.orderheaderid) setOrderheaderid(row.orderheaderid)
@@ -790,7 +791,8 @@ import {
{/* <EyeTwoTone twoToneColor={theme.palette.secondary.main} /> */} {/* <EyeTwoTone twoToneColor={theme.palette.secondary.main} /> */}
<CloseOutlined <CloseOutlined
style={{ style={{
color:theme.palette.error.main color:theme.palette.error.main,
}} }}
// twoToneColor={theme.palette.primary.main} // twoToneColor={theme.palette.primary.main}
/> />
@@ -1443,7 +1445,7 @@ import {
} else if (tabstatus === 'Pending') { } else if (tabstatus === 'Pending') {
if (searchword) { if (searchword) {
let arr = orderarrcreated.filter((val) => { let arr = orderarruncovered.filter((val) => {
return (val.orderid.toLowerCase().includes(searchword.toLowerCase()) return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|| val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase()) || val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
@@ -1457,7 +1459,7 @@ import {
console.log(arr) console.log(arr)
setRows([...arr]) setRows([...arr])
} else { } else {
setRows([...orderarrcreated]) setRows([...orderarruncovered])
} }
} else if (tabstatus === 'Cancelled') { } else if (tabstatus === 'Cancelled') {
@@ -1465,10 +1467,10 @@ import {
let arr = orderarrcancelled.filter((val) => { let arr = orderarrcancelled.filter((val) => {
return (val.orderid.toLowerCase().includes(searchword.toLowerCase()) return (val.orderid.toLowerCase().includes(searchword.toLowerCase())
|| val.eventname.toLowerCase().includes(searchword.toLowerCase()) || val.pickupaddress.toString().toLowerCase().includes(searchword.toLowerCase())
|| val.customername.toLowerCase().includes(searchword.toLowerCase()) || val.ordernotes.toString().toLowerCase().includes(searchword.toLowerCase())
|| val.ordervalue.toString().toLowerCase().includes(searchword.toLowerCase())
|| val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase()) || val.deliveryaddress.toLowerCase().includes(searchword.toLowerCase())
|| val.customername.toLowerCase().includes(searchword.toLowerCase())
|| val.contactno.toString().toLowerCase().includes(searchword.toLowerCase()) || val.contactno.toString().toLowerCase().includes(searchword.toLowerCase())
) )
@@ -1574,6 +1576,26 @@ import {
setRows([...orderarrpicked]) setRows([...orderarrpicked])
} }
}else if (tabstatus === 'Created') {
if (searchword) {
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([...orderarrcreated])
}
} }
}, [orderarr, searchword]) }, [orderarr, searchword])