ordering-ui-external 5.0.5 → 6.0.0

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.
Files changed (51) hide show
  1. package/_bundles/{7.ordering-ui.28307d37127e6161004f.js → 7.ordering-ui.a0ed9167dd88195da796.js} +1 -1
  2. package/_bundles/{ordering-ui.28307d37127e6161004f.js → ordering-ui.a0ed9167dd88195da796.js} +2 -2
  3. package/_modules/themes/five/src/components/AddressList/index.js +2 -2
  4. package/_modules/themes/five/src/components/BusinessController/index.js +11 -3
  5. package/_modules/themes/five/src/components/BusinessController/styles.js +26 -29
  6. package/_modules/themes/five/src/components/BusinessInformation/index.js +10 -1
  7. package/_modules/themes/five/src/components/BusinessInformation/styles.js +1 -1
  8. package/_modules/themes/five/src/components/BusinessProductsList/index.js +2 -2
  9. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +5 -2
  10. package/_modules/themes/five/src/components/Checkout/index.js +17 -4
  11. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  12. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +1 -1
  13. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
  14. package/_modules/themes/five/src/components/OrderDetails/index.js +1 -1
  15. package/_modules/themes/five/src/components/OrderDetails/styles.js +1 -1
  16. package/_modules/themes/five/src/components/ProductForm/index.js +5 -5
  17. package/_modules/themes/five/src/components/ProductForm/styles.js +5 -3
  18. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -0
  19. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  20. package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
  21. package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -2
  22. package/package.json +2 -2
  23. package/src/themes/five/src/components/AddressList/index.js +2 -2
  24. package/src/themes/five/src/components/BusinessController/index.js +15 -19
  25. package/src/themes/five/src/components/BusinessController/styles.js +8 -7
  26. package/src/themes/five/src/components/BusinessInformation/index.js +14 -4
  27. package/src/themes/five/src/components/BusinessInformation/styles.js +1 -1
  28. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
  29. package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -3
  30. package/src/themes/five/src/components/Checkout/index.js +13 -4
  31. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  32. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +1 -0
  33. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +0 -1
  34. package/src/themes/five/src/components/OrderDetails/index.js +1 -1
  35. package/src/themes/five/src/components/OrderDetails/styles.js +1 -0
  36. package/src/themes/five/src/components/ProductForm/index.js +102 -93
  37. package/src/themes/five/src/components/ProductForm/styles.js +6 -0
  38. package/src/themes/five/src/components/ProductItemAccordion/index.js +9 -1
  39. package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  40. package/src/themes/five/src/components/SearchProducts/styles.js +0 -1
  41. package/src/themes/five/src/components/UserFormDetails/index.js +9 -6
  42. /package/_bundles/{0.ordering-ui.28307d37127e6161004f.js → 0.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  43. /package/_bundles/{1.ordering-ui.28307d37127e6161004f.js → 1.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  44. /package/_bundles/{2.ordering-ui.28307d37127e6161004f.js → 2.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  45. /package/_bundles/{4.ordering-ui.28307d37127e6161004f.js → 4.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  46. /package/_bundles/{5.ordering-ui.28307d37127e6161004f.js → 5.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  47. /package/_bundles/{6.ordering-ui.28307d37127e6161004f.js → 6.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  48. /package/_bundles/{7.ordering-ui.28307d37127e6161004f.js.LICENSE.txt → 7.ordering-ui.a0ed9167dd88195da796.js.LICENSE.txt} +0 -0
  49. /package/_bundles/{8.ordering-ui.28307d37127e6161004f.js → 8.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  50. /package/_bundles/{9.ordering-ui.28307d37127e6161004f.js → 9.ordering-ui.a0ed9167dd88195da796.js} +0 -0
  51. /package/_bundles/{ordering-ui.28307d37127e6161004f.js.LICENSE.txt → ordering-ui.a0ed9167dd88195da796.js.LICENSE.txt} +0 -0
@@ -378,10 +378,10 @@ var AddressListUI = function AddressListUI(props) {
378
378
  }, AfterElement);
379
379
  }));
380
380
  };
381
- var AddressList = function AddressList(props) {
381
+ var AddressList = /*#__PURE__*/_react.default.memo(function (props) {
382
382
  var addressListProps = _objectSpread(_objectSpread({}, props), {}, {
383
383
  UIComponent: AddressListUI
384
384
  });
385
385
  return /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.AddressList, addressListProps);
386
- };
386
+ });
387
387
  exports.AddressList = AddressList;
@@ -16,6 +16,8 @@ var _LoginForm = require("../LoginForm");
16
16
  var _SignUpForm = require("../SignUpForm");
17
17
  var _ForgotPasswordForm = require("../ForgotPasswordForm");
18
18
  var _utils = require("../../../../../utils");
19
+ var _BiCar = _interopRequireDefault(require("@meronex/icons/bi/BiCar"));
20
+ var _BiBasket = _interopRequireDefault(require("@meronex/icons/bi/BiBasket"));
19
21
  var _styles = require("./styles");
20
22
  var _GoPrimitiveDot = _interopRequireDefault(require("@meronex/icons/go/GoPrimitiveDot"));
21
23
  var _BisStar = _interopRequireDefault(require("@meronex/icons/bi/BisStar"));
@@ -35,7 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
35
37
  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; } }
36
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
39
  var BusinessControllerUI = function BusinessControllerUI(props) {
38
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _theme$business_listi36, _theme$business_listi37, _theme$business_listi38, _theme$business_listi39, _theme$business_listi40, _theme$business_listi41, _theme$business_listi42, _theme$business_listi43, _theme$business_listi44, _theme$business_listi45, _business$available_d, _business$busy_driver, _business$active_orde, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _business$available_d2, _business$available_d3, _business$busy_driver2, _business$busy_driver3, _business$active_orde2, _business$active_orde3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
40
+ var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _theme$business_listi36, _theme$business_listi37, _theme$business_listi38, _theme$business_listi39, _theme$business_listi40, _theme$business_listi41, _theme$business_listi42, _theme$business_listi43, _theme$business_listi44, _theme$business_listi45, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
39
41
  var isSkeleton = props.isSkeleton,
40
42
  business = props.business,
41
43
  getBusinessOffer = props.getBusinessOffer,
@@ -150,7 +152,7 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
150
152
  token: user === null || user === void 0 ? void 0 : (_user$session = user.session) === null || _user$session === void 0 ? void 0 : _user$session.access_token
151
153
  });
