11122023
This commit is contained in:
@@ -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