updates on the changes arelated toe the order creation and delivery fixes as well
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user