152
154
  };
153
- var hasInformationLength = (business === null || business === void 0 ? void 0 : (_business$available_d = business.available_drivers) === null || _business$available_d === void 0 ? void 0 : _business$available_d.length) + (business === null || business === void 0 ? void 0 : (_business$busy_driver = business.busy_drivers) === null || _business$busy_driver === void 0 ? void 0 : _business$busy_driver.length) + (business === null || business === void 0 ? void 0 : (_business$active_orde = business.active_orders) === null || _business$active_orde === void 0 ? void 0 : _business$active_orde.length) > 0;
155
+ var hasInformationLength = !!(business !== null && business !== void 0 && business.idle_drivers_count) || !!(business !== null && business !== void 0 && business.busy_drivers_count) || !!(business !== null && business !== void 0 && business.activated_orders);
154
156
  if (typeButton) {
155
157
  return /*#__PURE__*/_react.default.createElement(_styles.ContainerCard, {
156
158
  typeButton: typeButton
@@ -219,7 +221,13 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
219
221
  className: "bullet"
220
222
  }, /*#__PURE__*/_react.default.createElement(_GoPrimitiveDot.default, null), parseDistance(businessDistance !== null && businessDistance !== void 0 ? businessDistance : business === null || business === void 0 ? void 0 : business.distance)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
221
223
  width: 65
222
- })), isCustomerMode && hasInformationLength && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformation, null, (business === null || business === void 0 ? void 0 : (_business$available_d2 = business.available_drivers) === null || _business$available_d2 === void 0 ? void 0 : _business$available_d2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$available_d3 = business.available_drivers) === null || _business$available_d3 === void 0 ? void 0 : _business$available_d3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('OPEN_ORDERS', 'Open orders'))), (business === null || business === void 0 ? void 0 : (_business$busy_driver2 = business.busy_drivers) === null || _business$busy_driver2 === void 0 ? void 0 : _business$busy_driver2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$busy_driver3 = business.busy_drivers) === null || _business$busy_driver3 === void 0 ? void 0 : _business$busy_driver3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('BUSY_DRIVERS', 'Busy drivers'))), (business === null || business === void 0 ? void 0 : (_business$active_orde2 = business.active_orders) === null || _business$active_orde2 === void 0 ? void 0 : _business$active_orde2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$active_orde3 = business.active_orders) === null || _business$active_orde3 === void 0 ? void 0 : _business$active_orde3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('AVAILABLE_DRIVERS', 'Avalable drivers')))))))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
224
+ })), isCustomerMode && hasInformationLength && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformation, null, (business === null || business === void 0 ? void 0 : business.idle_drivers_count) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, {
225
+ bgcolor: "green"
226
+ }, /*#__PURE__*/_react.default.createElement(_BiCar.default, null), business === null || business === void 0 ? void 0 : business.idle_drivers_count), (business === null || business === void 0 ? void 0 : business.busy_drivers_count) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, {
227
+ bgcolor: "red"
228
+ }, /*#__PURE__*/_react.default.createElement(_BiCar.default, null), business === null || business === void 0 ? void 0 : business.busy_drivers_count), (business === null || business === void 0 ? void 0 : business.activated_orders) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, {
229
+ bgcolor: "rgb(252,225,5)"
230
+ }, /*#__PURE__*/_react.default.createElement(_BiBasket.default, null), business === null || business === void 0 ? void 0 : business.activated_orders)))))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
223
231
  title: t('BUSINESS_CLOSED', 'Business Closed'),
224
232
  content: alertState.content,
225
233
  acceptText: t('ACCEPT', 'Accept'),
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.WrapperBusinessLogo = exports.WrapperBusinessCard = exports.RibbonBox = exports.Medadata = exports.InfoLength = exports.InfoDescription = exports.FavoriteWrapper = exports.ContainerCard = exports.Categories = exports.CardOverlay = exports.CallCenterInformationBullet = exports.CallCenterInformation = exports.BusinessTags = exports.BusinessStarInfo = exports.BusinessName = exports.BusinessLogoWrapper = exports.BusinessLogo = exports.BusinessInfoItem = exports.BusinessInfo = exports.BusinessHero = exports.BusinessHeader = exports.BusinessContent = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
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, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48;
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, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46;
11
11
  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); }
12
12
  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; }
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -120,54 +120,51 @@ var Medadata = _styledComponents.default.div(_templateObject26 || (_templateObje
120
120
  return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
121
121
  });
122
122
  exports.Medadata = Medadata;
123
- var CallCenterInformation = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n div{\n justify-content: space-evenly;\n }\n"])));
123
+ var CallCenterInformation = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n position: absolute;\n right: 0;\n bottom: 43px;\n margin-right: 10px;\n margin-bottom: 10px;\n div{\n justify-content: space-evenly;\n }\n"])));
124
124
  exports.CallCenterInformation = CallCenterInformation;
125
- var CallCenterInformationBullet = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n padding: 2px;\n margin-bottom: 2px;\n border-radius: 16px;\n svg{\n font-size: 18px;\n }\n ", "\n"])), function (_ref16) {
126
- var isCustomerMode = _ref16.isCustomerMode;
127
- return isCustomerMode ? (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n flex-direction: column;\n "]))) : (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n width: 50px;\n background: ", ";\n color: #fff;\n "])), function (_ref17) {
128
- var bgcolor = _ref17.bgcolor;
129
- return bgcolor;
130
- });
125
+ var CallCenterInformationBullet = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n padding: 2px;\n margin-bottom: 2px;\n border-radius: 16px;\n background: ", ";\n width: 50px;\n color: #fff;\n svg{\n font-size: 18px;\n }\n"])), function (_ref16) {
126
+ var bgcolor = _ref16.bgcolor;
127
+ return bgcolor;
131
128
  });
