customers

This commit is contained in:
joshikannan
2024-04-09 13:08:33 +05:30
parent b8868122c6
commit 77f5295720
4 changed files with 71 additions and 22 deletions

View File

@@ -433,6 +433,11 @@ const Createorder1 = () => {
const [appLocaLat, setAppLocaLat] = useState();
const [appLocaLng, setAppLocaLng] = useState();
const [appLocaRadius, setAppLocaRadius] = useState();
const [isSms, setIsSms] = useState(0);
useEffect(() => {
console.log(isSms);
}, [isSms]);
const handleChipClick = (chipLabel) => {
setSelectedCatChip(chipLabel);
@@ -840,7 +845,7 @@ const Createorder1 = () => {
processing: '',
ready: '',
remarks: '',
smsdelivery: 1,
smsdelivery: isSms,
subcategoryid: +subCatId,
taxamount: 0.0,
tenantid: tenant.tenantid,
@@ -978,7 +983,8 @@ const Createorder1 = () => {
try {
let url =
searchCustList == ''
? `${process.env.REACT_APP_URL}/customers/getbytid/?tenantid=${tid}&pageno=1&pagesize=1`
? // ? `${process.env.REACT_APP_URL}/customers/getbytid/?tenantid=${tid}&pageno=1&pagesize=1`
`${process.env.REACT_APP_URL}/customers/gettenantcustomers/?tenantid=${tid}&pageno=1&pagesize=20`
: `${process.env.REACT_APP_URL}/customers/search/?tenantid=${tid}&keyword=${searchCustList}`;
await axios
@@ -1517,7 +1523,6 @@ const Createorder1 = () => {
label="Address"
disabled={!isLocation}
id="addressAuto1"
placeholder="Search"
fullWidth
value={inputValue2}
onChange={(e) => setInputValue2(e.target.value)}
@@ -1878,7 +1883,7 @@ const Createorder1 = () => {
<TextField
id="addressAuto2"
disabled={!isLocation}
placeholder="Search"
label="Address"
fullWidth
value={inputValue3}
onChange={(e) => setInputValue3(e.target.value)}
@@ -2194,6 +2199,15 @@ const Createorder1 = () => {
</Stack>
</Stack>
)}
<Stack direction={'row'} justifyContent={'space-between'}>
<Typography variant="h5">SMS Delivery</Typography>
<Switch
checked={isSms === 1}
onChange={(e) => {
setIsSms(e.target.checked ? 1 : 0);
}}
/>
</Stack>
<Typography variant="h5">Category</Typography>
<Autocomplete
disablePortal