ordering-ui-external 8.0.1 → 8.0.3
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/{7.ordering-ui.3242caad59e9f3bc9c35.js → 7.ordering-ui.ab1b4de01911e1ef2765.js} +1 -1
- package/_bundles/ordering-ui.ab1b4de01911e1ef2765.js +2 -0
- package/_modules/themes/callcenterOriginal/src/components/CartContent/index.js +4 -2
- package/_modules/themes/callcenterOriginal/src/components/CartPopover/index.js +1 -0
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +13 -0
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -0
- package/_modules/themes/five/src/components/Cart/index.js +17 -7
- package/_modules/themes/five/src/components/CartContent/index.js +4 -2
- package/_modules/themes/five/src/components/CartPopover/index.js +4 -2
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +10 -5
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +51 -45
- package/_modules/themes/five/src/components/OrdersOption/index.js +2 -1
- package/_modules/themes/five/src/components/ReviewProduct/index.js +1 -1
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/CartContent/index.js +3 -1
- package/src/themes/callcenterOriginal/src/components/CartPopover/index.js +1 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +14 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -0
- package/src/themes/five/src/components/Cart/index.js +18 -13
- package/src/themes/five/src/components/CartContent/index.js +3 -1
- package/src/themes/five/src/components/CartPopover/index.js +2 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +7 -6
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +7 -0
- package/src/themes/five/src/components/OrdersOption/index.js +9 -8
- package/src/themes/five/src/components/ReviewProduct/index.js +1 -1
- package/_bundles/ordering-ui.3242caad59e9f3bc9c35.js +0 -2
- /package/_bundles/{0.ordering-ui.3242caad59e9f3bc9c35.js → 0.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{1.ordering-ui.3242caad59e9f3bc9c35.js → 1.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{2.ordering-ui.3242caad59e9f3bc9c35.js → 2.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{4.ordering-ui.3242caad59e9f3bc9c35.js → 4.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{5.ordering-ui.3242caad59e9f3bc9c35.js → 5.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{6.ordering-ui.3242caad59e9f3bc9c35.js → 6.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{7.ordering-ui.3242caad59e9f3bc9c35.js.LICENSE.txt → 7.ordering-ui.ab1b4de01911e1ef2765.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.3242caad59e9f3bc9c35.js → 8.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{9.ordering-ui.3242caad59e9f3bc9c35.js → 9.ordering-ui.ab1b4de01911e1ef2765.js} +0 -0
- /package/_bundles/{ordering-ui.3242caad59e9f3bc9c35.js.LICENSE.txt → ordering-ui.ab1b4de01911e1ef2765.js.LICENSE.txt} +0 -0
|
@@ -26,7 +26,8 @@ var CartContent = function CartContent(props) {
|
|
|
26
26
|
isOrderStateCarts = props.isOrderStateCarts,
|
|
27
27
|
isCartPopover = props.isCartPopover,
|
|
28
28
|
isForceOpenCart = props.isForceOpenCart,
|
|
29
|
-
setPreorderBusiness = props.setPreorderBusiness
|
|
29
|
+
setPreorderBusiness = props.setPreorderBusiness,
|
|
30
|
+
isCustomerMode = props.isCustomerMode;
|
|
30
31
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
31
32
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
32
33
|
t = _useLanguage2[1];
|
|
@@ -111,7 +112,8 @@ var CartContent = function CartContent(props) {
|
|
|
111
112
|
currentCartUuid: currentCartUuid,
|
|
112
113
|
isProducts: cart.products.length,
|
|
113
114
|
onClickCheckout: props.onClose,
|
|
114
|
-
setPreorderBusiness: setPreorderBusiness
|
|
115
|
+
setPreorderBusiness: setPreorderBusiness,
|
|
116
|
+
isCustomerMode: isCustomerMode
|
|
115
117
|
}));
|
|
116
118
|
}), (!carts || (carts === null || carts === void 0 ? void 0 : carts.length) === 0) && /*#__PURE__*/_react.default.createElement(_styles.NotCarts, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
117
119
|
src: (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$general = _theme$images.general) === null || _theme$images$general === void 0 ? void 0 : _theme$images$general.notFound,
|
|
@@ -124,6 +124,7 @@ var CartPopover = function CartPopover(props) {
|
|
|
124
124
|
ref: popperElement,
|
|
125
125
|
style: popStyle
|
|
126
126
|
}, attributes.popper), /*#__PURE__*/_react.default.createElement(_CartContent.CartContent, {
|
|
127
|
+
isCustomerMode: isCustomerMode,
|
|
127
128
|
isCartPopover: true,
|
|
128
129
|
isOpenCart: open,
|
|
129
130
|
onClick: props.onClick,
|
|
@@ -42,6 +42,19 @@ var OrdersSection = function OrdersSection(props) {
|
|
|
42
42
|
isBusinessesLoading: businessesList.loading,
|
|
43
43
|
isCustomerMode: isCustomerMode,
|
|
44
44
|
franchiseId: props.franchiseId
|
|
45
|
+
}), /*#__PURE__*/_react.default.createElement(_OrdersOption.OrdersOption, {
|
|
46
|
+
activeOrders: true,
|
|
47
|
+
horizontal: true,
|
|
48
|
+
asDashboard: true,
|
|
49
|
+
isBusinessesPage: true,
|
|
50
|
+
titleContent: t('ACTIVE_ORDERS', 'Active orders'),
|
|
51
|
+
businessesIds: businessesIds,
|
|
52
|
+
onRedirectPage: onRedirectPage,
|
|
53
|
+
userCustomerId: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
|
|
54
|
+
isCustomLayout: true,
|
|
55
|
+
isBusinessesLoading: businessesList.loading,
|
|
56
|
+
isCustomerMode: isCustomerMode,
|
|
57
|
+
franchiseId: props.franchiseId
|
|
45
58
|
}), /*#__PURE__*/_react.default.createElement(_OrdersOption.OrdersOption, {
|
|
46
59
|
pastOrders: true,
|
|
47
60
|
horizontal: true,
|
|
@@ -216,6 +216,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
216
216
|
}, [preorderBusiness]);
|
|
217
217
|
(0, _react.useEffect)(function () {
|
|
218
218
|
var _businessesList$busin2;
|
|
219
|
+
setActiveMap(false);
|
|
219
220
|
if (!(businessesList !== null && businessesList !== void 0 && (_businessesList$busin2 = businessesList.businesses) !== null && _businessesList$busin2 !== void 0 && _businessesList$busin2.length)) return;
|
|
220
221
|
var ids = _toConsumableArray(favoriteIds);
|
|
221
222
|
businessesList.businesses.forEach(function (business) {
|
|
@@ -71,7 +71,8 @@ var CartUI = function CartUI(props) {
|
|
|
71
71
|
hideDriverTip = props.hideDriverTip,
|
|
72
72
|
hideCouponInput = props.hideCouponInput,
|
|
73
73
|
businessConfigs = props.businessConfigs,
|
|
74
|
-
loyaltyRewardRate = props.loyaltyRewardRate
|
|
74
|
+
loyaltyRewardRate = props.loyaltyRewardRate,
|
|
75
|
+
isCustomerMode = props.isCustomerMode;
|
|
75
76
|
var theme = (0, _styledComponents.useTheme)();
|
|
76
77
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
77
78
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -229,18 +230,27 @@ var CartUI = function CartUI(props) {
|
|
|
229
230
|
onClickCheckout && onClickCheckout();
|
|
230
231
|
};
|
|
231
232
|
var handleStoreRedirect = function handleStoreRedirect(slug) {
|
|
232
|
-
if (
|
|
233
|
+
if (isCustomerMode) {
|
|
233
234
|
events.emit('go_to_page', {
|
|
234
235
|
page: 'business',
|
|
235
236
|
params: {
|
|
236
|
-
|
|
237
|
+
store: slug
|
|
237
238
|
}
|
|
238
239
|
});
|
|
239
240
|
} else {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
|
|
242
|
+
events.emit('go_to_page', {
|
|
243
|
+
page: 'business',
|
|
244
|
+
params: {
|
|
245
|
+
business_slug: slug
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
} else {
|
|
249
|
+
events.emit('go_to_page', {
|
|
250
|
+
page: 'business',
|
|
251
|
+
search: "?".concat(businessUrlTemplate.split('?')[1].replace(':business_slug', '')).concat(slug)
|
|
252
|
+
});
|
|
253
|
+
}
|
|
244
254
|
}
|
|
245
255
|
if (windowSize.width <= 768) {
|
|
246
256
|
onClickCheckout && onClickCheckout();
|
|
@@ -27,7 +27,8 @@ var CartContent = function CartContent(props) {
|
|
|
27
27
|
isForceOpenCart = props.isForceOpenCart,
|
|
28
28
|
setPreorderBusiness = props.setPreorderBusiness,
|
|
29
29
|
isOpenCart = props.isOpenCart,
|
|
30
|
-
isSlideBar = props.isSlideBar
|
|
30
|
+
isSlideBar = props.isSlideBar,
|
|
31
|
+
isCustomerMode = props.isCustomerMode;
|
|
31
32
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
32
33
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
33
34
|
t = _useLanguage2[1];
|
|
@@ -129,7 +130,8 @@ var CartContent = function CartContent(props) {
|
|
|
129
130
|
businessConfigs: cart === null || cart === void 0 ? void 0 : (_cart$business = cart.business) === null || _cart$business === void 0 ? void 0 : _cart$business.configs,
|
|
130
131
|
hideCouponInput: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine = configs.multi_business_checkout_coupon_input_style) === null || _configs$multi_busine === void 0 ? void 0 : _configs$multi_busine.value) === 'group',
|
|
131
132
|
hideDeliveryFee: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine2 = configs.multi_business_checkout_show_combined_delivery_fee) === null || _configs$multi_busine2 === void 0 ? void 0 : _configs$multi_busine2.value) === '1',
|
|
132
|
-
hideDriverTip: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine3 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine3 === void 0 ? void 0 : _configs$multi_busine3.value) === '1'
|
|
133
|
+
hideDriverTip: (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine3 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine3 === void 0 ? void 0 : _configs$multi_busine3.value) === '1',
|
|
134
|
+
isCustomerMode: isCustomerMode
|
|
133
135
|
}));
|
|
134
136
|
}), checkoutMultiBusinessEnabled && !!carts.length && /*#__PURE__*/_react.default.createElement(_styles.MultiCartPriceContainer, null, !!totalCartsFee && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine4 = configs.multi_business_checkout_show_combined_delivery_fee) === null || _configs$multi_busine4 === void 0 ? void 0 : _configs$multi_busine4.value) === '1' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('TOTAL_DELIVERY_FEE', 'Total delivery fee')), /*#__PURE__*/_react.default.createElement("p", null, parsePrice(totalCartsFee))), carts.reduce(function (sum, cart) {
|
|
135
137
|
return sum + (cart === null || cart === void 0 ? void 0 : cart.driver_tip);
|
|
@@ -157,7 +157,8 @@ var CartPopover = function CartPopover(props) {
|
|
|
157
157
|
setPreorderBusiness: setPreorderBusiness,
|
|
158
158
|
isOpenCart: open,
|
|
159
159
|
onClick: props.onClick,
|
|
160
|
-
isSlideBar: isSlideBar
|
|
160
|
+
isSlideBar: isSlideBar,
|
|
161
|
+
isCustomerMode: isCustomerMode
|
|
161
162
|
})) : /*#__PURE__*/_react.default.createElement(_styles.PopoverBody, _extends({
|
|
162
163
|
className: "cart-popover",
|
|
163
164
|
ref: popperElement,
|
|
@@ -169,7 +170,8 @@ var CartPopover = function CartPopover(props) {
|
|
|
169
170
|
onClose: props.onClose,
|
|
170
171
|
setPreorderBusiness: setPreorderBusiness,
|
|
171
172
|
isOpenCart: open,
|
|
172
|
-
onClick: props.onClick
|
|
173
|
+
onClick: props.onClick,
|
|
174
|
+
isCustomerMode: isCustomerMode
|
|
173
175
|
}), /*#__PURE__*/_react.default.createElement(_styles.PopoverArrow, {
|
|
174
176
|
key: "arrow",
|
|
175
177
|
ref: arrowElement,
|
|
@@ -18,7 +18,8 @@ var HorizontalOrdersLayout = function HorizontalOrdersLayout(props) {
|
|
|
18
18
|
customArray = props.customArray,
|
|
19
19
|
businessesIds = props.businessesIds,
|
|
20
20
|
isCustomerMode = props.isCustomerMode,
|
|
21
|
-
handleChangePage = props.handleChangePage
|
|
21
|
+
handleChangePage = props.handleChangePage,
|
|
22
|
+
titleContent = props.titleContent;
|
|
22
23
|
var orders = customArray || props.orders;
|
|
23
24
|
var ordersToShow = businessesIds && isCustomerMode ? orders.filter(function (order) {
|
|
24
25
|
return businessesIds === null || businessesIds === void 0 ? void 0 : businessesIds.includes(order === null || order === void 0 ? void 0 : order.business_id);
|
|
@@ -33,19 +34,23 @@ var HorizontalOrdersLayout = function HorizontalOrdersLayout(props) {
|
|
|
33
34
|
}));
|
|
34
35
|
}) : orders;
|
|
35
36
|
return orders.length > 0 && ordersToShow.length > 0 ? /*#__PURE__*/_react.default.createElement(_styles2.OrdersContainer, {
|
|
36
|
-
id: "orders-container
|
|
37
|
+
id: isBusinessesPage && titleContent ? "".concat(titleContent, "-container") : 'orders-container',
|
|
37
38
|
activeOrders: true,
|
|
38
39
|
ordersLength: (orders === null || orders === void 0 ? void 0 : orders.length) <= 1,
|
|
39
40
|
isBusinessesPage: isBusinessesPage
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.CardWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.CardsContainerWrapper,
|
|
41
|
-
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.CardWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.CardsContainerWrapper, {
|
|
42
|
+
isBusinessesPage: isBusinessesPage
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.CardsContainer, {
|
|
44
|
+
isBusinessesPage: isBusinessesPage
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
|
|
46
|
+
scrollId: isBusinessesPage && titleContent ? "".concat(titleContent, "Scroll") : 'orderScroll'
|
|
42
47
|
}, orders.length > 0 && ordersToShow.map(function (order, i) {
|
|
43
48
|
var _order$id;
|
|
44
49
|
return /*#__PURE__*/_react.default.createElement(_SingleOrderCard.SingleOrderCard, _extends({}, props, {
|
|
45
50
|
key: order.id || ((_order$id = order.id) === null || _order$id === void 0 ? void 0 : _order$id[0]) || i,
|
|
46
51
|
order: order
|
|
47
52
|
}));
|
|
48
|
-
})))), orders.length > 0 && ordersToShow.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.Pagination, {
|
|
53
|
+
})))), orders.length > 0 && ordersToShow.length > 0 && Math.ceil(pagination === null || pagination === void 0 ? void 0 : pagination.totalPages) > 1 && /*#__PURE__*/_react.default.createElement(_Pagination.Pagination, {
|
|
49
54
|
currentPage: pagination.currentPage,
|
|
50
55
|
totalPages: Math.ceil(pagination === null || pagination === void 0 ? void 0 : pagination.totalPages),
|
|
51
56
|
handleChangePage: handleChangePage
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.TitleContainer = exports.Price = exports.Map = exports.Logo = exports.FavoriteWrapper = exports.Content = exports.CardsContainerWrapper = exports.CardsContainer = exports.CardWrapper = exports.Card = 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, _templateObject26;
|
|
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, _templateObject27, _templateObject28;
|
|
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; }
|
|
@@ -20,55 +20,61 @@ var Content = _styledComponents.default.div(_templateObject || (_templateObject
|
|
|
20
20
|
exports.Content = Content;
|
|
21
21
|
var CardWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
22
22
|
exports.CardWrapper = CardWrapper;
|
|
23
|
-
var CardsContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n"])))
|
|
23
|
+
var CardsContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n ", "\n"])), function (_ref2) {
|
|
24
|
+
var isBusinessesPage = _ref2.isBusinessesPage;
|
|
25
|
+
return isBusinessesPage && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n "])));
|
|
26
|
+
});
|
|
24
27
|
exports.CardsContainer = CardsContainer;
|
|
25
|
-
var CardsContainerWrapper = _styledComponents.default.div(
|
|
26
|
-
var
|
|
27
|
-
return
|
|
28
|
+
var CardsContainerWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: 10px;\n display: flex;\n ", "\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n ", "\n"])), function (_ref3) {
|
|
29
|
+
var isBusinessesPage = _ref3.isBusinessesPage;
|
|
30
|
+
return isBusinessesPage && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: scroll hidden;\n width: 100%;\n "])));
|
|
31
|
+
}, function (_ref4) {
|
|
32
|
+
var isLoading = _ref4.isLoading;
|
|
33
|
+
return isLoading && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n }\n "])));
|
|
28
34
|
});
|
|
29
35
|
exports.CardsContainerWrapper = CardsContainerWrapper;
|
|
30
|
-
var Price = _styledComponents.default.div(
|
|
31
|
-
var isCustomerMode =
|
|
32
|
-
return isCustomerMode ? (0, _styledComponents.css)(
|
|
33
|
-
}, function (
|
|
34
|
-
var isBusinessesPage =
|
|
36
|
+
var Price = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _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 (_ref5) {
|
|
37
|
+
var isCustomerMode = _ref5.isCustomerMode;
|
|
38
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n text-align: end;\n white-space: nowrap;\n text-overflow: ellipsis;\n "]))) : (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n flex-direction: column;\n align-items: flex-end;\n "])));
|
|
39
|
+
}, function (_ref6) {
|
|
40
|
+
var isBusinessesPage = _ref6.isBusinessesPage;
|
|
35
41
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
36
|
-
}, function (
|
|
37
|
-
var isBusinessesPage =
|
|
42
|
+
}, function (_ref7) {
|
|
43
|
+
var isBusinessesPage = _ref7.isBusinessesPage;
|
|
38
44
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
39
45
|
}, function (props) {
|
|
40
46
|
return props.theme.colors.primary;
|
|
41
|
-
}, function (
|
|
42
|
-
var isCustomerMode =
|
|
43
|
-
return !isCustomerMode && (0, _styledComponents.css)(
|
|
47
|
+
}, function (_ref8) {
|
|
48
|
+
var isCustomerMode = _ref8.isCustomerMode;
|
|
49
|
+
return !isCustomerMode && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n "])));
|
|
44
50
|
});
|
|
45
51
|
exports.Price = Price;
|
|
46
|
-
var Card = _styledComponents.default.div(
|
|
47
|
-
var isCustomerMode =
|
|
48
|
-
return isCustomerMode ? (0, _styledComponents.css)(
|
|
49
|
-
var isBusinessesPage =
|
|
52
|
+
var Card = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _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 ", "\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 (_ref9) {
|
|
53
|
+
var isCustomerMode = _ref9.isCustomerMode;
|
|
54
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n min-width: 300px;\n width: 300px;\n display: inline-block;\n "]))) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n min-width: 380px;\n width: 380px;\n height: ", ";\n max-height: ", ";\n "])), function (_ref10) {
|
|
55
|
+
var isBusinessesPage = _ref10.isBusinessesPage;
|
|
50
56
|
return isBusinessesPage && '300px';
|
|
51
|
-
}, function (
|
|
52
|
-
var isBusinessesPage =
|
|
57
|
+
}, function (_ref11) {
|
|
58
|
+
var isBusinessesPage = _ref11.isBusinessesPage;
|
|
53
59
|
return isBusinessesPage ? '300px' : '220px';
|
|
54
60
|
});
|
|
55
61
|
}, function (props) {
|
|
56
62
|
var _props$theme;
|
|
57
|
-
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(
|
|
63
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
58
64
|
}, function (props) {
|
|
59
|
-
return (props.nobg || props.isBusinessesPage) && (0, _styledComponents.css)(
|
|
65
|
+
return (props.nobg || props.isBusinessesPage) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n background: transparent;\n "])));
|
|
60
66
|
}, function (props) {
|
|
61
|
-
return props.flex && (0, _styledComponents.css)(
|
|
62
|
-
}, function (
|
|
63
|
-
var isBusinessesPage =
|
|
67
|
+
return props.flex && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n "])));
|
|
68
|
+
}, function (_ref12) {
|
|
69
|
+
var isBusinessesPage = _ref12.isBusinessesPage;
|
|
64
70
|
return isBusinessesPage ? '300px' : '250px';
|
|
65
|
-
}, function (
|
|
66
|
-
var isBusinessesPage =
|
|
67
|
-
return isBusinessesPage && (0, _styledComponents.css)(
|
|
71
|
+
}, function (_ref13) {
|
|
72
|
+
var isBusinessesPage = _ref13.isBusinessesPage;
|
|
73
|
+
return isBusinessesPage && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin: 30px 20px;\n width: calc(33% - 40px);\n "])));
|
|
68
74
|
});
|
|
69
75
|
exports.Card = Card;
|
|
70
|
-
var BusinessLogoWrapperStyled = _styledComponents.default.div(
|
|
71
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
76
|
+
var BusinessLogoWrapperStyled = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _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-left: 8px;\n\n ", "\n\n @media (min-width: 576px) {\n width: 86px;\n min-width: 86px;\n height: 86px;\n min-height: 86px;\n }\n"])), function (props) {
|
|
77
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 8px;\n "])));
|
|
72
78
|
});
|
|
73
79
|
var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
74
80
|
var style = {};
|
|
@@ -82,7 +88,7 @@ var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
|
82
88
|
}), props.children);
|
|
83
89
|
};
|
|
84
90
|
exports.BusinessLogoWrapper = BusinessLogoWrapper;
|
|
85
|
-
var ButtonWrapper = _styledComponents.default.div(
|
|
91
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _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) {
|
|
86
92
|
return props.theme.colors.primaryContrast;
|
|
87
93
|
}, function (props) {
|
|
88
94
|
return props.theme.colors.primaryContrast;
|
|
@@ -90,29 +96,29 @@ var ButtonWrapper = _styledComponents.default.div(_templateObject21 || (_templat
|
|
|
90
96
|
return props.theme.colors.primary;
|
|
91
97
|
});
|
|
92
98
|
exports.ButtonWrapper = ButtonWrapper;
|
|
93
|
-
var Logo = _styledComponents.default.div(
|
|
99
|
+
var Logo = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _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"])));
|
|
94
100
|
exports.Logo = Logo;
|
|
95
|
-
var TitleContainer = _styledComponents.default.div(
|
|
101
|
+
var TitleContainer = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
96
102
|
exports.TitleContainer = TitleContainer;
|
|
97
|
-
var Map = _styledComponents.default.div(
|
|
98
|
-
var isBusinessesPage = _ref12.isBusinessesPage;
|
|
99
|
-
return isBusinessesPage ? '200px' : '88px';
|
|
100
|
-
}, function (_ref13) {
|
|
101
|
-
var isBusinessesPage = _ref13.isBusinessesPage;
|
|
102
|
-
return isBusinessesPage && '175px';
|
|
103
|
-
}, function (_ref14) {
|
|
103
|
+
var Map = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _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) {
|
|
104
104
|
var isBusinessesPage = _ref14.isBusinessesPage;
|
|
105
|
-
return isBusinessesPage
|
|
105
|
+
return isBusinessesPage ? '200px' : '88px';
|
|
106
106
|
}, function (_ref15) {
|
|
107
107
|
var isBusinessesPage = _ref15.isBusinessesPage;
|
|
108
|
-
return isBusinessesPage
|
|
108
|
+
return isBusinessesPage && '175px';
|
|
109
109
|
}, function (_ref16) {
|
|
110
110
|
var isBusinessesPage = _ref16.isBusinessesPage;
|
|
111
|
+
return isBusinessesPage && '16px';
|
|
112
|
+
}, function (_ref17) {
|
|
113
|
+
var isBusinessesPage = _ref17.isBusinessesPage;
|
|
114
|
+
return isBusinessesPage ? '200px' : '100px';
|
|
115
|
+
}, function (_ref18) {
|
|
116
|
+
var isBusinessesPage = _ref18.isBusinessesPage;
|
|
111
117
|
return isBusinessesPage && '200px';
|
|
112
118
|
});
|
|
113
119
|
exports.Map = Map;
|
|
114
|
-
var FavoriteWrapper = _styledComponents.default.div(
|
|
115
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
120
|
+
var FavoriteWrapper = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n position: absolute;\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) {
|
|
121
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
|
|
116
122
|
}, function (props) {
|
|
117
123
|
return props.theme.colors.danger500;
|
|
118
124
|
});
|
|
@@ -342,6 +342,7 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
342
342
|
isCustomerMode: isCustomerMode,
|
|
343
343
|
isBusiness: isBusiness,
|
|
344
344
|
isProducts: isProducts,
|
|
345
|
+
titleContent: titleContent,
|
|
345
346
|
handleChangePage: handleChangePage
|
|
346
347
|
}) : /*#__PURE__*/_react.default.createElement(_VerticalOrdersLayout.VerticalOrdersLayout, {
|
|
347
348
|
reorderLoading: reorderState === null || reorderState === void 0 ? void 0 : reorderState.loading,
|
|
@@ -394,7 +395,7 @@ var OrdersOption = function OrdersOption(props) {
|
|
|
394
395
|
useDefualtSessionManager: true,
|
|
395
396
|
paginationSettings: {
|
|
396
397
|
initialPage: 1,
|
|
397
|
-
pageSize: getAllOrders || props.activeOrders ? 30 : 10,
|
|
398
|
+
pageSize: getAllOrders || props.activeOrders && !props.isBusinessesPage ? 30 : 10,
|
|
398
399
|
controlType: 'infinity'
|
|
399
400
|
}
|
|
400
401
|
});
|
|
@@ -232,7 +232,7 @@ var ReviewProductUI = function ReviewProductUI(props) {
|
|
|
232
232
|
product: product
|
|
233
233
|
}));
|
|
234
234
|
}) : !(productsOrder !== null && productsOrder !== void 0 && productsOrder.deleted) && /*#__PURE__*/_react.default.createElement(SingleProductReview, _extends({}, props, {
|
|
235
|
-
key:
|
|
235
|
+
key: productsOrder === null || productsOrder === void 0 ? void 0 : productsOrder.id,
|
|
236
236
|
product: productsOrder
|
|
237
237
|
}));
|
|
238
238
|
})), /*#__PURE__*/_react.default.createElement(_styles.ActionBlock, null, /*#__PURE__*/_react.default.createElement("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"lodash": "^4.17.19",
|
|
88
88
|
"moment": "^2.29.4",
|
|
89
89
|
"nanoid": "^4.0.0",
|
|
90
|
-
"ordering-components-external": "7.0.
|
|
90
|
+
"ordering-components-external": "7.0.3",
|
|
91
91
|
"payment": "^2.4.6",
|
|
92
92
|
"polished": "^3.6.6",
|
|
93
93
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -13,7 +13,8 @@ export const CartContent = (props) => {
|
|
|
13
13
|
isOrderStateCarts,
|
|
14
14
|
isCartPopover,
|
|
15
15
|
isForceOpenCart,
|
|
16
|
-
setPreorderBusiness
|
|
16
|
+
setPreorderBusiness,
|
|
17
|
+
isCustomerMode
|
|
17
18
|
} = props
|
|
18
19
|
|
|
19
20
|
const [, t] = useLanguage()
|
|
@@ -95,6 +96,7 @@ export const CartContent = (props) => {
|
|
|
95
96
|
isProducts={cart.products.length}
|
|
96
97
|
onClickCheckout={props.onClose}
|
|
97
98
|
setPreorderBusiness={setPreorderBusiness}
|
|
99
|
+
isCustomerMode={isCustomerMode}
|
|
98
100
|
/>
|
|
99
101
|
)}
|
|
100
102
|
</React.Fragment>
|
|
@@ -95,6 +95,7 @@ export const CartPopover = (props) => {
|
|
|
95
95
|
</HeaderItem>
|
|
96
96
|
<PopoverBody className='cart-popover' ref={popperElement} style={popStyle} {...attributes.popper}>
|
|
97
97
|
<CartContent
|
|
98
|
+
isCustomerMode={isCustomerMode}
|
|
98
99
|
isCartPopover
|
|
99
100
|
isOpenCart={open}
|
|
100
101
|
onClick={props.onClick}
|
|
@@ -31,6 +31,20 @@ export const OrdersSection = (props) => {
|
|
|
31
31
|
isCustomerMode={isCustomerMode}
|
|
32
32
|
franchiseId={props.franchiseId}
|
|
33
33
|
/>
|
|
34
|
+
<OrdersOption
|
|
35
|
+
activeOrders
|
|
36
|
+
horizontal
|
|
37
|
+
asDashboard
|
|
38
|
+
isBusinessesPage
|
|
39
|
+
titleContent={t('ACTIVE_ORDERS', 'Active orders')}
|
|
40
|
+
businessesIds={businessesIds}
|
|
41
|
+
onRedirectPage={onRedirectPage}
|
|
42
|
+
userCustomerId={userCustomer?.id}
|
|
43
|
+
isCustomLayout
|
|
44
|
+
isBusinessesLoading={businessesList.loading}
|
|
45
|
+
isCustomerMode={isCustomerMode}
|
|
46
|
+
franchiseId={props.franchiseId}
|
|
47
|
+
/>
|
|
34
48
|
<OrdersOption
|
|
35
49
|
pastOrders
|
|
36
50
|
horizontal
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -177,6 +177,7 @@ const BusinessesListingUI = (props) => {
|
|
|
177
177
|
}, [preorderBusiness])
|
|
178
178
|
|
|
179
179
|
useEffect(() => {
|
|
180
|
+
setActiveMap(false)
|
|
180
181
|
if (!businessesList?.businesses?.length) return
|
|
181
182
|
const ids = [...favoriteIds]
|
|
182
183
|
businessesList.businesses.forEach(business => {
|
|
@@ -72,7 +72,8 @@ const CartUI = (props) => {
|
|
|
72
72
|
hideDriverTip,
|
|
73
73
|
hideCouponInput,
|
|
74
74
|
businessConfigs,
|
|
75
|
-
loyaltyRewardRate
|
|
75
|
+
loyaltyRewardRate,
|
|
76
|
+
isCustomerMode
|
|
76
77
|
} = props
|
|
77
78
|
|
|
78
79
|
const theme = useTheme()
|
|
@@ -189,10 +190,14 @@ const CartUI = (props) => {
|
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
const handleStoreRedirect = (slug) => {
|
|
192
|
-
if (
|
|
193
|
-
events.emit('go_to_page', { page: 'business', params: {
|
|
193
|
+
if (isCustomerMode) {
|
|
194
|
+
events.emit('go_to_page', { page: 'business', params: { store: slug } })
|
|
194
195
|
} else {
|
|
195
|
-
|
|
196
|
+
if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
|
|
197
|
+
events.emit('go_to_page', { page: 'business', params: { business_slug: slug } })
|
|
198
|
+
} else {
|
|
199
|
+
events.emit('go_to_page', { page: 'business', search: `?${businessUrlTemplate.split('?')[1].replace(':business_slug', '')}${slug}` })
|
|
200
|
+
}
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
if (windowSize.width <= 768) {
|
|
@@ -466,15 +471,15 @@ const CartUI = (props) => {
|
|
|
466
471
|
</table>
|
|
467
472
|
{isCouponEnabled && !isCartPending &&
|
|
468
473
|
((isCheckout || isCartPopover || isMultiCheckout) &&
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
474
|
+
!(isCheckout && isCartPopover)) && !hideCartDiscount && !hideCouponInput &&
|
|
475
|
+
(
|
|
476
|
+
<CouponContainer>
|
|
477
|
+
<CouponControl
|
|
478
|
+
businessId={cart?.business_id}
|
|
479
|
+
price={cart?.total}
|
|
480
|
+
/>
|
|
481
|
+
</CouponContainer>
|
|
482
|
+
)}
|
|
478
483
|
{
|
|
479
484
|
!isStore &&
|
|
480
485
|
!isMultiCheckout &&
|
|
@@ -14,7 +14,8 @@ export const CartContent = (props) => {
|
|
|
14
14
|
isForceOpenCart,
|
|
15
15
|
setPreorderBusiness,
|
|
16
16
|
isOpenCart,
|
|
17
|
-
isSlideBar
|
|
17
|
+
isSlideBar,
|
|
18
|
+
isCustomerMode
|
|
18
19
|
} = props
|
|
19
20
|
|
|
20
21
|
const [, t] = useLanguage()
|
|
@@ -111,6 +112,7 @@ export const CartContent = (props) => {
|
|
|
111
112
|
hideCouponInput={configs?.multi_business_checkout_coupon_input_style?.value === 'group'}
|
|
112
113
|
hideDeliveryFee={configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'}
|
|
113
114
|
hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
|
|
115
|
+
isCustomerMode={isCustomerMode}
|
|
114
116
|
/>
|
|
115
117
|
)}
|
|
116
118
|
</React.Fragment>
|
|
@@ -132,6 +132,7 @@ export const CartPopover = (props) => {
|
|
|
132
132
|
isOpenCart={open}
|
|
133
133
|
onClick={props.onClick}
|
|
134
134
|
isSlideBar={isSlideBar}
|
|
135
|
+
isCustomerMode={isCustomerMode}
|
|
135
136
|
/>
|
|
136
137
|
</Modal>
|
|
137
138
|
) : (
|
|
@@ -144,6 +145,7 @@ export const CartPopover = (props) => {
|
|
|
144
145
|
setPreorderBusiness={setPreorderBusiness}
|
|
145
146
|
isOpenCart={open}
|
|
146
147
|
onClick={props.onClick}
|
|
148
|
+
isCustomerMode={isCustomerMode}
|
|
147
149
|
/>
|
|
148
150
|
<PopoverArrow key='arrow' ref={arrowElement} style={styles.arrow} />
|
|
149
151
|
</PopoverBody>
|
|
@@ -17,7 +17,8 @@ export const HorizontalOrdersLayout = (props) => {
|
|
|
17
17
|
customArray,
|
|
18
18
|
businessesIds,
|
|
19
19
|
isCustomerMode,
|
|
20
|
-
handleChangePage
|
|
20
|
+
handleChangePage,
|
|
21
|
+
titleContent
|
|
21
22
|
} = props
|
|
22
23
|
|
|
23
24
|
const orders = customArray || props.orders
|
|
@@ -34,15 +35,15 @@ export const HorizontalOrdersLayout = (props) => {
|
|
|
34
35
|
return (
|
|
35
36
|
orders.length > 0 && ordersToShow.length > 0 ? (
|
|
36
37
|
<OrdersContainer
|
|
37
|
-
id='orders-container'
|
|
38
|
+
id={isBusinessesPage && titleContent ? `${titleContent}-container` : 'orders-container'}
|
|
38
39
|
activeOrders
|
|
39
40
|
ordersLength={orders?.length <= 1}
|
|
40
41
|
isBusinessesPage={isBusinessesPage}
|
|
41
42
|
>
|
|
42
43
|
<CardWrapper>
|
|
43
|
-
<CardsContainerWrapper>
|
|
44
|
-
<CardsContainer>
|
|
45
|
-
<AutoScroll scrollId='orderScroll'>
|
|
44
|
+
<CardsContainerWrapper isBusinessesPage={isBusinessesPage}>
|
|
45
|
+
<CardsContainer isBusinessesPage={isBusinessesPage}>
|
|
46
|
+
<AutoScroll scrollId={isBusinessesPage && titleContent ? `${titleContent}Scroll` : 'orderScroll'}>
|
|
46
47
|
{orders.length > 0 && ordersToShow.map((order, i) => (
|
|
47
48
|
<SingleOrderCard
|
|
48
49
|
{...props}
|
|
@@ -53,7 +54,7 @@ export const HorizontalOrdersLayout = (props) => {
|
|
|
53
54
|
</AutoScroll>
|
|
54
55
|
</CardsContainer>
|
|
55
56
|
</CardsContainerWrapper>
|
|
56
|
-
{orders.length > 0 && ordersToShow.length > 0 && (
|
|
57
|
+
{orders.length > 0 && ordersToShow.length > 0 && Math.ceil(pagination?.totalPages) > 1 && (
|
|
57
58
|
<Pagination
|
|
58
59
|
currentPage={pagination.currentPage}
|
|
59
60
|
totalPages={Math.ceil(pagination?.totalPages)}
|
|
@@ -21,11 +21,18 @@ export const CardWrapper = styled.div`
|
|
|
21
21
|
`
|
|
22
22
|
export const CardsContainer = styled.div`
|
|
23
23
|
display: flex;
|
|
24
|
+
${({ isBusinessesPage }) => isBusinessesPage && css`
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
`}
|
|
24
27
|
`
|
|
25
28
|
|
|
26
29
|
export const CardsContainerWrapper = styled.div`
|
|
27
30
|
margin-bottom: 10px;
|
|
28
31
|
display: flex;
|
|
32
|
+
${({ isBusinessesPage }) => isBusinessesPage && css`
|
|
33
|
+
overflow: scroll hidden;
|
|
34
|
+
width: 100%;
|
|
35
|
+
`}
|
|
29
36
|
::-webkit-scrollbar {
|
|
30
37
|
width: 6px;
|
|
31
38
|
height: 6px;
|