132
129
  exports.CallCenterInformationBullet = CallCenterInformationBullet;
133
- var BusinessLogoWrapper = _styledComponents.default.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: -20px;\n margin-bottom: 10px;\n"])));
130
+ var BusinessLogoWrapper = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: -20px;\n margin-bottom: 10px;\n"])));
134
131
  exports.BusinessLogoWrapper = BusinessLogoWrapper;
135
- var BusinessStarInfo = _styledComponents.default.div(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n .reviews {\n display: flex;\n align-items: center;\n svg {\n margin-right: 3px;\n font-size: 22px;\n color: #414954;\n ", "\n }\n span {\n font-size: 15px;\n color: #414954;\n }\n }\n"])), function (props) {
132
+ var BusinessStarInfo = _styledComponents.default.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n .reviews {\n display: flex;\n align-items: center;\n svg {\n margin-right: 3px;\n font-size: 22px;\n color: #414954;\n ", "\n }\n span {\n font-size: 15px;\n color: #414954;\n }\n }\n"])), function (props) {
136
133
  var _props$theme5;
137
- return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0;\n "])));
134
+ return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0;\n "])));
138
135
  });
139
136
  exports.BusinessStarInfo = BusinessStarInfo;
140
- var CardOverlay = _styledComponents.default.div(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.2);\n border-radius: 7.6px;\n z-index: 1;\n"])));
137
+ var CardOverlay = _styledComponents.default.div(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.2);\n border-radius: 7.6px;\n z-index: 1;\n"])));
141
138
  exports.CardOverlay = CardOverlay;
142
- var InfoLength = _styledComponents.default.p(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n font-size: 16px;\n font-weight: 600;\n"])));
139
+ var InfoLength = _styledComponents.default.p(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n font-size: 16px;\n font-weight: 600;\n"])));
143
140
  exports.InfoLength = InfoLength;
144
- var InfoDescription = _styledComponents.default.p(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n font-size: 12px;\n"])));
141
+ var InfoDescription = _styledComponents.default.p(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n font-size: 12px;\n"])));
145
142
  exports.InfoDescription = InfoDescription;
146
- var RibbonBox = _styledComponents.default.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n position: absolute;\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n top: -4px;\n right: -3px;\n background-color: ", ";\n max-width: 180px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
143
+ var RibbonBox = _styledComponents.default.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n position: absolute;\n padding: 2px 8px;\n box-sizing: border-box;\n z-index: 10;\n color: ", ";\n font-weight: 400;\n font-size: 10px;\n line-height: 13px;\n top: -4px;\n right: -3px;\n background-color: ", ";\n max-width: 180px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
147
144
  return props.theme.colors.colorTextSignForm;
148
145
  }, function (props) {
149
146
  return props.theme.colors.primary;
150
147
  }, function (props) {
151
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n left: -3px;\n right: initial;\n "])));
148
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n left: -3px;\n right: initial;\n "])));
149
+ }, function (_ref17) {
150
+ var bgColor = _ref17.bgColor;
151
+ return bgColor && (0, _styledComponents.css)(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
152
152
  }, function (_ref18) {
153
- var bgColor = _ref18.bgColor;
154
- return bgColor && (0, _styledComponents.css)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), bgColor);
153
+ var isRoundRect = _ref18.isRoundRect;
154
+ return isRoundRect && (0, _styledComponents.css)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
155
155
  }, function (_ref19) {
156
- var isRoundRect = _ref19.isRoundRect;
157
- return isRoundRect && (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n "])));
156
+ var isCapsule = _ref19.isCapsule;
157
+ return isCapsule && (0, _styledComponents.css)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
158
158
  }, function (_ref20) {
159
- var isCapsule = _ref20.isCapsule;
160
- return isCapsule && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n border-radius: 50px;\n "])));
159
+ var colorText = _ref20.colorText;
160
+ return colorText && (0, _styledComponents.css)(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
161
161
  }, function (_ref21) {
162
- var colorText = _ref21.colorText;
163
- return colorText && (0, _styledComponents.css)(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorText ? 'black' : 'white');
164
- }, function (_ref22) {
165
- var borderRibbon = _ref22.borderRibbon;
166
- return borderRibbon && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
162
+ var borderRibbon = _ref21.borderRibbon;
163
+ return borderRibbon && (0, _styledComponents.css)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), borderRibbon ? 'black' : 'white');
167
164
  });
168
165
  exports.RibbonBox = RibbonBox;
169
- var FavoriteWrapper = _styledComponents.default.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-left: 15px;\n ", "\n\n svg {\n font-size: 16px;\n color: ", ";\n }\n"])), function (props) {
170
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n margin-right: 15px;\n margin-left: 0px;\n "])));
166
+ var FavoriteWrapper = _styledComponents.default.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-left: 15px;\n ", "\n\n svg {\n font-size: 16px;\n color: ", ";\n }\n"])), function (props) {
167
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n margin-right: 15px;\n margin-left: 0px;\n "])));
171
168
  }, function (props) {
172
169
  return props.theme.colors.danger500;
173
170
  });
@@ -62,6 +62,13 @@ var BusinessInformationUI = function BusinessInformationUI(props) {
62
62
  var hideImages = theme === null || theme === void 0 ? void 0 : (_theme$business_view32 = theme.business_view) === null || _theme$business_view32 === void 0 ? void 0 : (_theme$business_view33 = _theme$business_view32.components) === null || _theme$business_view33 === void 0 ? void 0 : (_theme$business_view34 = _theme$business_view33.information) === null || _theme$business_view34 === void 0 ? void 0 : (_theme$business_view35 = _theme$business_view34.components) === null || _theme$business_view35 === void 0 ? void 0 : (_theme$business_view36 = _theme$business_view35.images) === null || _theme$business_view36 === void 0 ? void 0 : _theme$business_view36.hidden;
63
63
  var hideAddress = theme === null || theme === void 0 ? void 0 : (_theme$business_view37 = theme.business_view) === null || _theme$business_view37 === void 0 ? void 0 : (_theme$business_view38 = _theme$business_view37.components) === null || _theme$business_view38 === void 0 ? void 0 : (_theme$business_view39 = _theme$business_view38.information) === null || _theme$business_view39 === void 0 ? void 0 : (_theme$business_view40 = _theme$business_view39.components) === null || _theme$business_view40 === void 0 ? void 0 : (_theme$business_view41 = _theme$business_view40.address) === null || _theme$business_view41 === void 0 ? void 0 : _theme$business_view41.hidden;
64
64
  var formatTime = configs === null || configs === void 0 ? void 0 : (_configs$general_hour = configs.general_hour_format) === null || _configs$general_hour === void 0 ? void 0 : _configs$general_hour.value;
65
+ var fillStyle = {
66
+ fillColor: theme.colors.primary,
67
+ strokeColor: theme.colors.darkPrimaryColor,
68
+ fillOpacity: 0.2,
69
+ strokeWeight: 2,
70
+ editable: false
71
+ };
65
72
  var checkTime = function checkTime(val) {
66
73
  return val < 10 ? "0".concat(val) : val;
67
74
  };
@@ -87,7 +94,9 @@ var BusinessInformationUI = function BusinessInformationUI(props) {
87
94
  })), /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessTitle, null, business === null || business === void 0 ? void 0 : business.name), !hideAbout && business.about && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('BUSINESS_ABOUT', 'Business short description')), /*#__PURE__*/_react.default.createElement(_styles.Description, null, business.about)), !hideDescription && business.description && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('BUSINESS_DESCRIPTION', 'Business description')), /*#__PURE__*/_react.default.createElement(_styles.Description, null, business.description)), !hideLocation && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, businessLocation.location && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('BUSINESS_LOCATION', 'Business location')), businessLocation.location && /*#__PURE__*/_react.default.createElement(_styles.Map, null, /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.GoogleMapsMap, {
88
95
  apiKey: configs === null || configs === void 0 ? void 0 : (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value,
89
96
  location: businessLocation.location,
90
- mapControls: businessLocation.googleMapsControls || business.googleMapsControls
97
+ mapControls: businessLocation.googleMapsControls || business.googleMapsControls,
98
+ businessZones: business === null || business === void 0 ? void 0 : business.zones,
99
+ fillStyle: fillStyle
91
100
  }))), !hideAddress && (business === null || business === void 0 ? void 0 : business.address) && /*#__PURE__*/_react.default.createElement(_styles.BusinessAddress, null, business === null || business === void 0 ? void 0 : business.address), (business === null || business === void 0 ? void 0 : business.address_notes) && /*#__PURE__*/_react.default.createElement(_styles.BusinessAddressNotes, null, business === null || business === void 0 ? void 0 : business.address_notes), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), (businessSchedule === null || businessSchedule === void 0 ? void 0 : businessSchedule.length) > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !hideSchedule && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('OPENING_TIME', 'Opening time')), /*#__PURE__*/_react.default.createElement(_styles.ScheduleSection, null, /*#__PURE__*/_react.default.createElement(_styles.ScheduleContainer, null, businessSchedule.map(function (schedule, i) {
92
101
  return /*#__PURE__*/_react.default.createElement(_ScheduleAccordion.ScheduleAccordion, {
93
102
  key: i,
@@ -41,7 +41,7 @@ var SectionTitle = _styledComponents.default.h3(_templateObject8 || (_templateOb
41
41
  return props.theme.colors.darkTextColor;
42
42
  });
43
43
  exports.SectionTitle = SectionTitle;
44
- var Map = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: calc(100% + 20px);\n margin-left: -10px;\n height: 250px;\n > div {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n }\n @media(min-width: 768px){\n width: calc(100% + 40px);\n margin-left: -20px;\n }\n"])));
44
+ var Map = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: calc(100% + 20px);\n margin-left: -10px;\n height: 300px;\n > div {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n }\n @media(min-width: 768px){\n width: calc(100% + 40px);\n margin-left: -20px;\n }\n"])));
45
45
  exports.Map = Map;
46
46
  var ScheduleSection = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 100%;\n margin-bottom: 35px;\n"])));
47
47
  exports.ScheduleSection = ScheduleSection;
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
34
34
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
35
35
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
36
36
  var BusinessProductsListUI = function BusinessProductsListUI(props) {
37
- var _configs$use_parent_c, _configs$use_parent_c2, _categoryState$produc, _props$beforeElements, _props$beforeComponen, _category$subcategori2, _category$subcategori3, _category$subcategori4, _category$subcategori5, _categoryState$produc2, _categoryState$produc3, _categoryState$produc4, _props$afterComponent, _props$afterElements;
37
+ var _configs$use_parent_c, _configs$use_parent_c2, _categoryState$produc, _props$beforeElements, _props$beforeComponen, _category$subcategori2, _category$subcategori3, _category$subcategori4, _category$subcategori5, _categoryState$produc2, _categoryState$produc3, _categoryState$produc4, _categoryState$produc9, _props$afterComponent, _props$afterElements;
38
38
  var errors = props.errors,
39
39
  businessId = props.businessId,
40
40
  isLazy = props.isLazy,
@@ -357,7 +357,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
357
357
  key: "skeleton:".concat(i),
358
358
  isSkeleton: true
359
359
  });
360
- })), !categoryState.loading && !isBusinessLoading && categoryState.products.length === 0 && !(searchValue && errorQuantityProducts || !searchValue && !errorQuantityProducts) && /*#__PURE__*/_react.default.createElement(_styles.WrapperNotFound, null, /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
360
+ })), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && !isBusinessLoading && (categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc9 = categoryState.products) === null || _categoryState$produc9 === void 0 ? void 0 : _categoryState$produc9.length) === 0 && !(!searchValue && !errorQuantityProducts) && /*#__PURE__*/_react.default.createElement(_styles.WrapperNotFound, null, /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
361
361
  content: !searchValue ? t('ERROR_NOT_FOUND_PRODUCTS_TIME', 'No products found at this time') : t('ERROR_NOT_FOUND_PRODUCTS', 'No products found, please change filters.'),
362
362
  btnTitle: !searchValue ? t('SEARCH_REDIRECT', 'Go to Businesses') : t('CLEAR_FILTERS', 'Clear filters'),
363
363
  onClickButton: function onClickButton() {
@@ -81,7 +81,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
81
81
  priceFilterValues = props.priceFilterValues,
82
82
  handleUpdateProfessionals = props.handleUpdateProfessionals,
83
83
  isCustomerMode = props.isCustomerMode,
84
- isCustomLayout = props.isCustomLayout;
84
+ isCustomLayout = props.isCustomLayout,
85
+ notFound = props.notFound,
86
+ setNotFound = props.setNotFound;
85
87
  var business = businessState.business,
86
88
  loading = businessState.loading,
87
89
  error = businessState.error;
@@ -266,6 +268,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
266
268
  handleUpdateInitialRender(false);
267
269
  updateProductModal(null);
268
270
  setCurProduct(null);
271
+ setNotFound(false);
269
272
  onProductRedirect({
270
273
  slug: business === null || business === void 0 ? void 0 : business.slug
271
274
  });
@@ -559,7 +562,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
559
562
  count: props.useKioskApp ? 12 : 8
560
563
  }))), productModal.error && productModal.error.length > 0 && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
