ordering-ui-admin-external 1.43.62 → 1.43.64
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/{ordering-ui-admin.79f59e9bee862210166d.js → ordering-ui-admin.59d6b5f2801dce338f86.js} +2 -2
- package/_modules/components/BusinessIntelligence/InvoiceBusinessManager/index.js +4 -0
- package/_modules/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +9 -3
- package/_modules/components/BusinessIntelligence/InvoiceDriverPdf/index.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +2 -1
- package/_modules/components/Stores/BusinessDetail/index.js +2 -1
- package/_modules/components/Stores/BusinessOrderingChannels/index.js +2 -1
- package/_modules/components/Stores/ProductDesktopPreview/index.js +9 -7
- package/_modules/components/Stores/ProductDesktopPreview/styles.js +4 -4
- package/_modules/components/Stores/ProductSummary/index.js +9 -2
- package/_modules/styles/Checkbox/index.js +16 -2
- package/_modules/styles/index.js +6 -0
- package/_modules/utils/index.js +40 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +1 -0
- package/src/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +8 -5
- package/src/components/BusinessIntelligence/InvoiceDriverPdf/index.js +1 -1
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +2 -1
- package/src/components/Stores/BusinessDetail/index.js +2 -1
- package/src/components/Stores/BusinessOrderingChannels/index.js +2 -1
- package/src/components/Stores/ProductDesktopPreview/index.js +7 -12
- package/src/components/Stores/ProductDesktopPreview/styles.js +6 -3
- package/src/components/Stores/ProductSummary/index.js +10 -2
- package/src/styles/Checkbox/index.js +53 -0
- package/src/styles/index.js +2 -1
- package/src/utils/index.js +40 -0
- /package/_bundles/{ordering-ui-admin.79f59e9bee862210166d.js.LICENSE.txt → ordering-ui-admin.59d6b5f2801dce338f86.js.LICENSE.txt} +0 -0
|
@@ -101,6 +101,10 @@ var InvoiceBusinessManagerUI = function InvoiceBusinessManagerUI(props) {
|
|
|
101
101
|
ref: inputRef,
|
|
102
102
|
type: "hidden",
|
|
103
103
|
name: "html"
|
|
104
|
+
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
105
|
+
value: "1",
|
|
106
|
+
type: "hidden",
|
|
107
|
+
name: "with_doctype"
|
|
104
108
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
105
109
|
ref: submitBtnRef,
|
|
106
110
|
type: "submit"
|
|
@@ -9,6 +9,7 @@ var _orderingComponentsAdminExternal = require("ordering-components-admin-extern
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactBootstrap = require("react-bootstrap");
|
|
11
11
|
var _styledComponents = require("styled-components");
|
|
12
|
+
var _ConfigFileContext = require("../../../contexts/ConfigFileContext");
|
|
12
13
|
var _utils = require("../../../utils");
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -22,22 +23,27 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
22
23
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
25
|
var InvoiceBusinessPdf = exports.InvoiceBusinessPdf = function InvoiceBusinessPdf(props) {
|
|
25
|
-
var _theme$images, _exportInvoiceList$in, _exportInvoiceList$in2, _exportInvoiceList$in3, _exportInvoiceList$in4, _exportInvoiceList$in5, _exportInvoiceList$in6, _exportInvoiceList$in7, _exportInvoiceList$in8, _exportInvoiceList$in9, _exportInvoiceList$in10, _exportInvoiceList$in11, _exportInvoiceList$in12, _exportInvoiceList$in13, _exportInvoiceList$in14, _exportInvoiceList$in15, _exportInvoiceList$in16, _exportInvoiceList$in17, _exportInvoiceList$in18, _exportInvoiceList$in19, _exportInvoiceList$in20, _exportInvoiceList$in21, _exportInvoiceList$in22, _exportInvoiceList$in23, _exportInvoiceList$in24, _exportInvoiceList$in25, _exportInvoiceList$in26, _exportInvoiceList$in27, _exportInvoiceList$in28, _exportInvoiceList$in29, _exportInvoiceList$in30;
|
|
26
|
+
var _configFile$app_inter, _theme$images, _exportInvoiceList$in, _exportInvoiceList$in2, _exportInvoiceList$in3, _exportInvoiceList$in4, _exportInvoiceList$in5, _exportInvoiceList$in6, _exportInvoiceList$in7, _exportInvoiceList$in8, _exportInvoiceList$in9, _exportInvoiceList$in10, _exportInvoiceList$in11, _exportInvoiceList$in12, _exportInvoiceList$in13, _exportInvoiceList$in14, _exportInvoiceList$in15, _exportInvoiceList$in16, _exportInvoiceList$in17, _exportInvoiceList$in18, _exportInvoiceList$in19, _exportInvoiceList$in20, _exportInvoiceList$in21, _exportInvoiceList$in22, _exportInvoiceList$in23, _exportInvoiceList$in24, _exportInvoiceList$in25, _exportInvoiceList$in26, _exportInvoiceList$in27, _exportInvoiceList$in28, _exportInvoiceList$in29, _exportInvoiceList$in30;
|
|
26
27
|
var exportInvoiceList = props.exportInvoiceList,
|
|
27
28
|
getSubtotal = props.getSubtotal,
|
|
28
29
|
getTotal = props.getTotal;
|
|
29
30
|
var theme = (0, _styledComponents.useTheme)();
|
|
30
31
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
31
32
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
33
|
+
dictionary = _useLanguage2[0].dictionary,
|
|
32
34
|
t = _useLanguage2[1];
|
|
33
35
|
var _useUtils = (0, _orderingComponentsAdminExternal.useUtils)(),
|
|
34
36
|
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
35
37
|
_useUtils2$ = _useUtils2[0],
|
|
36
38
|
parseDate = _useUtils2$.parseDate,
|
|
37
39
|
parsePrice = _useUtils2$.parsePrice;
|
|
40
|
+
var _useContext = (0, _react.useContext)(_ConfigFileContext.ConfigFileContext),
|
|
41
|
+
_useContext2 = _slicedToArray(_useContext, 1),
|
|
42
|
+
configFile = _useContext2[0];
|
|
43
|
+
var prefixForVariable = configFile === null || configFile === void 0 || (_configFile$app_inter = configFile.app_internal_name) === null || _configFile$app_inter === void 0 ? void 0 : _configFile$app_inter.toUpperCase();
|
|
38
44
|
var styles = {
|
|
39
45
|
root: {
|
|
40
|
-
fontFamily: '
|
|
46
|
+
fontFamily: 'Noto Sans Georgian, sans-serif',
|
|
41
47
|
color: '#333'
|
|
42
48
|
},
|
|
43
49
|
table: {
|
|
@@ -188,7 +194,7 @@ var InvoiceBusinessPdf = exports.InvoiceBusinessPdf = function InvoiceBusinessPd
|
|
|
188
194
|
utc: false
|
|
189
195
|
})), /*#__PURE__*/_react.default.createElement("td", {
|
|
190
196
|
style: styles.table.tbody.tr.td
|
|
191
|
-
}, (0, _utils.
|
|
197
|
+
}, (0, _utils.getOrderStatusPrefix)(order.status, dictionary, prefixForVariable)), /*#__PURE__*/_react.default.createElement("td", {
|
|
192
198
|
style: styles.table.tbody.tr.tdNumber
|
|
193
199
|
}, parsePrice(getSubtotal(order))), /*#__PURE__*/_react.default.createElement("td", {
|
|
194
200
|
style: styles.table.tbody.tr.tdNumber
|
|
@@ -37,7 +37,7 @@ var InvoiceDriverPdf = exports.InvoiceDriverPdf = function InvoiceDriverPdf(prop
|
|
|
37
37
|
parsePrice = _useUtils2$.parsePrice;
|
|
38
38
|
var styles = {
|
|
39
39
|
root: {
|
|
40
|
-
fontFamily: '
|
|
40
|
+
fontFamily: 'Noto Sans Georgian, sans-serif',
|
|
41
41
|
color: '#333'
|
|
42
42
|
},
|
|
43
43
|
table: {
|
|
@@ -59,7 +59,8 @@ var BusinessDeliveryPickupMore = exports.BusinessDeliveryPickupMore = function B
|
|
|
59
59
|
};
|
|
60
60
|
(0, _react.useEffect)(function () {
|
|
61
61
|
var tab = query.get('tab');
|
|
62
|
-
|
|
62
|
+
var tabs = ['delivery', 'pickup', 'driver_delivery_group', 'advanced_eta'];
|
|
63
|
+
if (tab && tabs.includes(tab)) {
|
|
63
64
|
handleTabClick(tab, true);
|
|
64
65
|
} else {
|
|
65
66
|
handleTabClick('delivery');
|
|
@@ -60,7 +60,8 @@ var BusinessDetail = exports.BusinessDetail = function BusinessDetail(props) {
|
|
|
60
60
|
}, [selectedInfoItem]);
|
|
61
61
|
(0, _react.useEffect)(function () {
|
|
62
62
|
var tab = query.get('tab');
|
|
63
|
-
|
|
63
|
+
var tabs = ['information', 'owner', 'categories', 'location', 'images', 'videos', 'seo_options'];
|
|
64
|
+
if (tab && tabs.includes(tab)) {
|
|
64
65
|
setSelctedInfoItem(tab);
|
|
65
66
|
} else {
|
|
66
67
|
handleSelectInfoItem('information');
|
|
@@ -95,7 +95,8 @@ var BusinessOrderingChannels = exports.BusinessOrderingChannels = function Busin
|
|
|
95
95
|
}, [business]);
|
|
96
96
|
(0, _react.useEffect)(function () {
|
|
97
97
|
var tab = query.get('tab');
|
|
98
|
-
|
|
98
|
+
var tabs = ['custom_slug', 'widgets'];
|
|
99
|
+
if (tab && tabs.includes(tab)) {
|
|
99
100
|
handleChangeOption(tab, true);
|
|
100
101
|
} else {
|
|
101
102
|
handleChangeOption('custom_slug');
|
|
@@ -10,8 +10,6 @@ var _orderingComponentsAdminExternal = require("ordering-components-admin-extern
|
|
|
10
10
|
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
11
11
|
var _styledComponents = require("styled-components");
|
|
12
12
|
var _styles = require("../../../styles");
|
|
13
|
-
var _MdRadioButtonChecked = _interopRequireDefault(require("@meronex/icons/md/MdRadioButtonChecked"));
|
|
14
|
-
var _MdRadioButtonUnchecked = _interopRequireDefault(require("@meronex/icons/md/MdRadioButtonUnchecked"));
|
|
15
13
|
var _BsDashCircle = _interopRequireDefault(require("@meronex/icons/bs/BsDashCircle"));
|
|
16
14
|
var _BsPlusCircle = _interopRequireDefault(require("@meronex/icons/bs/BsPlusCircle"));
|
|
17
15
|
var _BsCircleHalf = _interopRequireDefault(require("@meronex/icons/bs/BsCircleHalf"));
|
|
@@ -35,7 +33,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
35
33
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
34
|
_swiper.default.use([_swiper.Navigation, _swiper.Thumbs]);
|
|
37
35
|
var ProductDesktopPreview = exports.ProductDesktopPreview = function ProductDesktopPreview(props) {
|
|
38
|
-
var _product$product, _product$product2, _theme$defaultLanguag, _product$ingredients, _product$extras, _product$ingredients2, _product$extras2, _product$ingredients3, _theme$defaultLanguag2, _product$extras3;
|
|
36
|
+
var _product$product, _product$product2, _theme$defaultLanguag, _product$ingredients, _product$extras, _product$ingredients2, _product$extras2, _product$ingredients3, _theme$defaultLanguag2, _product$extras3, _productCart$quantity;
|
|
39
37
|
var product = props.product,
|
|
40
38
|
productCart = props.productCart,
|
|
41
39
|
showProductOption = props.showProductOption,
|
|
@@ -238,15 +236,19 @@ var ProductDesktopPreview = exports.ProductDesktopPreview = function ProductDesk
|
|
|
238
236
|
var _productCart$options;
|
|
239
237
|
var currentState = ((_productCart$options = productCart.options["id:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _productCart$options === void 0 ? void 0 : _productCart$options.suboptions["id:".concat(suboption === null || suboption === void 0 ? void 0 : suboption.id)]) || {};
|
|
240
238
|
var price = option !== null && option !== void 0 && option.with_half_option && suboption !== null && suboption !== void 0 && suboption.half_price && currentState.position !== 'whole' ? suboption === null || suboption === void 0 ? void 0 : suboption.half_price : suboption === null || suboption === void 0 ? void 0 : suboption.price;
|
|
239
|
+
var inputId = "".concat(suboption.id);
|
|
241
240
|
return suboption !== null && suboption !== void 0 && suboption.enabled ? /*#__PURE__*/_react.default.createElement(_styles2.ProductSuboptionContainer, {
|
|
242
241
|
key: suboption === null || suboption === void 0 ? void 0 : suboption.id
|
|
243
242
|
}, /*#__PURE__*/_react.default.createElement(_styles2.IconControl, null, (option === null || option === void 0 ? void 0 : option.min) === 0 && (option === null || option === void 0 ? void 0 : option.max) === 1 || (option === null || option === void 0 ? void 0 : option.max) > 1 ? /*#__PURE__*/_react.default.createElement(_styles.Checkbox, {
|
|
243
|
+
id: inputId,
|
|
244
244
|
defaultChecked: currentState === null || currentState === void 0 ? void 0 : currentState.selected
|
|
245
|
-
}) :
|
|
246
|
-
|
|
245
|
+
}) : /*#__PURE__*/_react.default.createElement(_styles.RadioButton, {
|
|
246
|
+
id: inputId
|
|
247
247
|
})), suboption.image && suboption.image !== '-' && /*#__PURE__*/_react.default.createElement(_styles2.SubOptionThumbnail, {
|
|
248
248
|
src: suboption.image
|
|
249
|
-
}), /*#__PURE__*/_react.default.createElement(_styles2.SuoptionText, null, /*#__PURE__*/_react.default.createElement("div", null,
|
|
249
|
+
}), /*#__PURE__*/_react.default.createElement(_styles2.SuoptionText, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("label", {
|
|
250
|
+
htmlFor: inputId
|
|
251
|
+
}, suboption === null || suboption === void 0 ? void 0 : suboption.name))), (option === null || option === void 0 ? void 0 : option.allow_suboption_quantity) && /*#__PURE__*/_react.default.createElement(_styles2.QuantityControl, null, /*#__PURE__*/_react.default.createElement(_BsDashCircle.default, null), currentState.quantity || 1, /*#__PURE__*/_react.default.createElement(_BsPlusCircle.default, null)), (option === null || option === void 0 ? void 0 : option.with_half_option) && /*#__PURE__*/_react.default.createElement(_styles2.PositionControl, null, /*#__PURE__*/_react.default.createElement(_BsCircleHalf.default, {
|
|
250
252
|
className: ['reverse', currentState.selected && currentState.position === 'left' ? 'selected' : null].filter(function (classname) {
|
|
251
253
|
return classname;
|
|
252
254
|
}).join(' ')
|
|
@@ -273,7 +275,7 @@ var ProductDesktopPreview = exports.ProductDesktopPreview = function ProductDesk
|
|
|
273
275
|
className: "incdec-control"
|
|
274
276
|
}, /*#__PURE__*/_react.default.createElement(_FiMinusCircle.default, {
|
|
275
277
|
className: "".concat(productCart.quantity === 1 || isSoldOut ? 'disabled' : '')
|
|
276
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, productCart.quantity), /*#__PURE__*/_react.default.createElement(_FiPlusCircle.default, {
|
|
278
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, (_productCart$quantity = productCart.quantity) !== null && _productCart$quantity !== void 0 ? _productCart$quantity : 1), /*#__PURE__*/_react.default.createElement(_FiPlusCircle.default, {
|
|
277
279
|
className: "".concat(isSoldOut ? 'disabled' : '')
|
|
278
280
|
})), productCart && !isSoldOut && /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
279
281
|
color: "primary",
|
|
@@ -26,7 +26,7 @@ var DesktopBackground = exports.DesktopBackground = _styledComponents.default.di
|
|
|
26
26
|
return props.theme.colors.gray;
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
|
-
var ProductInfoModalPreview = exports.ProductInfoModalPreview = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n max-width: 500px;\n width: 100%;\n height: 100%;\n border-radius: 8px;\n position: relative;\n
|
|
29
|
+
var ProductInfoModalPreview = exports.ProductInfoModalPreview = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n max-width: 500px;\n width: 100%;\n height: 100%;\n border-radius: 8px;\n position: relative;\n\n ", "\n\n ", "\n"])), function (_ref3) {
|
|
30
30
|
var isMobileView = _ref3.isMobileView;
|
|
31
31
|
return !isMobileView && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background: ", ";\n "])), function (props) {
|
|
32
32
|
return props.theme.colors.backgroundPage;
|
|
@@ -109,7 +109,7 @@ var OptionWrapHeader = exports.OptionWrapHeader = _styledComponents.default.div(
|
|
|
109
109
|
var _props$theme$colors2;
|
|
110
110
|
return ((_props$theme$colors2 = props.theme.colors) === null || _props$theme$colors2 === void 0 ? void 0 : _props$theme$colors2.backgroundPage) || '#FFF';
|
|
111
111
|
});
|
|
112
|
-
var OptionTitleContainer = exports.OptionTitleContainer = _styledComponents.default.div(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n margin: 0px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 70%;\n display: flex;\n align-items: center
|
|
112
|
+
var OptionTitleContainer = exports.OptionTitleContainer = _styledComponents.default.div(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n margin: 0px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 70%;\n display: flex;\n align-items: center;\n\n *:first-child {\n margin-right: 8px;\n }\n"])));
|
|
113
113
|
var OptionTitle = exports.OptionTitle = _styledComponents.default.h3(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n font-size: 14px;\n display: flex;\n flex-direction: column;\n margin-bottom: 0;\n\n span {\n &:not(:first-child) {\n color: ", ";\n font-size: 12px;\n font-weight: 400;\n }\n }\n"])), function (props) {
|
|
114
114
|
return props.theme.colors.grayTextColor;
|
|
115
115
|
});
|
|
@@ -130,11 +130,11 @@ var SubOptionThumbnail = exports.SubOptionThumbnail = _styledComponents.default.
|
|
|
130
130
|
var src = _ref12.src;
|
|
131
131
|
return src;
|
|
132
132
|
});
|
|
133
|
-
var SuoptionText = exports.SuoptionText = _styledComponents.default.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n display: flex;\n font-weight: 300;\n color: #555;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 5px;\n font-size: 12px;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n span {\n margin-left: 10px;\n font-weight: 500;\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n }\n"])), function (props) {
|
|
133
|
+
var SuoptionText = exports.SuoptionText = _styledComponents.default.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n display: flex;\n font-weight: 300;\n color: #555;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 5px;\n font-size: 12px;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n span {\n margin-left: 10px;\n font-weight: 500;\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n }\n label {\n margin: 0;\n }\n"])), function (props) {
|
|
134
134
|
return props.theme.colors.primary;
|
|
135
135
|
}, function (props) {
|
|
136
136
|
var _props$theme4;
|
|
137
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px
|
|
137
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px;\n "])));
|
|
138
138
|
});
|
|
139
139
|
var QuantityControl = exports.QuantityControl = _styledComponents.default.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n display: flex;\n color: #555;\n align-items: center;\n font-weight: 300;\n font-size: 12px;\n margin: 0 5px;\n\n svg {\n color: ", ";\n font-size: 16px;\n margin-right: 3px;\n ", "\n }\n\n svg[disabled] {\n color: #CBCBCB;\n }\n\n svg:last-child {\n margin-left: 3px;\n margin-right: 0;\n ", "\n }\n"])), function (props) {
|
|
140
140
|
return props.theme.colors.primary;
|
|
@@ -43,7 +43,8 @@ var ProductSummary = exports.ProductSummary = function ProductSummary(props) {
|
|
|
43
43
|
showProductOption = props.showProductOption,
|
|
44
44
|
isExpand = props.isExpand,
|
|
45
45
|
setIsExpand = props.setIsExpand,
|
|
46
|
-
handleDuplicateProduct = props.handleDuplicateProduct
|
|
46
|
+
handleDuplicateProduct = props.handleDuplicateProduct,
|
|
47
|
+
getProduct = props.getProduct;
|
|
47
48
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
48
49
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
49
50
|
t = _useLanguage2[1];
|
|
@@ -234,7 +235,13 @@ var ProductSummary = exports.ProductSummary = function ProductSummary(props) {
|
|
|
234
235
|
setIsProductPreview(false);
|
|
235
236
|
setSelectedView('desktop');
|
|
236
237
|
}
|
|
237
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.ProductPreviewHeader, null, /*#__PURE__*/_react.default.createElement("h1", null, t('PREVIEW', 'Preview')), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.
|
|
238
|
+
}, /*#__PURE__*/_react.default.createElement(_styles2.ProductPreviewHeader, null, /*#__PURE__*/_react.default.createElement("h1", null, t('PREVIEW', 'Preview')), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
239
|
+
color: "primary",
|
|
240
|
+
borderRadius: "7.6px",
|
|
241
|
+
onClick: function onClick() {
|
|
242
|
+
return getProduct();
|
|
243
|
+
}
|
|
244
|
+
}, t('RELOAD', 'Reload')), /*#__PURE__*/_react.default.createElement(_styles.IconButton, {
|
|
238
245
|
color: selectedView === 'desktop' ? 'primary' : 'black',
|
|
239
246
|
onClick: function onClick() {
|
|
240
247
|
return setSelectedView('desktop');
|
|
@@ -4,9 +4,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Checkbox = void 0;
|
|
7
|
+
exports.RadioButton = exports.Checkbox = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -23,4 +23,18 @@ var Checkbox = exports.Checkbox = _styledComponents.default.input.attrs({
|
|
|
23
23
|
}, function (props) {
|
|
24
24
|
var _props$theme2;
|
|
25
25
|
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n right: 7px;\n "]))) : (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n left: 7px;\n "])));
|
|
26
|
+
});
|
|
27
|
+
var RadioButton = exports.RadioButton = _styledComponents.default.input.attrs({
|
|
28
|
+
type: 'checkbox'
|
|
29
|
+
})(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n width: 18px;\n height: 18px;\n border: none;\n appearance: none;\n\n &:before {\n content: \"\";\n display: block;\n position: absolute;\n width: 18px;\n height: 18px;\n top: 0;\n left: 0;\n border: 1px solid #B1BCCC;\n border-radius: 50%;\n background: ", ";\n }\n\n &:checked:before {\n content: \"\";\n display: block;\n position: absolute;\n width: 18px;\n height: 18px;\n top: 0;\n ", "\n background-color: ", ";\n border: none;\n }\n\n &:checked:after {\n content: \"\";\n display: block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: white;\n position: absolute;\n top: 5.2px;\n ", "\n }\n"])), function (props) {
|
|
30
|
+
var _props$theme$colors2;
|
|
31
|
+
return ((_props$theme$colors2 = props.theme.colors) === null || _props$theme$colors2 === void 0 ? void 0 : _props$theme$colors2.backgroundPage) || '#FFF';
|
|
32
|
+
}, function (props) {
|
|
33
|
+
var _props$theme3;
|
|
34
|
+
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n right: 0;\n "]))) : (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n left: 0;\n "])));
|
|
35
|
+
}, function (props) {
|
|
36
|
+
return props.theme.colors.primary;
|
|
37
|
+
}, function (props) {
|
|
38
|
+
var _props$theme4;
|
|
39
|
+
return (_props$theme4 = props.theme) !== null && _props$theme4 !== void 0 && _props$theme4.rtl ? (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n right: 5.1px;\n "]))) : (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n left: 5.1px;\n "])));
|
|
26
40
|
});
|
package/_modules/styles/index.js
CHANGED
|
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "MultiSelect", {
|
|
|
45
45
|
return _MultiSelect.MultiSelect;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "RadioButton", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _Checkbox.RadioButton;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
48
54
|
Object.defineProperty(exports, "SecondSelect", {
|
|
49
55
|
enumerable: true,
|
|
50
56
|
get: function get() {
|
package/_modules/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.widgetURL = exports.verifyDecimals = exports.stringToSlug = exports.sortInputFields = exports.shape = exports.setStorageItem = exports.scrollTo = exports.ribbonValues = exports.reviewCommentList = exports.removeStorageItem = exports.removeQueryToUrl = exports.queryStringToObject = exports.orderStatus = exports.orderRejectCommentList = exports.optimizeImage = exports.getUniqueId = exports.getStorageItem = exports.getStarWidth = exports.getSeconds = exports.getOrderStatus = exports.getOrderStatuPickUp = exports.getMinutes = exports.getLocale = exports.getIconCard = exports.getHours = exports.getCurrenySymbol = exports.getCurrentDiffDays = exports.getAttributeName = exports.getAgoMinutes = exports.formatUrlVideo = exports.formatSeconds = exports.firstLetterCapital = exports.findExitingCountryPhoneCode = exports.findExitingCode = exports.fieldsToSort = exports.disableReasons = exports.convertHoursToMinutes = exports.convertHMS = exports.checkValidUrlFormat = exports.checkSiteUrl = exports.checkPreSiteUrl = exports.capitalize = exports.bytesConverter = exports.addQueryToUrl = exports.TwentyFourHours = exports.TwelveHours = exports.DriverTipsOptions = void 0;
|
|
6
|
+
exports.widgetURL = exports.verifyDecimals = exports.stringToSlug = exports.sortInputFields = exports.shape = exports.setStorageItem = exports.scrollTo = exports.ribbonValues = exports.reviewCommentList = exports.removeStorageItem = exports.removeQueryToUrl = exports.queryStringToObject = exports.orderStatus = exports.orderRejectCommentList = exports.optimizeImage = exports.getUniqueId = exports.getStorageItem = exports.getStarWidth = exports.getSeconds = exports.getOrderStatusPrefix = exports.getOrderStatus = exports.getOrderStatuPickUp = exports.getMinutes = exports.getLocale = exports.getIconCard = exports.getHours = exports.getCurrenySymbol = exports.getCurrentDiffDays = exports.getAttributeName = exports.getAgoMinutes = exports.formatUrlVideo = exports.formatSeconds = exports.firstLetterCapital = exports.findExitingCountryPhoneCode = exports.findExitingCode = exports.fieldsToSort = exports.disableReasons = exports.convertHoursToMinutes = exports.convertHMS = exports.checkValidUrlFormat = exports.checkSiteUrl = exports.checkPreSiteUrl = exports.capitalize = exports.bytesConverter = exports.addQueryToUrl = exports.TwentyFourHours = exports.TwelveHours = exports.DriverTipsOptions = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _FaCcMastercard = _interopRequireDefault(require("@meronex/icons/fa/FaCcMastercard"));
|
|
9
9
|
var _FaCcVisa = _interopRequireDefault(require("@meronex/icons/fa/FaCcVisa"));
|
|
@@ -677,6 +677,45 @@ var orderStatus = exports.orderStatus = [{
|
|
|
677
677
|
slug: 'ORDER_DRIVER_ARRIVED_CUSTOMER',
|
|
678
678
|
percentage: 80
|
|
679
679
|
}];
|
|
680
|
+
var getOrderStatusPrefix = exports.getOrderStatusPrefix = function getOrderStatusPrefix(s, dictionary) {
|
|
681
|
+
var _dictionary, _dictionary2, _dictionary3, _dictionary4, _dictionary5, _dictionary6, _dictionary7, _dictionary8, _dictionary9, _dictionary10, _dictionary11, _dictionary12, _dictionary13, _dictionary14, _dictionary15, _dictionary16, _dictionary17, _dictionary18, _dictionary19, _dictionary20, _dictionary21, _dictionary22, _dictionary23, _dictionary24, _dictionary25, _dictionary26, _dictionary27, _dictionary28, _dictionary29, _dictionary30, _dictionary31, _orderStatus$Number;
|
|
682
|
+
var prefixForVariable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
683
|
+
if (!dictionary) return s;
|
|
684
|
+
var orderStatus = {
|
|
685
|
+
0: (_dictionary = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_PENDING") : 'PENDING']) !== null && _dictionary !== void 0 ? _dictionary : 'Pending',
|
|
686
|
+
1: (_dictionary2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_COMPLETED_BY_ADMIN") : 'COMPLETED_BY_ADMIN']) !== null && _dictionary2 !== void 0 ? _dictionary2 : 'Completed by admin',
|
|
687
|
+
2: (_dictionary3 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_REJECTED") : 'REJECTED']) !== null && _dictionary3 !== void 0 ? _dictionary3 : 'Rejected',
|
|
688
|
+
3: (_dictionary4 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_STATUS_IN_BUSINESS") : 'ORDER_STATUS_IN_BUSINESS']) !== null && _dictionary4 !== void 0 ? _dictionary4 : 'Driver arrived to business',
|
|
689
|
+
4: (_dictionary5 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_PREPARATION_COMPLETED") : 'PREPARATION_COMPLETED']) !== null && _dictionary5 !== void 0 ? _dictionary5 : 'Preparation Completed',
|
|
690
|
+
5: (_dictionary6 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_REJECTED_BY_BUSINESS") : 'REJECTED_BY_BUSINESS']) !== null && _dictionary6 !== void 0 ? _dictionary6 : 'Rejected by business',
|
|
691
|
+
6: (_dictionary7 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_REJECTED_BY_DRIVER") : 'REJECTED_BY_DRIVER']) !== null && _dictionary7 !== void 0 ? _dictionary7 : 'Rejected by Driver',
|
|
692
|
+
7: (_dictionary8 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ACCEPTED_BY_BUSINESS") : 'ACCEPTED_BY_BUSINESS']) !== null && _dictionary8 !== void 0 ? _dictionary8 : 'Accepted by business',
|
|
693
|
+
8: (_dictionary9 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ACCEPTED_BY_DRIVER") : 'ACCEPTED_BY_DRIVER']) !== null && _dictionary9 !== void 0 ? _dictionary9 : 'Accepted by driver',
|
|
694
|
+
9: (_dictionary10 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_PICK_UP_COMPLETED_BY_DRIVER") : 'PICK_UP_COMPLETED_BY_DRIVER']) !== null && _dictionary10 !== void 0 ? _dictionary10 : 'Pick up completed by driver',
|
|
695
|
+
10: (_dictionary11 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_PICK_UP_FAILED_BY_DRIVER") : 'PICK_UP_FAILED_BY_DRIVER']) !== null && _dictionary11 !== void 0 ? _dictionary11 : 'Pick up Failed by driver',
|
|
696
|
+
11: (_dictionary12 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_DELIVERY_COMPLETED_BY_DRIVER") : 'DELIVERY_COMPLETED_BY_DRIVER']) !== null && _dictionary12 !== void 0 ? _dictionary12 : 'Delivery completed by driver',
|
|
697
|
+
12: (_dictionary13 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_DELIVERY_FAILED_BY_DRIVER") : 'DELIVERY_FAILED_BY_DRIVER']) !== null && _dictionary13 !== void 0 ? _dictionary13 : 'Delivery Failed by driver',
|
|
698
|
+
13: (_dictionary14 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_PREORDER") : 'PREORDER']) !== null && _dictionary14 !== void 0 ? _dictionary14 : 'PreOrder',
|
|
699
|
+
14: (_dictionary15 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_NOT_READY") : 'ORDER_NOT_READY']) !== null && _dictionary15 !== void 0 ? _dictionary15 : 'Order not ready',
|
|
700
|
+
15: (_dictionary16 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER") : 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER']) !== null && _dictionary16 !== void 0 ? _dictionary16 : 'Order picked up completed by customer',
|
|
701
|
+
16: (_dictionary17 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_STATUS_CANCELLED_BY_CUSTOMER") : 'ORDER_STATUS_CANCELLED_BY_CUSTOMER']) !== null && _dictionary17 !== void 0 ? _dictionary17 : 'Order cancelled by customer',
|
|
702
|
+
17: (_dictionary18 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_NOT_PICKEDUP_BY_CUSTOMER") : 'ORDER_NOT_PICKEDUP_BY_CUSTOMER']) !== null && _dictionary18 !== void 0 ? _dictionary18 : 'Order not picked up by customer',
|
|
703
|
+
18: (_dictionary19 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS") : 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS']) !== null && _dictionary19 !== void 0 ? _dictionary19 : 'Driver almost arrived to business',
|
|
704
|
+
19: (_dictionary20 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER") : 'ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER']) !== null && _dictionary20 !== void 0 ? _dictionary20 : 'Driver almost arrived to customer',
|
|
705
|
+
20: (_dictionary21 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS") : 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS']) !== null && _dictionary21 !== void 0 ? _dictionary21 : 'Customer almost arrived to business',
|
|
706
|
+
21: (_dictionary22 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_CUSTOMER_ARRIVED_BUSINESS") : 'ORDER_CUSTOMER_ARRIVED_BUSINESS']) !== null && _dictionary22 !== void 0 ? _dictionary22 : 'Customer arrived to business',
|
|
707
|
+
22: (_dictionary23 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_LOOKING_FOR_DRIVER") : 'ORDER_LOOKING_FOR_DRIVER']) !== null && _dictionary23 !== void 0 ? _dictionary23 : 'Looking for driver',
|
|
708
|
+
23: (_dictionary24 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_DRIVER_ON_WAY") : 'ORDER_DRIVER_ON_WAY']) !== null && _dictionary24 !== void 0 ? _dictionary24 : 'Driver on way',
|
|
709
|
+
24: (_dictionary25 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_STATUS_DRIVER_WAITING_FOR_ORDER") : 'ORDER_STATUS_DRIVER_WAITING_FOR_ORDER']) !== null && _dictionary25 !== void 0 ? _dictionary25 : 'Driver waiting for order',
|
|
710
|
+
25: (_dictionary26 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_STATUS_ACCEPTED_BY_DRIVER_COMPANY") : 'ORDER_STATUS_ACCEPTED_BY_DRIVER_COMPANY']) !== null && _dictionary26 !== void 0 ? _dictionary26 : 'Accepted by driver company',
|
|
711
|
+
26: (_dictionary27 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_ORDER_DRIVER_ARRIVED_CUSTOMER") : 'ORDER_DRIVER_ARRIVED_CUSTOMER']) !== null && _dictionary27 !== void 0 ? _dictionary27 : 'Driver arrived to customer',
|
|
712
|
+
50: (_dictionary28 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_DRIVER_ASSIGNED") : 'DRIVER_ASSIGNED']) !== null && _dictionary28 !== void 0 ? _dictionary28 : 'Driver assigned',
|
|
713
|
+
51: (_dictionary29 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_DRIVER_CLOSE") : 'DRIVER_CLOSE']) !== null && _dictionary29 !== void 0 ? _dictionary29 : 'Driver is close',
|
|
714
|
+
53: (_dictionary30 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_NEW_BUSINESS_OWNER_SIGNUP") : 'NEW_BUSINESS_OWNER_SIGNUP']) !== null && _dictionary30 !== void 0 ? _dictionary30 : 'New Business owner Signup',
|
|
715
|
+
54: (_dictionary31 = dictionary === null || dictionary === void 0 ? void 0 : dictionary[prefixForVariable ? "".concat(prefixForVariable, "_NEW_DRIVER_SIGNUP") : 'NEW_DRIVER_SIGNUP']) !== null && _dictionary31 !== void 0 ? _dictionary31 : 'New Driver owner Signup'
|
|
716
|
+
};
|
|
717
|
+
return (_orderStatus$Number = orderStatus === null || orderStatus === void 0 ? void 0 : orderStatus[Number(s)]) !== null && _orderStatus$Number !== void 0 ? _orderStatus$Number : s;
|
|
718
|
+
};
|
|
680
719
|
var getOrderStatus = exports.getOrderStatus = function getOrderStatus(status) {
|
|
681
720
|
var objectStatus = orderStatus.find(function (o) {
|
|
682
721
|
return o.key === status;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.64",
|
|
4
4
|
"description": "Ordering UI Admin Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": "^4.17.20",
|
|
84
84
|
"moment": "^2.29.1",
|
|
85
85
|
"moment-range": "^4.0.2",
|
|
86
|
-
"ordering-components-admin-external": "1.43.
|
|
86
|
+
"ordering-components-admin-external": "1.43.40",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|
|
@@ -110,6 +110,7 @@ const InvoiceBusinessManagerUI = (props) => {
|
|
|
110
110
|
}
|
|
111
111
|
<Form target='_blank' action={`${ordering.root}/pdf/html`} method='POST'>
|
|
112
112
|
<input ref={inputRef} type='hidden' name='html' />
|
|
113
|
+
<input value='1' type='hidden' name='with_doctype' />
|
|
113
114
|
<button ref={submitBtnRef} type='submit' />
|
|
114
115
|
</Form>
|
|
115
116
|
<InvoicePdfWrapper ref={invoicePdfRef}>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useLanguage, useUtils } from 'ordering-components-admin-external'
|
|
2
|
-
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import React, { useState, useEffect, useContext } from 'react'
|
|
3
3
|
import { Image } from 'react-bootstrap'
|
|
4
4
|
import { useTheme } from 'styled-components'
|
|
5
|
-
import {
|
|
5
|
+
import { ConfigFileContext } from '../../../contexts/ConfigFileContext'
|
|
6
|
+
import { getOrderStatusPrefix as getOrderStatus } from '../../../utils'
|
|
6
7
|
export const InvoiceBusinessPdf = (props) => {
|
|
7
8
|
const {
|
|
8
9
|
exportInvoiceList,
|
|
@@ -11,12 +12,14 @@ export const InvoiceBusinessPdf = (props) => {
|
|
|
11
12
|
} = props
|
|
12
13
|
|
|
13
14
|
const theme = useTheme()
|
|
14
|
-
const [, t] = useLanguage()
|
|
15
|
+
const [{ dictionary }, t] = useLanguage()
|
|
15
16
|
const [{ parseDate, parsePrice }] = useUtils()
|
|
17
|
+
const [configFile] = useContext(ConfigFileContext)
|
|
18
|
+
const prefixForVariable = configFile?.app_internal_name?.toUpperCase()
|
|
16
19
|
|
|
17
20
|
const styles = {
|
|
18
21
|
root: {
|
|
19
|
-
fontFamily: '
|
|
22
|
+
fontFamily: 'Noto Sans Georgian, sans-serif',
|
|
20
23
|
color: '#333'
|
|
21
24
|
},
|
|
22
25
|
table: {
|
|
@@ -150,7 +153,7 @@ export const InvoiceBusinessPdf = (props) => {
|
|
|
150
153
|
<tr key={i}>
|
|
151
154
|
<td style={styles.table.tbody.tr.td}>{order.id}</td>
|
|
152
155
|
<td style={styles.table.tbody.tr.td}>{parseDate(order.delivery_datetime, { utc: false })}</td>
|
|
153
|
-
<td style={styles.table.tbody.tr.td}>{getOrderStatus(order.status)
|
|
156
|
+
<td style={styles.table.tbody.tr.td}>{getOrderStatus(order.status, dictionary, prefixForVariable)}</td>
|
|
154
157
|
<td style={styles.table.tbody.tr.tdNumber}>{parsePrice(getSubtotal(order))}</td>
|
|
155
158
|
<td style={styles.table.tbody.tr.tdNumber}>{parsePrice(getTotal(order))}</td>
|
|
156
159
|
</tr>
|
|
@@ -43,7 +43,8 @@ export const BusinessDeliveryPickupMore = (props) => {
|
|
|
43
43
|
|
|
44
44
|
useEffect(() => {
|
|
45
45
|
const tab = query.get('tab')
|
|
46
|
-
|
|
46
|
+
const tabs = ['delivery', 'pickup', 'driver_delivery_group', 'advanced_eta']
|
|
47
|
+
if (tab && tabs.includes(tab)) {
|
|
47
48
|
handleTabClick(tab, true)
|
|
48
49
|
} else {
|
|
49
50
|
handleTabClick('delivery')
|
|
@@ -49,7 +49,8 @@ export const BusinessDetail = (props) => {
|
|
|
49
49
|
|
|
50
50
|
useEffect(() => {
|
|
51
51
|
const tab = query.get('tab')
|
|
52
|
-
|
|
52
|
+
const tabs = ['information', 'owner', 'categories', 'location', 'images', 'videos', 'seo_options']
|
|
53
|
+
if (tab && tabs.includes(tab)) {
|
|
53
54
|
setSelctedInfoItem(tab)
|
|
54
55
|
} else {
|
|
55
56
|
handleSelectInfoItem('information')
|
|
@@ -76,7 +76,8 @@ export const BusinessOrderingChannels = (props) => {
|
|
|
76
76
|
|
|
77
77
|
useEffect(() => {
|
|
78
78
|
const tab = query.get('tab')
|
|
79
|
-
|
|
79
|
+
const tabs = ['custom_slug', 'widgets']
|
|
80
|
+
if (tab && tabs.includes(tab)) {
|
|
80
81
|
handleChangeOption(tab, true)
|
|
81
82
|
} else {
|
|
82
83
|
handleChangeOption('custom_slug')
|
|
@@ -2,9 +2,7 @@ import React, { useState, useEffect, useRef } from 'react'
|
|
|
2
2
|
import { useLanguage, useUtils } from 'ordering-components-admin-external'
|
|
3
3
|
import { XLg } from 'react-bootstrap-icons'
|
|
4
4
|
import { useTheme } from 'styled-components'
|
|
5
|
-
import { Checkbox, TextArea, Button } from '../../../styles'
|
|
6
|
-
import MdRadioButtonChecked from '@meronex/icons/md/MdRadioButtonChecked'
|
|
7
|
-
import MdRadioButtonUnchecked from '@meronex/icons/md/MdRadioButtonUnchecked'
|
|
5
|
+
import { Checkbox, TextArea, Button, RadioButton } from '../../../styles'
|
|
8
6
|
import BsDashCircle from '@meronex/icons/bs/BsDashCircle'
|
|
9
7
|
import BsPlusCircle from '@meronex/icons/bs/BsPlusCircle'
|
|
10
8
|
import BsCircleHalf from '@meronex/icons/bs/BsCircleHalf'
|
|
@@ -311,31 +309,28 @@ export const ProductDesktopPreview = (props) => {
|
|
|
311
309
|
option.suboptions.map(suboption => {
|
|
312
310
|
const currentState = productCart.options[`id:${option?.id}`]?.suboptions[`id:${suboption?.id}`] || {}
|
|
313
311
|
const price = option?.with_half_option && suboption?.half_price && currentState.position !== 'whole' ? suboption?.half_price : suboption?.price
|
|
312
|
+
const inputId = `${suboption.id}`
|
|
314
313
|
return suboption?.enabled ? (
|
|
315
314
|
<ProductSuboptionContainer
|
|
316
315
|
key={suboption?.id}
|
|
317
316
|
>
|
|
318
317
|
<IconControl>
|
|
319
318
|
{((option?.min === 0 && option?.max === 1) || option?.max > 1) ? (
|
|
320
|
-
<Checkbox defaultChecked={currentState?.selected} />
|
|
319
|
+
<Checkbox id={inputId} defaultChecked={currentState?.selected} />
|
|
321
320
|
) : (
|
|
322
|
-
|
|
323
|
-
<MdRadioButtonChecked />
|
|
324
|
-
) : (
|
|
325
|
-
<MdRadioButtonUnchecked disabled />
|
|
326
|
-
)
|
|
321
|
+
<RadioButton id={inputId} />
|
|
327
322
|
)}
|
|
328
323
|
</IconControl>
|
|
329
324
|
{suboption.image && suboption.image !== '-' && (
|
|
330
325
|
<SubOptionThumbnail src={suboption.image} />
|
|
331
326
|
)}
|
|
332
327
|
<SuoptionText>
|
|
333
|
-
<div>{suboption?.name}</div>
|
|
328
|
+
<div><label htmlFor={inputId}>{suboption?.name}</label></div>
|
|
334
329
|
</SuoptionText>
|
|
335
330
|
{option?.allow_suboption_quantity && (
|
|
336
331
|
<QuantityControl>
|
|
337
332
|
<BsDashCircle />
|
|
338
|
-
{currentState.quantity}
|
|
333
|
+
{currentState.quantity || 1}
|
|
339
334
|
<BsPlusCircle />
|
|
340
335
|
</QuantityControl>
|
|
341
336
|
)}
|
|
@@ -388,7 +383,7 @@ export const ProductDesktopPreview = (props) => {
|
|
|
388
383
|
<FiMinusCircle
|
|
389
384
|
className={`${productCart.quantity === 1 || isSoldOut ? 'disabled' : ''}`}
|
|
390
385
|
/>
|
|
391
|
-
<span>{productCart.quantity}</span>
|
|
386
|
+
<span>{productCart.quantity ?? 1}</span>
|
|
392
387
|
<FiPlusCircle
|
|
393
388
|
className={`${isSoldOut ? 'disabled' : ''}`}
|
|
394
389
|
/>
|
|
@@ -38,7 +38,7 @@ export const ProductInfoModalPreview = styled.div`
|
|
|
38
38
|
height: 100%;
|
|
39
39
|
border-radius: 8px;
|
|
40
40
|
position: relative;
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
${({ isMobileView }) => !isMobileView && css`
|
|
43
43
|
background: ${props => props.theme.colors.backgroundPage};
|
|
44
44
|
`}
|
|
@@ -314,7 +314,7 @@ export const OptionTitleContainer = styled.div`
|
|
|
314
314
|
white-space: nowrap;
|
|
315
315
|
width: 70%;
|
|
316
316
|
display: flex;
|
|
317
|
-
align-items: center;
|
|
317
|
+
align-items: center;
|
|
318
318
|
|
|
319
319
|
*:first-child {
|
|
320
320
|
margin-right: 8px;
|
|
@@ -434,9 +434,12 @@ export const SuoptionText = styled.div`
|
|
|
434
434
|
text-overflow: ellipsis;
|
|
435
435
|
${props => props.theme?.rtl && css`
|
|
436
436
|
margin-left: 0;
|
|
437
|
-
margin-right: 10px;
|
|
437
|
+
margin-right: 10px;
|
|
438
438
|
`}
|
|
439
439
|
}
|
|
440
|
+
label {
|
|
441
|
+
margin: 0;
|
|
442
|
+
}
|
|
440
443
|
`
|
|
441
444
|
|
|
442
445
|
export const QuantityControl = styled.div`
|
|
@@ -4,7 +4,7 @@ import BsChevronRight from '@meronex/icons/bs/BsChevronRight'
|
|
|
4
4
|
import BiImage from '@meronex/icons/bi/BiImage'
|
|
5
5
|
import { XLg, ThreeDots, Laptop, Phone, ArrowsAngleContract, ArrowsAngleExpand } from 'react-bootstrap-icons'
|
|
6
6
|
import { Switch } from '../../../styles/Switch'
|
|
7
|
-
import { IconButton } from '../../../styles'
|
|
7
|
+
import { IconButton, Button } from '../../../styles'
|
|
8
8
|
import { DropdownButton, Dropdown } from 'react-bootstrap'
|
|
9
9
|
import { useTheme } from 'styled-components'
|
|
10
10
|
import { Confirm, Modal, ProgressRing } from '../../Shared'
|
|
@@ -45,7 +45,8 @@ export const ProductSummary = (props) => {
|
|
|
45
45
|
showProductOption,
|
|
46
46
|
isExpand,
|
|
47
47
|
setIsExpand,
|
|
48
|
-
handleDuplicateProduct
|
|
48
|
+
handleDuplicateProduct,
|
|
49
|
+
getProduct
|
|
49
50
|
} = props
|
|
50
51
|
|
|
51
52
|
const [, t] = useLanguage()
|
|
@@ -318,6 +319,13 @@ export const ProductSummary = (props) => {
|
|
|
318
319
|
<ProductPreviewHeader>
|
|
319
320
|
<h1>{t('PREVIEW', 'Preview')}</h1>
|
|
320
321
|
<div>
|
|
322
|
+
<Button
|
|
323
|
+
color='primary'
|
|
324
|
+
borderRadius='7.6px'
|
|
325
|
+
onClick={() => getProduct()}
|
|
326
|
+
>
|
|
327
|
+
{t('RELOAD', 'Reload')}
|
|
328
|
+
</Button>
|
|
321
329
|
<IconButton
|
|
322
330
|
color={selectedView === 'desktop' ? 'primary' : 'black'}
|
|
323
331
|
onClick={() => setSelectedView('desktop')}
|