ordering-ui-external 1.9.6 → 2.0.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.55652fab015bca672f9d.js → 0.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{1.ordering-ui.55652fab015bca672f9d.js → 1.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{2.ordering-ui.55652fab015bca672f9d.js → 2.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{4.ordering-ui.55652fab015bca672f9d.js → 4.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{5.ordering-ui.55652fab015bca672f9d.js → 5.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{6.ordering-ui.55652fab015bca672f9d.js → 6.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{7.ordering-ui.55652fab015bca672f9d.js → 7.ordering-ui.32113e17b220a7b5ae09.js} +2 -2
- package/_bundles/{7.ordering-ui.55652fab015bca672f9d.js.LICENSE.txt → 7.ordering-ui.32113e17b220a7b5ae09.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.55652fab015bca672f9d.js → 8.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/{9.ordering-ui.55652fab015bca672f9d.js → 9.ordering-ui.32113e17b220a7b5ae09.js} +1 -1
- package/_bundles/ordering-ui.32113e17b220a7b5ae09.js +2 -0
- package/_bundles/{ordering-ui.55652fab015bca672f9d.js.LICENSE.txt → ordering-ui.32113e17b220a7b5ae09.js.LICENSE.txt} +0 -0
- package/_modules/components/Confirm/index.js +4 -2
- package/_modules/components/Header/index.js +4 -2
- package/_modules/components/SmartAppBanner/index.js +4 -2
- package/_modules/themes/callcenterOriginal/src/components/Orders/OrdersTable/index.js +32 -11
- package/_modules/themes/callcenterOriginal/src/components/Orders/OrdersTable/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +7 -6
- package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +4 -4
- package/_modules/themes/five/src/components/Cart/index.js +6 -6
- package/_modules/themes/five/src/components/Checkout/index.js +4 -0
- package/_modules/themes/five/src/components/FavoriteList/index.js +2 -83
- package/_modules/themes/five/src/components/Footer/index.js +4 -2
- package/_modules/themes/five/src/components/Header/layouts/Kiosk/index.js +4 -2
- package/_modules/themes/five/src/components/MessagesListing/index.js +2 -82
- package/_modules/themes/five/src/components/Modal/index.js +4 -2
- package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +1 -1
- package/_modules/themes/five/src/components/MultiCheckout/index.js +14 -8
- package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +12 -135
- package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +15 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +5 -3
- package/_modules/themes/five/src/components/NavigationBar/index.js +4 -2
- package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +4 -2
- package/_modules/themes/five/src/components/OrderDetails/index.js +11 -140
- package/_modules/themes/five/src/components/OrderProgress/index.js +3 -131
- package/_modules/themes/five/src/components/ProductForm/index.js +27 -26
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +11 -14
- package/_modules/themes/five/src/components/ReviewDriver/index.js +4 -2
- package/_modules/themes/five/src/components/ReviewOrder/index.js +4 -2
- package/_modules/themes/five/src/components/ReviewProduct/index.js +4 -2
- package/_modules/themes/five/src/components/ReviewTrigger/index.js +4 -2
- package/_modules/themes/five/src/components/SignUpApproval/index.js +4 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -2
- package/_modules/themes/five/src/styles/Buttons/index.js +5 -3
- package/_modules/themes/five/src/styles/Inputs/index.js +1 -1
- package/_modules/themes/seven/src/components/Header/index.js +4 -2
- package/_modules/themes/six/src/components/Header/index.js +4 -2
- package/package.json +2 -2
- package/src/components/CancellationComponent/index.js +31 -27
- package/src/components/Confirm/index.js +2 -0
- package/src/components/Header/index.js +2 -0
- package/src/components/SmartAppBanner/index.js +2 -0
- package/src/themes/callcenterOriginal/src/components/Orders/OrdersTable/index.js +43 -19
- package/src/themes/callcenterOriginal/src/components/Orders/OrdersTable/styles.js +1 -0
- package/src/themes/five/src/components/BusinessProductsList/index.js +7 -6
- package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +4 -4
- package/src/themes/five/src/components/Cart/index.js +15 -4
- package/src/themes/five/src/components/Checkout/index.js +2 -0
- package/src/themes/five/src/components/FavoriteList/index.js +1 -35
- package/src/themes/five/src/components/Footer/index.js +2 -0
- package/src/themes/five/src/components/Header/layouts/Kiosk/index.js +2 -0
- package/src/themes/five/src/components/MessagesListing/index.js +1 -34
- package/src/themes/five/src/components/Modal/index.js +2 -0
- package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +1 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +14 -5
- package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +24 -45
- package/src/themes/five/src/components/MultiOrdersDetails/index.js +16 -2
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +8 -0
- package/src/themes/five/src/components/NavigationBar/index.js +2 -0
- package/src/themes/five/src/components/NotNetworkConnectivity/index.js +2 -0
- package/src/themes/five/src/components/OrderDetails/index.js +1 -35
- package/src/themes/five/src/components/OrderProgress/index.js +1 -34
- package/src/themes/five/src/components/ProductForm/index.js +11 -11
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/src/themes/five/src/components/ReviewDriver/index.js +2 -0
- package/src/themes/five/src/components/ReviewOrder/index.js +2 -0
- package/src/themes/five/src/components/ReviewProduct/index.js +2 -0
- package/src/themes/five/src/components/ReviewTrigger/index.js +2 -0
- package/src/themes/five/src/components/SignUpApproval/index.js +2 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +1 -2
- package/src/themes/five/src/styles/Buttons/index.js +3 -1
- package/src/themes/five/src/styles/Inputs/index.js +1 -1
- package/src/themes/seven/src/components/Header/index.js +2 -0
- package/src/themes/six/src/components/Header/index.js +2 -0
- package/template/components/HelmetTags/index.js +2 -0
- package/template/components/ListenPageChanges/index.js +2 -0
- package/template/components/ScrollToTop/index.js +2 -0
- package/template/components/SubdomainComponent/index.js +4 -39
- package/template/config.json +2 -1
- package/template/pages/AddressList/index.js +2 -0
- package/template/pages/BusinessListingSearch/index.js +2 -0
- package/template/pages/BusinessProductsList/index.js +2 -0
- package/template/pages/BusinessesList/index.js +2 -0
- package/template/pages/Checkout/index.js +2 -0
- package/template/pages/Cms/index.js +2 -0
- package/template/pages/Favorite/index.js +2 -0
- package/template/pages/Help/index.js +2 -0
- package/template/pages/Home/index.js +2 -0
- package/template/pages/MessagesList/index.js +2 -0
- package/template/pages/MultiCheckout/index.js +5 -0
- package/template/pages/MultiOrdersDetails/index.js +2 -0
- package/template/pages/MyOrders/index.js +2 -0
- package/template/pages/OrderDetails/index.js +2 -0
- package/template/pages/PageNotFound/index.js +2 -0
- package/template/pages/PagesList/index.js +2 -0
- package/template/pages/Profile/index.js +2 -0
- package/template/pages/Promotions/index.js +2 -0
- package/template/pages/ResetPassword/index.js +2 -0
- package/template/pages/SessionsList/index.js +2 -0
- package/template/pages/SignUpBusiness/index.js +2 -0
- package/template/pages/SignUpDriver/index.js +2 -0
- package/template/pages/UserVerification/index.js +2 -0
- package/template/pages/Wallets/index.js +2 -0
- package/_bundles/ordering-ui.55652fab015bca672f9d.js +0 -2
|
File without changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Confirm = exports.Alert = void 0;
|
|
6
|
+
exports.default = exports.Confirm = exports.Alert = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _MdClose = _interopRequireDefault(require("@meronex/icons/md/MdClose"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
@@ -87,4 +87,6 @@ var Confirm = function Confirm(props) {
|
|
|
87
87
|
};
|
|
88
88
|
exports.Confirm = Confirm;
|
|
89
89
|
var Alert = Confirm;
|
|
90
|
-
exports.Alert = Alert;
|
|
90
|
+
exports.Alert = Alert;
|
|
91
|
+
var _default = Confirm;
|
|
92
|
+
exports.default = _default;
|
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Header = void 0;
|
|
7
|
+
exports.default = exports.Header = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactRouterDom = require("react-router-dom");
|
|
10
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
@@ -429,4 +429,6 @@ var styles = {
|
|
|
429
429
|
};
|
|
430
430
|
Header.defaultProps = {
|
|
431
431
|
isShowOrderOptions: true
|
|
432
|
-
};
|
|
432
|
+
};
|
|
433
|
+
var _default = Header;
|
|
434
|
+
exports.default = _default;
|
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.SmartAppBanner = void 0;
|
|
7
|
+
exports.default = exports.SmartAppBanner = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
10
|
var _reactSmartbanner = _interopRequireDefault(require("react-smartbanner"));
|
|
@@ -51,4 +51,6 @@ var SmartAppBanner = function SmartAppBanner(props) {
|
|
|
51
51
|
});
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.SmartAppBanner, smartAppBannerProps);
|
|
53
53
|
};
|
|
54
|
-
exports.SmartAppBanner = SmartAppBanner;
|
|
54
|
+
exports.SmartAppBanner = SmartAppBanner;
|
|
55
|
+
var _default = SmartAppBanner;
|
|
56
|
+
exports.default = _default;
|
|
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
34
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var OrdersTable = function OrdersTable(props) {
|
|
37
|
-
var _orderList$orders3;
|
|
37
|
+
var _orderList$orders3, _Object$keys$filter;
|
|
38
38
|
var isSelectedOrders = props.isSelectedOrders,
|
|
39
39
|
orderList = props.orderList,
|
|
40
40
|
pagination = props.pagination,
|
|
@@ -350,12 +350,23 @@ var OrdersTable = function OrdersTable(props) {
|
|
|
350
350
|
}, /*#__PURE__*/_react.default.createElement(_styles.Table, {
|
|
351
351
|
className: "orders_table",
|
|
352
352
|
noFixedHeader: !orderList.loading && ((_orderList$orders3 = orderList.orders) === null || _orderList$orders3 === void 0 ? void 0 : _orderList$orders3.length) <= 5
|
|
353
|
-
}, !isSelectedOrders && /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, allowColumns && Object.keys(allowColumns).filter(function (col) {
|
|
353
|
+
}, !isSelectedOrders && /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, allowColumns && (((_Object$keys$filter = Object.keys(allowColumns).filter(function (col) {
|
|
354
354
|
var _allowColumns$col, _allowColumns$col2;
|
|
355
355
|
return ((_allowColumns$col = allowColumns[col]) === null || _allowColumns$col === void 0 ? void 0 : _allowColumns$col.visable) && ((_allowColumns$col2 = allowColumns[col]) === null || _allowColumns$col2 === void 0 ? void 0 : _allowColumns$col2.order) !== 0;
|
|
356
|
-
}).
|
|
356
|
+
})) === null || _Object$keys$filter === void 0 ? void 0 : _Object$keys$filter.length) === 0 ? /*#__PURE__*/_react.default.createElement("th", {
|
|
357
|
+
className: "orderPrice",
|
|
358
|
+
key: "noDragTh-".concat(i)
|
|
359
|
+
}, /*#__PURE__*/_react.default.createElement(_Shared.ColumnAllowSettingPopover, {
|
|
360
|
+
allowColumns: allowColumns,
|
|
361
|
+
optionsDefault: optionsDefault,
|
|
362
|
+
handleChangeAllowColumns: handleChangeAllowColumns,
|
|
363
|
+
isOrder: true
|
|
364
|
+
})) : Object.keys(allowColumns).filter(function (col) {
|
|
357
365
|
var _allowColumns$col3, _allowColumns$col4;
|
|
358
|
-
return ((_allowColumns$col3 = allowColumns[
|
|
366
|
+
return ((_allowColumns$col3 = allowColumns[col]) === null || _allowColumns$col3 === void 0 ? void 0 : _allowColumns$col3.visable) && ((_allowColumns$col4 = allowColumns[col]) === null || _allowColumns$col4 === void 0 ? void 0 : _allowColumns$col4.order) !== 0;
|
|
367
|
+
}).sort(function (col1, col2) {
|
|
368
|
+
var _allowColumns$col5, _allowColumns$col6;
|
|
369
|
+
return ((_allowColumns$col5 = allowColumns[col1]) === null || _allowColumns$col5 === void 0 ? void 0 : _allowColumns$col5.order) - ((_allowColumns$col6 = allowColumns[col2]) === null || _allowColumns$col6 === void 0 ? void 0 : _allowColumns$col6.order);
|
|
359
370
|
}).map(function (column, i, array) {
|
|
360
371
|
var _allowColumns$column$2, _allowColumns$column4, _allowColumns$column5, _theme$images$icons2, _allowColumns$column6;
|
|
361
372
|
if (column === 'slaBar') {
|
|
@@ -363,7 +374,9 @@ var OrdersTable = function OrdersTable(props) {
|
|
|
363
374
|
}
|
|
364
375
|
if (column === 'orderNumber') {
|
|
365
376
|
var _allowColumns$orderNu, _allowColumns$dateTim, _allowColumns$slaBar;
|
|
366
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
377
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
378
|
+
key: i
|
|
379
|
+
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
367
380
|
className: !(allowColumns !== null && allowColumns !== void 0 && (_allowColumns$orderNu = allowColumns.orderNumber) !== null && _allowColumns$orderNu !== void 0 && _allowColumns$orderNu.visable || allowColumns !== null && allowColumns !== void 0 && (_allowColumns$dateTim = allowColumns.dateTime) !== null && _allowColumns$dateTim !== void 0 && _allowColumns$dateTim.visable) ? 'orderNo small' : 'orderNo',
|
|
368
381
|
key: "noDragTh-".concat(i),
|
|
369
382
|
colSpan: allowColumns !== null && allowColumns !== void 0 && (_allowColumns$slaBar = allowColumns.slaBar) !== null && _allowColumns$slaBar !== void 0 && _allowColumns$slaBar.visable ? 2 : 1
|
|
@@ -373,7 +386,15 @@ var OrdersTable = function OrdersTable(props) {
|
|
|
373
386
|
return handleSelecteAllOrder();
|
|
374
387
|
},
|
|
375
388
|
className: "orderCheckBox"
|
|
376
|
-
}, !orderList.loading && isAllChecked ? /*#__PURE__*/_react.default.createElement(_RiCheckboxFill.default, null) : /*#__PURE__*/_react.default.createElement(_RiCheckboxBlankLine.default, null)), t('ORDER', 'Order'))
|
|
389
|
+
}, !orderList.loading && isAllChecked ? /*#__PURE__*/_react.default.createElement(_RiCheckboxFill.default, null) : /*#__PURE__*/_react.default.createElement(_RiCheckboxBlankLine.default, null)), t('ORDER', 'Order')), column === _toConsumableArray(array).pop() && /*#__PURE__*/_react.default.createElement("th", {
|
|
390
|
+
className: "orderPrice",
|
|
391
|
+
key: "noDragTh-".concat(i)
|
|
392
|
+
}, /*#__PURE__*/_react.default.createElement(_Shared.ColumnAllowSettingPopover, {
|
|
393
|
+
allowColumns: allowColumns,
|
|
394
|
+
optionsDefault: optionsDefault,
|
|
395
|
+
handleChangeAllowColumns: handleChangeAllowColumns,
|
|
396
|
+
isOrder: true
|
|
397
|
+
})));
|
|
377
398
|
}
|
|
378
399
|
if (column === 'total' || column !== 'total' && column === _toConsumableArray(array).pop()) {
|
|
379
400
|
var _allowColumns$column$, _allowColumns$column, _allowColumns$column2, _theme$images$icons, _allowColumns$column3;
|
|
@@ -434,7 +455,7 @@ var OrdersTable = function OrdersTable(props) {
|
|
|
434
455
|
src: (_theme$images$icons2 = theme.images.icons) === null || _theme$images$icons2 === void 0 ? void 0 : _theme$images$icons2.sixDots,
|
|
435
456
|
alt: "six dots"
|
|
436
457
|
}), /*#__PURE__*/_react.default.createElement("span", null, (_allowColumns$column6 = allowColumns[column]) === null || _allowColumns$column6 === void 0 ? void 0 : _allowColumns$column6.title)));
|
|
437
|
-
}))), orderList.loading || !allowColumns ? _toConsumableArray(Array(10).keys()).map(function (i) {
|
|
458
|
+
})))), orderList.loading || !allowColumns ? _toConsumableArray(Array(10).keys()).map(function (i) {
|
|
438
459
|
var _allowColumns$slaBar2, _allowColumns$orderNu2, _allowColumns$dateTim2, _allowColumns$orderNu3, _allowColumns$dateTim3, _allowColumns$status, _allowColumns$busines, _allowColumns$custome, _allowColumns$driver, _allowColumns$deliver, _allowColumns$status2, _allowColumns$advance, _allowColumns$advance2, _allowColumns$advance3, _allowColumns$total;
|
|
439
460
|
return /*#__PURE__*/_react.default.createElement(_styles.OrderTbody, {
|
|
440
461
|
key: i
|
|
@@ -558,11 +579,11 @@ var OrdersTable = function OrdersTable(props) {
|
|
|
558
579
|
},
|
|
559
580
|
"data-tour": i === 0 ? 'tour_start' : ''
|
|
560
581
|
}, /*#__PURE__*/_react.default.createElement("tr", null, Object.keys(allowColumns).filter(function (col) {
|
|
561
|
-
var _allowColumns$
|
|
562
|
-
return (_allowColumns$
|
|
582
|
+
var _allowColumns$col7;
|
|
583
|
+
return (_allowColumns$col7 = allowColumns[col]) === null || _allowColumns$col7 === void 0 ? void 0 : _allowColumns$col7.visable;
|
|
563
584
|
}).sort(function (col1, col2) {
|
|
564
|
-
var _allowColumns$
|
|
565
|
-
return ((_allowColumns$
|
|
585
|
+
var _allowColumns$col8, _allowColumns$col9;
|
|
586
|
+
return ((_allowColumns$col8 = allowColumns[col1]) === null || _allowColumns$col8 === void 0 ? void 0 : _allowColumns$col8.order) - ((_allowColumns$col9 = allowColumns[col2]) === null || _allowColumns$col9 === void 0 ? void 0 : _allowColumns$col9.order);
|
|
566
587
|
}).map(function (column, index) {
|
|
567
588
|
if (column === 'slaBar') {
|
|
568
589
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
@@ -21,7 +21,7 @@ var OrdersContainer = _styledComponents.default.div(_templateObject || (_templat
|
|
|
21
21
|
return isSelectedOrders && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n max-height: calc(var(--vh, 1vh) * 100 - 345px);\n "])));
|
|
22
22
|
});
|
|
23
23
|
exports.OrdersContainer = OrdersContainer;
|
|
24
|
-
var Table = _styledComponents.default.table(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: calc(100% - 10px);\n min-width: 900px;\n\n th,\n td {\n padding: 15px;\n box-sizing: border-box;\n font-size: 14px;\n\n &:first-child {\n padding-left: 0px;\n padding-right: 0px;\n }\n }\n\n th {\n padding-top: 0px;\n }\n\n thead {\n tr {\n width: 100%;\n border-bottom: solid 1px ", ";\n th {\n color: ", ";\n white-space: nowrap;\n ", "\n background: ", ";\n }\n }\n }\n\n p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .orderPrice {\n div.info {\n p {\n ", "\n }\n }\n }\n\n div.info {\n p {\n margin: 0px;\n color: ", ";\n font-size: 12px;\n }\n p.date {\n color: ", ";\n }\n p.bold {\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n }\n }\n"])), function (props) {
|
|
24
|
+
var Table = _styledComponents.default.table(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: calc(100% - 10px);\n min-width: 900px;\n min-height: 35vh;\n\n th,\n td {\n padding: 15px;\n box-sizing: border-box;\n font-size: 14px;\n\n &:first-child {\n padding-left: 0px;\n padding-right: 0px;\n }\n }\n\n th {\n padding-top: 0px;\n }\n\n thead {\n tr {\n width: 100%;\n border-bottom: solid 1px ", ";\n th {\n color: ", ";\n white-space: nowrap;\n ", "\n background: ", ";\n }\n }\n }\n\n p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .orderPrice {\n div.info {\n p {\n ", "\n }\n }\n }\n\n div.info {\n p {\n margin: 0px;\n color: ", ";\n font-size: 12px;\n }\n p.date {\n color: ", ";\n }\n p.bold {\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n }\n }\n"])), function (props) {
|
|
25
25
|
return props.theme.colors.disabled;
|
|
26
26
|
}, function (props) {
|
|
27
27
|
var _props$theme$colors;
|
|
@@ -55,7 +55,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
55
55
|
subcategoriesSelected = props.subcategoriesSelected,
|
|
56
56
|
onClickCategory = props.onClickCategory,
|
|
57
57
|
handleUpdateProducts = props.handleUpdateProducts,
|
|
58
|
-
isSearchMode = props.isSearchMode
|
|
58
|
+
isSearchMode = props.isSearchMode,
|
|
59
|
+
business = props.business;
|
|
59
60
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
60
61
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
61
62
|
t = _useLanguage2[1];
|
|
@@ -198,7 +199,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
198
199
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
199
200
|
}, 0)
|
|
200
201
|
});
|
|
201
|
-
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc4 = categoryState.products) === null || _categoryState$produc4 === void 0 ? void 0 : _categoryState$produc4.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
202
|
+
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc4 = categoryState.products) === null || _categoryState$produc4 === void 0 ? void 0 : _categoryState$produc4.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
202
203
|
useCustomFunctionality: true,
|
|
203
204
|
onCustomClick: function onCustomClick() {
|
|
204
205
|
return onClickCategory(category);
|
|
@@ -260,7 +261,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
260
261
|
})), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, {
|
|
261
262
|
isSubcategorySearch: isSubcategorySearch
|
|
262
263
|
}, isSearchMode && (category === null || category === void 0 ? void 0 : (_category$subcategori9 = category.subcategories) === null || _category$subcategori9 === void 0 ? void 0 : _category$subcategori9.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products === null || products === void 0 ? void 0 : (_products$filter = products.filter(function (product, i) {
|
|
263
|
-
return i < 9 && (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
264
|
+
return i < 9 && (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id) || (business === null || business === void 0 ? void 0 : business.food);
|
|
264
265
|
})) === null || _products$filter === void 0 ? void 0 : _products$filter.map(function (product, i) {
|
|
265
266
|
var _currentCart$products4;
|
|
266
267
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
@@ -276,7 +277,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
276
277
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
277
278
|
}, 0)
|
|
278
279
|
});
|
|
279
|
-
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
280
|
+
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
280
281
|
useCustomFunctionality: true,
|
|
281
282
|
onCustomClick: function onCustomClick() {
|
|
282
283
|
return onClickCategory(category);
|
|
@@ -289,7 +290,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
289
290
|
justifyContent: 'center'
|
|
290
291
|
}
|
|
291
292
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products.filter(function (_, i) {
|
|
292
|
-
return i < 9;
|
|
293
|
+
return i < 9 || (business === null || business === void 0 ? void 0 : business.food);
|
|
293
294
|
}).map(function (product, i) {
|
|
294
295
|
var _currentCart$products5;
|
|
295
296
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
@@ -305,7 +306,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
305
306
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
306
307
|
}, 0)
|
|
307
308
|
});
|
|
308
|
-
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
309
|
+
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
309
310
|
useCustomFunctionality: true,
|
|
310
311
|
onCustomClick: function onCustomClick() {
|
|
311
312
|
return onClickCategory(category);
|
|
@@ -110,7 +110,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
110
110
|
return onClickCategory(category);
|
|
111
111
|
}
|
|
112
112
|
}, t('MORE', 'More'))), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, null, featProducts === null || featProducts === void 0 ? void 0 : (_featProducts$filter = featProducts.filter(function (p, index) {
|
|
113
|
-
return index < 9;
|
|
113
|
+
return (business === null || business === void 0 ? void 0 : business.food) || index < 9;
|
|
114
114
|
})) === null || _featProducts$filter === void 0 ? void 0 : _featProducts$filter.map(function (product, i) {
|
|
115
115
|
var _currentCart$products2;
|
|
116
116
|
return product.featured && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
@@ -125,7 +125,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
125
125
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
126
126
|
}, 0)
|
|
127
127
|
});
|
|
128
|
-
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (featProducts === null || featProducts === void 0 ? void 0 : featProducts.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
128
|
+
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (featProducts === null || featProducts === void 0 ? void 0 : featProducts.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
129
129
|
useCustomFunctionality: true,
|
|
130
130
|
onCustomClick: function onCustomClick() {
|
|
131
131
|
return onClickCategory(category);
|
|
@@ -174,7 +174,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
174
174
|
return setOpenDescription(category);
|
|
175
175
|
}
|
|
176
176
|
}, t('VIEW_MORE', 'View more')))))), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, null, products.filter(function (p, index) {
|
|
177
|
-
return index < 9;
|
|
177
|
+
return index < 9 || (business === null || business === void 0 ? void 0 : business.food);
|
|
178
178
|
}).map(function (product, i) {
|
|
179
179
|
var _currentCart$products3;
|
|
180
180
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
@@ -189,7 +189,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
189
189
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
190
190
|
}, 0)
|
|
191
191
|
});
|
|
192
|
-
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
192
|
+
}), !(business !== null && business !== void 0 && business.food) && !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
193
193
|
useCustomFunctionality: true,
|
|
194
194
|
onCustomClick: function onCustomClick() {
|
|
195
195
|
return onClickCategory(category);
|
|
@@ -42,7 +42,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
42
42
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
43
43
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
44
|
var CartUI = function CartUI(props) {
|
|
45
|
-
var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _configs$checkout_mul, _orderState$carts, _props$cart, _theme$viewString, _theme$viewString$com, _theme$viewString$com2, _theme$viewString$com3, _theme$viewString$com4, _theme$viewString2, _theme$viewString2$co, _theme$viewString2$co2, _theme$viewString2$co3, _theme$viewString2$co4, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers3$filter, _cart$offers4, _cart$offers4$filter, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes2, _cart$taxes3, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _cart$offers6$filter, _orderState$options, _cart$
|
|
45
|
+
var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _configs$checkout_mul, _orderState$carts, _props$cart, _theme$viewString, _theme$viewString$com, _theme$viewString$com2, _theme$viewString$com3, _theme$viewString$com4, _theme$viewString2, _theme$viewString2$co, _theme$viewString2$co2, _theme$viewString2$co3, _theme$viewString2$co4, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers3$filter, _cart$offers4, _cart$offers4$filter, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes2, _cart$taxes3, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _cart$offers6$filter, _orderState$options, _cart$offers7, _cart$offers8, _cart$offers8$filter, _orderState$options2, _configs$driver_tip_t, _configs$driver_tip_u, _orderState$options3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_t2, _configs$driver_tip_u2, _configs$driver_tip_t3, _cart$payment_events, _cart$payment_events2, _cart$business2, _cart$business3, _curProduct$calendar_, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
|
|
46
46
|
var currentCartUuid = props.currentCartUuid,
|
|
47
47
|
clearCart = props.clearCart,
|
|
48
48
|
isProducts = props.isProducts,
|
|
@@ -436,14 +436,14 @@ var CartUI = function CartUI(props) {
|
|
|
436
436
|
type: 'offer_target_3'
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
}), /*#__PURE__*/_react.default.createElement(_MdCloseCircle.default, {
|
|
439
|
+
}), !(offer !== null && offer !== void 0 && offer.type) && /*#__PURE__*/_react.default.createElement(_MdCloseCircle.default, {
|
|
440
440
|
size: "24",
|
|
441
441
|
color: theme.colors.primary,
|
|
442
442
|
onClick: function onClick() {
|
|
443
443
|
return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
|
|
444
444
|
}
|
|
445
445
|
}))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 ? void 0 : (_offer$summary2 = offer.summary) === null || _offer$summary2 === void 0 ? void 0 : _offer$summary2.discount)));
|
|
446
|
-
})), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE', 'Delivery Fee')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(
|
|
446
|
+
})), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE', 'Delivery Fee')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.delivery_price))), !hideCartDiscount && (cart === null || cart === void 0 ? void 0 : (_cart$offers7 = cart.offers) === null || _cart$offers7 === void 0 ? void 0 : _cart$offers7.length) > 0 && (cart === null || cart === void 0 ? void 0 : (_cart$offers8 = cart.offers) === null || _cart$offers8 === void 0 ? void 0 : (_cart$offers8$filter = _cart$offers8.filter(function (offer) {
|
|
447
447
|
return (offer === null || offer === void 0 ? void 0 : offer.target) === 2;
|
|
448
448
|
})) === null || _cart$offers8$filter === void 0 ? void 0 : _cart$offers8$filter.map(function (offer) {
|
|
449
449
|
var _offer$summary3;
|
|
@@ -461,17 +461,17 @@ var CartUI = function CartUI(props) {
|
|
|
461
461
|
type: 'offer_target_2'
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
}), /*#__PURE__*/_react.default.createElement(_MdCloseCircle.default, {
|
|
464
|
+
}), !(offer !== null && offer !== void 0 && offer.type) && /*#__PURE__*/_react.default.createElement(_MdCloseCircle.default, {
|
|
465
465
|
size: "24",
|
|
466
466
|
color: theme.colors.primary,
|
|
467
467
|
onClick: function onClick() {
|
|
468
468
|
return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
|
|
469
469
|
}
|
|
470
470
|
}))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 ? void 0 : (_offer$summary3 = offer.summary) === null || _offer$summary3 === void 0 ? void 0 : _offer$summary3.discount)));
|
|
471
|
-
})), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && !hideCartDiscount && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
|
|
471
|
+
})), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price_with_discount) >= 0 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE_AFTER_DISCOUNT', 'Delivery Fee After Discount')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.delivery_price_with_discount))), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && !hideCartDiscount && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
|
|
472
472
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
473
473
|
price: cart === null || cart === void 0 ? void 0 : cart.total
|
|
474
|
-
})), isMultiCheckout && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
474
|
+
})), !isStore && !isMultiCheckout && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.enabled) && driverTipsOptions.length > 0 && !useKioskApp && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
|
|
475
475
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
476
476
|
driverTipsOptions: driverTipsOptions,
|
|
477
477
|
isFixedPrice: parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t2 = configs.driver_tip_type) === null || _configs$driver_tip_t2 === void 0 ? void 0 : _configs$driver_tip_t2.value, 10) === 1,
|
|
@@ -711,6 +711,10 @@ var Checkout = function Checkout(props) {
|
|
|
711
711
|
(0, _react.useEffect)(function () {
|
|
712
712
|
if (token && cartUuid) {
|
|
713
713
|
getOrder(cartUuid);
|
|
714
|
+
} else {
|
|
715
|
+
setCartState(_objectSpread(_objectSpread({}, cartState), {}, {
|
|
716
|
+
loading: false
|
|
717
|
+
}));
|
|
714
718
|
}
|
|
715
719
|
}, [token, cartUuid]);
|
|
716
720
|
var checkoutProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -106,87 +106,6 @@ var FavoriteListUI = function FavoriteListUI(props) {
|
|
|
106
106
|
setIsPreorder(false);
|
|
107
107
|
setPreorderBusiness(null);
|
|
108
108
|
};
|
|
109
|
-
var getOrderStatus = function getOrderStatus(s) {
|
|
110
|
-
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;
|
|
111
|
-
var status = parseInt(s);
|
|
112
|
-
var orderStatus = [{
|
|
113
|
-
key: 0,
|
|
114
|
-
value: t('PENDING', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.PENDING) || 'Pending')
|
|
115
|
-
}, {
|
|
116
|
-
key: 1,
|
|
117
|
-
value: t('COMPLETED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.COMPLETED) || 'Completed')
|
|
118
|
-
}, {
|
|
119
|
-
key: 2,
|
|
120
|
-
value: t('REJECTED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.REJECTED) || 'Rejected')
|
|
121
|
-
}, {
|
|
122
|
-
key: 3,
|
|
123
|
-
value: t('DRIVER_IN_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.DRIVER_IN_BUSINESS) || 'Driver in business')
|
|
124
|
-
}, {
|
|
125
|
-
key: 4,
|
|
126
|
-
value: t('PREPARATION_COMPLETED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.PREPARATION_COMPLETED) || 'Preparation Completed')
|
|
127
|
-
}, {
|
|
128
|
-
key: 5,
|
|
129
|
-
value: t('REJECTED_BY_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.REJECTED_BY_BUSINESS) || 'Rejected by business')
|
|
130
|
-
}, {
|
|
131
|
-
key: 6,
|
|
132
|
-
value: t('REJECTED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.REJECTED_BY_DRIVER) || 'Rejected by Driver')
|
|
133
|
-
}, {
|
|
134
|
-
key: 7,
|
|
135
|
-
value: t('ACCEPTED_BY_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.ACCEPTED_BY_BUSINESS) || 'Accepted by business')
|
|
136
|
-
}, {
|
|
137
|
-
key: 8,
|
|
138
|
-
value: t('ACCEPTED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag9 = theme.defaultLanguages) === null || _theme$defaultLanguag9 === void 0 ? void 0 : _theme$defaultLanguag9.ACCEPTED_BY_DRIVER) || 'Accepted by driver')
|
|
139
|
-
}, {
|
|
140
|
-
key: 9,
|
|
141
|
-
value: t('PICK_UP_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag10 = theme.defaultLanguages) === null || _theme$defaultLanguag10 === void 0 ? void 0 : _theme$defaultLanguag10.PICK_UP_COMPLETED_BY_DRIVER) || 'Pick up completed by driver')
|
|
142
|
-
}, {
|
|
143
|
-
key: 10,
|
|
144
|
-
value: t('PICK_UP_FAILED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag11 = theme.defaultLanguages) === null || _theme$defaultLanguag11 === void 0 ? void 0 : _theme$defaultLanguag11.PICK_UP_FAILED_BY_DRIVER) || 'Pick up Failed by driver')
|
|
145
|
-
}, {
|
|
146
|
-
key: 11,
|
|
147
|
-
value: t('DELIVERY_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag12 = theme.defaultLanguages) === null || _theme$defaultLanguag12 === void 0 ? void 0 : _theme$defaultLanguag12.DELIVERY_COMPLETED_BY_DRIVER) || 'Delivery completed by driver')
|
|
148
|
-
}, {
|
|
149
|
-
key: 12,
|
|
150
|
-
value: t('DELIVERY_FAILED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag13 = theme.defaultLanguages) === null || _theme$defaultLanguag13 === void 0 ? void 0 : _theme$defaultLanguag13.DELIVERY_FAILED_BY_DRIVER) || 'Delivery Failed by driver')
|
|
151
|
-
}, {
|
|
152
|
-
key: 13,
|
|
153
|
-
value: t('PREORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag14 = theme.defaultLanguages) === null || _theme$defaultLanguag14 === void 0 ? void 0 : _theme$defaultLanguag14.PREORDER) || 'PreOrder')
|
|
154
|
-
}, {
|
|
155
|
-
key: 14,
|
|
156
|
-
value: t('ORDER_NOT_READY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.ORDER_NOT_READY) || 'Order not ready')
|
|
157
|
-
}, {
|
|
158
|
-
key: 15,
|
|
159
|
-
value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag16 = theme.defaultLanguages) === null || _theme$defaultLanguag16 === void 0 ? void 0 : _theme$defaultLanguag16.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER) || 'Order picked up completed by customer')
|
|
160
|
-
}, {
|
|
161
|
-
key: 16,
|
|
162
|
-
value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag17 = theme.defaultLanguages) === null || _theme$defaultLanguag17 === void 0 ? void 0 : _theme$defaultLanguag17.ORDER_STATUS_CANCELLED_BY_CUSTOMER) || 'Order cancelled by customer')
|
|
163
|
-
}, {
|
|
164
|
-
key: 17,
|
|
165
|
-
value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag18 = theme.defaultLanguages) === null || _theme$defaultLanguag18 === void 0 ? void 0 : _theme$defaultLanguag18.ORDER_NOT_PICKEDUP_BY_CUSTOMER) || 'Order not picked up by customer')
|
|
166
|
-
}, {
|
|
167
|
-
key: 18,
|
|
168
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag19 = theme.defaultLanguages) === null || _theme$defaultLanguag19 === void 0 ? void 0 : _theme$defaultLanguag19.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS) || 'Driver almost arrived to business')
|
|
169
|
-
}, {
|
|
170
|
-
key: 19,
|
|
171
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag20 = theme.defaultLanguages) === null || _theme$defaultLanguag20 === void 0 ? void 0 : _theme$defaultLanguag20.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER) || 'Driver almost arrived to customer')
|
|
172
|
-
}, {
|
|
173
|
-
key: 20,
|
|
174
|
-
value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag21 = theme.defaultLanguages) === null || _theme$defaultLanguag21 === void 0 ? void 0 : _theme$defaultLanguag21.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS) || 'Customer almost arrived to business')
|
|
175
|
-
}, {
|
|
176
|
-
key: 21,
|
|
177
|
-
value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag22 = theme.defaultLanguages) === null || _theme$defaultLanguag22 === void 0 ? void 0 : _theme$defaultLanguag22.ORDER_CUSTOMER_ARRIVED_BUSINESS) || 'Customer arrived to business')
|
|
178
|
-
}, {
|
|
179
|
-
key: 22,
|
|
180
|
-
value: t('ORDER_LOOKING_FOR_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag23 = theme.defaultLanguages) === null || _theme$defaultLanguag23 === void 0 ? void 0 : _theme$defaultLanguag23.ORDER_LOOKING_FOR_DRIVER) || 'Looking for driver')
|
|
181
|
-
}, {
|
|
182
|
-
key: 23,
|
|
183
|
-
value: t('ORDER_DRIVER_ON_WAY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag24 = theme.defaultLanguages) === null || _theme$defaultLanguag24 === void 0 ? void 0 : _theme$defaultLanguag24.ORDER_DRIVER_ON_WAY) || 'Driver on way')
|
|
184
|
-
}];
|
|
185
|
-
var objectStatus = orderStatus.find(function (o) {
|
|
186
|
-
return o.key === status;
|
|
187
|
-
});
|
|
188
|
-
return objectStatus && objectStatus;
|
|
189
|
-
};
|
|
190
109
|
var onRedirectPage = function onRedirectPage(data) {
|
|
191
110
|
events.emit('go_to_page', data);
|
|
192
111
|
};
|
|
@@ -389,7 +308,7 @@ var FavoriteListUI = function FavoriteListUI(props) {
|
|
|
389
308
|
key: "".concat(order === null || order === void 0 ? void 0 : order.id, "_").concat(i),
|
|
390
309
|
order: order,
|
|
391
310
|
onRedirectPage: onRedirectPage,
|
|
392
|
-
getOrderStatus: getOrderStatus,
|
|
311
|
+
getOrderStatus: _utils.getOrderStatus,
|
|
393
312
|
pastOrders: pastOrders.includes(order === null || order === void 0 ? void 0 : order.status),
|
|
394
313
|
handleReorder: handleReorder,
|
|
395
314
|
handleUpdateOrderList: handleUpdateFavoriteList,
|
|
@@ -401,7 +320,7 @@ var FavoriteListUI = function FavoriteListUI(props) {
|
|
|
401
320
|
isSkeleton: true,
|
|
402
321
|
order: {},
|
|
403
322
|
onRedirectPage: onRedirectPage,
|
|
404
|
-
getOrderStatus: getOrderStatus,
|
|
323
|
+
getOrderStatus: _utils.getOrderStatus,
|
|
405
324
|
handleReorder: handleReorder
|
|
406
325
|
});
|
|
407
326
|
})), isProfessional && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !(favoriteList !== null && favoriteList !== void 0 && favoriteList.loading) && (favoriteList === null || favoriteList === void 0 ? void 0 : (_favoriteList$favorit6 = favoriteList.favorites) === null || _favoriteList$favorit6 === void 0 ? void 0 : _favoriteList$favorit6.map(function (professional, i) {
|
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Footer = void 0;
|
|
7
|
+
exports.default = exports.Footer = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
10
|
var _styles = require("./styles");
|
|
@@ -124,4 +124,6 @@ var Footer = function Footer(_ref) {
|
|
|
124
124
|
href: "https://www.ordering.co"
|
|
125
125
|
}, ' ', t('ORDERING_CO', 'Ordering.co'))));
|
|
126
126
|
};
|
|
127
|
-
exports.Footer = Footer;
|
|
127
|
+
exports.Footer = Footer;
|
|
128
|
+
var _default = Footer;
|
|
129
|
+
exports.default = _default;
|
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Header = void 0;
|
|
7
|
+
exports.default = exports.Header = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _styledComponents = require("styled-components");
|
|
10
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
@@ -191,4 +191,6 @@ var Header = function Header(props) {
|
|
|
191
191
|
}, t('RESET_PASSWORD', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.RESET_PASSWORD) || 'Reset password'))
|
|
192
192
|
})));
|
|
193
193
|
};
|
|
194
|
-
exports.Header = Header;
|
|
194
|
+
exports.Header = Header;
|
|
195
|
+
var _default = Header;
|
|
196
|
+
exports.default = _default;
|
|
@@ -12,6 +12,7 @@ var _styledComponents = require("styled-components");
|
|
|
12
12
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
13
13
|
var _FaUserAlt = _interopRequireDefault(require("@meronex/icons/fa/FaUserAlt"));
|
|
14
14
|
var _NotFoundSource = require("../../../../../components/NotFoundSource");
|
|
15
|
+
var _utils = require("../../../../../utils");
|
|
15
16
|
var _styles = require("./styles");
|
|
16
17
|
var _Messages = require("../Messages");
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -56,87 +57,6 @@ var OrdersListingUI = function OrdersListingUI(props) {
|
|
|
56
57
|
_useUtils2$ = _useUtils2[0],
|
|
57
58
|
parseDate = _useUtils2$.parseDate,
|
|
58
59
|
optimizeImage = _useUtils2$.optimizeImage;
|
|
59
|
-
var getOrderStatus = function getOrderStatus(s) {
|
|
60
|
-
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;
|
|
61
|
-
var status = parseInt(s);
|
|
62
|
-
var orderStatus = [{
|
|
63
|
-
key: 0,
|
|
64
|
-
value: t('PENDING', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.PENDING) || 'Pending')
|
|
65
|
-
}, {
|
|
66
|
-
key: 1,
|
|
67
|
-
value: t('COMPLETED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.COMPLETED) || 'Completed')
|
|
68
|
-
}, {
|
|
69
|
-
key: 2,
|
|
70
|
-
value: t('REJECTED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.REJECTED) || 'Rejected')
|
|
71
|
-
}, {
|
|
72
|
-
key: 3,
|
|
73
|
-
value: t('DRIVER_IN_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.DRIVER_IN_BUSINESS) || 'Driver in business')
|
|
74
|
-
}, {
|
|
75
|
-
key: 4,
|
|
76
|
-
value: t('PREPARATION_COMPLETED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.PREPARATION_COMPLETED) || 'Preparation Completed')
|
|
77
|
-
}, {
|
|
78
|
-
key: 5,
|
|
79
|
-
value: t('REJECTED_BY_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.REJECTED_BY_BUSINESS) || 'Rejected by business')
|
|
80
|
-
}, {
|
|
81
|
-
key: 6,
|
|
82
|
-
value: t('REJECTED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag7 = theme.defaultLanguages) === null || _theme$defaultLanguag7 === void 0 ? void 0 : _theme$defaultLanguag7.REJECTED_BY_DRIVER) || 'Rejected by Driver')
|
|
83
|
-
}, {
|
|
84
|
-
key: 7,
|
|
85
|
-
value: t('ACCEPTED_BY_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.ACCEPTED_BY_BUSINESS) || 'Accepted by business')
|
|
86
|
-
}, {
|
|
87
|
-
key: 8,
|
|
88
|
-
value: t('ACCEPTED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag9 = theme.defaultLanguages) === null || _theme$defaultLanguag9 === void 0 ? void 0 : _theme$defaultLanguag9.ACCEPTED_BY_DRIVER) || 'Accepted by driver')
|
|
89
|
-
}, {
|
|
90
|
-
key: 9,
|
|
91
|
-
value: t('PICK_UP_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag10 = theme.defaultLanguages) === null || _theme$defaultLanguag10 === void 0 ? void 0 : _theme$defaultLanguag10.PICK_UP_COMPLETED_BY_DRIVER) || 'Pick up completed by driver')
|
|
92
|
-
}, {
|
|
93
|
-
key: 10,
|
|
94
|
-
value: t('PICK_UP_FAILED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag11 = theme.defaultLanguages) === null || _theme$defaultLanguag11 === void 0 ? void 0 : _theme$defaultLanguag11.PICK_UP_FAILED_BY_DRIVER) || 'Pick up Failed by driver')
|
|
95
|
-
}, {
|
|
96
|
-
key: 11,
|
|
97
|
-
value: t('DELIVERY_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag12 = theme.defaultLanguages) === null || _theme$defaultLanguag12 === void 0 ? void 0 : _theme$defaultLanguag12.DELIVERY_COMPLETED_BY_DRIVER) || 'Delivery completed by driver')
|
|
98
|
-
}, {
|
|
99
|
-
key: 12,
|
|
100
|
-
value: t('DELIVERY_FAILED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag13 = theme.defaultLanguages) === null || _theme$defaultLanguag13 === void 0 ? void 0 : _theme$defaultLanguag13.DELIVERY_FAILED_BY_DRIVER) || 'Delivery Failed by driver')
|
|
101
|
-
}, {
|
|
102
|
-
key: 13,
|
|
103
|
-
value: t('PREORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag14 = theme.defaultLanguages) === null || _theme$defaultLanguag14 === void 0 ? void 0 : _theme$defaultLanguag14.PREORDER) || 'PreOrder')
|
|
104
|
-
}, {
|
|
105
|
-
key: 14,
|
|
106
|
-
value: t('ORDER_NOT_READY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.ORDER_NOT_READY) || 'Order not ready')
|
|
107
|
-
}, {
|
|
108
|
-
key: 15,
|
|
109
|
-
value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag16 = theme.defaultLanguages) === null || _theme$defaultLanguag16 === void 0 ? void 0 : _theme$defaultLanguag16.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER) || 'Order picked up completed by customer')
|
|
110
|
-
}, {
|
|
111
|
-
key: 16,
|
|
112
|
-
value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag17 = theme.defaultLanguages) === null || _theme$defaultLanguag17 === void 0 ? void 0 : _theme$defaultLanguag17.ORDER_STATUS_CANCELLED_BY_CUSTOMER) || 'Order cancelled by customer')
|
|
113
|
-
}, {
|
|
114
|
-
key: 17,
|
|
115
|
-
value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag18 = theme.defaultLanguages) === null || _theme$defaultLanguag18 === void 0 ? void 0 : _theme$defaultLanguag18.ORDER_NOT_PICKEDUP_BY_CUSTOMER) || 'Order not picked up by customer')
|
|
116
|
-
}, {
|
|
117
|
-
key: 18,
|
|
118
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag19 = theme.defaultLanguages) === null || _theme$defaultLanguag19 === void 0 ? void 0 : _theme$defaultLanguag19.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS) || 'Driver almost arrived to business')
|
|
119
|
-
}, {
|
|
120
|
-
key: 19,
|
|
121
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag20 = theme.defaultLanguages) === null || _theme$defaultLanguag20 === void 0 ? void 0 : _theme$defaultLanguag20.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER) || 'Driver almost arrived to customer')
|
|
122
|
-
}, {
|
|
123
|
-
key: 20,
|
|
124
|
-
value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag21 = theme.defaultLanguages) === null || _theme$defaultLanguag21 === void 0 ? void 0 : _theme$defaultLanguag21.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS) || 'Customer almost arrived to business')
|
|
125
|
-
}, {
|
|
126
|
-
key: 21,
|
|
127
|
-
value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag22 = theme.defaultLanguages) === null || _theme$defaultLanguag22 === void 0 ? void 0 : _theme$defaultLanguag22.ORDER_CUSTOMER_ARRIVED_BUSINESS) || 'Customer arrived to business')
|
|
128
|
-
}, {
|
|
129
|
-
key: 22,
|
|
130
|
-
value: t('ORDER_LOOKING_FOR_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag23 = theme.defaultLanguages) === null || _theme$defaultLanguag23 === void 0 ? void 0 : _theme$defaultLanguag23.ORDER_LOOKING_FOR_DRIVER) || 'Looking for driver')
|
|
131
|
-
}, {
|
|
132
|
-
key: 23,
|
|
133
|
-
value: t('ORDER_DRIVER_ON_WAY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag24 = theme.defaultLanguages) === null || _theme$defaultLanguag24 === void 0 ? void 0 : _theme$defaultLanguag24.ORDER_DRIVER_ON_WAY) || 'Driver on way')
|
|
134
|
-
}];
|
|
135
|
-
var objectStatus = orderStatus.find(function (o) {
|
|
136
|
-
return o.key === status;
|
|
137
|
-
});
|
|
138
|
-
return objectStatus && objectStatus;
|
|
139
|
-
};
|
|
140
60
|
var handleOrderClick = function handleOrderClick(e, order) {
|
|
141
61
|
var isInvalid = e.target.closest('.view-details') || e.target.closest('.driver-selector');
|
|
142
62
|
if (isInvalid) return;
|
|
@@ -206,7 +126,7 @@ var OrdersListingUI = function OrdersListingUI(props) {
|
|
|
206
126
|
onClick: function onClick(e) {
|
|
207
127
|
return handleOrderClick(e, order);
|
|
208
128
|
}
|
|
209
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.OrderHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, t('INVOICE_ORDER_NO', 'Order No.'), " ", order === null || order === void 0 ? void 0 : order.id), /*#__PURE__*/_react.default.createElement("p", null, (_getOrderStatus = getOrderStatus(order.status)) === null || _getOrderStatus === void 0 ? void 0 : _getOrderStatus.value), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, order !== null && order !== void 0 && order.delivery_datetime_utc ? parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime_utc) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.OrderHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, t('INVOICE_ORDER_NO', 'Order No.'), " ", order === null || order === void 0 ? void 0 : order.id), /*#__PURE__*/_react.default.createElement("p", null, (_getOrderStatus = (0, _utils.getOrderStatus)(order.status)) === null || _getOrderStatus === void 0 ? void 0 : _getOrderStatus.value), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, order !== null && order !== void 0 && order.delivery_datetime_utc ? parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime_utc) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
|
|
210
130
|
utc: false
|
|
211
131
|
})), /*#__PURE__*/_react.default.createElement(_styles.ViewDetails, {
|
|
212
132
|
className: "view-details",
|
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Modal = void 0;
|
|
7
|
+
exports.default = exports.Modal = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _MdClose = _interopRequireDefault(require("@meronex/icons/md/MdClose"));
|
|
10
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
@@ -101,4 +101,6 @@ var Modal = function Modal(props) {
|
|
|
101
101
|
});
|
|
102
102
|
return /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.Popup, ModalProps);
|
|
103
103
|
};
|
|
104
|
-
exports.Modal = Modal;
|
|
104
|
+
exports.Modal = Modal;
|
|
105
|
+
var _default = Modal;
|
|
106
|
+
exports.default = _default;
|