createorder

This commit is contained in:
joshikannan
2024-04-06 16:27:35 +05:30
parent 7bf192f7f6
commit 7999e136ad

View File

@@ -830,7 +830,7 @@ const Createorder1 = () => {
pickup: { pickup: {
address: pickCust.address || '', address: pickCust.address || '',
applocationid: pickCust.applocationid, applocationid: tenant.applolcationid,
city: pickCust.city || '', city: pickCust.city || '',
configid: parseInt(localStorage.getItem('configid')), configid: parseInt(localStorage.getItem('configid')),
contactno: pickCust.contactno || '', contactno: pickCust.contactno || '',
@@ -845,6 +845,7 @@ const Createorder1 = () => {
landmark: pickCust.landmark || '', landmark: pickCust.landmark || '',
latitude: pickCust.latitude.toString() || '', latitude: pickCust.latitude.toString() || '',
longitude: pickCust.longitude.toString() || '', longitude: pickCust.longitude.toString() || '',
locationid: pickCust.deliverylocationid || 0,
postcode: pickCust.postcode || '', postcode: pickCust.postcode || '',
primaryaddress: 1, primaryaddress: 1,
profileimage: '', profileimage: '',
@@ -852,9 +853,10 @@ const Createorder1 = () => {
suburb: pickCust.suburb || '', suburb: pickCust.suburb || '',
tenantid: tenant.tenantid tenantid: tenant.tenantid
}, },
drop: { drop: {
address: dropCust.address || '', address: dropCust.address || '',
applocationid: dropCust.applocationid, applocationid: tenant.applolcationid,
city: dropCust.city || '', city: dropCust.city || '',
configid: parseInt(localStorage.getItem('configid')), configid: parseInt(localStorage.getItem('configid')),
contactno: dropCust.contactno || '', contactno: dropCust.contactno || '',
@@ -869,6 +871,7 @@ const Createorder1 = () => {
landmark: dropCust.landmark || '', landmark: dropCust.landmark || '',
latitude: dropCust.latitude.toString(), latitude: dropCust.latitude.toString(),
longitude: dropCust.longitude.toString(), longitude: dropCust.longitude.toString(),
locationid: dropCust.deliverylocationid || 0,
postcode: dropCust.postcode || '', postcode: dropCust.postcode || '',
primaryaddress: 1, primaryaddress: 1,
profileimage: '', profileimage: '',
@@ -1358,10 +1361,11 @@ const Createorder1 = () => {
setPickCust({}); setPickCust({});
setAddId1(1); setAddId1(1);
setInputValue2(''); setInputValue2('');
setSearchCustList('');
} }
}} }}
> >
Saved Address Saved Locations
</Button> </Button>
</Stack> </Stack>
</Stack> </Stack>
@@ -1467,6 +1471,7 @@ const Createorder1 = () => {
// /> // />
<div> <div>
<TextField <TextField
disabled={!isLocation}
id="addressAuto1" id="addressAuto1"
placeholder="Search" placeholder="Search"
fullWidth fullWidth
@@ -1545,6 +1550,7 @@ const Createorder1 = () => {
{/* ====================================== ||Contact Name (pick) || ====================================== */} {/* ====================================== ||Contact Name (pick) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
InputProps={{ InputProps={{
startAdornment: ( startAdornment: (
@@ -1564,6 +1570,7 @@ const Createorder1 = () => {
{/* ====================================== ||Contact Number(pick) || ====================================== */} {/* ====================================== ||Contact Number(pick) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
type="number" type="number"
InputProps={{ InputProps={{
@@ -1589,6 +1596,7 @@ const Createorder1 = () => {
{/* ====================================== ||Door No (pick) || ====================================== */} {/* ====================================== ||Door No (pick) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
InputProps={{ InputProps={{
startAdornment: ( startAdornment: (
@@ -1608,6 +1616,7 @@ const Createorder1 = () => {
{/* ====================================== || Suburb (pick) || ====================================== */} {/* ====================================== || Suburb (pick) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
InputProps={{ InputProps={{
startAdornment: ( startAdornment: (
@@ -1627,6 +1636,7 @@ const Createorder1 = () => {
{/* ====================================== || City (pick) || ====================================== */} {/* ====================================== || City (pick) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
InputProps={{ InputProps={{
startAdornment: ( startAdornment: (
@@ -1646,6 +1656,7 @@ const Createorder1 = () => {
{/* ====================================== || postcode (pick) || ====================================== */} {/* ====================================== || postcode (pick) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
InputProps={{ InputProps={{
startAdornment: ( startAdornment: (
@@ -1665,6 +1676,7 @@ const Createorder1 = () => {
{/* ====================================== || Landmark (pick) || ====================================== */} {/* ====================================== || Landmark (pick) || ====================================== */}
<Grid item xs={12}> <Grid item xs={12}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
InputProps={{ InputProps={{
startAdornment: ( startAdornment: (
@@ -1745,10 +1757,11 @@ const Createorder1 = () => {
setpickordrop(2); setpickordrop(2);
setAddId2(1); setAddId2(1);
setInputValue3(''); setInputValue3('');
setSearchCustList('');
} }
}} }}
> >
Saved Address Saved Locations
</Button> </Button>
</Stack> </Stack>
</Stack> </Stack>
@@ -1848,6 +1861,7 @@ const Createorder1 = () => {
<div> <div>
<TextField <TextField
id="addressAuto2" id="addressAuto2"
disabled={!isLocation}
placeholder="Search" placeholder="Search"
fullWidth fullWidth
value={inputValue3} value={inputValue3}
@@ -1878,6 +1892,7 @@ const Createorder1 = () => {
</div> </div>
) : ( ) : (
<TextField <TextField
disabled={!isLocation}
InputProps={{ InputProps={{
endAdornment: ( endAdornment: (
<IconButton <IconButton
@@ -1925,6 +1940,7 @@ const Createorder1 = () => {
{/* ====================================== ||Contact Name (drop) || ====================================== */} {/* ====================================== ||Contact Name (drop) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
variant="outlined" variant="outlined"
label="Contact Name" label="Contact Name"
@@ -1944,6 +1960,7 @@ const Createorder1 = () => {
{/* ====================================== ||Contact Number (drop) || ====================================== */} {/* ====================================== ||Contact Number (drop) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
type="number" type="number"
variant="outlined" variant="outlined"
@@ -1966,6 +1983,7 @@ const Createorder1 = () => {
{/* ====================================== ||Door No (drop) || ====================================== */} {/* ====================================== ||Door No (drop) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
variant="outlined" variant="outlined"
label="Door No / Street" label="Door No / Street"
@@ -1985,6 +2003,7 @@ const Createorder1 = () => {
{/* ====================================== ||Suburb (drop) || ====================================== */} {/* ====================================== ||Suburb (drop) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
variant="outlined" variant="outlined"
label="Location" label="Location"
@@ -2004,6 +2023,7 @@ const Createorder1 = () => {
{/* ====================================== ||City (drop) || ====================================== */} {/* ====================================== ||City (drop) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
variant="outlined" variant="outlined"
label="City" label="City"
@@ -2024,6 +2044,7 @@ const Createorder1 = () => {
{/* ====================================== ||Postcode (drop) || ====================================== */} {/* ====================================== ||Postcode (drop) || ====================================== */}
<Grid item xs={6}> <Grid item xs={6}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
variant="outlined" variant="outlined"
label="Postcode" label="Postcode"
@@ -2043,6 +2064,7 @@ const Createorder1 = () => {
{/* ====================================== ||Landmark (drop) || ====================================== */} {/* ====================================== ||Landmark (drop) || ====================================== */}
<Grid item xs={12}> <Grid item xs={12}>
<TextField <TextField
disabled={!isLocation}
fullWidth fullWidth
variant="outlined" variant="outlined"
label="Landmark" label="Landmark"
@@ -2365,7 +2387,7 @@ const Createorder1 = () => {
> >
<DialogTitle sx={{ bgcolor: theme.palette.primary.main, color: 'white' }}> <DialogTitle sx={{ bgcolor: theme.palette.primary.main, color: 'white' }}>
<Stack> <Stack>
<Typography variant="h4"> {`Select Address (${pickordrop === 1 ? 'Pickup' : 'Drop'})`}</Typography> <Typography variant="h4"> {`Select Location (${pickordrop === 1 ? 'Pickup' : 'Drop'})`}</Typography>
<FormControl <FormControl
sx={{ sx={{
width: '100%', width: '100%',