ordering-ui-external 1.9.2 → 1.9.4
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.9ce64e14904d222c0020.js +1 -0
- package/_bundles/{1.ordering-ui.8e20ae6af39ad738a29e.js → 1.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{2.ordering-ui.8e20ae6af39ad738a29e.js → 2.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{4.ordering-ui.8e20ae6af39ad738a29e.js → 4.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{5.ordering-ui.8e20ae6af39ad738a29e.js → 5.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{6.ordering-ui.8e20ae6af39ad738a29e.js → 6.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js → 7.ordering-ui.9ce64e14904d222c0020.js} +2 -2
- package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → 7.ordering-ui.9ce64e14904d222c0020.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.8e20ae6af39ad738a29e.js → 8.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{9.ordering-ui.8e20ae6af39ad738a29e.js → 9.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/ordering-ui.9ce64e14904d222c0020.js +2 -0
- package/_bundles/{ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → ordering-ui.9ce64e14904d222c0020.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessesListing/index.js +1 -3
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +26 -12
- package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/AddressList/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -6
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +55 -186
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
- package/_modules/themes/five/src/components/Cart/index.js +56 -97
- package/_modules/themes/five/src/components/CartContent/index.js +50 -2
- package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
- package/_modules/themes/five/src/components/Checkout/index.js +8 -2
- package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
- package/_modules/themes/five/src/components/Header/index.js +26 -34
- package/_modules/themes/five/src/components/Header/styles.js +46 -35
- package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
- package/_modules/themes/five/src/components/MultiCheckout/index.js +22 -13
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
- package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +9 -1
- package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +3 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +2 -1
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
- package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
- package/package.json +3 -2
- package/src/components/BusinessesListing/index.js +1 -3
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +25 -14
- package/src/components/VerticalOrdersLayout/styles.js +8 -0
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/AddressList/index.js +3 -2
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
- package/src/themes/five/src/components/BusinessListingSearch/index.js +4 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
- package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +219 -345
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
- package/src/themes/five/src/components/Cart/index.js +50 -57
- package/src/themes/five/src/components/CartContent/index.js +43 -3
- package/src/themes/five/src/components/CartContent/styles.js +6 -0
- package/src/themes/five/src/components/Checkout/index.js +16 -2
- package/src/themes/five/src/components/Checkout/styles.js +19 -6
- package/src/themes/five/src/components/Header/index.js +281 -277
- package/src/themes/five/src/components/Header/styles.js +20 -51
- package/src/themes/five/src/components/HeaderOption/index.js +3 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +27 -13
- package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
- package/src/themes/five/src/components/MultiOrdersDetails/index.js +21 -13
- package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
- package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
- package/src/themes/five/src/components/OrderDetails/index.js +4 -0
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
- package/src/themes/five/src/components/OrdersOption/index.js +2 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
- package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
- package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
- package/template/app.js +179 -66
- package/template/components/ListenPageChanges/index.js +3 -2
- package/template/components/OrderingThemeUpdated/index.js +41 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/MessagesList/index.js +2 -0
- package/template/pages/MultiCart/index.js +30 -0
- package/template/pages/MultiCheckout/index.js +86 -10
- package/template/pages/MultiOrdersDetails/index.js +9 -4
- package/_bundles/0.ordering-ui.8e20ae6af39ad738a29e.js +0 -1
- package/_bundles/ordering-ui.8e20ae6af39ad738a29e.js +0 -2
|
@@ -11,6 +11,7 @@ var _BsCircleFill = _interopRequireDefault(require("@meronex/icons/bs/BsCircleFi
|
|
|
11
11
|
var _BsCircleHalf = _interopRequireDefault(require("@meronex/icons/bs/BsCircleHalf"));
|
|
12
12
|
var _BsDashCircle = _interopRequireDefault(require("@meronex/icons/bs/BsDashCircle"));
|
|
13
13
|
var _BsPlusCircle = _interopRequireDefault(require("@meronex/icons/bs/BsPlusCircle"));
|
|
14
|
+
var _useWindowSize2 = require("../../../../../hooks/useWindowSize");
|
|
14
15
|
var _styles = require("./styles");
|
|
15
16
|
var _MdCheckBox = _interopRequireDefault(require("@meronex/icons/md/MdCheckBox"));
|
|
16
17
|
var _MdCheckBoxOutlineBlank = _interopRequireDefault(require("@meronex/icons/md/MdCheckBoxOutlineBlank"));
|
|
@@ -51,6 +52,8 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
51
52
|
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
52
53
|
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
53
54
|
parsePrice = _useUtils2[0].parsePrice;
|
|
55
|
+
var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
|
|
56
|
+
width = _useWindowSize.width;
|
|
54
57
|
var _useState = (0, _react.useState)(false),
|
|
55
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
56
59
|
showMessage = _useState2[0],
|
|
@@ -109,7 +112,7 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
109
112
|
disabled: true
|
|
110
113
|
})), suboption.image && suboption.image !== '-' && /*#__PURE__*/_react.default.createElement(_styles.SubOptionThumbnail, {
|
|
111
114
|
src: suboption.image
|
|
112
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.Text, null, /*#__PURE__*/_react.default.createElement("div", null, suboption === null || suboption === void 0 ? void 0 : suboption.name), showMessage && /*#__PURE__*/_react.default.createElement("span", null, "".concat(t('OPTIONS_MAX_LIMIT', 'Maximum options to choose'), ": ").concat(option === null || option === void 0 ? void 0 : option.max)))), /*#__PURE__*/_react.default.createElement(_styles.RightOptionContainer, null, /*#__PURE__*/_react.default.createElement(_styles.QuantityControl, null, (option === null || option === void 0 ? void 0 : option.allow_suboption_quantity) && (state === null || state === void 0 ? void 0 : state.selected) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDashCircle.default, {
|
|
115
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.Text, null, /*#__PURE__*/_react.default.createElement("div", null, suboption === null || suboption === void 0 ? void 0 : suboption.name), showMessage && width > 576 && /*#__PURE__*/_react.default.createElement("span", null, "".concat(t('OPTIONS_MAX_LIMIT', 'Maximum options to choose'), ": ").concat(option === null || option === void 0 ? void 0 : option.max)))), /*#__PURE__*/_react.default.createElement(_styles.RightOptionContainer, null, /*#__PURE__*/_react.default.createElement(_styles.QuantityControl, null, (option === null || option === void 0 ? void 0 : option.allow_suboption_quantity) && (state === null || state === void 0 ? void 0 : state.selected) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDashCircle.default, {
|
|
113
116
|
disabled: state.quantity === 0 || isSoldOut,
|
|
114
117
|
onClick: handleDecrement
|
|
115
118
|
}), state.quantity, /*#__PURE__*/_react.default.createElement(_BsPlusCircle.default, {
|
|
@@ -136,7 +139,9 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
136
139
|
onClick: function onClick(e) {
|
|
137
140
|
return handlePosition(e, 'right');
|
|
138
141
|
}
|
|
139
|
-
})))), /*#__PURE__*/_react.default.createElement(_styles.SuboptionPrice, null, price > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "+ ", parsePrice(price)))),
|
|
142
|
+
})))), /*#__PURE__*/_react.default.createElement(_styles.SuboptionPrice, null, price > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "+ ", parsePrice(price)))), showMessage && width < 576 && /*#__PURE__*/_react.default.createElement(_styles.Text, {
|
|
143
|
+
noMargin: true
|
|
144
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, "".concat(t('OPTIONS_MAX_LIMIT', 'Maximum options to choose'), ": ").concat(option === null || option === void 0 ? void 0 : option.max))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
140
145
|
return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
|
|
141
146
|
key: i
|
|
142
147
|
}, props));
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Text = exports.SuboptionPrice = exports.SubOptionThumbnail = exports.RightOptionContainer = exports.QuantityControl = exports.PositionControl = exports.LeftOptionContainer = exports.IconControl = exports.Container = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -21,50 +21,53 @@ var IconControl = _styledComponents.default.div(_templateObject2 || (_templateOb
|
|
|
21
21
|
return props.theme.colors.lightGray;
|
|
22
22
|
});
|
|
23
23
|
exports.IconControl = IconControl;
|
|
24
|
-
var Text = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n display: flex;\n font-weight: 300;\n color: #555;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 5px;\n\n div {\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 14px;\n color: ", ";\n }\n\n span {\n margin-left: 10px;\n font-weight: 500;\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n }\n"])), function (props) {
|
|
24
|
+
var Text = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n display: flex;\n font-weight: 300;\n color: #555;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 5px;\n\n div {\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 14px;\n color: ", ";\n }\n\n span {\n margin-left: 10px;\n font-weight: 500;\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n }\n\n ", "\n"])), function (props) {
|
|
25
25
|
return props.theme.colors.darkGray;
|
|
26
26
|
}, function (props) {
|
|
27
27
|
return props.theme.colors.primary;
|
|
28
28
|
}, function (props) {
|
|
29
29
|
var _props$theme2;
|
|
30
30
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px; \n "])));
|
|
31
|
+
}, function (_ref) {
|
|
32
|
+
var noMargin = _ref.noMargin;
|
|
33
|
+
return noMargin && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n span {\n margin: 0;\n }\n "])));
|
|
31
34
|
});
|
|
32
35
|
exports.Text = Text;
|
|
33
|
-
var SubOptionThumbnail = _styledComponents.default.div(
|
|
34
|
-
var src =
|
|
36
|
+
var SubOptionThumbnail = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: inline-block;\n border-radius: 8px;\n background-image: url(", ");\n background-repeat: no-repeat, repeat;\n width: 40px;\n height: 40px;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n"])), function (_ref2) {
|
|
37
|
+
var src = _ref2.src;
|
|
35
38
|
return src;
|
|
36
39
|
});
|
|
37
40
|
exports.SubOptionThumbnail = SubOptionThumbnail;
|
|
38
|
-
var QuantityControl = _styledComponents.default.div(
|
|
41
|
+
var QuantityControl = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n align-items: center;\n font-weight: 300;\n font-size: 18px;\n margin: 0 5px;\n\n svg {\n color: ", ";\n font-size: 20px;\n margin-right: 3px;\n ", "\n }\n\n svg[disabled] {\n color: #CBCBCB;\n }\n\n svg:last-child {\n margin-left: 3px;\n margin-right: 0;\n ", "\n }\n"])), function (props) {
|
|
39
42
|
return props.theme.colors.darkGray;
|
|
40
43
|
}, function (props) {
|
|
41
44
|
return props.theme.colors.primary;
|
|
42
45
|
}, function (props) {
|
|
43
46
|
var _props$theme3;
|
|
44
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
47
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0px;\n "])));
|
|
45
48
|
}, function (props) {
|
|
46
49
|
var _props$theme4;
|
|
47
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
50
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-right: 3px;\n margin-left: 0px;\n "])));
|
|
48
51
|
});
|
|
49
52
|
exports.QuantityControl = QuantityControl;
|
|
50
|
-
var PositionControl = _styledComponents.default.div(
|
|
53
|
+
var PositionControl = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: #CBCBCB;\n font-weight: 300;\n font-size: 18px;\n margin: 0 5px;\n\n svg {\n font-size: 20px;\n margin-right: 3px;\n ", "\n &.reverse {\n transform: rotate(180deg);\n }\n\n &.selected {\n color: ", ";\n }\n\n &:last-child {\n margin-right: 0;\n ", "\n }\n }\n"])), function (props) {
|
|
51
54
|
var _props$theme5;
|
|
52
|
-
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(
|
|
55
|
+
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0px;\n "])));
|
|
53
56
|
}, function (props) {
|
|
54
57
|
return props.theme.colors.primary;
|
|
55
58
|
}, function (props) {
|
|
56
59
|
var _props$theme6;
|
|
57
|
-
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(
|
|
60
|
+
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 0;\n "])));
|
|
58
61
|
});
|
|
59
62
|
exports.PositionControl = PositionControl;
|
|
60
|
-
var SuboptionPrice = _styledComponents.default.div(
|
|
63
|
+
var SuboptionPrice = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n white-space: nowrap;\n font-weight: 300;\n font-size: 14px;\n color: ", ";\n margin-left: 5px;\n min-width: 60px;\n ", "\n"])), function (props) {
|
|
61
64
|
return props.theme.colors.darkGray;
|
|
62
65
|
}, function (props) {
|
|
63
66
|
var _props$theme7;
|
|
64
|
-
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(
|
|
67
|
+
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
|
|
65
68
|
});
|
|
66
69
|
exports.SuboptionPrice = SuboptionPrice;
|
|
67
|
-
var LeftOptionContainer = _styledComponents.default.div(
|
|
70
|
+
var LeftOptionContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n width: 70%;\n align-items: center;\n"])));
|
|
68
71
|
exports.LeftOptionContainer = LeftOptionContainer;
|
|
69
|
-
var RightOptionContainer = _styledComponents.default.div(
|
|
72
|
+
var RightOptionContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n width: 25%;\n align-items: center;\n justify-content: space-between;\n"])));
|
|
70
73
|
exports.RightOptionContainer = RightOptionContainer;
|
|
@@ -39,7 +39,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
39
39
|
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; } }
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
42
|
-
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _props$beforeElements, _props$beforeComponen, _order$business, _order$business2, _order$business4, _theme$images2, _theme$images2$dummie, _order$
|
|
42
|
+
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _props$beforeElements, _props$beforeComponen, _order$business, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _theme$images2, _theme$images2$dummie, _order$business7, _theme$images3, _theme$images3$dummie, _order$business8, _theme$images4, _theme$images4$dummie, _order$business9, _order$business10, _order$summary, _order$business11, _order$business12, _order$business13, _order$business14, _getOrderStatus, _order$business15, _order$summary2, _order$business16, _props$afterComponent, _props$afterElements;
|
|
43
43
|
var order = props.order,
|
|
44
44
|
getOrderStatus = props.getOrderStatus,
|
|
45
45
|
isBusinessesPage = props.isBusinessesPage,
|
|
@@ -230,6 +230,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
230
230
|
}, props));
|
|
231
231
|
}), /*#__PURE__*/_react.default.createElement(_styles.Container, {
|
|
232
232
|
id: "order-card",
|
|
233
|
+
w: screen.width - (screen.width < 411 ? -60 : 60),
|
|
233
234
|
isBusinessesPage: isBusinessesPage,
|
|
234
235
|
isCustomerMode: isCustomerMode,
|
|
235
236
|
onClick: function onClick(e) {
|
|
@@ -241,33 +242,32 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
241
242
|
width: 60,
|
|
242
243
|
height: 60
|
|
243
244
|
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isCustomerMode && showBusinessLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (order === null || order === void 0 ? void 0 : (_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.length) > 1 ? /*#__PURE__*/_react.default.createElement(_styles.MultiLogosContainer, null, order === null || order === void 0 ? void 0 : (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.map(function (business, i) {
|
|
244
|
-
var
|
|
245
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
246
|
-
key: business === null || business === void 0 ? void 0 : business.id
|
|
247
|
-
}, i > 1 ? /*#__PURE__*/_react.default.createElement("p", null, "+ ", (order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.length) - 2) : /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
245
|
+
var _theme$images, _theme$images$dummies;
|
|
246
|
+
return i < 2 && /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
247
|
+
key: business === null || business === void 0 ? void 0 : business.id,
|
|
248
248
|
bgimage: optimizeImage((business === null || business === void 0 ? void 0 : business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo), 'h_400,c_limit'),
|
|
249
249
|
isMulti: true
|
|
250
|
-
})
|
|
251
|
-
})) : /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
252
|
-
bgimage: optimizeImage((order === null || order === void 0 ? void 0 : (_order$
|
|
253
|
-
})), isCustomerMode && showBusinessLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (((_order$
|
|
254
|
-
src: ((_order$
|
|
250
|
+
});
|
|
251
|
+
}), (order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.length) > 1 && (order === null || order === void 0 ? void 0 : (_order$business4 = order.business) === null || _order$business4 === void 0 ? void 0 : _order$business4.length) - 2 > 0 && /*#__PURE__*/_react.default.createElement("p", null, "+ ", (order === null || order === void 0 ? void 0 : (_order$business5 = order.business) === null || _order$business5 === void 0 ? void 0 : _order$business5.length) - 2)) : /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
252
|
+
bgimage: optimizeImage((order === null || order === void 0 ? void 0 : (_order$business6 = order.business) === null || _order$business6 === void 0 ? void 0 : _order$business6.logo) || ((_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$dummie = _theme$images2.dummies) === null || _theme$images2$dummie === void 0 ? void 0 : _theme$images2$dummie.businessLogo), 'h_400,c_limit')
|
|
253
|
+
})), isCustomerMode && showBusinessLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (((_order$business7 = order.business) === null || _order$business7 === void 0 ? void 0 : _order$business7.logo) || ((_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$dummie = _theme$images3.dummies) === null || _theme$images3$dummie === void 0 ? void 0 : _theme$images3$dummie.businessLogo)) && /*#__PURE__*/_react.default.createElement(_styles.Logo, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
254
|
+
src: ((_order$business8 = order.business) === null || _order$business8 === void 0 ? void 0 : _order$business8.logo) || ((_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$dummie = _theme$images4.dummies) === null || _theme$images4$dummie === void 0 ? void 0 : _theme$images4$dummie.businessLogo),
|
|
255
255
|
alt: "business-logo",
|
|
256
256
|
width: "75px",
|
|
257
257
|
height: "75px"
|
|
258
258
|
})))), /*#__PURE__*/_react.default.createElement(_styles2.BusinessInformation, {
|
|
259
259
|
activeOrders: true,
|
|
260
|
-
isMultiCart: (order === null || order === void 0 ? void 0 : (_order$
|
|
260
|
+
isMultiCart: (order === null || order === void 0 ? void 0 : (_order$business9 = order.business) === null || _order$business9 === void 0 ? void 0 : _order$business9.length) > 1
|
|
261
261
|
}, isCustomerMode ? /*#__PURE__*/_react.default.createElement(_styles.TitleContainer, null, /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
262
262
|
width: 120
|
|
263
|
-
}) : (_order$
|
|
263
|
+
}) : (_order$business10 = order.business) === null || _order$business10 === void 0 ? void 0 : _order$business10.name), /*#__PURE__*/_react.default.createElement(_styles.Price, {
|
|
264
264
|
isBusinessesPage: isBusinessesPage,
|
|
265
265
|
isCustomerMode: isCustomerMode
|
|
266
266
|
}, /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
267
267
|
width: 50
|
|
268
268
|
}) : parsePrice((order === null || order === void 0 ? void 0 : (_order$summary = order.summary) === null || _order$summary === void 0 ? void 0 : _order$summary.total) || (order === null || order === void 0 ? void 0 : order.total))))) : /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
269
269
|
width: 120
|
|
270
|
-
}) : (order === null || order === void 0 ? void 0 : (_order$
|
|
270
|
+
}) : (order === null || order === void 0 ? void 0 : (_order$business11 = order.business) === null || _order$business11 === void 0 ? void 0 : _order$business11.length) > 1 ? "".concat(t('GROUP_ORDER', 'Group Order'), " ").concat(t('No', 'No'), ". ").concat(order === null || order === void 0 ? void 0 : order.cart_group_id) : (_order$business12 = order.business) === null || _order$business12 === void 0 ? void 0 : _order$business12.name), isSkeleton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
271
271
|
className: "orders-detail"
|
|
272
272
|
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
273
273
|
width: 150
|
|
@@ -275,7 +275,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
275
275
|
className: "orders-detail"
|
|
276
276
|
}, (order === null || order === void 0 ? void 0 : order.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDot.default, null), /*#__PURE__*/_react.default.createElement("p", {
|
|
277
277
|
name: "order_number"
|
|
278
|
-
}, (order === null || order === void 0 ? void 0 : (_order$
|
|
278
|
+
}, (order === null || order === void 0 ? void 0 : (_order$business13 = order.business) === null || _order$business13 === void 0 ? void 0 : _order$business13.length) > 1 ? "".concat(order === null || order === void 0 ? void 0 : (_order$business14 = order.business) === null || _order$business14 === void 0 ? void 0 : _order$business14.length, " ").concat(t('ORDERS', 'orders')) : "".concat(t('ORDER_NUM', 'Order No.'), " ").concat(order.id))), showDate && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDot.default, 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, {
|
|
279
279
|
outputFormat: 'MM/DD/YY hh:mm A'
|
|
280
280
|
}) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
|
|
281
281
|
utc: false
|
|
@@ -287,7 +287,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
287
287
|
isBusinessesPage: isBusinessesPage
|
|
288
288
|
}, !pastOrders && /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
289
289
|
width: 50
|
|
290
|
-
}) : parsePrice((order === null || order === void 0 ? void 0 : (_order$
|
|
290
|
+
}) : parsePrice((order === null || order === void 0 ? void 0 : (_order$business15 = order.business) === null || _order$business15 === void 0 ? void 0 : _order$business15.length) > 1 ? order === null || order === void 0 ? void 0 : order.total : (order === null || order === void 0 ? void 0 : (_order$summary2 = order.summary) === null || _order$summary2 === void 0 ? void 0 : _order$summary2.total) || (order === null || order === void 0 ? void 0 : order.total)))), pastOrders && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, !isOrderReviewed && !isFavorite && (!(order !== null && order !== void 0 && order.review) || order.driver && !(order !== null && order !== void 0 && order.user_review)) && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
291
291
|
outline: true,
|
|
292
292
|
color: "primary",
|
|
293
293
|
className: "review",
|
|
@@ -301,7 +301,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
301
301
|
onClick: function onClick() {
|
|
302
302
|
return handleClickReorder(order);
|
|
303
303
|
}
|
|
304
|
-
}, cartState !== null && cartState !== void 0 && cartState.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder'))), !(order !== null && order !== void 0 && (_order$
|
|
304
|
+
}, cartState !== null && cartState !== void 0 && cartState.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder'))), !(order !== null && order !== void 0 && (_order$business16 = order.business) !== null && _order$business16 !== void 0 && _order$business16.length) && /*#__PURE__*/_react.default.createElement(_styles.FavoriteWrapper, {
|
|
305
305
|
onClick: function onClick() {
|
|
306
306
|
return handleChangeFavorite(order);
|
|
307
307
|
},
|
|
@@ -7,19 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.TitleContainer = exports.ReviewWrapper = exports.Price = exports.MultiLogosContainer = exports.Map = exports.Logo = exports.FavoriteWrapper = exports.Content = exports.Container = exports.ButtonWrapper = exports.BusinessLogoWrapper = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n margin: 10px;\n position: relative;\n background: white;\n border-radius: 16px;\n display: inline-block;\n text-align: left;\n transition: all 0.3s ease;\n\n > span {\n display: flex;\n }\n\n ", "\n\n &:hover {\n box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;\n }\n\n button.load-orders {\n padding: 10px 30px;\n }\n\n ", "\n\n ", "\n\n ", "\n\n @media (min-width: 480px) {\n min-width: 430px;\n max-height: ", ";\n width: 430px;\n }\n\n @media(min-width: 993px){\n ", "\n }\n"])), function (_ref) {
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n margin: 10px 0;\n position: relative;\n background: white;\n border-radius: 16px;\n display: inline-block;\n text-align: left;\n transition: all 0.3s ease;\n\n > span {\n display: flex;\n }\n\n ", "\n\n &:hover {\n box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;\n }\n\n button.load-orders {\n padding: 10px 30px;\n }\n\n ", "\n\n ", "\n\n ", "\n\n @media (min-width: 480px) {\n min-width: 430px;\n max-height: ", ";\n width: 430px;\n }\n\n @media (min-width: 768px) {\n margin: 10px;\n }\n\n @media(min-width: 993px){\n ", "\n }\n"])), function (_ref) {
|
|
17
17
|
var isCustomerMode = _ref.isCustomerMode;
|
|
18
|
-
return isCustomerMode ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 300px;\n width: 300px;\n display: inline-block;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width:
|
|
19
|
-
var
|
|
20
|
-
return
|
|
18
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 300px;\n width: 300px;\n display: inline-block;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: ", "px;\n width: ", "px;\n height: ", ";\n max-height: ", ";\n "])), function (_ref2) {
|
|
19
|
+
var w = _ref2.w;
|
|
20
|
+
return w !== null && w !== void 0 ? w : 380;
|
|
21
21
|
}, function (_ref3) {
|
|
22
|
-
var
|
|
22
|
+
var w = _ref3.w;
|
|
23
|
+
return w !== null && w !== void 0 ? w : 380;
|
|
24
|
+
}, function (_ref4) {
|
|
25
|
+
var isBusinessesPage = _ref4.isBusinessesPage;
|
|
26
|
+
return isBusinessesPage && '300px';
|
|
27
|
+
}, function (_ref5) {
|
|
28
|
+
var isBusinessesPage = _ref5.isBusinessesPage;
|
|
23
29
|
return isBusinessesPage ? '300px' : '220px';
|
|
24
30
|
});
|
|
25
31
|
}, function (props) {
|
|
@@ -29,40 +35,42 @@ var Container = _styledComponents.default.div(_templateObject || (_templateObjec
|
|
|
29
35
|
return (props.nobg || props.isBusinessesPage) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: transparent;\n "])));
|
|
30
36
|
}, function (props) {
|
|
31
37
|
return props.flex && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n "])));
|
|
32
|
-
}, function (
|
|
33
|
-
var isBusinessesPage =
|
|
38
|
+
}, function (_ref6) {
|
|
39
|
+
var isBusinessesPage = _ref6.isBusinessesPage;
|
|
34
40
|
return isBusinessesPage ? '300px' : '250px';
|
|
35
|
-
}, function (
|
|
36
|
-
var isBusinessesPage =
|
|
41
|
+
}, function (_ref7) {
|
|
42
|
+
var isBusinessesPage = _ref7.isBusinessesPage;
|
|
37
43
|
return isBusinessesPage && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 30px 20px;\n width: calc(33% - 40px);\n "])));
|
|
38
44
|
});
|
|
39
45
|
exports.Container = Container;
|
|
40
|
-
var Content = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n border-radius: 16px;\n padding:
|
|
41
|
-
var isCustomerMode =
|
|
46
|
+
var Content = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n border-radius: 16px;\n padding: 0;\n ", "\n\n @media (min-width: 768px) {\n padding: 10px;\n }\n"])), function (_ref8) {
|
|
47
|
+
var isCustomerMode = _ref8.isCustomerMode;
|
|
42
48
|
return isCustomerMode ? (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n align-items: center;\n "]))) : (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n align-items: flex-start;\n flex: 1;\n "])));
|
|
43
49
|
});
|
|
44
50
|
exports.Content = Content;
|
|
45
|
-
var Price = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 35%;\n \n ", "\n\n h2 {\n font-size: 16px;\n margin-block-end: ", ";\n margin-block-start: 0.1em;\n font-weight: normal;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: ", ";\n color: #ff9300;\n font-size: 0.8em;\n overflow:hidden;\n text-overflow: ellipsis;\n margin-left: 5px;\n }\n\n p[name='view-cart']{\n color: ", ";\n cursor: pointer;\n }\n\n @media (min-width: 480px) {\n ", "\n }\n"])), function (
|
|
46
|
-
var isCustomerMode =
|
|
51
|
+
var Price = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 35%;\n \n ", "\n\n h2 {\n font-size: 16px;\n margin-block-end: ", ";\n margin-block-start: 0.1em;\n font-weight: normal;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: ", ";\n color: #ff9300;\n font-size: 0.8em;\n overflow:hidden;\n text-overflow: ellipsis;\n margin-left: 5px;\n }\n\n p[name='view-cart']{\n color: ", ";\n cursor: pointer;\n }\n\n @media (min-width: 480px) {\n ", "\n }\n"])), function (_ref9) {
|
|
52
|
+
var isCustomerMode = _ref9.isCustomerMode;
|
|
47
53
|
return isCustomerMode ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n text-align: end;\n white-space: nowrap;\n text-overflow: ellipsis;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n flex-direction: column;\n align-items: flex-end;\n "])));
|
|
48
|
-
}, function (
|
|
49
|
-
var isBusinessesPage =
|
|
54
|
+
}, function (_ref10) {
|
|
55
|
+
var isBusinessesPage = _ref10.isBusinessesPage;
|
|
50
56
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
51
|
-
}, function (
|
|
52
|
-
var isBusinessesPage =
|
|
57
|
+
}, function (_ref11) {
|
|
58
|
+
var isBusinessesPage = _ref11.isBusinessesPage;
|
|
53
59
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
54
60
|
}, function (props) {
|
|
55
61
|
return props.theme.colors.primary;
|
|
56
|
-
}, function (
|
|
57
|
-
var isCustomerMode =
|
|
62
|
+
}, function (_ref12) {
|
|
63
|
+
var isCustomerMode = _ref12.isCustomerMode;
|
|
58
64
|
return !isCustomerMode && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n "])));
|
|
59
65
|
});
|
|
60
66
|
exports.Price = Price;
|
|
61
|
-
var BusinessLogoWrapperStyled = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n\n margin-
|
|
62
|
-
return props.theme.rtl && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left:
|
|
63
|
-
}, function (
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
var BusinessLogoWrapperStyled = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n\n margin-right: 8px;\n margin-left: 0px;\n\n ", "\n\n @media (min-width: 768px) {\n margin-right: 0px;\n margin-left: 8px;\n\n ", "\n }\n\n @media (min-width: 576px) {\n width: 86px;\n min-width: 86px;\n height: 86px;\n min-height: 86px;\n ", "\n }\n"])), function (props) {
|
|
68
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 8px;\n margin-right: 0px;\n "])));
|
|
69
|
+
}, function (props) {
|
|
70
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 8px;\n "])));
|
|
71
|
+
}, function (_ref13) {
|
|
72
|
+
var isMulti = _ref13.isMulti;
|
|
73
|
+
return isMulti && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n "])));
|
|
66
74
|
});
|
|
67
75
|
var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
68
76
|
var style = {};
|
|
@@ -76,7 +84,7 @@ var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
|
76
84
|
}), props.children);
|
|
77
85
|
};
|
|
78
86
|
exports.BusinessLogoWrapper = BusinessLogoWrapper;
|
|
79
|
-
var ButtonWrapper = _styledComponents.default.div(
|
|
87
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0px;\n top: 4px;\n display: flex;\n align-items: center;\n\n button {\n border-radius: 50px;\n font-size: 10px;\n line-height: 15px;\n padding: 4px 8px;\n border: 1px solid ", ";\n margin: 5px;\n\n &.reorder {\n background: ", ";\n &:hover {\n background: ", ";\n }\n }\n }\n"])), function (props) {
|
|
80
88
|
return props.theme.colors.primaryContrast;
|
|
81
89
|
}, function (props) {
|
|
82
90
|
return props.theme.colors.primaryContrast;
|
|
@@ -84,34 +92,34 @@ var ButtonWrapper = _styledComponents.default.div(_templateObject18 || (_templat
|
|
|
84
92
|
return props.theme.colors.primary;
|
|
85
93
|
});
|
|
86
94
|
exports.ButtonWrapper = ButtonWrapper;
|
|
87
|
-
var Logo = _styledComponents.default.div(
|
|
95
|
+
var Logo = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n width: 55px;\n height: 55px;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n border-radius: 7.6px;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 7.6px;\n }\n\n @media (min-width: 480px){\n width: 86px;\n height: 86px;\n }\n"])));
|
|
88
96
|
exports.Logo = Logo;
|
|
89
|
-
var TitleContainer = _styledComponents.default.div(
|
|
97
|
+
var TitleContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
90
98
|
exports.TitleContainer = TitleContainer;
|
|
91
|
-
var Map = _styledComponents.default.div(
|
|
92
|
-
var isBusinessesPage = _ref12.isBusinessesPage;
|
|
93
|
-
return isBusinessesPage ? '200px' : '88px';
|
|
94
|
-
}, function (_ref13) {
|
|
95
|
-
var isBusinessesPage = _ref13.isBusinessesPage;
|
|
96
|
-
return isBusinessesPage && '175px';
|
|
97
|
-
}, function (_ref14) {
|
|
99
|
+
var Map = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n width: 100%;\n height: ", ";\n min-height: ", ";\n img{\n width: 100%;\n height: 100%;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n border-radius: ", ";\n image-rendering: -webkit-optimize-contrast;\n object-fit: cover;\n }\n @media(min-width: 480px){\n height: ", ";\n min-height: ", "\n }\n"])), function (_ref14) {
|
|
98
100
|
var isBusinessesPage = _ref14.isBusinessesPage;
|
|
99
|
-
return isBusinessesPage
|
|
101
|
+
return isBusinessesPage ? '200px' : '88px';
|
|
100
102
|
}, function (_ref15) {
|
|
101
103
|
var isBusinessesPage = _ref15.isBusinessesPage;
|
|
102
|
-
return isBusinessesPage
|
|
104
|
+
return isBusinessesPage && '175px';
|
|
103
105
|
}, function (_ref16) {
|
|
104
106
|
var isBusinessesPage = _ref16.isBusinessesPage;
|
|
107
|
+
return isBusinessesPage && '16px';
|
|
108
|
+
}, function (_ref17) {
|
|
109
|
+
var isBusinessesPage = _ref17.isBusinessesPage;
|
|
110
|
+
return isBusinessesPage ? '200px' : '100px';
|
|
111
|
+
}, function (_ref18) {
|
|
112
|
+
var isBusinessesPage = _ref18.isBusinessesPage;
|
|
105
113
|
return isBusinessesPage && '200px';
|
|
106
114
|
});
|
|
107
115
|
exports.Map = Map;
|
|
108
|
-
var FavoriteWrapper = _styledComponents.default.div(
|
|
109
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
116
|
+
var FavoriteWrapper = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\n cursor: pointer;\n display: flex;\n z-index: 10;\n align-items: center;\n justify-content: center;\n top: 41px;\n right: 10px;\n ", "\n svg {\n color: ", ";\n font-size: 16px;\n }\n"])), function (props) {
|
|
117
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
|
|
110
118
|
}, function (props) {
|
|
111
119
|
return props.theme.colors.danger500;
|
|
112
120
|
});
|
|
113
121
|
exports.FavoriteWrapper = FavoriteWrapper;
|
|
114
|
-
var ReviewWrapper = _styledComponents.default.div(
|
|
122
|
+
var ReviewWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n .review-sent {\n border-radius: 7.6px;\n }\n"])));
|
|
115
123
|
exports.ReviewWrapper = ReviewWrapper;
|
|
116
|
-
var MultiLogosContainer = _styledComponents.default.div(
|
|
124
|
+
var MultiLogosContainer = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n p {\n white-space: nowrap;\n }\n"])));
|
|
117
125
|
exports.MultiLogosContainer = MultiLogosContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@babel/runtime": "^7.10.4",
|
|
76
|
+
"@loadable/component": "^5.15.2",
|
|
76
77
|
"@meronex/icons": "^4.0.0",
|
|
77
78
|
"@popperjs/core": "^2.5.3",
|
|
78
79
|
"@sentry/react": "^5.25.0",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"libphonenumber-js": "^1.9.4",
|
|
86
87
|
"lodash": "^4.17.19",
|
|
87
88
|
"moment": "^2.29.4",
|
|
88
|
-
"ordering-components-external": "1.9.
|
|
89
|
+
"ordering-components-external": "1.9.2",
|
|
89
90
|
"polished": "^3.6.6",
|
|
90
91
|
"react-bootstrap-icons": "^1.7.2",
|
|
91
92
|
"react-calendar": "^3.3.1",
|
|
@@ -94,9 +94,7 @@ const BusinessesListingUI = (props) => {
|
|
|
94
94
|
}, [mapErrors])
|
|
95
95
|
|
|
96
96
|
useEffect(() => {
|
|
97
|
-
if (orderState.loading
|
|
98
|
-
// const newurl = window.location.protocol + '//' + window.location.host + window.location.pathname
|
|
99
|
-
// window.history.pushState({ path: newurl }, '', newurl)
|
|
97
|
+
if (orderState.loading || businessesList.loading) {
|
|
100
98
|
const params = new URLSearchParams()
|
|
101
99
|
history.replace({ pathname: location.pathname, search: params.toString() })
|
|
102
100
|
setPrevPage({ loading: true, page: 1 })
|
|
@@ -25,7 +25,9 @@ const SingleOrderCardUI = (props) => {
|
|
|
25
25
|
reorderLoading,
|
|
26
26
|
orderID,
|
|
27
27
|
handleFavoriteOrder,
|
|
28
|
-
setOrderSelected
|
|
28
|
+
setOrderSelected,
|
|
29
|
+
onRedirectPage,
|
|
30
|
+
customArray
|
|
29
31
|
} = props
|
|
30
32
|
|
|
31
33
|
const theme = useTheme()
|
|
@@ -36,26 +38,35 @@ const SingleOrderCardUI = (props) => {
|
|
|
36
38
|
handleFavoriteOrder && handleFavoriteOrder(!order?.favorite)
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
const handleClickCard = (e, order) => {
|
|
42
|
+
if (e.target.closest('.favorite') || e.target.closest('.review') || e.target.closest('.reorder')) return
|
|
43
|
+
const params = {
|
|
44
|
+
[customArray ? 'cartUuid' : 'orderId']: customArray ? order.uuid : order?.cart_group_id ?? order.uuid
|
|
45
|
+
}
|
|
46
|
+
const page = customArray ? 'checkout' : order?.cart_group_id ? 'multi_orders' : 'order_detail'
|
|
47
|
+
onRedirectPage({ page, params })
|
|
48
|
+
}
|
|
49
|
+
|
|
39
50
|
return (
|
|
40
|
-
<SingleCard key={order.id} id='order-card'>
|
|
51
|
+
<SingleCard key={order.id} id='order-card' onClick={(e) => handleClickCard(e, order)}>
|
|
41
52
|
<OrderPastContent>
|
|
42
53
|
{(order.business?.logo || theme.images?.dummies?.businessLogo) && (
|
|
43
54
|
<>
|
|
44
55
|
{order?.business?.length > 1 ? (
|
|
45
56
|
<MultiLogosContainer>
|
|
46
|
-
{order?.business?.map((business, i) => (
|
|
47
|
-
<
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<PastLogo isMulti>
|
|
54
|
-
<img src={business?.logo || theme.images?.dummies?.businessLogo} alt='business-logo' width='55px' height='64px' loading='lazy' />
|
|
55
|
-
</PastLogo>
|
|
56
|
-
)}
|
|
57
|
-
</React.Fragment>
|
|
57
|
+
{order?.business?.map((business, i) => i < 2 && (
|
|
58
|
+
<PastLogo
|
|
59
|
+
key={business?.id}
|
|
60
|
+
isMulti
|
|
61
|
+
>
|
|
62
|
+
<img src={business?.logo || theme.images?.dummies?.businessLogo} alt='business-logo' width='55px' height='64px' loading='lazy' />
|
|
63
|
+
</PastLogo>
|
|
58
64
|
))}
|
|
65
|
+
{order?.business?.length > 1 && (order?.business?.length - 2) > 0 && (
|
|
66
|
+
<p>
|
|
67
|
+
+ {order?.business?.length - 2}
|
|
68
|
+
</p>
|
|
69
|
+
)}
|
|
59
70
|
</MultiLogosContainer>
|
|
60
71
|
) : (
|
|
61
72
|
<PastLogo>
|
|
@@ -6,7 +6,11 @@ export const SingleCard = styled.div`
|
|
|
6
6
|
display: flex;
|
|
7
7
|
max-height: 100px;
|
|
8
8
|
height: auto;
|
|
9
|
+
border-radius: 16px;
|
|
10
|
+
padding: 10px;
|
|
11
|
+
transition: all 0.3s ease;
|
|
9
12
|
border-bottom: 1px solid #F5F6F6;
|
|
13
|
+
cursor: pointer;
|
|
10
14
|
|
|
11
15
|
${props => (
|
|
12
16
|
props.theme.colors.backgroundPage === '#FFF' ||
|
|
@@ -24,6 +28,10 @@ export const SingleCard = styled.div`
|
|
|
24
28
|
border-top: none !important;
|
|
25
29
|
`}
|
|
26
30
|
}
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;
|
|
34
|
+
}
|
|
27
35
|
`
|
|
28
36
|
|
|
29
37
|
export const OrderPastContent = styled.div`
|
package/src/themes/five/index.js
CHANGED
|
@@ -108,6 +108,7 @@ import { SearchProducts } from './src/components/SearchProducts'
|
|
|
108
108
|
import { MultiCartsPaymethodsAndWallets } from './src/components/MultiCartsPaymethodsAndWallets'
|
|
109
109
|
import { ProfessionalProfile } from './src/components/ProfessionalProfile'
|
|
110
110
|
import { OrderHistory } from './src/components/OrderDetails/OrderHistory'
|
|
111
|
+
import { OrderContextUI } from './src/components/OrderContextUI'
|
|
111
112
|
import { OrderBillSection } from './src/components/OrderDetails/OrderBillSection'
|
|
112
113
|
import { OrderPreferencesSection } from './src/components/OrderDetails/OrderPreferencesSections'
|
|
113
114
|
import { ActionsSection } from './src/components/OrderDetails/ActionsSection'
|
|
@@ -177,6 +178,7 @@ export {
|
|
|
177
178
|
Modal,
|
|
178
179
|
NotFoundSource,
|
|
179
180
|
NotNetworkConnectivity,
|
|
181
|
+
OrderContextUI,
|
|
180
182
|
OrderDetails,
|
|
181
183
|
OrderItAgain,
|
|
182
184
|
OrderDetailsKiosk,
|
|
@@ -64,7 +64,8 @@ const AddressListUI = (props) => {
|
|
|
64
64
|
isCustomerMode,
|
|
65
65
|
isFromCheckout,
|
|
66
66
|
setIsAddressFormOpen,
|
|
67
|
-
isProfile
|
|
67
|
+
isProfile,
|
|
68
|
+
isMobile
|
|
68
69
|
} = props
|
|
69
70
|
|
|
70
71
|
const [, t] = useLanguage()
|
|
@@ -235,7 +236,7 @@ const AddressListUI = (props) => {
|
|
|
235
236
|
color={isEnableContinueButton && addressList?.addresses?.length > 0 ? 'secondary' : 'primary'}
|
|
236
237
|
onClick={() => openAddress({})}
|
|
237
238
|
disabled={orderState?.loading || actionStatus.loading}
|
|
238
|
-
style={isCompletedLayout ? { flex: 1, width: 'fit-content' } : {}}
|
|
239
|
+
style={(isCompletedLayout && !isMobile) ? { flex: 1, width: 'fit-content' } : {}}
|
|
239
240
|
>
|
|
240
241
|
{(orderState?.loading || actionStatus.loading) ? t('LOADING', 'Loading') : t('ADD_NEW_ADDRESS', 'Add New Address')}
|
|
241
242
|
</Button>
|
|
@@ -55,6 +55,7 @@ export const BusinessItemAccordion = (props) => {
|
|
|
55
55
|
const [setRotate, setRotateState] = useState('accordion__icon')
|
|
56
56
|
const [cartProductUpdated, setCartProductUpdated] = useState(null)
|
|
57
57
|
const isBusinessChangeEnabled = configs?.cart_change_business_validation?.value === '1'
|
|
58
|
+
const checkoutMultiBusinessEnabled = configs?.checkout_multi_business_enabled?.value === '1'
|
|
58
59
|
|
|
59
60
|
const content = useRef(null)
|
|
60
61
|
const businessStore = useRef(null)
|
|
@@ -242,7 +243,7 @@ export const BusinessItemAccordion = (props) => {
|
|
|
242
243
|
)}
|
|
243
244
|
{props.children}
|
|
244
245
|
</AccordionContent>
|
|
245
|
-
{!setActive && !isClosed && !!isProducts && !checkoutButtonDisabled && !isMultiCheckout && (
|
|
246
|
+
{!setActive && !isClosed && !!isProducts && !checkoutButtonDisabled && !isMultiCheckout && !checkoutMultiBusinessEnabled && (
|
|
246
247
|
<PriceContainer>
|
|
247
248
|
<h4>{parsePrice(total)}</h4>
|
|
248
249
|
<Button onClick={handleClickCheckout} color='primary'>{t('CHECKOUT', 'Checkout')}</Button>
|
|
@@ -100,6 +100,8 @@ export const BusinessListingSearchUI = (props) => {
|
|
|
100
100
|
]
|
|
101
101
|
|
|
102
102
|
const noResults = (!businessesSearchList.loading && !businessesSearchList.lengthError && businessesSearchList?.businesses?.length === 0)
|
|
103
|
+
const currentCart = Object.values(orderState?.carts).find(cart => cart?.business?.slug === curProduct?.business?.slug) ?? {}
|
|
104
|
+
|
|
103
105
|
|
|
104
106
|
const handleScroll = useCallback(() => {
|
|
105
107
|
const innerHeightScrolltop = window.innerHeight + document.documentElement?.scrollTop + PIXELS_TO_SCROLL
|
|
@@ -420,11 +422,13 @@ export const BusinessListingSearchUI = (props) => {
|
|
|
420
422
|
<ProductForm
|
|
421
423
|
businessSlug={curProduct?.business?.slug}
|
|
422
424
|
useKioskApp={props?.useKioskApp}
|
|
425
|
+
product={curProduct?.product}
|
|
423
426
|
businessId={curProduct?.business?.id}
|
|
424
427
|
categoryId={curProduct?.product?.category_id}
|
|
425
428
|
productId={curProduct?.product?.id}
|
|
426
429
|
onSave={handleRedirectToCart}
|
|
427
430
|
handleUpdateProducts={(productId, changes) => handleUpdateProducts(productId, curProduct?.product?.category_id, curProduct?.business?.id, changes)}
|
|
431
|
+
productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === curProduct?.id ? Cproduct?.quantity : 0) }, 0) || 0}
|
|
428
432
|
/>
|
|
429
433
|
)}
|
|
430
434
|
</Modal>
|