createOrder

This commit is contained in:
joshikannan
2024-03-14 11:47:09 +05:30
parent 4d2ebeb41c
commit a76b3f4819

View File

@@ -254,23 +254,11 @@ const Createorder1 = () => {
}, [value, inputValue, fetch]);
const createprofile = async () => {
// console.log('res', businessname, businessno, mobilenumber, emailaddress, address, city, zipcode)
// if (!businessname) {
// opentoast('Fill Business name')
// } else if (!businessno) {
// opentoast('Fill Registration No')
// }
// else
if (!firstname) {
opentoast('Fill Full name');
} else if (!mobilenumber) {
opentoast('Fill Mobile Number');
}
// else if (!emailaddress) {
// opentoast('Fill emailaddress')
// }
else if (!address) {
} else if (!address) {
opentoast('Fill Address');
} else if (!city) {
opentoast('Fill City');
@@ -278,8 +266,6 @@ const Createorder1 = () => {
opentoast('Fill post code');
} else if (!suburb) {
opentoast('Fill suburb');
// } else if (!emailaddress) {
// opentoast('Fill emailaddress')
} else if (!latlong.lat || !latlong.lng) {
opentoast('Choose valid address');
} else {
@@ -697,15 +683,13 @@ const Createorder1 = () => {
const [searchword, setSearchword] = useState('');
const [clientdetailarr, setClientdetailarr] = useState([]);
const [clientdetailbusinessarr, setClientdetailbusinessarr] = useState([]);
// const [admintoken, setAdmintoken] = useState('');
const [admintoken, setAdmintoken] = useState();
const [tenantlocationlist, setTenantlocationlist] = useState([]);
const [tenant, setTenant] = useState({});
const [clientinfo, setClientinfo] = useState({});
const [selectedtime, setSelectedtime] = useState('');
const [tenantlist, setTenantlist] = useState([]);
const [tenantid, setTenantid] = useState('');
const [tenantid, setTenantid] = useState();
const [tenantlocation, setTenantlocation] = useState('');
const [pickupswitch, setPickupswitch] = useState(true);
@@ -884,6 +868,7 @@ const Createorder1 = () => {
console.log('fetchtenantinfo', res);
if (res.data.status) {
setTenant(res.data.details);
setTenantid(res.data.details.tenantid);
// fetchadmintoken(res.data.details.tenantid, res.data.details.partnerid);
fetchAppAdminTokens();
}