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