ordering-ui-external 14.1.39 → 14.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -329,22 +329,23 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
329
329
|
while (1) switch (_context2.prev = _context2.next) {
|
|
330
330
|
case 0:
|
|
331
331
|
if (!(address !== null && address !== void 0 && address.location)) {
|
|
332
|
-
_context2.next =
|
|
332
|
+
_context2.next = 6;
|
|
333
333
|
break;
|
|
334
334
|
}
|
|
335
335
|
_context2.next = 3;
|
|
336
336
|
return getBusinessDeliveryZones(address === null || address === void 0 ? void 0 : address.location);
|
|
337
337
|
case 3:
|
|
338
338
|
result = _context2.sent;
|
|
339
|
+
setLocationChange(address === null || address === void 0 ? void 0 : address.location);
|
|
339
340
|
if ((result === null || result === void 0 ? void 0 : result.length) === 0) {
|
|
340
341
|
showToast(_orderingComponentsExternal.ToastType.Error, t('NO_NEAR_DELIVERY_ZONES', 'No near delivery zones'), 3000);
|
|
341
342
|
}
|
|
342
|
-
case
|
|
343
|
+
case 6:
|
|
343
344
|
setSelectedFromAutocomplete(true);
|
|
344
345
|
updateChanges(_objectSpread(_objectSpread({}, address), {}, {
|
|
345
346
|
address: googleInputRef === null || googleInputRef === void 0 || (_googleInputRef$curre = googleInputRef.current) === null || _googleInputRef$curre === void 0 ? void 0 : _googleInputRef$curre.value
|
|
346
347
|
}));
|
|
347
|
-
case
|
|
348
|
+
case 8:
|
|
348
349
|
case "end":
|
|
349
350
|
return _context2.stop();
|
|
350
351
|
}
|
package/package.json
CHANGED
|
@@ -252,6 +252,7 @@ const AddressFormUI = (props) => {
|
|
|
252
252
|
const handleChangeAddress = async (address) => {
|
|
253
253
|
if (address?.location) {
|
|
254
254
|
const result = await getBusinessDeliveryZones(address?.location)
|
|
255
|
+
setLocationChange(address?.location)
|
|
255
256
|
if (result?.length === 0) {
|
|
256
257
|
showToast(ToastType.Error, t('NO_NEAR_DELIVERY_ZONES', 'No near delivery zones'), 3000)
|
|
257
258
|
}
|