ordering-ui-external 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.cf22ed960e0a8685bf74.js → 0.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{1.ordering-ui.cf22ed960e0a8685bf74.js → 1.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{2.ordering-ui.cf22ed960e0a8685bf74.js → 2.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{4.ordering-ui.cf22ed960e0a8685bf74.js → 4.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{5.ordering-ui.cf22ed960e0a8685bf74.js → 5.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{6.ordering-ui.cf22ed960e0a8685bf74.js → 6.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{7.ordering-ui.cf22ed960e0a8685bf74.js → 7.ordering-ui.67fc029cdff9bbdf3d6a.js} +2 -2
- package/_bundles/{8.ordering-ui.cf22ed960e0a8685bf74.js → 8.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{9.ordering-ui.cf22ed960e0a8685bf74.js → 9.ordering-ui.67fc029cdff9bbdf3d6a.js} +1 -1
- package/_bundles/{ordering-ui.cf22ed960e0a8685bf74.js → ordering-ui.67fc029cdff9bbdf3d6a.js} +2 -2
- package/_bundles/{ordering-ui.cf22ed960e0a8685bf74.js.LICENSE.txt → ordering-ui.67fc029cdff9bbdf3d6a.js.LICENSE.txt} +8 -0
- package/_modules/components/UserProfileForm/index.js +1 -1
- package/_modules/components/VerticalOrdersLayout/index.js +3 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -46
- package/_modules/themes/five/src/components/Cart/index.js +3 -3
- package/_modules/themes/five/src/components/CartContent/index.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +5 -4
- package/_modules/themes/five/src/components/MultiCheckout/index.js +4 -4
- package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +4 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +2 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +22 -10
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +15 -9
- package/_modules/themes/five/src/components/ReviewOrder/styles.js +1 -1
- package/_modules/themes/five/src/components/Wallets/index.js +1 -1
- package/_modules/utils/index.js +10 -10
- package/package.json +2 -2
- package/src/components/UserProfileForm/index.js +1 -2
- package/src/components/VerticalOrdersLayout/index.js +3 -1
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +15 -9
- package/src/themes/five/src/components/Cart/index.js +5 -3
- package/src/themes/five/src/components/CartContent/index.js +3 -0
- package/src/themes/five/src/components/Header/index.js +17 -11
- package/src/themes/five/src/components/MultiCheckout/index.js +1 -1
- package/src/themes/five/src/components/OrderDetails/OrderEta.js +4 -3
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +9 -3
- package/src/themes/five/src/components/OrdersOption/index.js +11 -1
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +12 -6
- package/src/themes/five/src/components/ReviewOrder/styles.js +2 -1
- package/src/themes/five/src/components/Wallets/index.js +1 -1
- package/src/utils/index.js +10 -10
- package/template/app.js +2 -1
- /package/_bundles/{7.ordering-ui.cf22ed960e0a8685bf74.js.LICENSE.txt → 7.ordering-ui.67fc029cdff9bbdf3d6a.js.LICENSE.txt} +0 -0
|
@@ -20,12 +20,12 @@ var _MdRadioButtonUnchecked = _interopRequireDefault(require("@meronex/icons/md/
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
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); }
|
|
22
22
|
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; }
|
|
23
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
26
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
27
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
27
28
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
28
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
30
30
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
31
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -43,7 +43,8 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
43
43
|
toggleSelect = props.toggleSelect,
|
|
44
44
|
changePosition = props.changePosition,
|
|
45
45
|
isSoldOut = props.isSoldOut,
|
|
46
|
-
setIsScrollAvailable = props.setIsScrollAvailable
|
|
46
|
+
setIsScrollAvailable = props.setIsScrollAvailable,
|
|
47
|
+
onChange = props.onChange;
|
|
47
48
|
var disableIncrement = option !== null && option !== void 0 && option.limit_suboptions_by_max ? balance === (option === null || option === void 0 ? void 0 : option.max) || state.quantity === suboption.max : state.quantity === (suboption === null || suboption === void 0 ? void 0 : suboption.max) || !state.selected && balance === (option === null || option === void 0 ? void 0 : option.max);
|
|
48
49
|
var price = option !== null && option !== void 0 && option.with_half_option && suboption !== null && suboption !== void 0 && suboption.half_price && state.position !== 'whole' ? suboption === null || suboption === void 0 ? void 0 : suboption.half_price : suboption === null || suboption === void 0 ? void 0 : suboption.price;
|
|
49
50
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
@@ -58,10 +59,7 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
58
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
59
60
|
showMessage = _useState2[0],
|
|
60
61
|
setShowMessage = _useState2[1];
|
|
61
|
-
var
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
isDirty = _useState4[0],
|
|
64
|
-
setIsDirty = _useState4[1];
|
|
62
|
+
var dirtyRef = (0, _react.useRef)(null);
|
|
65
63
|
var handleIncrement = function handleIncrement(e) {
|
|
66
64
|
e.stopPropagation();
|
|
67
65
|
increment();
|
|
@@ -76,8 +74,8 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
76
74
|
};
|
|
77
75
|
var handleSuboptionClick = function handleSuboptionClick() {
|
|
78
76
|
var _option$suboptions;
|
|
77
|
+
dirtyRef.current = true;
|
|
79
78
|
toggleSelect();
|
|
80
|
-
setIsDirty(true);
|
|
81
79
|
if (balance === (option === null || option === void 0 ? void 0 : option.max) && (option === null || option === void 0 ? void 0 : (_option$suboptions = option.suboptions) === null || _option$suboptions === void 0 ? void 0 : _option$suboptions.length) > balance && !((option === null || option === void 0 ? void 0 : option.min) === 1 && (option === null || option === void 0 ? void 0 : option.max) === 1) && !state.selected) {
|
|
82
80
|
setShowMessage(true);
|
|
83
81
|
}
|
|
@@ -89,11 +87,19 @@ var ProductOptionSubOptionUI = function ProductOptionSubOptionUI(props) {
|
|
|
89
87
|
}
|
|
90
88
|
}, [balance]);
|
|
91
89
|
(0, _react.useEffect)(function () {
|
|
92
|
-
if (balance === (option === null || option === void 0 ? void 0 : option.max) && state !== null && state !== void 0 && state.selected &&
|
|
93
|
-
|
|
90
|
+
if (balance === (option === null || option === void 0 ? void 0 : option.max) && state !== null && state !== void 0 && state.selected && dirtyRef) {
|
|
91
|
+
dirtyRef.current = false;
|
|
94
92
|
setIsScrollAvailable(true);
|
|
95
93
|
}
|
|
96
94
|
}, [state === null || state === void 0 ? void 0 : state.selected]);
|
|
95
|
+
(0, _react.useEffect)(function () {
|
|
96
|
+
if (dirtyRef !== null && dirtyRef !== void 0 && dirtyRef.current || !(suboption !== null && suboption !== void 0 && suboption.preselected) || !(option !== null && option !== void 0 && option.respect_to)) return;
|
|
97
|
+
var newState = _objectSpread(_objectSpread({}, state), {}, {
|
|
98
|
+
selected: suboption === null || suboption === void 0 ? void 0 : suboption.preselected,
|
|
99
|
+
quantity: state.selected ? 0 : 1
|
|
100
|
+
});
|
|
101
|
+
onChange(newState, suboption, option);
|
|
102
|
+
}, [suboption, dirtyRef, option]);
|
|
97
103
|
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) {
|
|
98
104
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
99
105
|
key: i
|
|
@@ -95,7 +95,7 @@ var CommentButton = (0, _styledComponents.default)(_Buttons.Button)(_templateObj
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
exports.CommentButton = CommentButton;
|
|
98
|
-
var ContinueContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n p{\n flex: 1
|
|
98
|
+
var ContinueContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n p{\n flex: 1;\n margin: 0;\n }\n"])));
|
|
99
99
|
exports.ContinueContainer = ContinueContainer;
|
|
100
100
|
var MultiLogosContainer = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-around;\n"])));
|
|
101
101
|
exports.MultiLogosContainer = MultiLogosContainer;
|
|
@@ -90,7 +90,7 @@ var WalletsUI = function WalletsUI(props) {
|
|
|
90
90
|
}, (_walletName$wallet$ty2 = walletName[wallet.type]) === null || _walletName$wallet$ty2 === void 0 ? void 0 : _walletName$wallet$ty2.name);
|
|
91
91
|
}))), /*#__PURE__*/_react.default.createElement(_styles.WrapContent, null, /*#__PURE__*/_react.default.createElement(_styles.Transactions, {
|
|
92
92
|
isLoyaltyLevel: !!loyaltyLevel
|
|
93
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.SectionWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BalanceElement, null, /*#__PURE__*/_react.default.createElement("h1", null, (currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.type) === 'cash' ? parsePrice(currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.balance) : currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.balance), /*#__PURE__*/_react.default.createElement("span", null, (currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.type) === 'cash' ? configs === null || configs === void 0 ? void 0 : (_configs$stripe_curre = configs.stripe_currency) === null || _configs$stripe_curre === void 0 ? void 0 : _configs$stripe_curre.value : t('POINTS', 'Points')))), /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.SectionWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BalanceElement, null, /*#__PURE__*/_react.default.createElement("h1", null, (currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.type) === 'cash' ? parsePrice(currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.balance) : currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.balance), /*#__PURE__*/_react.default.createElement("span", null, (currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.type) === 'cash' ? configs === null || configs === void 0 ? void 0 : (_configs$stripe_curre = configs.stripe_currency) === null || _configs$stripe_curre === void 0 ? void 0 : _configs$stripe_curre.value : t('POINTS', 'Points')))), /*#__PURE__*/_react.default.createElement(_GiftCardUI.GiftCardUI, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
94
94
|
className: "transactions_list"
|
|
95
95
|
}, !(transactionsList !== null && transactionsList !== void 0 && transactionsList.loading) && ((_transactionsList$lis = transactionsList.list) === null || _transactionsList$lis === void 0 ? void 0 : (_transactionsList$lis2 = _transactionsList$lis["wallet:".concat(currentWalletSelected === null || currentWalletSelected === void 0 ? void 0 : currentWalletSelected.id)]) === null || _transactionsList$lis2 === void 0 ? void 0 : _transactionsList$lis2.length) > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h2", {
|
|
96
96
|
style: {
|
package/_modules/utils/index.js
CHANGED
|
@@ -903,7 +903,7 @@ var getOrderStatus = function getOrderStatus(s) {
|
|
|
903
903
|
key: 0,
|
|
904
904
|
value: t('PENDING', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.PENDING) || 'Pending'),
|
|
905
905
|
slug: 'PENDING',
|
|
906
|
-
percentage:
|
|
906
|
+
percentage: 10
|
|
907
907
|
}, {
|
|
908
908
|
key: 1,
|
|
909
909
|
value: t('COMPLETED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.COMPLETED) || 'Completed'),
|
|
@@ -923,7 +923,7 @@ var getOrderStatus = function getOrderStatus(s) {
|
|
|
923
923
|
key: 4,
|
|
924
924
|
value: t('PREPARATION_COMPLETED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.PREPARATION_COMPLETED) || 'Preparation Completed'),
|
|
925
925
|
slug: 'PREPARATION_COMPLETED',
|
|
926
|
-
percentage:
|
|
926
|
+
percentage: 20
|
|
927
927
|
}, {
|
|
928
928
|
key: 5,
|
|
929
929
|
value: t('REJECTED_BY_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.REJECTED_BY_BUSINESS) || 'Rejected by business'),
|
|
@@ -938,17 +938,17 @@ var getOrderStatus = function getOrderStatus(s) {
|
|
|
938
938
|
key: 7,
|
|
939
939
|
value: t('ACCEPTED_BY_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag8 = theme.defaultLanguages) === null || _theme$defaultLanguag8 === void 0 ? void 0 : _theme$defaultLanguag8.ACCEPTED_BY_BUSINESS) || 'Accepted by business'),
|
|
940
940
|
slug: 'ACCEPTED_BY_BUSINESS',
|
|
941
|
-
percentage:
|
|
941
|
+
percentage: 15
|
|
942
942
|
}, {
|
|
943
943
|
key: 8,
|
|
944
944
|
value: t('ACCEPTED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag9 = theme.defaultLanguages) === null || _theme$defaultLanguag9 === void 0 ? void 0 : _theme$defaultLanguag9.ACCEPTED_BY_DRIVER) || 'Accepted by driver'),
|
|
945
945
|
slug: 'ACCEPTED_BY_DRIVER',
|
|
946
|
-
percentage:
|
|
946
|
+
percentage: 40
|
|
947
947
|
}, {
|
|
948
948
|
key: 9,
|
|
949
949
|
value: t('PICK_UP_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag10 = theme.defaultLanguages) === null || _theme$defaultLanguag10 === void 0 ? void 0 : _theme$defaultLanguag10.PICK_UP_COMPLETED_BY_DRIVER) || 'Pick up completed by driver'),
|
|
950
950
|
slug: 'PICK_UP_COMPLETED_BY_DRIVER',
|
|
951
|
-
percentage:
|
|
951
|
+
percentage: 70
|
|
952
952
|
}, {
|
|
953
953
|
key: 10,
|
|
954
954
|
value: t('PICK_UP_FAILED_BY_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag11 = theme.defaultLanguages) === null || _theme$defaultLanguag11 === void 0 ? void 0 : _theme$defaultLanguag11.PICK_UP_FAILED_BY_DRIVER) || 'Pick up Failed by driver'),
|
|
@@ -973,7 +973,7 @@ var getOrderStatus = function getOrderStatus(s) {
|
|
|
973
973
|
key: 14,
|
|
974
974
|
value: t('ORDER_NOT_READY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.ORDER_NOT_READY) || 'Order not ready'),
|
|
975
975
|
slug: 'ORDER_NOT_READY',
|
|
976
|
-
percentage:
|
|
976
|
+
percentage: 15
|
|
977
977
|
}, {
|
|
978
978
|
key: 15,
|
|
979
979
|
value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag16 = theme.defaultLanguages) === null || _theme$defaultLanguag16 === void 0 ? void 0 : _theme$defaultLanguag16.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER) || 'Order picked up completed by customer'),
|
|
@@ -993,7 +993,7 @@ var getOrderStatus = function getOrderStatus(s) {
|
|
|
993
993
|
key: 18,
|
|
994
994
|
value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag19 = theme.defaultLanguages) === null || _theme$defaultLanguag19 === void 0 ? void 0 : _theme$defaultLanguag19.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS) || 'Driver almost arrived to business'),
|
|
995
995
|
slug: 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS',
|
|
996
|
-
percentage:
|
|
996
|
+
percentage: 50
|
|
997
997
|
}, {
|
|
998
998
|
key: 19,
|
|
999
999
|
value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag20 = theme.defaultLanguages) === null || _theme$defaultLanguag20 === void 0 ? void 0 : _theme$defaultLanguag20.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER) || 'Driver almost arrived to customer'),
|
|
@@ -1008,17 +1008,17 @@ var getOrderStatus = function getOrderStatus(s) {
|
|
|
1008
1008
|
key: 21,
|
|
1009
1009
|
value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag22 = theme.defaultLanguages) === null || _theme$defaultLanguag22 === void 0 ? void 0 : _theme$defaultLanguag22.ORDER_CUSTOMER_ARRIVED_BUSINESS) || 'Customer arrived to business'),
|
|
1010
1010
|
slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
|
|
1011
|
-
percentage:
|
|
1011
|
+
percentage: 90
|
|
1012
1012
|
}, {
|
|
1013
1013
|
key: 22,
|
|
1014
1014
|
value: t('ORDER_LOOKING_FOR_DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag23 = theme.defaultLanguages) === null || _theme$defaultLanguag23 === void 0 ? void 0 : _theme$defaultLanguag23.ORDER_LOOKING_FOR_DRIVER) || 'Looking for driver'),
|
|
1015
1015
|
slug: 'ORDER_LOOKING_FOR_DRIVER',
|
|
1016
|
-
percentage:
|
|
1016
|
+
percentage: 30
|
|
1017
1017
|
}, {
|
|
1018
1018
|
key: 23,
|
|
1019
1019
|
value: t('ORDER_DRIVER_ON_WAY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag24 = theme.defaultLanguages) === null || _theme$defaultLanguag24 === void 0 ? void 0 : _theme$defaultLanguag24.ORDER_DRIVER_ON_WAY) || 'Driver on way'),
|
|
1020
1020
|
slug: 'ORDER_DRIVER_ON_WAY',
|
|
1021
|
-
percentage:
|
|
1021
|
+
percentage: 80
|
|
1022
1022
|
}];
|
|
1023
1023
|
var objectStatus = orderStatus.find(function (o) {
|
|
1024
1024
|
return o.key === status;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
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": "2.6.
|
|
90
|
+
"ordering-components-external": "2.6.1",
|
|
91
91
|
"polished": "^3.6.6",
|
|
92
92
|
"react-bootstrap-icons": "^1.7.2",
|
|
93
93
|
"react-calendar": "^3.3.1",
|
|
@@ -164,8 +164,7 @@ const UserProfileFormUI = (props) => {
|
|
|
164
164
|
) : (
|
|
165
165
|
<UserData>
|
|
166
166
|
<h1>
|
|
167
|
-
{showCustomerName && (userData?.name || user?.name)}
|
|
168
|
-
{showCustomerLastName && (userData?.lastname || user?.lastname)}
|
|
167
|
+
{showCustomerName && (userData?.name || user?.name)} {showCustomerLastName && (userData?.lastname || user?.lastname)}
|
|
169
168
|
</h1>
|
|
170
169
|
<p>{(showCustomerEmail && (userData?.email || user.email))}</p>
|
|
171
170
|
{(showCustomerCellphone && (userData?.cellphone || user?.cellphone)) && (
|
|
@@ -20,7 +20,8 @@ export const VerticalOrdersLayout = (props) => {
|
|
|
20
20
|
orders,
|
|
21
21
|
pagination,
|
|
22
22
|
loadMoreOrders,
|
|
23
|
-
handleUpdateOrderList
|
|
23
|
+
handleUpdateOrderList,
|
|
24
|
+
setRefreshOrders
|
|
24
25
|
} = props
|
|
25
26
|
|
|
26
27
|
const [, t] = useLanguage()
|
|
@@ -58,6 +59,7 @@ export const VerticalOrdersLayout = (props) => {
|
|
|
58
59
|
const handleCloseReivew = () => {
|
|
59
60
|
setReviewStatus({ order: false, product: false, driver: false })
|
|
60
61
|
setIsReviewOpen(false)
|
|
62
|
+
setRefreshOrders(true)
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const handleClickReview = (order) => {
|
|
@@ -8,12 +8,12 @@ export const BusinessContainer = styled.div`
|
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
position: relative;
|
|
10
10
|
max-height: 324px;
|
|
11
|
-
height:
|
|
11
|
+
height: 150px;
|
|
12
12
|
background-repeat: no-repeat, repeat;
|
|
13
13
|
background-size: cover;
|
|
14
14
|
object-fit: cover;
|
|
15
15
|
background-position: center;
|
|
16
|
-
min-height:
|
|
16
|
+
min-height: 150px;
|
|
17
17
|
justify-content: start;
|
|
18
18
|
align-items: flex-end;
|
|
19
19
|
|
|
@@ -21,6 +21,10 @@ export const BusinessContainer = styled.div`
|
|
|
21
21
|
background-color: #cccccc;
|
|
22
22
|
`}
|
|
23
23
|
|
|
24
|
+
${props => props.bgimage && props.isChew && css`
|
|
25
|
+
height: 180px;
|
|
26
|
+
`}
|
|
27
|
+
|
|
24
28
|
${props => props.bgimage && (!props.isClosed && !props.isChew) && css`
|
|
25
29
|
background-image: url(${props.bgimage});
|
|
26
30
|
`}
|
|
@@ -45,6 +49,8 @@ export const BusinessContainer = styled.div`
|
|
|
45
49
|
|
|
46
50
|
@media (min-width: 576px) {
|
|
47
51
|
border-radius: 7.6px;
|
|
52
|
+
height: 324px;
|
|
53
|
+
min-height: 200px;
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
|
|
@@ -54,8 +60,8 @@ export const BusinessContent = styled.div`
|
|
|
54
60
|
margin: 0;
|
|
55
61
|
margin-left: 35px;
|
|
56
62
|
margin-bottom: -35px;
|
|
57
|
-
max-height:
|
|
58
|
-
width:
|
|
63
|
+
max-height: 70px;
|
|
64
|
+
width: 70px;
|
|
59
65
|
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
|
|
60
66
|
|
|
61
67
|
@media (min-width: 576px) {
|
|
@@ -71,10 +77,10 @@ export const BusinessContent = styled.div`
|
|
|
71
77
|
`
|
|
72
78
|
|
|
73
79
|
export const WrapperBusinessLogo = styled.div`
|
|
74
|
-
max-width:
|
|
75
|
-
max-height:
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
80
|
+
max-width: 70px;
|
|
81
|
+
max-height: 70px;
|
|
82
|
+
width: 70px;
|
|
83
|
+
height: 70px;
|
|
78
84
|
|
|
79
85
|
@media (min-width: 576px) {
|
|
80
86
|
max-width: 124px;
|
|
@@ -94,7 +100,7 @@ const BusinessLogoStyled = styled.div`
|
|
|
94
100
|
background-size: cover;
|
|
95
101
|
object-fit: cover;
|
|
96
102
|
background-position: center;
|
|
97
|
-
min-height:
|
|
103
|
+
min-height: 70px;
|
|
98
104
|
border-radius: 7.6px;
|
|
99
105
|
@media (min-width: 576px) {
|
|
100
106
|
min-height: 124px;
|
|
@@ -345,7 +345,9 @@ const CartUI = (props) => {
|
|
|
345
345
|
)}
|
|
346
346
|
<IconContainer>
|
|
347
347
|
<BsInfoCircle size='20' color={theme.colors.primary} onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })} />
|
|
348
|
-
|
|
348
|
+
{!!offer?.id && (
|
|
349
|
+
<MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
|
|
350
|
+
)}
|
|
349
351
|
</IconContainer>
|
|
350
352
|
</td>
|
|
351
353
|
<td>
|
|
@@ -408,7 +410,7 @@ const CartUI = (props) => {
|
|
|
408
410
|
)}
|
|
409
411
|
<IconContainer>
|
|
410
412
|
<BsInfoCircle size='20' color={theme.colors.primary} onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })} />
|
|
411
|
-
{
|
|
413
|
+
{!!offer?.id && (
|
|
412
414
|
<MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
|
|
413
415
|
)}
|
|
414
416
|
</IconContainer>
|
|
@@ -435,7 +437,7 @@ const CartUI = (props) => {
|
|
|
435
437
|
)}
|
|
436
438
|
<IconContainer>
|
|
437
439
|
<BsInfoCircle size='20' color={theme.colors.primary} onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })} />
|
|
438
|
-
{
|
|
440
|
+
{!!offer?.id && (
|
|
439
441
|
<MdCloseCircle size='24' color={theme.colors.primary} onClick={() => onRemoveOffer(offer?.id)} />
|
|
440
442
|
)}
|
|
441
443
|
</IconContainer>
|
|
@@ -137,6 +137,9 @@ export const CartContent = (props) => {
|
|
|
137
137
|
<h4>{t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')}</h4>
|
|
138
138
|
<h4>{parsePrice(totalCartsPrice)}</h4>
|
|
139
139
|
</div>
|
|
140
|
+
<span>
|
|
141
|
+
<p>{t('CART_GROUP_MESSAGE_ALERT', 'Discounts may be applied at the time of payment for this group.')}</p>
|
|
142
|
+
</span>
|
|
140
143
|
</MultiCartPriceContainer>
|
|
141
144
|
)}
|
|
142
145
|
</>
|
|
@@ -87,6 +87,8 @@ export const Header = (props) => {
|
|
|
87
87
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
88
88
|
const [isFarAway, setIsFarAway] = useState(false)
|
|
89
89
|
|
|
90
|
+
const isMulticheckoutPage = window.location.pathname?.includes('/multi-checkout')
|
|
91
|
+
|
|
90
92
|
const cartsWithProducts = (orderState?.carts && Object.values(orderState?.carts).filter(cart => cart.products && cart.products?.length > 0)) || null
|
|
91
93
|
|
|
92
94
|
const windowSize = useWindowSize()
|
|
@@ -236,7 +238,7 @@ export const Header = (props) => {
|
|
|
236
238
|
<img alt='Isotype' width={isChew ? '70px' : '35px'} height={isChew ? '20px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : (isHome && windowSize.width < 576 ? theme?.images?.logos?.isotypeInvert : orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.isotype)} loading='lazy' />
|
|
237
239
|
</LogoHeader>
|
|
238
240
|
</LeftHeader>
|
|
239
|
-
{isShowOrderOptions &&
|
|
241
|
+
{isShowOrderOptions && windowSize.width >= 576 && (
|
|
240
242
|
<Menu id='center-side' className='left-header' isCustomerMode={isCustomerMode} isChew={isChew}>
|
|
241
243
|
{windowSize.width > 850 && isFarAway && (
|
|
242
244
|
<FarAwayMessage>
|
|
@@ -361,16 +363,20 @@ export const Header = (props) => {
|
|
|
361
363
|
<>
|
|
362
364
|
{isShowOrderOptions && (
|
|
363
365
|
windowSize.width > 768 ? (
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
366
|
+
<>
|
|
367
|
+
{!isMulticheckoutPage ? (
|
|
368
|
+
<CartPopover
|
|
369
|
+
open={openPopover.cart}
|
|
370
|
+
carts={cartsWithProducts}
|
|
371
|
+
onClick={() => handleTogglePopover('cart')}
|
|
372
|
+
onClose={() => handleClosePopover('cart')}
|
|
373
|
+
auth={auth}
|
|
374
|
+
location={location}
|
|
375
|
+
isCustomerMode={isCustomerMode}
|
|
376
|
+
setPreorderBusiness={setPreorderBusiness}
|
|
377
|
+
/>
|
|
378
|
+
) : null}
|
|
379
|
+
</>
|
|
374
380
|
) : (
|
|
375
381
|
<HeaderOption
|
|
376
382
|
variant='cart'
|
|
@@ -57,7 +57,6 @@ const MultiCheckoutUI = (props) => {
|
|
|
57
57
|
isCustomerMode,
|
|
58
58
|
openCarts,
|
|
59
59
|
loyaltyPlansState,
|
|
60
|
-
totalCartsPrice,
|
|
61
60
|
handleGroupPlaceOrder,
|
|
62
61
|
paymethodSelected,
|
|
63
62
|
handleSelectPaymethod,
|
|
@@ -101,6 +100,7 @@ const MultiCheckoutUI = (props) => {
|
|
|
101
100
|
? JSON.parse(configs?.driver_tip_options?.value) || []
|
|
102
101
|
: configs?.driver_tip_options?.value || []
|
|
103
102
|
|
|
103
|
+
const totalCartsPrice = cartGroup?.result?.balance
|
|
104
104
|
const methodsPay = ['global_google_pay', 'global_apple_pay']
|
|
105
105
|
const creditPointPlan = loyaltyPlansState?.result?.find((loyal) => loyal.type === 'credit_point')
|
|
106
106
|
const businessIds = openCarts.map((cart) => cart.business_id)
|
|
@@ -38,9 +38,10 @@ export const OrderEta = (props) => {
|
|
|
38
38
|
}
|
|
39
39
|
_estimatedTime = moment.utc(_delivery).add(totalEta, 'minutes')
|
|
40
40
|
} else {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
let timesToAdd = 0
|
|
42
|
+
if (order?.delivered_in) timesToAdd += order?.delivered_in
|
|
43
|
+
if (order?.prepared_in) timesToAdd += order?.prepared_in
|
|
44
|
+
const _etaTime = order?.eta_time + timesToAdd
|
|
44
45
|
_estimatedTime = moment.utc(_delivery).add(_etaTime, 'minutes')
|
|
45
46
|
}
|
|
46
47
|
_estimatedTime = outputFormat ? moment(_estimatedTime).local().format(outputFormat) : parseDate(_estimatedTime, { utc: false })
|
|
@@ -129,11 +129,17 @@ export const OrderHistory = (props) => {
|
|
|
129
129
|
? getLogisticTagStatus(parseInt(message.change.new, 10))
|
|
130
130
|
: message.change?.attribute === 'delivered_in' ? (
|
|
131
131
|
<h3>
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
<strong>{t('TIME_ADDED_BY_DRIVER', 'Time added by driver')}</strong><br />
|
|
133
|
+
{formatSeconds(parseInt(message.change.new, 10))}
|
|
134
134
|
</h3>
|
|
135
135
|
)
|
|
136
|
-
:
|
|
136
|
+
: message.change?.attribute === 'prepared_in' ? (
|
|
137
|
+
<h3>
|
|
138
|
+
<strong>{t('TIME_ADDED_BY_BUSINESS', 'Time added by business')}</strong><br />
|
|
139
|
+
{formatSeconds(parseInt(message.change.new, 10))}
|
|
140
|
+
</h3>
|
|
141
|
+
)
|
|
142
|
+
: t(getStatus(parseInt(message.change.new, 10)))
|
|
137
143
|
}
|
|
138
144
|
</h3>
|
|
139
145
|
) : (
|
|
@@ -65,7 +65,8 @@ const OrdersOptionUI = (props) => {
|
|
|
65
65
|
handleUpdateProfessionals,
|
|
66
66
|
businesses,
|
|
67
67
|
handleUpdateBusinesses,
|
|
68
|
-
getPage
|
|
68
|
+
getPage,
|
|
69
|
+
loadOrders,
|
|
69
70
|
} = props
|
|
70
71
|
|
|
71
72
|
const [, t] = useLanguage()
|
|
@@ -73,6 +74,7 @@ const OrdersOptionUI = (props) => {
|
|
|
73
74
|
const [events] = useEvent()
|
|
74
75
|
const { width } = useWindowSize()
|
|
75
76
|
const { loading, error, orders: values } = orderList
|
|
77
|
+
const [refreshOrders , setRefreshOrders] = useState(false)
|
|
76
78
|
|
|
77
79
|
const _orders = customArray || values || []
|
|
78
80
|
const uniqueOrders = []
|
|
@@ -186,6 +188,13 @@ const OrdersOptionUI = (props) => {
|
|
|
186
188
|
}
|
|
187
189
|
}, [reorderState])
|
|
188
190
|
|
|
191
|
+
useEffect(() => {
|
|
192
|
+
if (refreshOrders) {
|
|
193
|
+
loadOrders(false, false, false, true)
|
|
194
|
+
setRefreshOrders(false)
|
|
195
|
+
}
|
|
196
|
+
}, [refreshOrders])
|
|
197
|
+
|
|
189
198
|
return (
|
|
190
199
|
<>
|
|
191
200
|
{props.beforeElements?.map((BeforeElement, i) => (
|
|
@@ -340,6 +349,7 @@ const OrdersOptionUI = (props) => {
|
|
|
340
349
|
getOrderStatus={getOrderStatus}
|
|
341
350
|
handleReorder={handleReorder}
|
|
342
351
|
handleUpdateOrderList={handleUpdateOrderList}
|
|
352
|
+
setRefreshOrders={setRefreshOrders}
|
|
343
353
|
/>
|
|
344
354
|
)
|
|
345
355
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react'
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react'
|
|
2
2
|
import {
|
|
3
3
|
ProductOptionSuboption as ProductSubOptionController,
|
|
4
4
|
useUtils,
|
|
@@ -37,7 +37,8 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
37
37
|
toggleSelect,
|
|
38
38
|
changePosition,
|
|
39
39
|
isSoldOut,
|
|
40
|
-
setIsScrollAvailable
|
|
40
|
+
setIsScrollAvailable,
|
|
41
|
+
onChange
|
|
41
42
|
} = props
|
|
42
43
|
|
|
43
44
|
const disableIncrement = option?.limit_suboptions_by_max ? (balance === option?.max || state.quantity === suboption.max) : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
@@ -46,7 +47,7 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
46
47
|
const [{ parsePrice }] = useUtils()
|
|
47
48
|
const { width } = useWindowSize()
|
|
48
49
|
const [showMessage, setShowMessage] = useState(false)
|
|
49
|
-
const
|
|
50
|
+
const dirtyRef = useRef(null)
|
|
50
51
|
|
|
51
52
|
const handleIncrement = (e) => {
|
|
52
53
|
e.stopPropagation()
|
|
@@ -64,8 +65,8 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
const handleSuboptionClick = () => {
|
|
68
|
+
dirtyRef.current = true
|
|
67
69
|
toggleSelect()
|
|
68
|
-
setIsDirty(true)
|
|
69
70
|
if (balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1) && !state.selected) {
|
|
70
71
|
setShowMessage(true)
|
|
71
72
|
}
|
|
@@ -78,12 +79,17 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
78
79
|
}, [balance])
|
|
79
80
|
|
|
80
81
|
useEffect(() => {
|
|
81
|
-
if (balance === option?.max && state?.selected &&
|
|
82
|
-
|
|
82
|
+
if (balance === option?.max && state?.selected && dirtyRef) {
|
|
83
|
+
dirtyRef.current = false
|
|
83
84
|
setIsScrollAvailable(true)
|
|
84
85
|
}
|
|
85
86
|
}, [state?.selected])
|
|
86
87
|
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (dirtyRef?.current || !suboption?.preselected || !option?.respect_to) return
|
|
90
|
+
const newState = { ...state, selected: suboption?.preselected, quantity: state.selected ? 0 : 1 }
|
|
91
|
+
onChange(newState, suboption, option)
|
|
92
|
+
}, [suboption, dirtyRef, option])
|
|
87
93
|
return (
|
|
88
94
|
<>
|
|
89
95
|
{props.beforeElements?.map((BeforeElement, i) => (
|
|
@@ -109,7 +109,7 @@ const WalletsUI = (props) => {
|
|
|
109
109
|
</span>
|
|
110
110
|
</BalanceElement>
|
|
111
111
|
</SectionWrapper>
|
|
112
|
-
|
|
112
|
+
<GiftCardUI />
|
|
113
113
|
<div className='transactions_list'>
|
|
114
114
|
{!transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length > 0 && (
|
|
115
115
|
<>
|
package/src/utils/index.js
CHANGED
|
@@ -627,30 +627,30 @@ export const getOrderStatus = (s) => {
|
|
|
627
627
|
const theme = useTheme()
|
|
628
628
|
const status = parseInt(s)
|
|
629
629
|
const orderStatus = [
|
|
630
|
-
{ key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending'), slug: 'PENDING', percentage:
|
|
630
|
+
{ key: 0, value: t('PENDING', theme?.defaultLanguages?.PENDING || 'Pending'), slug: 'PENDING', percentage: 10 },
|
|
631
631
|
{ key: 1, value: t('COMPLETED', theme?.defaultLanguages?.COMPLETED || 'Completed'), slug: 'COMPLETED', percentage: 100 },
|
|
632
632
|
{ key: 2, value: t('REJECTED', theme?.defaultLanguages?.REJECTED || 'Rejected'), slug: 'REJECTED', percentage: 0 },
|
|
633
633
|
{ key: 3, value: t('DRIVER_IN_BUSINESS', theme?.defaultLanguages?.DRIVER_IN_BUSINESS || 'Driver in business'), slug: 'DRIVER_IN_BUSINESS', percentage: 60 },
|
|
634
|
-
{ key: 4, value: t('PREPARATION_COMPLETED', theme?.defaultLanguages?.PREPARATION_COMPLETED || 'Preparation Completed'), slug: 'PREPARATION_COMPLETED', percentage:
|
|
634
|
+
{ key: 4, value: t('PREPARATION_COMPLETED', theme?.defaultLanguages?.PREPARATION_COMPLETED || 'Preparation Completed'), slug: 'PREPARATION_COMPLETED', percentage: 20 },
|
|
635
635
|
{ key: 5, value: t('REJECTED_BY_BUSINESS', theme?.defaultLanguages?.REJECTED_BY_BUSINESS || 'Rejected by business'), slug: 'REJECTED_BY_BUSINESS', percentage: 0 },
|
|
636
636
|
{ key: 6, value: t('REJECTED_BY_DRIVER', theme?.defaultLanguages?.REJECTED_BY_DRIVER || 'Rejected by Driver'), slug: 'REJECTED_BY_DRIVER', percentage: 0 },
|
|
637
|
-
{ key: 7, value: t('ACCEPTED_BY_BUSINESS', theme?.defaultLanguages?.ACCEPTED_BY_BUSINESS || 'Accepted by business'), slug: 'ACCEPTED_BY_BUSINESS', percentage:
|
|
638
|
-
{ key: 8, value: t('ACCEPTED_BY_DRIVER', theme?.defaultLanguages?.ACCEPTED_BY_DRIVER || 'Accepted by driver'), slug: 'ACCEPTED_BY_DRIVER', percentage:
|
|
639
|
-
{ key: 9, value: t('PICK_UP_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_COMPLETED_BY_DRIVER || 'Pick up completed by driver'), slug: 'PICK_UP_COMPLETED_BY_DRIVER', percentage:
|
|
637
|
+
{ key: 7, value: t('ACCEPTED_BY_BUSINESS', theme?.defaultLanguages?.ACCEPTED_BY_BUSINESS || 'Accepted by business'), slug: 'ACCEPTED_BY_BUSINESS', percentage: 15 },
|
|
638
|
+
{ key: 8, value: t('ACCEPTED_BY_DRIVER', theme?.defaultLanguages?.ACCEPTED_BY_DRIVER || 'Accepted by driver'), slug: 'ACCEPTED_BY_DRIVER', percentage: 40 },
|
|
639
|
+
{ key: 9, value: t('PICK_UP_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_COMPLETED_BY_DRIVER || 'Pick up completed by driver'), slug: 'PICK_UP_COMPLETED_BY_DRIVER', percentage: 70 },
|
|
640
640
|
{ key: 10, value: t('PICK_UP_FAILED_BY_DRIVER', theme?.defaultLanguages?.PICK_UP_FAILED_BY_DRIVER || 'Pick up Failed by driver'), slug: 'PICK_UP_FAILED_BY_DRIVER', percentage: 0 },
|
|
641
641
|
{ key: 11, value: t('DELIVERY_COMPLETED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_COMPLETED_BY_DRIVER || 'Delivery completed by driver'), slug: 'DELIVERY_COMPLETED_BY_DRIVER', percentage: 100 },
|
|
642
642
|
{ key: 12, value: t('DELIVERY_FAILED_BY_DRIVER', theme?.defaultLanguages?.DELIVERY_FAILED_BY_DRIVER || 'Delivery Failed by driver'), slug: 'DELIVERY_FAILED_BY_DRIVER', percentage: 0 },
|
|
643
643
|
{ key: 13, value: t('PREORDER', theme?.defaultLanguages?.PREORDER || 'PreOrder'), slug: 'PREORDER', percentage: 0 },
|
|
644
|
-
{ key: 14, value: t('ORDER_NOT_READY', theme?.defaultLanguages?.ORDER_NOT_READY || 'Order not ready'), slug: 'ORDER_NOT_READY', percentage:
|
|
644
|
+
{ key: 14, value: t('ORDER_NOT_READY', theme?.defaultLanguages?.ORDER_NOT_READY || 'Order not ready'), slug: 'ORDER_NOT_READY', percentage: 15 },
|
|
645
645
|
{ key: 15, value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER || 'Order picked up completed by customer'), slug: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', percentage: 100 },
|
|
646
646
|
{ key: 16, value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_STATUS_CANCELLED_BY_CUSTOMER || 'Order cancelled by customer'), slug: 'ORDER_STATUS_CANCELLED_BY_CUSTOMER', percentage: 0 },
|
|
647
647
|
{ key: 17, value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', theme?.defaultLanguages?.ORDER_NOT_PICKEDUP_BY_CUSTOMER || 'Order not picked up by customer'), slug: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER', percentage: 0 },
|
|
648
|
-
{ key: 18, value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS || 'Driver almost arrived to business'), slug: 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', percentage:
|
|
648
|
+
{ key: 18, value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS || 'Driver almost arrived to business'), slug: 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', percentage: 50 },
|
|
649
649
|
{ key: 19, value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', theme?.defaultLanguages?.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER || 'Driver almost arrived to customer'), slug: 'ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', percentage: 90 },
|
|
650
650
|
{ key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS || 'Customer almost arrived to business'), slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', percentage: 90 },
|
|
651
|
-
{ key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage:
|
|
652
|
-
{ key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage:
|
|
653
|
-
{ key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage:
|
|
651
|
+
{ key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', theme?.defaultLanguages?.ORDER_CUSTOMER_ARRIVED_BUSINESS || 'Customer arrived to business'), slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS', percentage: 90 },
|
|
652
|
+
{ key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', theme?.defaultLanguages?.ORDER_LOOKING_FOR_DRIVER || 'Looking for driver'), slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 30 },
|
|
653
|
+
{ key: 23, value: t('ORDER_DRIVER_ON_WAY', theme?.defaultLanguages?.ORDER_DRIVER_ON_WAY || 'Driver on way'), slug: 'ORDER_DRIVER_ON_WAY', percentage: 80 }
|
|
654
654
|
]
|
|
655
655
|
const objectStatus = orderStatus.find((o) => o.key === status)
|
|
656
656
|
return objectStatus && objectStatus
|
package/template/app.js
CHANGED
|
@@ -476,6 +476,7 @@ export const App = () => {
|
|
|
476
476
|
isHome={isHome}
|
|
477
477
|
location={location}
|
|
478
478
|
isCustomLayout={singleBusinessConfig.isActive}
|
|
479
|
+
singleBusinessConfig={singleBusinessConfig}
|
|
479
480
|
searchValue={searchValue}
|
|
480
481
|
setSearchValue={setSearchValue}
|
|
481
482
|
/>
|
|
@@ -616,7 +617,7 @@ export const App = () => {
|
|
|
616
617
|
isUserVerifyRequired ? (
|
|
617
618
|
<Redirect to='/verify' />
|
|
618
619
|
) : (
|
|
619
|
-
(orderStatus.options?.address?.location || isAllowUnaddressOrderType)
|
|
620
|
+
(orderStatus.options?.address?.location || isAllowUnaddressOrderType) && !singleBusinessConfig.isActive
|
|
620
621
|
? <BusinessesList searchValueCustom={searchValue} />
|
|
621
622
|
: <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
|
|
622
623
|
)
|