ordering-ui-external 10.9.0 → 10.9.1
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.
- package/_bundles/{0.ordering-ui.ac159b0ec9eb4a80c944.js → 0.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{1.ordering-ui.ac159b0ec9eb4a80c944.js → 1.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{2.ordering-ui.ac159b0ec9eb4a80c944.js → 2.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{4.ordering-ui.ac159b0ec9eb4a80c944.js → 4.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{5.ordering-ui.ac159b0ec9eb4a80c944.js → 5.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{6.ordering-ui.ac159b0ec9eb4a80c944.js → 6.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{7.ordering-ui.ac159b0ec9eb4a80c944.js → 7.ordering-ui.c4b4f29a4f0c8eaad874.js} +2 -2
- package/_bundles/{8.ordering-ui.ac159b0ec9eb4a80c944.js → 8.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{9.ordering-ui.ac159b0ec9eb4a80c944.js → 9.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/ordering-ui.c4b4f29a4f0c8eaad874.js +2 -0
- package/_modules/components/AddressForm/index.js +5 -8
- package/_modules/components/BusinessProductsListing/index.js +5 -8
- package/_modules/components/Checkout/index.js +5 -8
- package/_modules/components/Footer/index.js +5 -7
- package/_modules/components/HelpStaticPage/index.js +5 -7
- package/_modules/components/LoginForm/index.js +5 -8
- package/_modules/components/OrdersOption/index.js +5 -8
- package/_modules/components/PagesList/index.js +5 -7
- package/_modules/components/StripeMethodForm/index.js +5 -8
- package/_modules/hooks/useIntersectionObserver.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/AddressDetails/index.js +11 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -14
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +5 -4
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +10 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +7 -9
- package/_modules/themes/callcenterOriginal/src/components/Footer/index.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +5 -2
- package/_modules/themes/callcenterOriginal/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/AddressForm/index.js +6 -9
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/Checkout/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +40 -25
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +9 -7
- package/_modules/themes/callcenterOriginal/src/components/Shared/ImageCrop/index.js +5 -7
- package/_modules/themes/eight/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/eight/src/components/Checkout/index.js +5 -8
- package/_modules/themes/eight/src/components/Footer/index.js +5 -7
- package/_modules/themes/eight/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/five/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/five/src/components/AddressList/index.js +5 -8
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -15
- package/_modules/themes/five/src/components/Checkout/index.js +5 -8
- package/_modules/themes/five/src/components/Footer/index.js +5 -8
- package/_modules/themes/five/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/five/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/five/src/components/LogoutPopup/index.js +9 -15
- package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +5 -8
- package/_modules/themes/five/src/components/OrderDetails/index.js +10 -16
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +5 -8
- package/_modules/themes/five/src/components/SignUpForm/index.js +5 -8
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +5 -8
- package/_modules/themes/four/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/four/src/components/BusinessProductsListing/index.js +5 -8
- package/_modules/themes/four/src/components/Checkout/index.js +5 -8
- package/_modules/themes/four/src/components/Footer/index.js +5 -7
- package/_modules/themes/four/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/four/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/four/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/franchise/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/franchise/src/components/Checkout/index.js +5 -8
- package/_modules/themes/franchise/src/components/Footer/index.js +5 -7
- package/_modules/themes/franchise/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/franchise/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/franchise/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/orderAndPay/src/components/Checkout/index.js +20 -31
- package/_modules/themes/orderAndPay/src/components/Footer/index.js +5 -7
- package/_modules/themes/orderAndPay/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/orderAndPay/src/components/OrderTypeSelectorContent/index.js +9 -15
- package/_modules/themes/orderAndPay/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/pwa/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/pwa/src/components/Checkout/index.js +5 -8
- package/_modules/themes/pwa/src/components/Footer/index.js +5 -7
- package/_modules/themes/pwa/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/pwa/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/pwa/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/seven/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/seven/src/components/Checkout/index.js +5 -8
- package/_modules/themes/seven/src/components/Footer/index.js +5 -7
- package/_modules/themes/seven/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/seven/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +9 -15
- package/_modules/themes/six/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/six/src/components/Checkout/index.js +5 -8
- package/_modules/themes/six/src/components/Footer/index.js +5 -7
- package/_modules/themes/six/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/three/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/three/src/components/Checkout/index.js +5 -8
- package/_modules/themes/three/src/components/Footer/index.js +5 -7
- package/_modules/themes/three/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/three/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/three/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/two/src/components/Checkout/index.js +5 -8
- package/_modules/themes/two/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/two/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/two/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/wow/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/wow/src/components/Checkout/index.js +5 -8
- package/_modules/themes/wow/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/wow/src/components/OrdersOption/index.js +5 -8
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressDetails/index.js +10 -3
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +15 -4
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +14 -4
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +5 -5
- package/src/themes/callcenterOriginal/src/components/Checkout/index.js +1 -0
- package/src/themes/callcenterOriginal/src/components/Header/index.js +4 -1
- package/src/themes/callcenterOriginal/src/components/Orders/AddressForm/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +39 -11
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +9 -4
- package/_bundles/ordering-ui.ac159b0ec9eb4a80c944.js +0 -2
- /package/_bundles/{7.ordering-ui.ac159b0ec9eb4a80c944.js.LICENSE.txt → 7.ordering-ui.c4b4f29a4f0c8eaad874.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.ac159b0ec9eb4a80c944.js.LICENSE.txt → ordering-ui.c4b4f29a4f0c8eaad874.js.LICENSE.txt} +0 -0
|
@@ -182,11 +182,12 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
182
182
|
var handleClickReorder = function handleClickReorder(order) {
|
|
183
183
|
var _carts;
|
|
184
184
|
if (carts["businessId:".concat(order === null || order === void 0 ? void 0 : order.business_id)] && ((_carts = carts["businessId:".concat(order === null || order === void 0 ? void 0 : order.business_id)]) === null || _carts === void 0 || (_carts = _carts.products) === null || _carts === void 0 ? void 0 : _carts.length) > 0) {
|
|
185
|
+
var _handleOnAccept;
|
|
185
186
|
setConfirm({
|
|
186
187
|
open: true,
|
|
187
188
|
content: t('QUESTION_DELETE_PRODUCTS_FROM_CART', 'Are you sure that you want to delete all products from cart?'),
|
|
188
|
-
handleOnAccept: function () {
|
|
189
|
-
|
|
189
|
+
handleOnAccept: function handleOnAccept() {
|
|
190
|
+
return (_handleOnAccept = _handleOnAccept || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
190
191
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
191
192
|
while (1) switch (_context.prev = _context.next) {
|
|
192
193
|
case 0:
|
|
@@ -199,12 +200,8 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
199
200
|
return _context.stop();
|
|
200
201
|
}
|
|
201
202
|
}, _callee);
|
|
202
|
-
}));
|
|
203
|
-
|
|
204
|
-
return _handleOnAccept.apply(this, arguments);
|
|
205
|
-
}
|
|
206
|
-
return handleOnAccept;
|
|
207
|
-
}()
|
|
203
|
+
}))).apply(this, arguments);
|
|
204
|
+
}
|
|
208
205
|
});
|
|
209
206
|
} else {
|
|
210
207
|
handleReorder(order.id);
|
|
@@ -55,7 +55,7 @@ var inputNames = [{
|
|
|
55
55
|
code: 'Address notes'
|
|
56
56
|
}];
|
|
57
57
|
var AddressFormUI = function AddressFormUI(props) {
|
|
58
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _theme$defaultLanguag, _props$afterComponent, _props$afterElements;
|
|
58
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _ref2, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _theme$defaultLanguag, _props$afterComponent, _props$afterElements;
|
|
59
59
|
var addressesList = props.addressesList,
|
|
60
60
|
googleMapsControls = props.googleMapsControls,
|
|
61
61
|
formState = props.formState,
|
|
@@ -238,8 +238,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
238
238
|
e.preventDefault();
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
var onSubmit =
|
|
242
|
-
|
|
241
|
+
var onSubmit = function onSubmit() {
|
|
242
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
243
243
|
var _formState$changes3, _addressState$address6, _formState$changes4, _formState$changes5, _arrayList$map$some2;
|
|
244
244
|
var _formState$changes6, arrayList, addressToCompare, isAddressAlreadyExist;
|
|
245
245
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -300,11 +300,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
300
300
|
return _context.stop();
|
|
301
301
|
}
|
|
302
302
|
}, _callee);
|
|
303
|
-
}));
|
|
304
|
-
|
|
305
|
-
return _ref2.apply(this, arguments);
|
|
306
|
-
};
|
|
307
|
-
}();
|
|
303
|
+
}))).apply(this, arguments);
|
|
304
|
+
};
|
|
308
305
|
var handleAddressTag = function handleAddressTag(tag) {
|
|
309
306
|
setAddressTag(tag);
|
|
310
307
|
handleChangeInput({
|
|
@@ -38,7 +38,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
var PIXELS_TO_SCROLL = 300;
|
|
40
40
|
var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
41
|
-
var _configs$add_product_, _Object$values$find, _props$beforeElements, _props$beforeComponen, _currentCart$products2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _error$, _theme$defaultLanguag4, _currentCart$products3, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products4, _productModal$error$, _theme$defaultLanguag7, _props$afterComponent, _props$afterElements;
|
|
41
|
+
var _configs$add_product_, _Object$values$find, _ref, _props$beforeElements, _props$beforeComponen, _currentCart$products2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _error$, _theme$defaultLanguag4, _currentCart$products3, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products4, _productModal$error$, _theme$defaultLanguag7, _props$afterComponent, _props$afterElements;
|
|
42
42
|
var errors = props.errors,
|
|
43
43
|
isInitialRender = props.isInitialRender,
|
|
44
44
|
businessState = props.businessState,
|
|
@@ -124,8 +124,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
124
124
|
var handler = function handler() {
|
|
125
125
|
setOpenBusinessInformation(true);
|
|
126
126
|
};
|
|
127
|
-
var onProductClick =
|
|
128
|
-
|
|
127
|
+
var onProductClick = function onProductClick(_x) {
|
|
128
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
|
|
129
129
|
var _currentCart$products, isProductAddedToCart, productQuantity, addCurrentProduct, updateCurrentProduct, cartData;
|
|
130
130
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
131
131
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -180,11 +180,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
180
180
|
return _context.stop();
|
|
181
181
|
}
|
|
182
182
|
}, _callee);
|
|
183
|
-
}));
|
|
184
|
-
|
|
185
|
-
return _ref.apply(this, arguments);
|
|
186
|
-
};
|
|
187
|
-
}();
|
|
183
|
+
}))).apply(this, arguments);
|
|
184
|
+
};
|
|
188
185
|
var handlerProductAction = function handlerProductAction(product) {
|
|
189
186
|
if (Object.keys(product).length) {
|
|
190
187
|
setModalIsOpen(false);
|
|
@@ -493,7 +493,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
493
493
|
}));
|
|
494
494
|
};
|
|
495
495
|
var Checkout = function Checkout(props) {
|
|
496
|
-
var _Object$values2, _cartState$cart, _cartState$error, _cartState$cart2;
|
|
496
|
+
var _Object$values2, _ref, _cartState$cart, _cartState$error, _cartState$cart2;
|
|
497
497
|
var errors = props.errors,
|
|
498
498
|
clearErrors = props.clearErrors,
|
|
499
499
|
query = props.query,
|
|
@@ -584,8 +584,8 @@ var Checkout = function Checkout(props) {
|
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
586
|
}, [errors]);
|
|
587
|
-
var getOrder =
|
|
588
|
-
|
|
587
|
+
var getOrder = function getOrder(_x) {
|
|
588
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartId) {
|
|
589
589
|
var _result$order, _result$paymethod_dat, userCustomer, url, response, _yield$response$json, result, _confirmCartRes$resul, confirmCartRes, cart;
|
|
590
590
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
591
591
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -679,11 +679,8 @@ var Checkout = function Checkout(props) {
|
|
|
679
679
|
return _context.stop();
|
|
680
680
|
}
|
|
681
681
|
}, _callee, null, [[0, 35], [17, 26]]);
|
|
682
|
-
}));
|
|
683
|
-
|
|
684
|
-
return _ref.apply(this, arguments);
|
|
685
|
-
};
|
|
686
|
-
}();
|
|
682
|
+
}))).apply(this, arguments);
|
|
683
|
+
};
|
|
687
684
|
(0, _react.useEffect)(function () {
|
|
688
685
|
if (token && cartUuid) {
|
|
689
686
|
getOrder(cartUuid);
|
|
@@ -24,6 +24,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
24
24
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
var Footer = function Footer() {
|
|
27
|
+
var _ref;
|
|
27
28
|
var _useState = (0, _react.useState)({
|
|
28
29
|
body: null,
|
|
29
30
|
loading: false,
|
|
@@ -36,8 +37,8 @@ var Footer = function Footer() {
|
|
|
36
37
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
37
38
|
ordering = _useApi2[0];
|
|
38
39
|
var requestsState = {};
|
|
39
|
-
var getPage =
|
|
40
|
-
|
|
40
|
+
var getPage = function getPage() {
|
|
41
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
41
42
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
42
43
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43
44
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -85,11 +86,8 @@ var Footer = function Footer() {
|
|
|
85
86
|
return _context.stop();
|
|
86
87
|
}
|
|
87
88
|
}, _callee, null, [[1, 14]]);
|
|
88
|
-
}));
|
|
89
|
-
|
|
90
|
-
return _ref.apply(this, arguments);
|
|
91
|
-
};
|
|
92
|
-
}();
|
|
89
|
+
}))).apply(this, arguments);
|
|
90
|
+
};
|
|
93
91
|
(0, _react.useEffect)(function () {
|
|
94
92
|
getPage();
|
|
95
93
|
return function () {
|
|
@@ -26,6 +26,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
26
26
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var HelpStaticPage = function HelpStaticPage(props) {
|
|
29
|
+
var _ref;
|
|
29
30
|
var slug = props.slug;
|
|
30
31
|
var _useState = (0, _react.useState)({
|
|
31
32
|
body: null,
|
|
@@ -39,8 +40,8 @@ var HelpStaticPage = function HelpStaticPage(props) {
|
|
|
39
40
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
40
41
|
ordering = _useApi2[0];
|
|
41
42
|
var requestsState = {};
|
|
42
|
-
var getPage =
|
|
43
|
-
|
|
43
|
+
var getPage = function getPage() {
|
|
44
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
44
45
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
45
46
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
46
47
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -88,11 +89,8 @@ var HelpStaticPage = function HelpStaticPage(props) {
|
|
|
88
89
|
return _context.stop();
|
|
89
90
|
}
|
|
90
91
|
}, _callee, null, [[1, 14]]);
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
return _ref.apply(this, arguments);
|
|
94
|
-
};
|
|
95
|
-
}();
|
|
92
|
+
}))).apply(this, arguments);
|
|
93
|
+
};
|
|
96
94
|
(0, _react.useEffect)(function () {
|
|
97
95
|
getPage();
|
|
98
96
|
return function () {
|
|
@@ -47,7 +47,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
47
47
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
48
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { Tabs, Tab } from '../../styles/Tabs'
|
|
49
49
|
var LoginFormUI = function LoginFormUI(props) {
|
|
50
|
-
var _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images2, _theme$defaultLanguag, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag2, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _theme$defaultLanguag3, _props$afterComponent, _props$afterElements;
|
|
50
|
+
var _ref, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images2, _theme$defaultLanguag, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag2, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _theme$defaultLanguag3, _props$afterComponent, _props$afterElements;
|
|
51
51
|
var useLoginByEmail = props.useLoginByEmail,
|
|
52
52
|
useLoginByCellphone = props.useLoginByCellphone,
|
|
53
53
|
handleChangeInput = props.handleChangeInput,
|
|
@@ -120,8 +120,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
120
120
|
otpLeftTime = _useCountdownTimer2[0],
|
|
121
121
|
_ = _useCountdownTimer2[1],
|
|
122
122
|
resetOtpLeftTime = _useCountdownTimer2[2];
|
|
123
|
-
var onSubmit =
|
|
124
|
-
|
|
123
|
+
var onSubmit = function onSubmit() {
|
|
124
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
125
125
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
126
126
|
while (1) switch (_context.prev = _context.next) {
|
|
127
127
|
case 0:
|
|
@@ -149,11 +149,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
149
149
|
return _context.stop();
|
|
150
150
|
}
|
|
151
151
|
}, _callee);
|
|
152
|
-
}));
|
|
153
|
-
|
|
154
|
-
return _ref.apply(this, arguments);
|
|
155
|
-
};
|
|
156
|
-
}();
|
|
152
|
+
}))).apply(this, arguments);
|
|
153
|
+
};
|
|
157
154
|
var handleSuccessFacebook = function handleSuccessFacebook(user) {
|
|
158
155
|
var _user$session;
|
|
159
156
|
login({
|
|
@@ -36,7 +36,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
36
36
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
37
37
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
38
|
var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
39
|
-
var _theme$images, _theme$images2, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
39
|
+
var _theme$images, _theme$images2, _ref, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
40
40
|
var horizontal = props.horizontal,
|
|
41
41
|
activeOrders = props.activeOrders,
|
|
42
42
|
orderList = props.orderList,
|
|
@@ -72,8 +72,8 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
72
72
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
73
|
reorderLoading = _useState4[0],
|
|
74
74
|
setReorderLoading = _useState4[1];
|
|
75
|
-
var handleReorder =
|
|
76
|
-
|
|
75
|
+
var handleReorder = function handleReorder(_x) {
|
|
76
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderId) {
|
|
77
77
|
var _yield$reorder, _error, result;
|
|
78
78
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
79
79
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -110,11 +110,8 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
110
110
|
return _context.stop();
|
|
111
111
|
}
|
|
112
112
|
}, _callee, null, [[1, 13]]);
|
|
113
|
-
}));
|
|
114
|
-
|
|
115
|
-
return _ref.apply(this, arguments);
|
|
116
|
-
};
|
|
117
|
-
}();
|
|
113
|
+
}))).apply(this, arguments);
|
|
114
|
+
};
|
|
118
115
|
var getOrderStatus = function getOrderStatus(s) {
|
|
119
116
|
var _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _theme$defaultLanguag11, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _theme$defaultLanguag16, _theme$defaultLanguag17, _theme$defaultLanguag18, _theme$defaultLanguag19, _theme$defaultLanguag20, _theme$defaultLanguag21, _theme$defaultLanguag22, _theme$defaultLanguag23, _theme$defaultLanguag24;
|
|
120
117
|
var status = parseInt(s);
|
|
@@ -54,7 +54,7 @@ var inputNames = [{
|
|
|
54
54
|
code: 'Address notes'
|
|
55
55
|
}];
|
|
56
56
|
var AddressFormUI = function AddressFormUI(props) {
|
|
57
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
57
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _ref2, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
58
58
|
var addressesList = props.addressesList,
|
|
59
59
|
googleMapsControls = props.googleMapsControls,
|
|
60
60
|
formState = props.formState,
|
|
@@ -232,8 +232,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
232
232
|
e.preventDefault();
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
var onSubmit =
|
|
236
|
-
|
|
235
|
+
var onSubmit = function onSubmit() {
|
|
236
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
237
237
|
var _formState$changes3, _addressState$address6, _formState$changes4, _formState$changes5, _arrayList$map$some2;
|
|
238
238
|
var _formState$changes6, arrayList, addressToCompare, isAddressAlreadyExist;
|
|
239
239
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -293,11 +293,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
293
293
|
return _context.stop();
|
|
294
294
|
}
|
|
295
295
|
}, _callee);
|
|
296
|
-
}));
|
|
297
|
-
|
|
298
|
-
return _ref2.apply(this, arguments);
|
|
299
|
-
};
|
|
300
|
-
}();
|
|
296
|
+
}))).apply(this, arguments);
|
|
297
|
+
};
|
|
301
298
|
var handleAddressTag = function handleAddressTag(tag) {
|
|
302
299
|
setAddressTag(tag);
|
|
303
300
|
handleChangeInput({
|
|
@@ -388,7 +388,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
388
388
|
}));
|
|
389
389
|
};
|
|
390
390
|
var Checkout = function Checkout(props) {
|
|
391
|
-
var _Object$values2, _cartState$error, _cartState$cart;
|
|
391
|
+
var _Object$values2, _ref, _cartState$error, _cartState$cart;
|
|
392
392
|
var errors = props.errors,
|
|
393
393
|
clearErrors = props.clearErrors,
|
|
394
394
|
cartUuid = props.cartUuid,
|
|
@@ -478,8 +478,8 @@ var Checkout = function Checkout(props) {
|
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
}, [errors]);
|
|
481
|
-
var getOrder =
|
|
482
|
-
|
|
481
|
+
var getOrder = function getOrder(_x) {
|
|
482
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartId) {
|
|
483
483
|
var _result$order, userCustomer, url, response, _yield$response$json, result, _confirmCartRes$resul, confirmCartRes, cart;
|
|
484
484
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
485
485
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -573,11 +573,8 @@ var Checkout = function Checkout(props) {
|
|
|
573
573
|
return _context.stop();
|
|
574
574
|
}
|
|
575
575
|
}, _callee, null, [[0, 35], [17, 26]]);
|
|
576
|
-
}));
|
|
577
|
-
|
|
578
|
-
return _ref.apply(this, arguments);
|
|
579
|
-
};
|
|
580
|
-
}();
|
|
576
|
+
}))).apply(this, arguments);
|
|
577
|
+
};
|
|
581
578
|
(0, _react.useEffect)(function () {
|
|
582
579
|
if (token && cartUuid) {
|
|
583
580
|
getOrder(cartUuid);
|
|
@@ -24,6 +24,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
24
24
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
var Footer = function Footer() {
|
|
27
|
+
var _ref;
|
|
27
28
|
var _useState = (0, _react.useState)({
|
|
28
29
|
body: null,
|
|
29
30
|
loading: false,
|
|
@@ -36,8 +37,8 @@ var Footer = function Footer() {
|
|
|
36
37
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
37
38
|
ordering = _useApi2[0];
|
|
38
39
|
var requestsState = {};
|
|
39
|
-
var getPage =
|
|
40
|
-
|
|
40
|
+
var getPage = function getPage() {
|
|
41
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
41
42
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
42
43
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43
44
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -85,11 +86,8 @@ var Footer = function Footer() {
|
|
|
85
86
|
return _context.stop();
|
|
86
87
|
}
|
|
87
88
|
}, _callee, null, [[1, 14]]);
|
|
88
|
-
}));
|
|
89
|
-
|
|
90
|
-
return _ref.apply(this, arguments);
|
|
91
|
-
};
|
|
92
|
-
}();
|
|
89
|
+
}))).apply(this, arguments);
|
|
90
|
+
};
|
|
93
91
|
(0, _react.useEffect)(function () {
|
|
94
92
|
getPage();
|
|
95
93
|
return function () {
|
|
@@ -26,6 +26,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
26
26
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var HelpStaticPage = function HelpStaticPage(props) {
|
|
29
|
+
var _ref;
|
|
29
30
|
var slug = props.slug;
|
|
30
31
|
var _useState = (0, _react.useState)({
|
|
31
32
|
body: null,
|
|
@@ -39,8 +40,8 @@ var HelpStaticPage = function HelpStaticPage(props) {
|
|
|
39
40
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
40
41
|
ordering = _useApi2[0];
|
|
41
42
|
var requestsState = {};
|
|
42
|
-
var getPage =
|
|
43
|
-
|
|
43
|
+
var getPage = function getPage() {
|
|
44
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
44
45
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
45
46
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
46
47
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -88,11 +89,8 @@ var HelpStaticPage = function HelpStaticPage(props) {
|
|
|
88
89
|
return _context.stop();
|
|
89
90
|
}
|
|
90
91
|
}, _callee, null, [[1, 14]]);
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
return _ref.apply(this, arguments);
|
|
94
|
-
};
|
|
95
|
-
}();
|
|
92
|
+
}))).apply(this, arguments);
|
|
93
|
+
};
|
|
96
94
|
(0, _react.useEffect)(function () {
|
|
97
95
|
getPage();
|
|
98
96
|
return function () {
|
|
@@ -49,7 +49,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
49
49
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
50
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
51
|
var LoginFormUI = function LoginFormUI(props) {
|
|
52
|
-
var _configs$google_login, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$google_login2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _props$afterComponent, _props$afterElements;
|
|
52
|
+
var _configs$google_login, _ref, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$google_login2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _props$afterComponent, _props$afterElements;
|
|
53
53
|
var useLoginByEmail = props.useLoginByEmail,
|
|
54
54
|
useLoginByCellphone = props.useLoginByCellphone,
|
|
55
55
|
handleChangeInput = props.handleChangeInput,
|
|
@@ -127,8 +127,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
127
127
|
cookiepolicy: 'single_host_origin',
|
|
128
128
|
scope: 'profile'
|
|
129
129
|
};
|
|
130
|
-
var onSubmit =
|
|
131
|
-
|
|
130
|
+
var onSubmit = function onSubmit() {
|
|
131
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
132
132
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
133
133
|
while (1) switch (_context.prev = _context.next) {
|
|
134
134
|
case 0:
|
|
@@ -156,11 +156,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
156
156
|
return _context.stop();
|
|
157
157
|
}
|
|
158
158
|
}, _callee);
|
|
159
|
-
}));
|
|
160
|
-
|
|
161
|
-
return _ref.apply(this, arguments);
|
|
162
|
-
};
|
|
163
|
-
}();
|
|
159
|
+
}))).apply(this, arguments);
|
|
160
|
+
};
|
|
164
161
|
var handleSuccessFacebook = function handleSuccessFacebook(user) {
|
|
165
162
|
var _user$session;
|
|
166
163
|
login({
|
|
@@ -36,7 +36,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
36
36
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
37
37
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
38
|
var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
39
|
-
var _theme$images, _theme$images2, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
39
|
+
var _theme$images, _theme$images2, _ref, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
40
40
|
var horizontal = props.horizontal,
|
|
41
41
|
activeOrders = props.activeOrders,
|
|
42
42
|
orderList = props.orderList,
|
|
@@ -76,8 +76,8 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
76
76
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
77
|
loadingOrders = _useState4[0],
|
|
78
78
|
setLoadingOrders = _useState4[1];
|
|
79
|
-
var handleReorder =
|
|
80
|
-
|
|
79
|
+
var handleReorder = function handleReorder(_x) {
|
|
80
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderId) {
|
|
81
81
|
var _yield$reorder, _error, result;
|
|
82
82
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
83
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -114,11 +114,8 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
114
114
|
return _context.stop();
|
|
115
115
|
}
|
|
116
116
|
}, _callee, null, [[1, 13]]);
|
|
117
|
-
}));
|
|
118
|
-
|
|
119
|
-
return _ref.apply(this, arguments);
|
|
120
|
-
};
|
|
121
|
-
}();
|
|
117
|
+
}))).apply(this, arguments);
|
|
118
|
+
};
|
|
122
119
|
var getOrderStatus = function getOrderStatus(s) {
|
|
123
120
|
var _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _theme$defaultLanguag11, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _theme$defaultLanguag16, _theme$defaultLanguag17, _theme$defaultLanguag18, _theme$defaultLanguag19, _theme$defaultLanguag20, _theme$defaultLanguag21, _theme$defaultLanguag22, _theme$defaultLanguag23, _theme$defaultLanguag24;
|
|
124
121
|
var status = parseInt(s);
|
|
@@ -55,7 +55,7 @@ var mapConfigs = {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
var CheckoutUI = function CheckoutUI(props) {
|
|
58
|
-
var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _props$beforeElements, _props$beforeComponen, _props$beforeElements2, _props$beforeComponen2, _businessDetails$busi, _businessDetails$busi2, _theme$images, _configs$google_maps_, _props$beforeElements3, _props$beforeComponen3, _customerState$user, _customerState$user2, _props$beforeElements4, _props$beforeComponen4, _Object$values, _businessDetails$busi3, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$erro, _businessDetails$erro2, _props$beforeElements5, _props$beforeComponen5, _businessDetails$busi7, _businessDetails$busi8, _props$beforeElements6, _props$beforeComponen6, _validationFields$fie5, _configs$driver_tip_u, _configs$driver_tip_t, _configs$driver_tip_u2, _props$beforeElements7, _props$beforeComponen7, _cart$products2, _props$beforeElements8, _props$beforeComponen8, _props$afterComponent, _props$afterElements;
|
|
58
|
+
var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _ref, _props$beforeElements, _props$beforeComponen, _props$beforeElements2, _props$beforeComponen2, _businessDetails$busi, _businessDetails$busi2, _theme$images, _configs$google_maps_, _props$beforeElements3, _props$beforeComponen3, _customerState$user, _customerState$user2, _props$beforeElements4, _props$beforeComponen4, _Object$values, _businessDetails$busi3, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$erro, _businessDetails$erro2, _props$beforeElements5, _props$beforeComponen5, _businessDetails$busi7, _businessDetails$busi8, _props$beforeElements6, _props$beforeComponen6, _validationFields$fie5, _configs$driver_tip_u, _configs$driver_tip_t, _configs$driver_tip_u2, _props$beforeElements7, _props$beforeComponen7, _cart$products2, _props$beforeElements8, _props$beforeComponen8, _props$afterComponent, _props$afterElements;
|
|
59
59
|
var businessId = props.businessId,
|
|
60
60
|
cart = props.cart,
|
|
61
61
|
errors = props.errors,
|
|
@@ -139,8 +139,8 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
139
139
|
var isIOS = window.navigator.userAgent.includes('iPhone');
|
|
140
140
|
var placeSpotTypes = [3, 4];
|
|
141
141
|
var driverTipsOptions = typeof (configs === null || configs === void 0 || (_configs$driver_tip_o = configs.driver_tip_options) === null || _configs$driver_tip_o === void 0 ? void 0 : _configs$driver_tip_o.value) === 'string' ? JSON.parse(configs === null || configs === void 0 || (_configs$driver_tip_o2 = configs.driver_tip_options) === null || _configs$driver_tip_o2 === void 0 ? void 0 : _configs$driver_tip_o2.value) || [] : (configs === null || configs === void 0 || (_configs$driver_tip_o3 = configs.driver_tip_options) === null || _configs$driver_tip_o3 === void 0 ? void 0 : _configs$driver_tip_o3.value) || [];
|
|
142
|
-
var handlePlaceOrder =
|
|
143
|
-
|
|
142
|
+
var handlePlaceOrder = function handlePlaceOrder() {
|
|
143
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
144
144
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
145
145
|
while (1) switch (_context.prev = _context.next) {
|
|
146
146
|
case 0:
|
|
@@ -176,11 +176,8 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
176
176
|
return _context.stop();
|
|
177
177
|
}
|
|
178
178
|
}, _callee);
|
|
179
|
-
}));
|
|
180
|
-
|
|
181
|
-
return _ref.apply(this, arguments);
|
|
182
|
-
};
|
|
183
|
-
}();
|
|
179
|
+
}))).apply(this, arguments);
|
|
180
|
+
};
|
|
184
181
|
var closeAlert = function closeAlert() {
|
|
185
182
|
setAlertState({
|
|
186
183
|
open: false,
|
|
@@ -254,8 +251,9 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
254
251
|
}
|
|
255
252
|
}, [paymethodSelected]);
|
|
256
253
|
(0, _react.useEffect)(function () {
|
|
257
|
-
var
|
|
258
|
-
|
|
254
|
+
var _ref2;
|
|
255
|
+
var getPlaceId = function getPlaceId() {
|
|
256
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
259
257
|
var id;
|
|
260
258
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
261
259
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -270,17 +268,14 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
270
268
|
return _context2.stop();
|
|
271
269
|
}
|
|
272
270
|
}, _callee2);
|
|
273
|
-
}));
|
|
274
|
-
|
|
275
|
-
return _ref2.apply(this, arguments);
|
|
276
|
-
};
|
|
277
|
-
}();
|
|
271
|
+
}))).apply(this, arguments);
|
|
272
|
+
};
|
|
278
273
|
getPlaceId();
|
|
279
274
|
}, []);
|
|
280
275
|
(0, _react.useEffect)(function () {
|
|
281
|
-
var _cart$products;
|
|
282
|
-
var handleChangePlace =
|
|
283
|
-
|
|
276
|
+
var _ref3, _cart$products;
|
|
277
|
+
var handleChangePlace = function handleChangePlace() {
|
|
278
|
+
return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
284
279
|
var response, _yield$response$json, result, error;
|
|
285
280
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
286
281
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -328,11 +323,8 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
328
323
|
return _context3.stop();
|
|
329
324
|
}
|
|
330
325
|
}, _callee3, null, [[1, 14]]);
|
|
331
|
-
}));
|
|
332
|
-
|
|
333
|
-
return _ref3.apply(this, arguments);
|
|
334
|
-
};
|
|
335
|
-
}();
|
|
326
|
+
}))).apply(this, arguments);
|
|
327
|
+
};
|
|
336
328
|
if ((cart === null || cart === void 0 || (_cart$products = cart.products) === null || _cart$products === void 0 ? void 0 : _cart$products.length) > 0 && placeId && placeSpotTypes.includes(options === null || options === void 0 ? void 0 : options.type) && !isDisabledTables) {
|
|
337
329
|
handleChangePlace();
|
|
338
330
|
}
|
|
@@ -580,7 +572,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
580
572
|
}));
|
|
581
573
|
};
|
|
582
574
|
var Checkout = function Checkout(props) {
|
|
583
|
-
var _Object$values2, _cartState$cart, _cartState$error, _cartState$cart2;
|
|
575
|
+
var _Object$values2, _ref4, _cartState$cart, _cartState$error, _cartState$cart2;
|
|
584
576
|
var errors = props.errors,
|
|
585
577
|
clearErrors = props.clearErrors,
|
|
586
578
|
cartUuid = props.cartUuid,
|
|
@@ -670,8 +662,8 @@ var Checkout = function Checkout(props) {
|
|
|
670
662
|
});
|
|
671
663
|
}
|
|
672
664
|
}, [errors]);
|
|
673
|
-
var getOrder =
|
|
674
|
-
|
|
665
|
+
var getOrder = function getOrder(_x) {
|
|
666
|
+
return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(cartId) {
|
|
675
667
|
var _result$order, userCustomer, url, response, _yield$response$json2, result, _confirmCartRes$resul, confirmCartRes, cart;
|
|
676
668
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
677
669
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -765,11 +757,8 @@ var Checkout = function Checkout(props) {
|
|
|
765
757
|
return _context4.stop();
|
|
766
758
|
}
|
|
767
759
|
}, _callee4, null, [[0, 35], [17, 26]]);
|
|
768
|
-
}));
|
|
769
|
-
|
|
770
|
-
return _ref4.apply(this, arguments);
|
|
771
|
-
};
|
|
772
|
-
}();
|
|
760
|
+
}))).apply(this, arguments);
|
|
761
|
+
};
|
|
773
762
|
(0, _react.useEffect)(function () {
|
|
774
763
|
if (token && cartUuid) {
|
|
775
764
|
getOrder(cartUuid);
|
|
@@ -24,6 +24,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
24
24
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
var Footer = function Footer() {
|
|
27
|
+
var _ref;
|
|
27
28
|
var _useState = (0, _react.useState)({
|
|
28
29
|
body: null,
|
|
29
30
|
loading: false,
|
|
@@ -36,8 +37,8 @@ var Footer = function Footer() {
|
|
|
36
37
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
37
38
|
ordering = _useApi2[0];
|
|
38
39
|
var requestsState = {};
|
|
39
|
-
var getPage =
|
|
40
|
-
|
|
40
|
+
var getPage = function getPage() {
|
|
41
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
41
42
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
42
43
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43
44
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -85,11 +86,8 @@ var Footer = function Footer() {
|
|
|
85
86
|
return _context.stop();
|
|
86
87
|
}
|
|
87
88
|
}, _callee, null, [[1, 14]]);
|
|
88
|
-
}));
|
|
89
|
-
|
|
90
|
-
return _ref.apply(this, arguments);
|
|
91
|
-
};
|
|
92
|
-
}();
|
|
89
|
+
}))).apply(this, arguments);
|
|
90
|
+
};
|
|
93
91
|
(0, _react.useEffect)(function () {
|
|
94
92
|
getPage();
|
|
95
93
|
return function () {
|