561
564
  content: ((_productModal$error$ = productModal.error[0]) === null || _productModal$error$ === void 0 ? void 0 : _productModal$error$.message) || productModal.error[0]
562
- }), isInitialRender && !productModal.loading && !productModal.error && !productModal.product && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
565
+ }), isInitialRender && !productModal.loading && !productModal.error && !productModal.product && notFound && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
563
566
  content: t('ERROR_GET_PRODUCT', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag16 = theme.defaultLanguages) === null || _theme$defaultLanguag16 === void 0 ? void 0 : _theme$defaultLanguag16.ERROR_GET_PRODUCT) || 'Sorry, we couldn\'t find the requested product.')
564
567
  }), (productModal.product || curProduct) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ((productModal === null || productModal === void 0 ? void 0 : (_productModal$product2 = productModal.product) === null || _productModal$product2 === void 0 ? void 0 : _productModal$product2.type) === 'service' || (curProduct === null || curProduct === void 0 ? void 0 : curProduct.type) === 'service') && (business === null || business === void 0 ? void 0 : (_business$professiona2 = business.professionals) === null || _business$professiona2 === void 0 ? void 0 : _business$professiona2.length) > 0 ? /*#__PURE__*/_react.default.createElement(_ServiceForm.ServiceForm, {
565
568
  businessSlug: business === null || business === void 0 ? void 0 : business.slug,
@@ -154,7 +154,8 @@ var CheckoutUI = function CheckoutUI(props) {
154
154
  setIsSuccess = _useState16[1];
155
155
  var _useState17 = (0, _react.useState)({
156
156
  login: false,
157
- signup: false
157
+ signup: false,
158
+ isGuest: false
158
159
  }),
159
160
  _useState18 = _slicedToArray(_useState17, 2),
160
161
  openModal = _useState18[0],
@@ -168,6 +169,7 @@ var CheckoutUI = function CheckoutUI(props) {
168
169
  cardList = _useState22[0],
169
170
  setCardList = _useState22[1];
170
171
  var cardsMethods = ['stripe', 'credomatic'];
172
+ var stripePaymethods = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect'];
171
173
  var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0 ? void 0 : (_businessDetails$busi2 = businessDetails.business) === null || _businessDetails$busi2 === void 0 ? void 0 : _businessDetails$busi2.configs) !== null && _businessDetails$busi !== void 0 ? _businessDetails$busi : [];
172
174
  var isTableNumberEnabled = configs === null || configs === void 0 ? void 0 : (_configs$table_numer_ = configs.table_numer_enabled) === null || _configs$table_numer_ === void 0 ? void 0 : _configs$table_numer_.value;
173
175
  var isWalletCashEnabled = ((_businessConfigs$find = businessConfigs.find(function (config) {
@@ -209,7 +211,14 @@ var CheckoutUI = function CheckoutUI(props) {
209
211
  return b.business_id === (cart === null || cart === void 0 ? void 0 : cart.business_id) && b.accumulates;
210
212
  });
211
213
  var handlePlaceOrder = function handlePlaceOrder() {
212
- if (!userErrors.length && (!(requiredFields !== null && requiredFields !== void 0 && requiredFields.length) || allowedGuest)) {
214
+ if (stripePaymethods.includes(paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) && user !== null && user !== void 0 && user.guest_id) {
215
+ setOpenModal(_objectSpread(_objectSpread({}, openModal), {}, {
216
+ signup: true,
217
+ isGuest: true
218
+ }));
219
+ return;
220
+ }
221
+ if (!userErrors.length && (!(requiredFields !== null && requiredFields !== void 0 && requiredFields.length) || allowedGuest && ((paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'cash' || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'card_delivery'))) {
213
222
  var body = {};
214
223
  if (behalfName) {
215
224
  body.on_behalf_of = behalfName;
@@ -282,8 +291,10 @@ var CheckoutUI = function CheckoutUI(props) {
282
291
  user: user,
283
292
  token: user === null || user === void 0 ? void 0 : (_user$session = user.session) === null || _user$session === void 0 ? void 0 : _user$session.access_token
284
293
  });
294
+ (openModal === null || openModal === void 0 ? void 0 : openModal.isGuest) && handlePlaceOrderAsGuest();
285
295
  setOpenModal(_objectSpread(_objectSpread({}, openModal), {}, {
286
- signup: false
296
+ signup: false,
297
+ isGuest: false
287
298
  }));
288
299
  };
289
300
  var handleSuccessLogin = function handleSuccessLogin(user) {
@@ -580,6 +591,7 @@ var CheckoutUI = function CheckoutUI(props) {
580
591
  isEdit: true,
581
592
  isModal: true,
582
593
  handlePlaceOrderAsGuest: handlePlaceOrderAsGuest,
594
+ isAllowGuest: (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'cash' || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'card_delivery',
583
595
  onClose: function onClose() {
584
596
  setIsOpen(false);
585
597
  handlePlaceOrder();
@@ -590,7 +602,8 @@ var CheckoutUI = function CheckoutUI(props) {
590
602
  padding: "30px",
591
603
  onClose: function onClose() {
592
604
  return setOpenModal(_objectSpread(_objectSpread({}, openModal), {}, {
593
- signup: false
605
+ signup: false,
606
+ isGuest: false
594
607
  }));
595
608
  }
596
609
  }, /*#__PURE__*/_react.default.createElement(_SignUpForm.SignUpForm, {
@@ -165,7 +165,7 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
165
165
  onClick: handleFindBusinesses
166
166
  }, t('FIND_BUSINESSES', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.FIND_BUSINESSES) || 'Find businesses')))), windowSize.width < 576 && !auth && isShowLoginAccount && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, enabledPoweredByOrdering && /*#__PURE__*/_react.default.createElement(_styles.PoweredByOrdering, null, t('POWERED_BY', 'Powered by'), /*#__PURE__*/_react.default.createElement("a", {
167
167
  href: "https://www.ordering.co"
168
- }, ' ', t('ORDERING_CO', 'Ordering.co'))), /*#__PURE__*/_react.default.createElement(_styles.UseAccount, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, t('YOUR_ACCOUNT', 'Use your account')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
168
+ }, t('ORDERING_CO', 'Ordering.co'))), /*#__PURE__*/_react.default.createElement(_styles.UseAccount, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, t('YOUR_ACCOUNT', 'Use your account')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
169
169
  color: "primary",
170
170
  onClick: function onClick() {
171
171
  return handleOpenLoginSignUp('login');
@@ -79,5 +79,5 @@ var LogoWrapper = _styledComponents.default.div(_templateObject20 || (_templateO
79
79
  exports.LogoWrapper = LogoWrapper;
80
80
  var HeroContent = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n button{\n font-size: 12px;\n line-height: 18px;\n padding: 10px 16px;\n margin-bottom: 45px;\n white-space: nowrap;\n\n @media (min-width: 576px) {\n padding-top: 5px;\n padding-bottom: 5px;\n font-size: 18px;\n width: 180px;\n line-height: initial;\n }\n }\n"])));
81
81
  exports.HeroContent = HeroContent;
82
- var PoweredByOrdering = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n text-align: center;\n margin-top: 10px;\n a{\n font-weight: 600;\n }\n"])));
82
+ var PoweredByOrdering = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n text-align: center;\n margin-top: 10px;\n a{\n font-weight: 600;\n margin-left: 5px;\n }\n"])));
83
83
  exports.PoweredByOrdering = PoweredByOrdering;
@@ -22,7 +22,7 @@ var CardWrapper = _styledComponents.default.div(_templateObject4 || (_templateOb
22
22
  exports.CardWrapper = CardWrapper;
23
23
  var CardsContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n"])));
24
24
  exports.CardsContainer = CardsContainer;
25
- var CardsContainerWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-bottom: 10px;\n display: flex;\n overflow: auto hidden;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n ", "\n"])), function (_ref2) {
25
+ var CardsContainerWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-bottom: 10px;\n display: flex;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n ", "\n"])), function (_ref2) {
26
26
  var isLoading = _ref2.isLoading;
27
27
  return isLoading && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n }\n "])));
28
28
  });
@@ -510,7 +510,7 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
510
510
  var disableRightButton = [1, 2, 5, 15, 16, 17, 21];
511
511
  return /*#__PURE__*/_react.default.createElement(_styles.Container, null, !loading && order && Object.keys(order).length > 0 && !(openMessages.driver || openMessages.business) && /*#__PURE__*/_react.default.createElement(_styles.WrapperContainer, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperLeftContainer, null, /*#__PURE__*/_react.default.createElement(_styles.OrderInfo, null, /*#__PURE__*/_react.default.createElement(_styles.TitleContainer, null, /*#__PURE__*/_react.default.createElement(_styles.OrderIdSec, null, isService ? t('APPOINTMENT', 'Appointment') : t('ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.ORDER) || 'Order'), " #", order === null || order === void 0 ? void 0 : order.id), enabledPoweredByOrdering && /*#__PURE__*/_react.default.createElement(_styles.PoweredByOrdering, null, t('POWERED_BY', 'Powered by'), /*#__PURE__*/_react.default.createElement("a", {
512
512
  href: "https://www.ordering.co"
513
- }, ' ', t('ORDERING_CO', 'Ordering.co'))), parseInt(configs === null || configs === void 0 ? void 0 : (_configs$guest_uuid_a = configs.guest_uuid_access) === null || _configs$guest_uuid_a === void 0 ? void 0 : _configs$guest_uuid_a.value, 10) && (order === null || order === void 0 ? void 0 : order.hash_key) && /*#__PURE__*/_react.default.createElement(_styles.Content, {
513
+ }, t('ORDERING_CO', 'Ordering.co'))), parseInt(configs === null || configs === void 0 ? void 0 : (_configs$guest_uuid_a = configs.guest_uuid_access) === null || _configs$guest_uuid_a === void 0 ? void 0 : _configs$guest_uuid_a.value, 10) && (order === null || order === void 0 ? void 0 : order.hash_key) && /*#__PURE__*/_react.default.createElement(_styles.Content, {
514
514
  className: "order-content"
515
515
  }, /*#__PURE__*/_react.default.createElement(_styles.ShareOrder, null, /*#__PURE__*/_react.default.createElement("div", {
516
516
  className: "wrap"
@@ -187,5 +187,5 @@ var ProfessionalBlock = _styledComponents.default.div(_templateObject66 || (_tem
187
187
  exports.ProfessionalBlock = ProfessionalBlock;
188
188
  var PlaceSpotWrapper = _styledComponents.default.div(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\n @media (min-width: 768px) {\n width: calc(100% - 20px);\n }\n"])));
189
189
  exports.PlaceSpotWrapper = PlaceSpotWrapper;
190
- var PoweredByOrdering = _styledComponents.default.p(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n text-align: center;\n margin: 0;\n display: flex;\n justify-content: center;\n white-space: pre !important;\n margin-bottom: 10px;\n a{\n font-weight: 600;\n }\n a:hover{\n text-decoration: underline;\n }\n"])));
190
+ var PoweredByOrdering = _styledComponents.default.p(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n text-align: center;\n margin: 0;\n display: flex;\n justify-content: center;\n white-space: pre !important;\n margin-bottom: 10px;\n a{\n font-weight: 600;\n margin-left: 5px;\n }\n a:hover{\n text-decoration: underline;\n }\n"])));
191
191
  exports.PoweredByOrdering = PoweredByOrdering;
@@ -635,7 +635,10 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
635
635
  }, props));
636
636
  })), /*#__PURE__*/_react.default.createElement(_styles.ProductActions, {
637
637
  isColumn: auth && !((_orderState$options3 = orderState.options) !== null && _orderState$options3 !== void 0 && _orderState$options3.address_id || unaddressedTypes.includes(orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.type))
638
- }, /*#__PURE__*/_react.default.createElement("div", {
638
+ }, actionStatus !== null && actionStatus !== void 0 && actionStatus.loading || orderState.loading ? /*#__PURE__*/_react.default.createElement(_styles.LoadingWrapper, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
639
+ height: 35,
640
+ width: 150
641
+ })) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
639
642
  className: "price-amount-block"
640
643
  }, /*#__PURE__*/_react.default.createElement("div", {
641
644
  className: "price"
@@ -698,10 +701,7 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
698
701
  }
699
702
  }, isSoldOut || maxProductQuantity <= 0 ? t('SOLD_OUT', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.SOLD_OUT) || 'Sold out') : t('LOGIN_SIGNUP', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag9 = theme.defaultLanguages) === null || _theme$defaultLanguag9 === void 0 ? void 0 : _theme$defaultLanguag9.LOGIN_SIGNUP) || 'Login / Sign Up')), !auth && guestCheckoutEnabled && orderTypeEnabled && /*#__PURE__*/_react.default.createElement(_styles.GuestUserLink, {
700
703
  onClick: handleUpdateGuest
701
- }, actionStatus !== null && actionStatus !== void 0 && actionStatus.loading ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
702
- height: 25,
703
- width: 70
704
- }) : t('WITH_GUEST_USER', 'With Guest user'))))), modalIsOpen && !auth && /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
704
+ }, t('WITH_GUEST_USER', 'With Guest user')))))), modalIsOpen && !auth && /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
705
705
  open: modalIsOpen,
