updates on the changes arelated toe the order creation and delivery fixes as well

This commit is contained in:
2026-08-13 11:26:58 +05:30
parent fabb74c326
commit b1efd14749
10 changed files with 125 additions and 56 deletions

View File

@@ -110,7 +110,15 @@ const LocationAutocomplete = forwardRef(
sx={{ ...sx }}
onChange={(event, value, reason) => {
if (reason === 'clear') {
setAppId?.(0);
// null (not 0) — 0 is a real, meaningful selection here: the
// synthetic "All" option (fetchAppLocations in api.js appends
// { locationname: 'All', applocationid: 0 }). Callers that gate
// other pickers on "has a zone been chosen yet" (e.g.
// deliveries.js's Tenant/Rider dropdowns) need to tell "nothing
// picked" apart from "deliberately picked All" — both used to
// collapse to the same falsy 0, so choosing All incorrectly
// still tripped the "select a zone first" gate.
setAppId?.(null);
setLocoName?.('');
setPage?.(0);
} else if (value) {