ordering-ui-admin-external 1.37.2 → 1.37.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{ordering-ui-admin.15bab79d358eee4bd125.js → ordering-ui-admin.316f4761de9be1fdca7c.js} +2 -2
- package/_modules/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +5 -8
- package/_modules/components/BusinessIntelligence/InvoiceDriverPdf/index.js +5 -8
- package/_modules/components/Delivery/AddressForm/index.js +5 -8
- package/_modules/components/Delivery/DeliveryUsersListing/index.js +9 -14
- package/_modules/components/Delivery/DriversGroupsListing/index.js +5 -8
- package/_modules/components/Marketing/BannerImageDetails/index.js +5 -8
- package/_modules/components/OrderingProducts/SiteTheme/ThemeImage.js +5 -7
- package/_modules/components/Orders/CreateCustomOrder/Checkout/index.js +5 -8
- package/_modules/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +5 -8
- package/_modules/components/Orders/OrderContactInformation/index.js +5 -8
- package/_modules/components/Orders/OrdersCards/index.js +32 -81
- package/_modules/components/Orders/OrdersTable/index.js +39 -89
- package/_modules/components/Orders/OrdersTable/styles.js +2 -2
- package/_modules/components/Shared/ImageCrop/index.js +5 -7
- package/_modules/components/SidebarMenu/index.js +5 -8
- package/_modules/components/Stores/BusinessDeliveryGroupsDetails/index.js +5 -8
- package/_modules/components/Stores/BusinessLocation/index.js +5 -8
- package/_modules/components/Stores/BusinessServiceProfessionalDetail/index.js +10 -15
- package/_modules/components/Stores/BusinessesListing/index.js +5 -8
- package/_modules/components/Stores/ProductDetailsAdvanced/index.js +5 -8
- package/_modules/components/Stores/ProductExtras/index.js +5 -7
- package/_modules/utils/index.js +13 -21
- package/package.json +1 -1
- package/src/components/Orders/OrdersCards/index.js +30 -31
- package/src/components/Orders/OrdersTable/index.js +41 -42
- package/src/components/Orders/OrdersTable/styles.js +26 -24
- /package/_bundles/{ordering-ui-admin.15bab79d358eee4bd125.js.LICENSE.txt → ordering-ui-admin.316f4761de9be1fdca7c.js.LICENSE.txt} +0 -0
|
@@ -59,6 +59,7 @@ var OrdersTable = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
59
59
|
isUseQuery = props.isUseQuery;
|
|
60
60
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
61
61
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
62
|
+
dictionary = _useLanguage2[0].dictionary,
|
|
62
63
|
t = _useLanguage2[1];
|
|
63
64
|
var theme = (0, _styledComponents.useTheme)();
|
|
64
65
|
var _useUtils = (0, _orderingComponentsAdminExternal.useUtils)(),
|
|
@@ -202,85 +203,35 @@ var OrdersTable = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
202
203
|
}
|
|
203
204
|
};
|
|
204
205
|
var getOrderStatus = function getOrderStatus(s) {
|
|
205
|
-
var
|
|
206
|
-
|
|
207
|
-
var orderStatus =
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}, {
|
|
235
|
-
key: 9,
|
|
236
|
-
value: t('PICK_UP_COMPLETED_BY_DRIVER', (theme === null || theme === 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')
|
|
237
|
-
}, {
|
|
238
|
-
key: 10,
|
|
239
|
-
value: t('PICK_UP_FAILED_BY_DRIVER', (theme === null || theme === 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')
|
|
240
|
-
}, {
|
|
241
|
-
key: 11,
|
|
242
|
-
value: t('DELIVERY_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 || (_theme$defaultLanguag12 = theme.defaultLanguages) === null || _theme$defaultLanguag12 === void 0 ? void 0 : _theme$defaultLanguag12.DELIVERY_COMPLETED_BY_DRIVER) || 'Delivery completed by driver')
|
|
243
|
-
}, {
|
|
244
|
-
key: 12,
|
|
245
|
-
value: t('DELIVERY_FAILED_BY_DRIVER', (theme === null || theme === void 0 || (_theme$defaultLanguag13 = theme.defaultLanguages) === null || _theme$defaultLanguag13 === void 0 ? void 0 : _theme$defaultLanguag13.DELIVERY_FAILED_BY_DRIVER) || 'Delivery Failed by driver')
|
|
246
|
-
}, {
|
|
247
|
-
key: 13,
|
|
248
|
-
value: t('PREORDER', (theme === null || theme === void 0 || (_theme$defaultLanguag14 = theme.defaultLanguages) === null || _theme$defaultLanguag14 === void 0 ? void 0 : _theme$defaultLanguag14.PREORDER) || 'PreOrder')
|
|
249
|
-
}, {
|
|
250
|
-
key: 14,
|
|
251
|
-
value: t('ORDER_NOT_READY', (theme === null || theme === void 0 || (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.ORDER_NOT_READY) || 'Order not ready')
|
|
252
|
-
}, {
|
|
253
|
-
key: 15,
|
|
254
|
-
value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', (theme === null || theme === 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')
|
|
255
|
-
}, {
|
|
256
|
-
key: 16,
|
|
257
|
-
value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', (theme === null || theme === void 0 || (_theme$defaultLanguag17 = theme.defaultLanguages) === null || _theme$defaultLanguag17 === void 0 ? void 0 : _theme$defaultLanguag17.ORDER_STATUS_CANCELLED_BY_CUSTOMER) || 'Order cancelled by customer')
|
|
258
|
-
}, {
|
|
259
|
-
key: 17,
|
|
260
|
-
value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', (theme === null || theme === void 0 || (_theme$defaultLanguag18 = theme.defaultLanguages) === null || _theme$defaultLanguag18 === void 0 ? void 0 : _theme$defaultLanguag18.ORDER_NOT_PICKEDUP_BY_CUSTOMER) || 'Order not picked up by customer')
|
|
261
|
-
}, {
|
|
262
|
-
key: 18,
|
|
263
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === 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')
|
|
264
|
-
}, {
|
|
265
|
-
key: 19,
|
|
266
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', (theme === null || theme === 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')
|
|
267
|
-
}, {
|
|
268
|
-
key: 20,
|
|
269
|
-
value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 || (_theme$defaultLanguag21 = theme.defaultLanguages) === null || _theme$defaultLanguag21 === void 0 ? void 0 : _theme$defaultLanguag21.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS) || 'Customer almost arrived to business')
|
|
270
|
-
}, {
|
|
271
|
-
key: 21,
|
|
272
|
-
value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', (theme === null || theme === void 0 || (_theme$defaultLanguag22 = theme.defaultLanguages) === null || _theme$defaultLanguag22 === void 0 ? void 0 : _theme$defaultLanguag22.ORDER_CUSTOMER_ARRIVED_BUSINESS) || 'Customer arrived to business')
|
|
273
|
-
}, {
|
|
274
|
-
key: 22,
|
|
275
|
-
value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver')
|
|
276
|
-
}, {
|
|
277
|
-
key: 23,
|
|
278
|
-
value: t('ORDER_DRIVER_ON_WAY', 'Driver on way')
|
|
279
|
-
}];
|
|
280
|
-
var objectStatus = orderStatus.find(function (o) {
|
|
281
|
-
return o.key === status;
|
|
282
|
-
});
|
|
283
|
-
return objectStatus && objectStatus;
|
|
206
|
+
var _dictionary$PENDING, _dictionary$COMPLETED, _dictionary$REJECTED, _dictionary$ORDER_STA, _dictionary$PREPARATI, _dictionary$REJECTED_, _dictionary$REJECTED_2, _dictionary$ACCEPTED_, _dictionary$ACCEPTED_2, _dictionary$PICK_UP_C, _dictionary$PICK_UP_F, _dictionary$DELIVERY_, _dictionary$DELIVERY_2, _dictionary$PREORDER, _dictionary$ORDER_NOT, _dictionary$ORDER_PIC, _dictionary$ORDER_STA2, _dictionary$ORDER_NOT2, _dictionary$ORDER_DRI, _dictionary$ORDER_DRI2, _dictionary$ORDER_CUS, _dictionary$ORDER_CUS2, _dictionary$ORDER_LOO, _dictionary$ORDER_DRI3, _orderStatus$Number;
|
|
207
|
+
if (!dictionary) return s;
|
|
208
|
+
var orderStatus = {
|
|
209
|
+
0: (_dictionary$PENDING = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PENDING) !== null && _dictionary$PENDING !== void 0 ? _dictionary$PENDING : 'Pending',
|
|
210
|
+
1: (_dictionary$COMPLETED = dictionary === null || dictionary === void 0 ? void 0 : dictionary.COMPLETED_BY_ADMIN) !== null && _dictionary$COMPLETED !== void 0 ? _dictionary$COMPLETED : 'Completed by admin',
|
|
211
|
+
2: (_dictionary$REJECTED = dictionary === null || dictionary === void 0 ? void 0 : dictionary.REJECTED) !== null && _dictionary$REJECTED !== void 0 ? _dictionary$REJECTED : 'Rejected',
|
|
212
|
+
3: (_dictionary$ORDER_STA = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_STATUS_IN_BUSINESS) !== null && _dictionary$ORDER_STA !== void 0 ? _dictionary$ORDER_STA : 'Driver arrived to business',
|
|
213
|
+
4: (_dictionary$PREPARATI = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PREPARATION_COMPLETED) !== null && _dictionary$PREPARATI !== void 0 ? _dictionary$PREPARATI : 'Preparation Completed',
|
|
214
|
+
5: (_dictionary$REJECTED_ = dictionary === null || dictionary === void 0 ? void 0 : dictionary.REJECTED_BY_BUSINESS) !== null && _dictionary$REJECTED_ !== void 0 ? _dictionary$REJECTED_ : 'Rejected by business',
|
|
215
|
+
6: (_dictionary$REJECTED_2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.REJECTED_BY_DRIVER) !== null && _dictionary$REJECTED_2 !== void 0 ? _dictionary$REJECTED_2 : 'Rejected by Driver',
|
|
216
|
+
7: (_dictionary$ACCEPTED_ = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ACCEPTED_BY_BUSINESS) !== null && _dictionary$ACCEPTED_ !== void 0 ? _dictionary$ACCEPTED_ : 'Accepted by business',
|
|
217
|
+
8: (_dictionary$ACCEPTED_2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ACCEPTED_BY_DRIVER) !== null && _dictionary$ACCEPTED_2 !== void 0 ? _dictionary$ACCEPTED_2 : 'Accepted by driver',
|
|
218
|
+
9: (_dictionary$PICK_UP_C = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PICK_UP_COMPLETED_BY_DRIVER) !== null && _dictionary$PICK_UP_C !== void 0 ? _dictionary$PICK_UP_C : 'Pick up completed by driver',
|
|
219
|
+
10: (_dictionary$PICK_UP_F = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PICK_UP_FAILED_BY_DRIVER) !== null && _dictionary$PICK_UP_F !== void 0 ? _dictionary$PICK_UP_F : 'Pick up Failed by driver',
|
|
220
|
+
11: (_dictionary$DELIVERY_ = dictionary === null || dictionary === void 0 ? void 0 : dictionary.DELIVERY_COMPLETED_BY_DRIVER) !== null && _dictionary$DELIVERY_ !== void 0 ? _dictionary$DELIVERY_ : 'Delivery completed by driver',
|
|
221
|
+
12: (_dictionary$DELIVERY_2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.DELIVERY_FAILED_BY_DRIVER) !== null && _dictionary$DELIVERY_2 !== void 0 ? _dictionary$DELIVERY_2 : 'Delivery Failed by driver',
|
|
222
|
+
13: (_dictionary$PREORDER = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PREORDER) !== null && _dictionary$PREORDER !== void 0 ? _dictionary$PREORDER : 'PreOrder',
|
|
223
|
+
14: (_dictionary$ORDER_NOT = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_NOT_READY) !== null && _dictionary$ORDER_NOT !== void 0 ? _dictionary$ORDER_NOT : 'Order not ready',
|
|
224
|
+
15: (_dictionary$ORDER_PIC = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER) !== null && _dictionary$ORDER_PIC !== void 0 ? _dictionary$ORDER_PIC : 'Order picked up completed by customer',
|
|
225
|
+
16: (_dictionary$ORDER_STA2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_STATUS_CANCELLED_BY_CUSTOMER) !== null && _dictionary$ORDER_STA2 !== void 0 ? _dictionary$ORDER_STA2 : 'Order cancelled by customer',
|
|
226
|
+
17: (_dictionary$ORDER_NOT2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_NOT_PICKEDUP_BY_CUSTOMER) !== null && _dictionary$ORDER_NOT2 !== void 0 ? _dictionary$ORDER_NOT2 : 'Order not picked up by customer',
|
|
227
|
+
18: (_dictionary$ORDER_DRI = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS) !== null && _dictionary$ORDER_DRI !== void 0 ? _dictionary$ORDER_DRI : 'Driver almost arrived to business',
|
|
228
|
+
19: (_dictionary$ORDER_DRI2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER) !== null && _dictionary$ORDER_DRI2 !== void 0 ? _dictionary$ORDER_DRI2 : 'Driver almost arrived to customer',
|
|
229
|
+
20: (_dictionary$ORDER_CUS = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS) !== null && _dictionary$ORDER_CUS !== void 0 ? _dictionary$ORDER_CUS : 'Customer almost arrived to business',
|
|
230
|
+
21: (_dictionary$ORDER_CUS2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_CUSTOMER_ARRIVED_BUSINESS) !== null && _dictionary$ORDER_CUS2 !== void 0 ? _dictionary$ORDER_CUS2 : 'Customer arrived to business',
|
|
231
|
+
22: (_dictionary$ORDER_LOO = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_LOOKING_FOR_DRIVER) !== null && _dictionary$ORDER_LOO !== void 0 ? _dictionary$ORDER_LOO : 'Looking for driver',
|
|
232
|
+
23: (_dictionary$ORDER_DRI3 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_DRIVER_ON_WAY) !== null && _dictionary$ORDER_DRI3 !== void 0 ? _dictionary$ORDER_DRI3 : 'Driver on way'
|
|
233
|
+
};
|
|
234
|
+
return (_orderStatus$Number = orderStatus === null || orderStatus === void 0 ? void 0 : orderStatus[Number(s)]) !== null && _orderStatus$Number !== void 0 ? _orderStatus$Number : s;
|
|
284
235
|
};
|
|
285
236
|
var handleChangeAllowColumns = function handleChangeAllowColumns(type) {
|
|
286
237
|
var _column = allowColumns[type];
|
|
@@ -647,16 +598,16 @@ var OrdersTable = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
647
598
|
})), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
648
599
|
width: 100
|
|
649
600
|
}))))));
|
|
650
|
-
}) : orderList.orders.map(function (order, i) {
|
|
651
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
601
|
+
}) : /*#__PURE__*/_react.default.createElement(_styles.OrderTbody, null, orderList.orders.map(function (order, i) {
|
|
602
|
+
return /*#__PURE__*/_react.default.createElement("tr", {
|
|
652
603
|
key: i,
|
|
653
604
|
className: parseInt(orderDetailId) === order.id ? 'active' : '',
|
|
605
|
+
"data-tour": i === 0 ? 'tour_start' : '',
|
|
606
|
+
"data-status": isEnabledRowInColor && (order === null || order === void 0 ? void 0 : order.time_status),
|
|
654
607
|
onClick: function onClick(e) {
|
|
655
608
|
return handleClickOrder(order, e);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
"data-status": isEnabledRowInColor && (order === null || order === void 0 ? void 0 : order.time_status)
|
|
659
|
-
}, /*#__PURE__*/_react.default.createElement("tr", null, Object.keys(allowColumns).filter(function (col) {
|
|
609
|
+
}
|
|
610
|
+
}, Object.keys(allowColumns).filter(function (col) {
|
|
660
611
|
var _allowColumns$col7;
|
|
661
612
|
return (_allowColumns$col7 = allowColumns[col]) === null || _allowColumns$col7 === void 0 ? void 0 : _allowColumns$col7.visable;
|
|
662
613
|
}).sort(function (col1, col2) {
|
|
@@ -700,13 +651,12 @@ var OrdersTable = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
700
651
|
})))));
|
|
701
652
|
}
|
|
702
653
|
if (column === 'status' && !isSelectedOrders) {
|
|
703
|
-
var _getOrderStatus;
|
|
704
654
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
705
655
|
className: "statusInfo",
|
|
706
656
|
key: "statusInfo".concat(i, "-").concat(index)
|
|
707
657
|
}, /*#__PURE__*/_react.default.createElement(_styles.StatusInfo, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
708
658
|
className: "bold"
|
|
709
|
-
},
|
|
659
|
+
}, getOrderStatus(order.status))));
|
|
710
660
|
}
|
|
711
661
|
if (column === 'cartGroupId') {
|
|
712
662
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
@@ -834,8 +784,8 @@ var OrdersTable = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
834
784
|
utc: false
|
|
835
785
|
}))));
|
|
836
786
|
}
|
|
837
|
-
}))
|
|
838
|
-
}))), pagination && /*#__PURE__*/_react.default.createElement(_styles.WrapperPagination, null, /*#__PURE__*/_react.default.createElement(_Shared.Pagination, {
|
|
787
|
+
}));
|
|
788
|
+
})))), pagination && /*#__PURE__*/_react.default.createElement(_styles.WrapperPagination, null, /*#__PURE__*/_react.default.createElement(_Shared.Pagination, {
|
|
839
789
|
currentPage: pagination.currentPage,
|
|
840
790
|
totalPages: Math.ceil((pagination === null || pagination === void 0 ? void 0 : pagination.total) / pagination.pageSize),
|
|
841
791
|
handleChangePage: handleChangePage,
|
|
@@ -45,7 +45,7 @@ var Table = _styledComponents.default.table(_templateObject5 || (_templateObject
|
|
|
45
45
|
return (_props$theme$colors4 = props.theme.colors) === null || _props$theme$colors4 === void 0 ? void 0 : _props$theme$colors4.headingColor;
|
|
46
46
|
});
|
|
47
47
|
exports.Table = Table;
|
|
48
|
-
var OrderTbody = _styledComponents.default.tbody(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n
|
|
48
|
+
var OrderTbody = _styledComponents.default.tbody(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n tr {\n border-bottom: 1px solid ", ";\n cursor: pointer;\n\n &[data-status=\"delayed\"] {\n background-color: ", ";\n td {\n border-top: 1px solid ", " !important;\n border-bottom: 1px solid ", " !important;\n }\n }\n &[data-status=\"at_risk\"] {\n background-color: ", ";\n td {\n border-top: 1px solid ", " !important;\n border-bottom: 1px solid ", " !important;\n }\n }\n &:hover {\n background-color: ", ";\n }\n &.active {\n background-color: ", ";\n td {\n border-top: 1px solid ", " !important;\n border-bottom: 1px solid ", " !important;\n }\n }\n }\n"])), function (props) {
|
|
49
49
|
return props.theme.colors.borderColor;
|
|
50
50
|
}, function (props) {
|
|
51
51
|
return props.theme.colors.danger100;
|
|
@@ -184,7 +184,7 @@ var Timestatus = _styledComponents.default.div(_templateObject45 || (_templateOb
|
|
|
184
184
|
return timeState === 'delayed' && (0, _styledComponents.css)(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n background-color: #E63757;\n "])));
|
|
185
185
|
});
|
|
186
186
|
exports.Timestatus = Timestatus;
|
|
187
|
-
var Timer = _styledComponents.default.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n min-width: 65px;\n p {\n margin: 0px;\n color: ", ";\n font-size: 12px;\n }\n\n .bold {\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n }\n\n .in_time{\n color: #00D27A;\n }\n\n .at_risk {\n color: #FFC700;\n }\n
|
|
187
|
+
var Timer = _styledComponents.default.div(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n min-width: 65px;\n p {\n margin: 0px;\n color: ", ";\n font-size: 12px;\n }\n\n .bold {\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n }\n\n .in_time{\n color: #00D27A;\n }\n\n .at_risk {\n color: #FFC700;\n }\n\n .delayed {\n color: #E63757;\n }\n"])), function (props) {
|
|
188
188
|
var _props$theme$colors8;
|
|
189
189
|
return (_props$theme$colors8 = props.theme.colors) === null || _props$theme$colors8 === void 0 ? void 0 : _props$theme$colors8.lightGray;
|
|
190
190
|
}, function (props) {
|
|
@@ -28,6 +28,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
28
28
|
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; } }
|
|
29
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
30
|
var ImageCrop = function ImageCrop(props) {
|
|
31
|
+
var _ref;
|
|
31
32
|
var photo = props.photo,
|
|
32
33
|
handleChangePhoto = props.handleChangePhoto,
|
|
33
34
|
onClose = props.onClose,
|
|
@@ -66,8 +67,8 @@ var ImageCrop = function ImageCrop(props) {
|
|
|
66
67
|
cropper.scale(value / 50);
|
|
67
68
|
setZoomValue(value);
|
|
68
69
|
};
|
|
69
|
-
var getCropData =
|
|
70
|
-
|
|
70
|
+
var getCropData = function getCropData() {
|
|
71
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
71
72
|
var _photo, response, _yield$response$json, result, error;
|
|
72
73
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
73
74
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -129,11 +130,8 @@ var ImageCrop = function ImageCrop(props) {
|
|
|
129
130
|
return _context.stop();
|
|
130
131
|
}
|
|
131
132
|
}, _callee);
|
|
132
|
-
}));
|
|
133
|
-
|
|
134
|
-
return _ref.apply(this, arguments);
|
|
135
|
-
};
|
|
136
|
-
}();
|
|
133
|
+
}))).apply(this, arguments);
|
|
134
|
+
};
|
|
137
135
|
var handleChangeRotate = function handleChangeRotate() {
|
|
138
136
|
if (!photo) return;
|
|
139
137
|
cropper.rotate(45);
|
|
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
34
|
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; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var SidebarMenuUI = function SidebarMenuUI(props) {
|
|
37
|
-
var _configs$powered_by_o, _configs$appointments, _sessionState$user, _sessionState$user2, _sessionState$user3, _sessionState$user4, _sessionState$user5, _sessionState$user6, _sessionState$user7, _configs$dashboard_lo, _theme$images, _sessionState$user8, _sessionState$user9, _sessionState$user10, _sessionState$user11, _sessionState$user16, _sessionState$user17, _sessionState$user18, _sessionState$user19, _sessionState$user21, _sessionState$user22, _sessionState$user23, _sessionState$user24, _sessionState$user25, _sessionState$user26, _sessionState$user27, _sessionState$user28, _sessionState$user29, _sessionState$user30, _sessionState$user31, _sessionState$user32, _sessionState$user33, _sessionState$user34, _sessionState$user35, _sessionState$user36, _sessionState$user37, _sessionState$user38, _sessionState$user39;
|
|
37
|
+
var _configs$powered_by_o, _configs$appointments, _sessionState$user, _sessionState$user2, _sessionState$user3, _sessionState$user4, _sessionState$user5, _sessionState$user6, _sessionState$user7, _ref, _configs$dashboard_lo, _theme$images, _sessionState$user8, _sessionState$user9, _sessionState$user10, _sessionState$user11, _sessionState$user16, _sessionState$user17, _sessionState$user18, _sessionState$user19, _sessionState$user21, _sessionState$user22, _sessionState$user23, _sessionState$user24, _sessionState$user25, _sessionState$user26, _sessionState$user27, _sessionState$user28, _sessionState$user29, _sessionState$user30, _sessionState$user31, _sessionState$user32, _sessionState$user33, _sessionState$user34, _sessionState$user35, _sessionState$user36, _sessionState$user37, _sessionState$user38, _sessionState$user39;
|
|
38
38
|
var getBillingToken = props.getBillingToken,
|
|
39
39
|
billingUrl = props.billingUrl;
|
|
40
40
|
var location = (0, _reactRouterDom.useLocation)();
|
|
@@ -341,8 +341,8 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
|
|
|
341
341
|
handleMenuCollapse(true);
|
|
342
342
|
}
|
|
343
343
|
}, [windowSize.width]);
|
|
344
|
-
var handleClickBilling =
|
|
345
|
-
|
|
344
|
+
var handleClickBilling = function handleClickBilling() {
|
|
345
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
346
346
|
var _billingState$result;
|
|
347
347
|
var billingState, _billingState$result2;
|
|
348
348
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -360,11 +360,8 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
|
|
|
360
360
|
return _context.stop();
|
|
361
361
|
}
|
|
362
362
|
}, _callee);
|
|
363
|
-
}));
|
|
364
|
-
|
|
365
|
-
return _ref.apply(this, arguments);
|
|
366
|
-
};
|
|
367
|
-
}();
|
|
363
|
+
}))).apply(this, arguments);
|
|
364
|
+
};
|
|
368
365
|
(0, _react.useEffect)(function () {
|
|
369
366
|
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
|
370
367
|
setShowMessage(true);
|
|
@@ -30,7 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
30
30
|
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; } }
|
|
31
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
32
|
var DriversGroupsListingDetailsUI = function DriversGroupsListingDetailsUI(props) {
|
|
33
|
-
var _history$location2;
|
|
33
|
+
var _history$location2, _ref;
|
|
34
34
|
var driversGroupsState = props.driversGroupsState,
|
|
35
35
|
selectedGroupList = props.selectedGroupList,
|
|
36
36
|
handleSelectGroup = props.handleSelectGroup,
|
|
@@ -81,8 +81,8 @@ var DriversGroupsListingDetailsUI = function DriversGroupsListingDetailsUI(props
|
|
|
81
81
|
handleOpenTour();
|
|
82
82
|
}
|
|
83
83
|
}, [(_history$location2 = history.location) === null || _history$location2 === void 0 || (_history$location2 = _history$location2.state) === null || _history$location2 === void 0 ? void 0 : _history$location2.isFromTourDriversGroup]);
|
|
84
|
-
var getDataFromStorage =
|
|
85
|
-
|
|
84
|
+
var getDataFromStorage = function getDataFromStorage() {
|
|
85
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
86
86
|
var value;
|
|
87
87
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
88
88
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -100,11 +100,8 @@ var DriversGroupsListingDetailsUI = function DriversGroupsListingDetailsUI(props
|
|
|
100
100
|
return _context.stop();
|
|
101
101
|
}
|
|
102
102
|
}, _callee);
|
|
103
|
-
}));
|
|
104
|
-
|
|
105
|
-
return _ref.apply(this, arguments);
|
|
106
|
-
};
|
|
107
|
-
}();
|
|
103
|
+
}))).apply(this, arguments);
|
|
104
|
+
};
|
|
108
105
|
(0, _react.useEffect)(function () {
|
|
109
106
|
getDataFromStorage();
|
|
110
107
|
}, []);
|
|
@@ -27,7 +27,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
27
27
|
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; } }
|
|
28
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
29
|
var BusinessLocation = function BusinessLocation(props) {
|
|
30
|
-
var _configs$google_maps_, _configs$google_maps_2, _ref2, _formState$changes$ti, _formState$changes, _formState$result, _formState$result2, _ref3, _formState$changes$ad, _formState$changes2, _configs$country_auto, _formState$result3, _formState$result4, _ref4, _formState$changes$ad2, _formState$changes3;
|
|
30
|
+
var _configs$google_maps_, _ref, _configs$google_maps_2, _ref2, _formState$changes$ti, _formState$changes, _formState$result, _formState$result2, _ref3, _formState$changes$ad, _formState$changes2, _configs$country_auto, _formState$result3, _formState$result4, _ref4, _formState$changes$ad2, _formState$changes3;
|
|
31
31
|
var business = props.business,
|
|
32
32
|
formState = props.formState,
|
|
33
33
|
setFormState = props.setFormState,
|
|
@@ -86,8 +86,8 @@ var BusinessLocation = function BusinessLocation(props) {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
|
-
var getTimeZone =
|
|
90
|
-
|
|
89
|
+
var getTimeZone = function getTimeZone(_x) {
|
|
90
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(address) {
|
|
91
91
|
var _address$location, _address$location2;
|
|
92
92
|
var date, timestamp, timezoneApiKey, url, response, result;
|
|
93
93
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -124,11 +124,8 @@ var BusinessLocation = function BusinessLocation(props) {
|
|
|
124
124
|
return _context.stop();
|
|
125
125
|
}
|
|
126
126
|
}, _callee);
|
|
127
|
-
}));
|
|
128
|
-
|
|
129
|
-
return _ref.apply(this, arguments);
|
|
130
|
-
};
|
|
131
|
-
}();
|
|
127
|
+
}))).apply(this, arguments);
|
|
128
|
+
};
|
|
132
129
|
var handleChangeCenter = function handleChangeCenter(address) {
|
|
133
130
|
setFormState(function (prevState) {
|
|
134
131
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
@@ -34,6 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
34
|
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; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var BusinessServiceProfessionalDetail = function BusinessServiceProfessionalDetail(props) {
|
|
37
|
+
var _ref;
|
|
37
38
|
var open = props.open,
|
|
38
39
|
_onClose = props.onClose,
|
|
39
40
|
professional = props.professional,
|
|
@@ -73,16 +74,17 @@ var BusinessServiceProfessionalDetail = function BusinessServiceProfessionalDeta
|
|
|
73
74
|
setIsMenuOpen(value);
|
|
74
75
|
document.getElementById('business_service').style.width = value ? width > 1000 ? '500px' : '100%' : '0';
|
|
75
76
|
};
|
|
76
|
-
var onDeleteCustomer =
|
|
77
|
-
|
|
77
|
+
var onDeleteCustomer = function onDeleteCustomer() {
|
|
78
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
79
|
+
var _handleOnAccept;
|
|
78
80
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
79
81
|
while (1) switch (_context2.prev = _context2.next) {
|
|
80
82
|
case 0:
|
|
81
83
|
setConfirm({
|
|
82
84
|
open: true,
|
|
83
85
|
content: t('QUESTION_DELETE_USER', 'Are you sure that you want to delete this user?'),
|
|
84
|
-
handleOnAccept: function () {
|
|
85
|
-
|
|
86
|
+
handleOnAccept: function handleOnAccept() {
|
|
87
|
+
return (_handleOnAccept = _handleOnAccept || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
86
88
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
87
89
|
while (1) switch (_context.prev = _context.next) {
|
|
88
90
|
case 0:
|
|
@@ -98,23 +100,16 @@ var BusinessServiceProfessionalDetail = function BusinessServiceProfessionalDeta
|
|
|
98
100
|
return _context.stop();
|
|
99
101
|
}
|
|
100
102
|
}, _callee);
|
|
101
|
-
}));
|
|
102
|
-
|
|
103
|
-
return _handleOnAccept.apply(this, arguments);
|
|
104
|
-
}
|
|
105
|
-
return handleOnAccept;
|
|
106
|
-
}()
|
|
103
|
+
}))).apply(this, arguments);
|
|
104
|
+
}
|
|
107
105
|
});
|
|
108
106
|
case 1:
|
|
109
107
|
case "end":
|
|
110
108
|
return _context2.stop();
|
|
111
109
|
}
|
|
112
110
|
}, _callee2);
|
|
113
|
-
}));
|
|
114
|
-
|
|
115
|
-
return _ref.apply(this, arguments);
|
|
116
|
-
};
|
|
117
|
-
}();
|
|
111
|
+
}))).apply(this, arguments);
|
|
112
|
+
};
|
|
118
113
|
var closeAlert = function closeAlert() {
|
|
119
114
|
setAlertState({
|
|
120
115
|
open: false,
|
|
@@ -42,7 +42,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
42
42
|
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; } }
|
|
43
43
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
44
|
var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
45
|
-
var _configs$allow_busine;
|
|
45
|
+
var _configs$allow_busine, _ref;
|
|
46
46
|
var businessList = props.businessList,
|
|
47
47
|
pagination = props.pagination,
|
|
48
48
|
searchValue = props.searchValue,
|
|
@@ -180,8 +180,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
180
180
|
setIsTutorialMode(true);
|
|
181
181
|
handleOpenAddBusiness();
|
|
182
182
|
};
|
|
183
|
-
var handleSetStorage =
|
|
184
|
-
|
|
183
|
+
var handleSetStorage = function handleSetStorage() {
|
|
184
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
185
185
|
var preVisited, visited;
|
|
186
186
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
187
187
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -206,11 +206,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
206
206
|
return _context.stop();
|
|
207
207
|
}
|
|
208
208
|
}, _callee);
|
|
209
|
-
}));
|
|
210
|
-
|
|
211
|
-
return _ref.apply(this, arguments);
|
|
212
|
-
};
|
|
213
|
-
}();
|
|
209
|
+
}))).apply(this, arguments);
|
|
210
|
+
};
|
|
214
211
|
var handleViewMethod = function handleViewMethod(method) {
|
|
215
212
|
setViewMethod(method);
|
|
216
213
|
if (method === 'list') {
|
|
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
34
|
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; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var ProductDetailsAdvancedUI = function ProductDetailsAdvancedUI(props) {
|
|
37
|
-
var _formState$changes10, _productState$estimat, _taxSelected$value, _fesSelected$value, _productState$cost_pr, _productState$cost_of, _productState$minimum, _productState$maximum, _productState$calorie, _productState$weight, _productState$weight_;
|
|
37
|
+
var _ref, _formState$changes10, _productState$estimat, _taxSelected$value, _fesSelected$value, _productState$cost_pr, _productState$cost_of, _productState$minimum, _productState$maximum, _productState$calorie, _productState$weight, _productState$weight_;
|
|
38
38
|
var formState = props.formState,
|
|
39
39
|
productState = props.productState,
|
|
40
40
|
handleClickProperty = props.handleClickProperty,
|
|
@@ -138,8 +138,8 @@ var ProductDetailsAdvancedUI = function ProductDetailsAdvancedUI(props) {
|
|
|
138
138
|
payload: null
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
|
-
var getTaxes =
|
|
142
|
-
|
|
141
|
+
var getTaxes = function getTaxes() {
|
|
142
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
143
143
|
var inheritOption, addTaxOption, taxesOptions;
|
|
144
144
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
145
145
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -181,11 +181,8 @@ var ProductDetailsAdvancedUI = function ProductDetailsAdvancedUI(props) {
|
|
|
181
181
|
return _context.stop();
|
|
182
182
|
}
|
|
183
183
|
}, _callee);
|
|
184
|
-
}));
|
|
185
|
-
|
|
186
|
-
return _ref.apply(this, arguments);
|
|
187
|
-
};
|
|
188
|
-
}();
|
|
184
|
+
}))).apply(this, arguments);
|
|
185
|
+
};
|
|
189
186
|
var getFees = function getFees() {
|
|
190
187
|
var inheritOption = {
|
|
191
188
|
name: t('INHERIT_FROM_BUSINESS', 'Inherit from business'),
|
|
@@ -37,6 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
37
37
|
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; } }
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
40
|
+
var _ref;
|
|
40
41
|
var productState = props.productState,
|
|
41
42
|
extrasState = props.extrasState,
|
|
42
43
|
isAddMode = props.isAddMode,
|
|
@@ -160,8 +161,8 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
160
161
|
}, 750);
|
|
161
162
|
setTimer(_timer);
|
|
162
163
|
};
|
|
163
|
-
var handleChangeExtra =
|
|
164
|
-
|
|
164
|
+
var handleChangeExtra = function handleChangeExtra(_x, _x2) {
|
|
165
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id, changes) {
|
|
165
166
|
var _extraInputRef$curren;
|
|
166
167
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
167
168
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -185,11 +186,8 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
185
186
|
return _context.stop();
|
|
186
187
|
}
|
|
187
188
|
}, _callee);
|
|
188
|
-
}));
|
|
189
|
-
|
|
190
|
-
return _ref.apply(this, arguments);
|
|
191
|
-
};
|
|
192
|
-
}();
|
|
189
|
+
}))).apply(this, arguments);
|
|
190
|
+
};
|
|
193
191
|
(0, _react.useEffect)(function () {
|
|
194
192
|
var _productState$product;
|
|
195
193
|
var _extraIds = [];
|
package/_modules/utils/index.js
CHANGED
|
@@ -11,6 +11,7 @@ var _FaCreditCard = _interopRequireDefault(require("@meronex/icons/fa/FaCreditCa
|
|
|
11
11
|
var _moment = _interopRequireDefault(require("moment"));
|
|
12
12
|
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
13
13
|
var _currency = require("../config/currency.js");
|
|
14
|
+
var _ref2, _ref3, _ref4;
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
16
17
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
@@ -280,8 +281,8 @@ var verifyDecimals = function verifyDecimals(value, parser) {
|
|
|
280
281
|
* Fuctions to control the local storage
|
|
281
282
|
*/
|
|
282
283
|
exports.verifyDecimals = verifyDecimals;
|
|
283
|
-
var getStorageItem =
|
|
284
|
-
|
|
284
|
+
var getStorageItem = function getStorageItem(_x, _x2) {
|
|
285
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(storageKey, isJson) {
|
|
285
286
|
var value;
|
|
286
287
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
287
288
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -302,14 +303,11 @@ var getStorageItem = /*#__PURE__*/function () {
|
|
|
302
303
|
return _context.stop();
|
|
303
304
|
}
|
|
304
305
|
}, _callee);
|
|
305
|
-
}));
|
|
306
|
-
|
|
307
|
-
return _ref2.apply(this, arguments);
|
|
308
|
-
};
|
|
309
|
-
}();
|
|
306
|
+
}))).apply(this, arguments);
|
|
307
|
+
};
|
|
310
308
|
exports.getStorageItem = getStorageItem;
|
|
311
|
-
var setStorageItem =
|
|
312
|
-
|
|
309
|
+
var setStorageItem = function setStorageItem(_x3, _x4, _x5) {
|
|
310
|
+
return (_ref3 = _ref3 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(key, val, isJson) {
|
|
313
311
|
var value;
|
|
314
312
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
315
313
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -322,14 +320,11 @@ var setStorageItem = /*#__PURE__*/function () {
|
|
|
322
320
|
return _context2.stop();
|
|
323
321
|
}
|
|
324
322
|
}, _callee2);
|
|
325
|
-
}));
|
|
326
|
-
|
|
327
|
-
return _ref3.apply(this, arguments);
|
|
328
|
-
};
|
|
329
|
-
}();
|
|
323
|
+
}))).apply(this, arguments);
|
|
324
|
+
};
|
|
330
325
|
exports.setStorageItem = setStorageItem;
|
|
331
|
-
var removeStorageItem =
|
|
332
|
-
|
|
326
|
+
var removeStorageItem = function removeStorageItem(_x6) {
|
|
327
|
+
return (_ref4 = _ref4 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(key) {
|
|
333
328
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
334
329
|
while (1) switch (_context3.prev = _context3.next) {
|
|
335
330
|
case 0:
|
|
@@ -340,11 +335,8 @@ var removeStorageItem = /*#__PURE__*/function () {
|
|
|
340
335
|
return _context3.stop();
|
|
341
336
|
}
|
|
342
337
|
}, _callee3);
|
|
343
|
-
}));
|
|
344
|
-
|
|
345
|
-
return _ref4.apply(this, arguments);
|
|
346
|
-
};
|
|
347
|
-
}();
|
|
338
|
+
}))).apply(this, arguments);
|
|
339
|
+
};
|
|
348
340
|
|
|
349
341
|
/**
|
|
350
342
|
* Fuctions to convert formatted time from seconds
|