706
706
  onClose: function onClose() {
707
707
  return closeModal();
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.WrapperSubOption = exports.WrapperIngredients = exports.WrapperImage = exports.WeightUnitSwitch = exports.WeightUnitItem = exports.VideoGalleryWrapper = exports.TitleWrapper = exports.SwiperWrapper = exports.SkuContent = exports.SkeletonBlock = exports.SectionTitle = exports.Properties = exports.ProductTagsListContainer = exports.ProductTagWrapper = exports.ProductTabContainer = exports.ProductShareWrapper = exports.ProductName = exports.ProductMeta = exports.ProductInfo = exports.ProductFormTitle = exports.ProductEdition = exports.ProductDescription = exports.ProductContainer = exports.ProductComment = exports.ProductActions = exports.PriceContent = exports.GuestUserLink = exports.EstimatedPersons = exports.Divider = void 0;
7
+ exports.WrapperSubOption = exports.WrapperIngredients = exports.WrapperImage = exports.WeightUnitSwitch = exports.WeightUnitItem = exports.VideoGalleryWrapper = exports.TitleWrapper = exports.SwiperWrapper = exports.SkuContent = exports.SkeletonBlock = exports.SectionTitle = exports.Properties = exports.ProductTagsListContainer = exports.ProductTagWrapper = exports.ProductTabContainer = exports.ProductShareWrapper = exports.ProductName = exports.ProductMeta = exports.ProductInfo = exports.ProductFormTitle = exports.ProductEdition = exports.ProductDescription = exports.ProductContainer = exports.ProductComment = exports.ProductActions = exports.PriceContent = exports.LoadingWrapper = exports.GuestUserLink = exports.EstimatedPersons = exports.Divider = 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, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48;
9
+ 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, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49;
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) } })); }
@@ -147,4 +147,6 @@ var GuestUserLink = _styledComponents.default.div(_templateObject47 || (_templat
147
147
  }, function (props) {
148
148
  return props.theme.rtl && (0, _styledComponents.css)(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px;\n "])));
149
149
  });
150
- exports.GuestUserLink = GuestUserLink;
150
+ exports.GuestUserLink = GuestUserLink;
151
+ var LoadingWrapper = _styledComponents.default.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: center;\n"])));
152
+ exports.LoadingWrapper = LoadingWrapper;
@@ -122,6 +122,11 @@ var ProductItemAccordion = function ProductItemAccordion(props) {
122
122
  var pos = position ? "(".concat(position, ")") : '';
123
123
  return "".concat(quantity, " x ").concat(name, " ").concat(pos, " +").concat(price);
124
124
  };
125
+ (0, _react.useEffect)(function () {
126
+ if (setActive === 'active') {
127
+ setHeightState("".concat(content.current.scrollHeight, "px"));
128
+ }
129
+ }, [product, setActive]);
125
130
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
126
131
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
127
132
  key: i
@@ -183,7 +183,7 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
183
183
  return handleChangeSortBy && handleChangeSortBy(val);
184
184
  },
