11122023
This commit is contained in:
Submodule nearlexpressbuild updated: 97d9155b79...c178408d13
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB |
@@ -47,7 +47,7 @@ const Header = () => {
|
||||
// variant="light"
|
||||
// sx={{ color: 'text.primary', bgcolor: drawerOpen ? iconBackColorOpen : iconBackColor, ml: { xs: 0, lg: -2 } }}
|
||||
sx={{ color: '#fff', bgcolor: 'transparent', ml: { xs: 0, lg: -2 },
|
||||
fontSize:'20px',
|
||||
fontSize:'25px',
|
||||
':hover':{
|
||||
color: '#fff', bgcolor: 'transparent'
|
||||
} }}
|
||||
|
||||
@@ -88,20 +88,17 @@ const Accountsettings = () => {
|
||||
<Grid container spacing={3}
|
||||
sx={{ mt: 1,height:'100%'}}
|
||||
>
|
||||
<Grid item xs={12} sm={5} md={4} xl={3}>
|
||||
{/* <Grid item xs={12} sm={5} md={4} xl={3}>
|
||||
<Grid container spacing={3} sx={{height:'100%'}}>
|
||||
<Grid item xs={12} sx={{height:'100%'}}>
|
||||
<MainCard sx={{height:'100%'}}>
|
||||
<Grid container spacing={3} sx={{height:'100%'}}>
|
||||
<Grid item xs={12} sx={{height:'100%'}}>
|
||||
<Stack direction="row" justifyContent="flex-end">
|
||||
{/* <Chip label="Pro" size="small" color="primary" /> */}
|
||||
</Stack>
|
||||
<Stack spacing={2.5} alignItems="center">
|
||||
<Avatar alt="Avatar 1"
|
||||
// size="xl"
|
||||
sx={{width:80,height:80}}
|
||||
// src={avatarImage(`./default.png`)}
|
||||
/>
|
||||
<Stack spacing={0.5} alignItems="center">
|
||||
<Typography variant="h5">{info.companyname || ''}</Typography>
|
||||
@@ -109,27 +106,7 @@ const Accountsettings = () => {
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Grid>
|
||||
{/* <Grid item xs={12}>
|
||||
<Divider />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Stack direction="row" justifyContent="space-around" alignItems="center">
|
||||
<Stack spacing={0.5} alignItems="center">
|
||||
<Typography variant="h5">86</Typography>
|
||||
<Typography color="secondary">Post</Typography>
|
||||
</Stack>
|
||||
<Divider orientation="vertical" flexItem />
|
||||
<Stack spacing={0.5} alignItems="center">
|
||||
<Typography variant="h5">40</Typography>
|
||||
<Typography color="secondary">Project</Typography>
|
||||
</Stack>
|
||||
<Divider orientation="vertical" flexItem />
|
||||
<Stack spacing={0.5} alignItems="center">
|
||||
<Typography variant="h5">4.5K</Typography>
|
||||
<Typography color="secondary">Members</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Grid>*/}
|
||||
|
||||
<Grid item xs={12}>
|
||||
<Divider />
|
||||
</Grid>
|
||||
@@ -149,7 +126,6 @@ const Accountsettings = () => {
|
||||
</ListItemIcon>
|
||||
<ListItemSecondaryAction>
|
||||
<Typography align="right">
|
||||
{/* (+1-876) 8654 239 581 */}
|
||||
{info.primarycontact || ''}
|
||||
</Typography>
|
||||
</ListItemSecondaryAction>
|
||||
@@ -160,7 +136,6 @@ const Accountsettings = () => {
|
||||
</ListItemIcon>
|
||||
<ListItemSecondaryAction>
|
||||
<Typography align="right">
|
||||
{/* New York */}
|
||||
{info.city}
|
||||
</Typography>
|
||||
</ListItemSecondaryAction>
|
||||
@@ -170,9 +145,7 @@ const Accountsettings = () => {
|
||||
<EnvironmentOutlined />
|
||||
</ListItemIcon>
|
||||
<ListItemSecondaryAction>
|
||||
{/* <Link align="right" href="https://google.com" target="_blank">
|
||||
https://anshan.dh.url
|
||||
</Link> */}
|
||||
|
||||
{info.state}
|
||||
</ListItemSecondaryAction>
|
||||
</ListItem>
|
||||
@@ -181,55 +154,41 @@ const Accountsettings = () => {
|
||||
</Grid>
|
||||
</MainCard>
|
||||
</Grid>
|
||||
{/* <Grid item xs={12}>
|
||||
<MainCard title="Skills">
|
||||
<Grid container spacing={1.25}>
|
||||
<Grid item xs={6}>
|
||||
<Typography color="secondary">Junior</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<LinearWithLabel value={30} />
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Typography color="secondary">UX Reseacher</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<LinearWithLabel value={80} />
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Typography color="secondary">Wordpress</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<LinearWithLabel value={90} />
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Typography color="secondary">HTML</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<LinearWithLabel value={30} />
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Typography color="secondary">Graphic Design</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<LinearWithLabel value={95} />
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Typography color="secondary">Code Style</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<LinearWithLabel value={75} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</MainCard>
|
||||
</Grid> */}
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={7} md={8} xl={9} >
|
||||
</Grid> */}
|
||||
<Grid item
|
||||
// xs={12} sm={7} md={8} xl={9}
|
||||
xs={12}
|
||||
// sm={7} md={8} xl={9}
|
||||
|
||||
>
|
||||
<Grid container spacing={3} >
|
||||
|
||||
<Grid item xs={12} >
|
||||
<MainCard title="Other Details" >
|
||||
<MainCard
|
||||
// title="Other Details"
|
||||
title={ <Stack direction="row" alignItems="center" spacing={1} justifyContent="flex-start">
|
||||
<Avatar
|
||||
alt=""
|
||||
size="sm"
|
||||
// src={row.profileimage}
|
||||
sx={{
|
||||
width: '25px',
|
||||
height: '25px'
|
||||
}}
|
||||
>
|
||||
|
||||
</Avatar>
|
||||
<Stack direction="column">
|
||||
<Typography variant="caption">{info.companyname}</Typography>
|
||||
{/* <Typography variant="caption" color="textSecondary">
|
||||
|
||||
{info.registrationno}
|
||||
</Typography> */}
|
||||
</Stack>
|
||||
</Stack>}
|
||||
>
|
||||
<List sx={{ py: 0 }}>
|
||||
<ListItem divider={!matchDownMD}>
|
||||
<Grid container spacing={3}>
|
||||
@@ -253,7 +212,6 @@ const Accountsettings = () => {
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Phone</Typography>
|
||||
<Typography>
|
||||
{/* (+1-876) <PatternFormat value={8654239581} displayType="text" type="text" format="#### ### ###" /> */}
|
||||
{info.primarycontact || ''}
|
||||
</Typography>
|
||||
</Stack>
|
||||
@@ -315,101 +273,7 @@ const Accountsettings = () => {
|
||||
</Typography>
|
||||
</MainCard>
|
||||
</Grid>
|
||||
{/* <Grid item xs={12}>
|
||||
<MainCard title="Education">
|
||||
<List sx={{ py: 0 }}>
|
||||
<ListItem divider>
|
||||
<Grid container spacing={matchDownMD ? 0.5 : 3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Master Degree (Year)</Typography>
|
||||
<Typography>2014-2017</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Institute</Typography>
|
||||
<Typography>-</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ListItem>
|
||||
<ListItem divider>
|
||||
<Grid container spacing={matchDownMD ? 0.5 : 3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Bachelor (Year)</Typography>
|
||||
<Typography>2011-2013</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Institute</Typography>
|
||||
<Typography>Imperial College London</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Grid container spacing={matchDownMD ? 0.5 : 3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">School (Year)</Typography>
|
||||
<Typography>2009-2011</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Institute</Typography>
|
||||
<Typography>School of London, England</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ListItem>
|
||||
</List>
|
||||
</MainCard>
|
||||
</Grid> */}
|
||||
{/* <Grid item xs={12}>
|
||||
<MainCard title="Emplyment">
|
||||
<List sx={{ py: 0 }}>
|
||||
<ListItem divider>
|
||||
<Grid container spacing={matchDownMD ? 0.5 : 3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Senior</Typography>
|
||||
<Typography color="secondary">Senior UI/UX designer (Year)</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Job Responsibility</Typography>
|
||||
<Typography>
|
||||
Perform task related to project manager with the 100+ team under my observation. Team management is key role in
|
||||
this company.
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>f
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Grid container spacing={matchDownMD ? 0.5 : 3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Trainee cum Project Manager (Year)</Typography>
|
||||
<Typography>2017-2019</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography color="secondary">Job Responsibility</Typography>
|
||||
<Typography>Team management is key role in this company.</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ListItem>
|
||||
</List>
|
||||
</MainCard>
|
||||
</Grid> */}
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -65,7 +65,10 @@ const Createclient = () => {
|
||||
const [primarycontact,setPrimarycontact]=useState('')
|
||||
const [firstname,setFirstname]=useState('');
|
||||
const [doorno,setDoorno]=useState('');
|
||||
const [landmark,setLandmark]=useState('')
|
||||
const [landmark,setLandmark]=useState('');
|
||||
const [tenantinfo, setTenantinfo] = useState({});
|
||||
|
||||
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -78,7 +81,9 @@ const Createclient = () => {
|
||||
useEffect(() => {
|
||||
// fetchprofiledetails(localStorage.getItem('appuserid'));
|
||||
// fetchprofiledetails(181);
|
||||
|
||||
if(localStorage.getItem('tenantid')){
|
||||
fetchtenantinfo(localStorage.getItem('tenantid'))
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -158,6 +163,21 @@ const Createclient = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const fetchtenantinfo = async (tid) => {
|
||||
setLoading(true)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/tenants/gettenantinfo/?tenantid=${tid}`)
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
if (res.data.status) {
|
||||
setTenantinfo(res.data.details);
|
||||
}
|
||||
setLoading(false)
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
setLoading(false)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedImage) {
|
||||
setAvatar(URL.createObjectURL(selectedImage));
|
||||
@@ -241,7 +261,7 @@ const Createclient = () => {
|
||||
"customerid":0,
|
||||
"configid":1,
|
||||
"firstname":firstname,
|
||||
"applocationid":3,
|
||||
"applocationid":tenantinfo.applolcationid,
|
||||
"profileimage":"",
|
||||
"dialcode":"+91",
|
||||
"contactno":mobilenumber,
|
||||
|
||||
@@ -59,6 +59,7 @@ import Geocode from "react-geocode";
|
||||
// import {setApi} from "react-geocode";
|
||||
import Autocomplete1 from "react-google-autocomplete";
|
||||
// import logo from 'assets/images/location.png'
|
||||
import Loader from 'components/Loader'
|
||||
|
||||
import {
|
||||
// EditOutlined,
|
||||
@@ -141,7 +142,7 @@ const Createorder = () => {
|
||||
|
||||
const [stafflist, setStafflist] = useState([]);
|
||||
const [loading2, setLoading2] = useState(false);
|
||||
|
||||
const [loading,setLoading]=useState(false)
|
||||
|
||||
|
||||
const [shiftarr, setShiftarr] = useState([]);
|
||||
@@ -163,12 +164,12 @@ const Createorder = () => {
|
||||
sno: 1,
|
||||
address: '',
|
||||
"customerid": '',
|
||||
"deliverytime": "",
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
}])
|
||||
console.log(orderarr)
|
||||
// console.log(dayjs())
|
||||
}
|
||||
}, [])
|
||||
|
||||
@@ -195,14 +196,17 @@ const Createorder = () => {
|
||||
}, [searchword])
|
||||
|
||||
const fetchtenantinfo = async (tid) => {
|
||||
setLoading(true)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/tenants/gettenantinfo/?tenantid=${tid}`)
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
if (res.data.status) {
|
||||
setTenantinfo(res.data.details);
|
||||
}
|
||||
setLoading(false)
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
setLoading(false)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -223,7 +227,7 @@ const Createorder = () => {
|
||||
|
||||
|
||||
|
||||
const createsubmitobj1 = () => {
|
||||
const createsubmitobj1 = async() => {
|
||||
let arr = []
|
||||
let timecheck = false;
|
||||
let addresscheck = false;
|
||||
@@ -243,7 +247,7 @@ const Createorder = () => {
|
||||
"moduleid": tenantinfo.moduleid,
|
||||
"configid": 7,
|
||||
"orderid": "",
|
||||
"customerid": val.customerid, //
|
||||
"customerid": val.customerid,
|
||||
"orderdate": dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
"orderstatus": "created",
|
||||
"pending": "",
|
||||
@@ -266,13 +270,16 @@ const Createorder = () => {
|
||||
"deliverycharge": 0,
|
||||
"deliverytime": `${dayjs(startdate).format('YYYY-MM-DD')} ${dayjs(val.deliverytime.$d).format('HH:mm:ss')}`,
|
||||
"deliverylocationid": val.deliverylocationid, //
|
||||
"delivceryaddress": val.address,
|
||||
"deliveryaddress": val.address,
|
||||
"pickupaddress": tenantinfo.address,
|
||||
"pickuplat": tenantinfo.latitude,
|
||||
"pickuplong": tenantinfo.longitude,
|
||||
"ordernotes": otherinstructions,
|
||||
"remarks": "",
|
||||
"tenantuserid": parseInt(localStorage.getItem('tenantid'))
|
||||
"tenantuserid": parseInt(localStorage.getItem('tenantid')),
|
||||
"categoryid":tenantinfo.categoryid,
|
||||
"subcategoryid":tenantinfo.subcategoryid,
|
||||
"partnerid":tenantinfo.partnerid
|
||||
})
|
||||
|
||||
})
|
||||
@@ -283,7 +290,28 @@ const Createorder = () => {
|
||||
opentoast('Choose Client')
|
||||
|
||||
} else {
|
||||
opentoast('success')
|
||||
setLoading(true)
|
||||
await axios.post(`${process.env.REACT_APP_URL}/orders/createorders`,arr)
|
||||
.then((res) => {
|
||||
if (res.data.status) {
|
||||
enqueueSnackbar('Order Created Successfully', {
|
||||
variant: 'success', anchorOrigin: { vertical: 'top', horizontal: 'right' },
|
||||
autoHideDuration: 2000
|
||||
})
|
||||
navigate('/orders')
|
||||
}else{
|
||||
opentoast(res.data.message)
|
||||
}
|
||||
setLoading(false)
|
||||
console.log(res)
|
||||
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
opentoast(err.data.message)
|
||||
setLoading(false)
|
||||
|
||||
})
|
||||
// opentoast('success')
|
||||
}
|
||||
|
||||
console.log(arr)
|
||||
@@ -433,6 +461,11 @@ const Createorder = () => {
|
||||
|
||||
|
||||
return <>
|
||||
{(loading) &&
|
||||
|
||||
<Loader />
|
||||
|
||||
}
|
||||
<Grid container rowSpacing={4.5} columnSpacing={2.75}>
|
||||
|
||||
<CardActions
|
||||
@@ -463,7 +496,7 @@ const Createorder = () => {
|
||||
sno: 1,
|
||||
address: '',
|
||||
"customerid": '',
|
||||
"deliverytime": "",
|
||||
"deliverytime":dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
@@ -475,7 +508,7 @@ const Createorder = () => {
|
||||
sno: 1,
|
||||
address: '',
|
||||
"customerid": '',
|
||||
"deliverytime": "",
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
@@ -785,17 +818,18 @@ const Createorder = () => {
|
||||
setOrderarr([{
|
||||
sno: 1,
|
||||
address: address.address,
|
||||
"customerid": '',
|
||||
"deliverytime": "",
|
||||
"deliverylocationid": '',
|
||||
"customerid": address.customerid,
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": address.deliverylocationid,
|
||||
"clientname": address.firstname,
|
||||
"contactno": address.contactno
|
||||
}])
|
||||
} else {
|
||||
if (orderarr.find((val2) => val2.address == address.address)) {
|
||||
if (orderarr.find((val2) => val2.customerid == address.customerid)) {
|
||||
if (orderarr.length > 1) {
|
||||
let arr = orderarr;
|
||||
arr.splice(address.sno - 1, 1);
|
||||
let res = orderarr.find((val2) => val2.customerid == address.customerid)
|
||||
arr.splice(res.sno - 1, 1);
|
||||
let arr1 = []
|
||||
arr.map((val2, k) => {
|
||||
arr1.push({
|
||||
@@ -814,7 +848,7 @@ const Createorder = () => {
|
||||
sno: 1,
|
||||
address: '',
|
||||
"customerid": '',
|
||||
"deliverytime": "",
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": '',
|
||||
"clientname": '',
|
||||
"contactno": ''
|
||||
@@ -827,7 +861,7 @@ const Createorder = () => {
|
||||
sno: arr.length + 1,
|
||||
'address': address.address,
|
||||
"customerid": address.customerid,
|
||||
"deliverytime": "",
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": address.deliverylocationid,
|
||||
"clientname":address.firstname,
|
||||
"contactno": address.contactno
|
||||
@@ -844,7 +878,7 @@ const Createorder = () => {
|
||||
sno: 1,
|
||||
address: address.address,
|
||||
"customerid": address.customerid,
|
||||
"deliverytime": "",
|
||||
"deliverytime": dayjs(),
|
||||
"deliverylocationid": address.deliverylocationid,
|
||||
"clientname":address.firstname,
|
||||
"contactno": address.contactno
|
||||
@@ -869,10 +903,11 @@ const Createorder = () => {
|
||||
cursor: 'pointer',
|
||||
p: 1.25,
|
||||
'&:hover': {
|
||||
bgcolor: theme.palette.primary.lighter,
|
||||
borderColor: theme.palette.primary.lighter
|
||||
// bgcolor: theme.palette.primary.lighter,
|
||||
// borderColor: theme.palette.primary.lighter
|
||||
bgcolor:(orderarr.find((val2) => val2.customerid == address.customerid)) ? '#e1bee7' : ''
|
||||
},
|
||||
bgcolor: (orderarr.find((val2) => val2.address == address.address)) ? '#e1bee7' : ''
|
||||
bgcolor: (orderarr.find((val2) => val2.customerid == address.customerid)) ? '#e1bee7' : ''
|
||||
}}
|
||||
>
|
||||
<Stack direction={'row'} justifyContent={'space-between'}>
|
||||
@@ -880,7 +915,7 @@ const Createorder = () => {
|
||||
{address.firstname}
|
||||
</Typography>
|
||||
{(orderarr.find((val2) => val2.address == address.address)) &&
|
||||
<CheckCircleIcon color='#662582' />
|
||||
<CheckCircleIcon color='primary' />
|
||||
}
|
||||
|
||||
</Stack>
|
||||
|
||||
@@ -517,9 +517,9 @@ import {
|
||||
<Typography variant='body2' noWrap>{row.orderid}</Typography>
|
||||
<Typography noWrap
|
||||
sx={{ fontSize: '11px' }}>
|
||||
{dayjs(row.orderdate).utc().format('MM/DD/YYYY')}
|
||||
{dayjs(row.deliverydate).utc().format('MM/DD/YYYY hh:mm A')}
|
||||
</Typography>
|
||||
|
||||
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<Stack direction='column'>
|
||||
@@ -536,7 +536,7 @@ import {
|
||||
<TableCell align="left">
|
||||
<Stack direction='column'>
|
||||
{/* <Typography variant="caption" > {row.eventname}</Typography> */}
|
||||
<Tooltip title={row.delivceryaddress}>
|
||||
<Tooltip title={row.deliveryaddress}>
|
||||
<Typography variant="caption" color="textSecondary"
|
||||
>
|
||||
{row.deliveryaddress.slice(0,20)}
|
||||
@@ -1065,6 +1065,8 @@ import {
|
||||
let [orderarrmodified, setArrmodified] = useState([]);
|
||||
let [orderarrclosed, setArrclosed] = useState([]);
|
||||
let [orderarrpicked, setArrpicked] = useState([]);
|
||||
let [orderarrcreated, setArrcreated] = useState([]);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1108,8 +1110,9 @@ import {
|
||||
setTabvalue(i);
|
||||
|
||||
if (i === 0) setTabstatus('All orders')
|
||||
if (i === 1) setTabstatus('Pending')
|
||||
// if (i === 1) setTabstatus('Created')
|
||||
// if (i === 2) setTabstatus('Modified')
|
||||
if (i === 1) setTabstatus('Pending')
|
||||
|
||||
if (i === 2) setTabstatus('Assigned')
|
||||
if (i === 3) setTabstatus('Picked')
|
||||
@@ -1147,6 +1150,7 @@ import {
|
||||
fetchtablecancelled(val);
|
||||
fetchtableassigned(val);
|
||||
fetchtablepicked(val);
|
||||
fetchtablecreated(val);
|
||||
// fetchtableconfirmed(val);
|
||||
// fetchtablemodified(val);
|
||||
// fetchtableclosed(val)
|
||||
@@ -1175,6 +1179,7 @@ import {
|
||||
// fetchtablemodified(val);
|
||||
// fetchtableclosed(val)
|
||||
fetchtable(val)
|
||||
fetchtablecreated(val)
|
||||
|
||||
console.log(activeorders);
|
||||
}
|
||||
@@ -1186,7 +1191,7 @@ import {
|
||||
// if (tabstatus === 'All orders') setRows(orderarr)
|
||||
// if (tabstatus === 'Completed') setRows(orderarrcovered)
|
||||
// if (tabstatus === 'Active') setRows(orderarractive)
|
||||
if (tabstatus === 'Pending') setRows(orderarruncovered)
|
||||
// if (tabstatus === 'Pending') setRows(orderarruncovered)
|
||||
// if (tabstatus === 'Cancelled') setRows(orderarrcancelled)
|
||||
// if (tabstatus === 'Assigned') setRows(orderarrassigned)
|
||||
// if (tabstatus === 'Confirmed') setRows(orderarrconfirmed)
|
||||
@@ -1194,6 +1199,8 @@ import {
|
||||
|
||||
if (tabstatus === 'All orders') setRows(orderarr)
|
||||
if (tabstatus === 'Delivered') setRows(orderarrcovered)
|
||||
if (tabstatus === 'Pending') setRows(orderarrcreated)
|
||||
|
||||
// if (tabstatus === 'Active') setRows(orderarractive)
|
||||
// if (tabstatus === 'Pending') setRows(orderarruncovered)
|
||||
if (tabstatus === 'Cancelled') setRows(orderarrcancelled)
|
||||
@@ -1434,8 +1441,8 @@ import {
|
||||
const fetchtable = async (tid) => {
|
||||
|
||||
try {
|
||||
// await axios.get(`${process.env.REACT_APP_URL}/orders/getorders/?tenantid=${tid}`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}`)
|
||||
// await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}`)
|
||||
.then((res) => {
|
||||
if (res.data.status) {
|
||||
let arr = []
|
||||
@@ -1463,7 +1470,7 @@ import {
|
||||
|
||||
try {
|
||||
// await axios.get(`${process.env.REACT_APP_URL}/orders/getorders/?tenantid=${tid}&status=completed`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}&status=delivered`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}&status=delivered`)
|
||||
.then((res) => {
|
||||
// if (res.data.message === "Success") {
|
||||
let arr = []
|
||||
@@ -1481,6 +1488,29 @@ import {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const fetchtablecreated = async (tid) => {
|
||||
|
||||
try {
|
||||
// await axios.get(`${process.env.REACT_APP_URL}/orders/getorders/?tenantid=${tid}&status=completed`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}&status=created`)
|
||||
.then((res) => {
|
||||
// if (res.data.message === "Success") {
|
||||
let arr = []
|
||||
res.data.details.map((val, i) => {
|
||||
arr = [...arr, { ...val, sno: i + 1 }];
|
||||
})
|
||||
setArrcreated(arr)
|
||||
// }
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
const fetchtableactive = async () => {
|
||||
@@ -1509,7 +1539,7 @@ import {
|
||||
const fetchtableuncovered = async (tid) => {
|
||||
|
||||
try {
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}&status=pending`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}&status=pending`)
|
||||
.then((res) => {
|
||||
if (res.data.message === "Success") {
|
||||
let arr = []
|
||||
@@ -1532,7 +1562,7 @@ import {
|
||||
const fetchtablecancelled = async (tid) => {
|
||||
|
||||
try {
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}&status=cancelled`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}&status=cancelled`)
|
||||
// await axios.get(`${process.env.REACT_APP_URL2}/client/orders/getordersbystatus?tenantid=${tid}&status=cancelled`)
|
||||
|
||||
.then((res) => {
|
||||
@@ -1558,7 +1588,7 @@ import {
|
||||
const fetchtableassigned = async (tid) => {
|
||||
|
||||
try {
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}&status=accepted`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}&status=accepted`)
|
||||
.then((res) => {
|
||||
// if (res.data.message === "Success") {
|
||||
let arr = [];
|
||||
@@ -1582,7 +1612,7 @@ import {
|
||||
const fetchtablepicked = async (tid) => {
|
||||
|
||||
try {
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenantorders/?tenantid=${tid}&status=picked`)
|
||||
await axios.get(`${process.env.REACT_APP_URL}/orders/tenant/getorders/?tenantid=${tid}&status=picked`)
|
||||
.then((res) => {
|
||||
// if (res.data.message === "Success") {
|
||||
let arr = [];
|
||||
@@ -1909,7 +1939,10 @@ import {
|
||||
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="Pending"
|
||||
icon={<Chip label={uncoveredorders} color="primary" variant="light" size="small" />}
|
||||
iconPosition="end"
|
||||
|
||||
Reference in New Issue
Block a user