From a76b3f4819415b11091d0fbf04eab64abe1bb51b Mon Sep 17 00:00:00 2001 From: joshikannan Date: Thu, 14 Mar 2024 11:47:09 +0530 Subject: [PATCH] createOrder --- src/pages/nearle/orders/createorder1.js | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/pages/nearle/orders/createorder1.js b/src/pages/nearle/orders/createorder1.js index b10ba17..c1a9cd6 100644 --- a/src/pages/nearle/orders/createorder1.js +++ b/src/pages/nearle/orders/createorder1.js @@ -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(); }