updates
This commit is contained in:
@@ -767,12 +767,12 @@ const Createorder1 = () => {
|
||||
// clientdetails(localStorage.getItem('tenantid'))
|
||||
// }
|
||||
if (localStorage.getItem('partnerid')) {
|
||||
fetchtenantinfolist(localStorage.getItem('partnerid'));
|
||||
// fetchtenantinfolist(localStorage.getItem('partnerid'));
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
fetchtenantlocation();
|
||||
// fetchtenantlocation();
|
||||
clientdetails();
|
||||
clientdetailsbusiness();
|
||||
fetchtenantinfo();
|
||||
@@ -869,7 +869,6 @@ const Createorder1 = () => {
|
||||
if (res.data.status) {
|
||||
setTenant(res.data.details);
|
||||
setTenantid(res.data.details.tenantid);
|
||||
// fetchadmintoken(res.data.details.tenantid, res.data.details.partnerid);
|
||||
fetchAppAdminTokens();
|
||||
}
|
||||
setLoading(false);
|
||||
@@ -881,7 +880,7 @@ const Createorder1 = () => {
|
||||
};
|
||||
useEffect(() => {
|
||||
fetchtenantinfo();
|
||||
fetchtenantlocation();
|
||||
// fetchtenantlocation();
|
||||
}, []);
|
||||
|
||||
// ==================================================== || fetchTiming || ====================================================
|
||||
@@ -948,29 +947,29 @@ const Createorder1 = () => {
|
||||
// });
|
||||
// };
|
||||
|
||||
const fetchtenantlocation = async () => {
|
||||
setLoading(true);
|
||||
await axios
|
||||
.get(`${process.env.REACT_APP_URL}/tenants/gettenantlocations/?tenantid=${tid}`)
|
||||
.then((res) => {
|
||||
console.log('fetchtenantlocation', res);
|
||||
if (res.data.status) {
|
||||
let arr = [];
|
||||
res.data.details.map((val) => {
|
||||
arr.push({
|
||||
...val,
|
||||
label: ` ${val.locationname}`
|
||||
});
|
||||
});
|
||||
setTenantlocationlist(arr);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
setLoading(false);
|
||||
});
|
||||
};
|
||||
// const fetchtenantlocation = async () => {
|
||||
// setLoading(true);
|
||||
// await axios
|
||||
// .get(`${process.env.REACT_APP_URL}/tenants/gettenantlocations/?tenantid=${tid}`)
|
||||
// .then((res) => {
|
||||
// console.log('fetchtenantlocation', res);
|
||||
// if (res.data.status) {
|
||||
// let arr = [];
|
||||
// res.data.details.map((val) => {
|
||||
// arr.push({
|
||||
// ...val,
|
||||
// label: ` ${val.locationname}`
|
||||
// });
|
||||
// });
|
||||
// setTenantlocationlist(arr);
|
||||
// }
|
||||
// setLoading(false);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// setLoading(false);
|
||||
// });
|
||||
// };
|
||||
|
||||
// // =============================================== || fetchadmintoken (via tid , pid) || ===============================================
|
||||
// const fetchadmintoken = async (tid, pid) => {
|
||||
|
||||
Reference in New Issue
Block a user