185
185
  businessState: businessState
186
- }))), !(business !== null && business !== void 0 && business.loading) && (business === null || business === void 0 ? void 0 : (_business$previously_ = business.previously_products) === null || _business$previously_ === void 0 ? void 0 : _business$previously_.length) > 0 && !hidePreviousOrdered && !categoryClicked && /*#__PURE__*/_react.default.createElement(_OrderItAgain.OrderItAgain, {
186
+ }))), !(business !== null && business !== void 0 && business.loading) && (business === null || business === void 0 ? void 0 : (_business$previously_ = business.previously_products) === null || _business$previously_ === void 0 ? void 0 : _business$previously_.length) > 0 && !hidePreviousOrdered && windowSize.width < 993 && !categoryClicked && /*#__PURE__*/_react.default.createElement(_OrderItAgain.OrderItAgain, {
187
187
  onProductClick: onProductClick,
188
188
  productList: business === null || business === void 0 ? void 0 : business.previously_products,
189
189
  businessId: business === null || business === void 0 ? void 0 : business.id
@@ -44,7 +44,7 @@ var CancelButton = _styledComponents.default.div(_templateObject10 || (_template
44
44
  exports.CancelButton = CancelButton;
45
45
  var LogoHeader = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: none; \n @media (min-width: 768px) {\n cursor: pointer;\n display: flex;\n }\n"])));
46
46
  exports.LogoHeader = LogoHeader;
47
- var BusinessProductsListContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background-color: ", ";\n padding: 30px 0;\n max-height: calc(100vh - 88px);\n overflow: auto;\n"])), function (props) {
47
+ var BusinessProductsListContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background-color: ", ";\n max-height: calc(100vh - 88px);\n overflow: auto;\n"])), function (props) {
48
48
  return props.theme.colors.backgroundPage;
49
49
  });
50
50
  exports.BusinessProductsListContainer = BusinessProductsListContainer;
@@ -61,7 +61,8 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
61
61
  isOldLayout = props.isOldLayout,
62
62
  requiredFields = props.requiredFields,
63
63
  handleChangeNotifications = props.handleChangeNotifications,
64
- handlePlaceOrderAsGuest = props.handlePlaceOrderAsGuest;
64
+ handlePlaceOrderAsGuest = props.handlePlaceOrderAsGuest,
65
+ isAllowGuest = props.isAllowGuest;
65
66
  var formMethods = (0, _reactHookForm.useForm)();
66
67
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
67
68
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
@@ -440,7 +441,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
440
441
  return setModalIsOpen(true);
441
442
  },
442
443
  disabled: formState.loading
443
- }, formState.loading ? t('UPDATING', 'Updating...') : t('SIGN_UP_AND_PLACE_ORDER', 'Sign up and place order')), /*#__PURE__*/_react.default.createElement(_styles.TextLinkWrapper, null, /*#__PURE__*/_react.default.createElement("span", {
444
+ }, formState.loading ? t('UPDATING', 'Updating...') : t('SIGN_UP_AND_PLACE_ORDER', 'Sign up and place order')), isAllowGuest && /*#__PURE__*/_react.default.createElement(_styles.TextLinkWrapper, null, /*#__PURE__*/_react.default.createElement("span", {
444
445
  onClick: function onClick() {
445
446
  return handlePlaceOrderAsGuest();
446
447
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "5.0.5",
3
+ "version": "6.0.0",
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": "4.0.3",
90
+ "ordering-components-external": "5.0.0",
91
91
  "payment": "^2.4.6",
92
92
  "polished": "^3.6.6",
93
93
  "react-bootstrap-icons": "^1.7.2",
@@ -406,11 +406,11 @@ const AddressListUI = (props) => {
406
406
  )
407
407
  }
408
408
 
409
- export const AddressList = (props) => {
409
+ export const AddressList = React.memo((props) => {
410
410
  const addressListProps = {
411
411
  ...props,
412
412
  UIComponent: AddressListUI
413
413
  }
414
414
 
415
415
  return <AddressListController {...addressListProps} />
416
- }
416
+ })
@@ -9,6 +9,8 @@ import { LoginForm } from '../LoginForm'
9
9
  import { SignUpForm } from '../SignUpForm'
10
10
  import { ForgotPasswordForm } from '../ForgotPasswordForm'
11
11
  import { convertHoursToMinutes, lightenDarkenColor, shape } from '../../../../../utils'
12
+ import BiCar from '@meronex/icons/bi/BiCar'
13
+ import BiBasket from '@meronex/icons/bi/BiBasket'
12
14
 
13
15
  import {
14
16
  ContainerCard,
@@ -131,7 +133,7 @@ const BusinessControllerUI = (props) => {
131
133
  })
132
134
  }
133
135
 
134
- const hasInformationLength = (business?.available_drivers?.length + business?.busy_drivers?.length + business?.active_orders?.length) > 0
136
+ const hasInformationLength = !!business?.idle_drivers_count || !!business?.busy_drivers_count || !!business?.activated_orders
135
137
 
136
138
  if (typeButton) {
137
139
  return (
@@ -273,28 +275,22 @@ const BusinessControllerUI = (props) => {
273
275
  )}
274
276
  {isCustomerMode && hasInformationLength && (
275
277
  <CallCenterInformation>
276
- {business?.available_drivers?.length > 0 && (
277
- <CallCenterInformationBullet>
278
- <InfoLength>
279
- {business?.available_drivers?.length}
280
- </InfoLength>
281
- <InfoDescription>{t('OPEN_ORDERS', 'Open orders')}</InfoDescription>
278
+ {business?.idle_drivers_count > 0 && (
279
+ <CallCenterInformationBullet bgcolor='green'>
280
+ <BiCar />
281
+ {business?.idle_drivers_count}
282
282
  </CallCenterInformationBullet>
283
283
  )}
284
- {business?.busy_drivers?.length > 0 && (
285
- <CallCenterInformationBullet>
286
- <InfoLength>
287
- {business?.busy_drivers?.length}
288
- </InfoLength>
289
- <InfoDescription>{t('BUSY_DRIVERS', 'Busy drivers')}</InfoDescription>
284
+ {business?.busy_drivers_count > 0 && (
285
+ <CallCenterInformationBullet bgcolor='red'>
286
+ <BiCar />
287
+ {business?.busy_drivers_count}
290
288
  </CallCenterInformationBullet>
291
289
  )}
292
- {business?.active_orders?.length > 0 && (
293
- <CallCenterInformationBullet>
294
- <InfoLength>
295
- {business?.active_orders?.length}
296
- </InfoLength>
297
- <InfoDescription>{t('AVAILABLE_DRIVERS', 'Avalable drivers')}</InfoDescription>
290
+ {business?.activated_orders > 0 && (
291
+ <CallCenterInformationBullet bgcolor='rgb(252,225,5)'>
292
+ <BiBasket />
293
+ {business?.activated_orders}
298
294
  </CallCenterInformationBullet>
299
295
  )}
300
296
  </CallCenterInformation>