ordering-ui-admin-external 1.30.7 → 1.31.1
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.a29dbc53a1f823ce0ce5.js → ordering-ui-admin.b84e1f62fd043e740aba.js} +2 -2
- package/_modules/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +80 -47
- package/_modules/components/BusinessIntelligence/BusinessAnalytics/index.js +2 -1
- package/_modules/components/BusinessIntelligence/BusinessAnalytics/styles.js +6 -4
- package/_modules/components/BusinessIntelligence/ReportsAverageSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsAverageSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsCustomer/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsCustomer/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/index.js +4 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/index.js +4 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/index.js +4 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrders/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsOrders/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSpentTIme/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsSpentTIme/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsUsers/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsUsers/styles.js +13 -3
- package/_modules/components/Delivery/AddressList/index.js +15 -5
- package/_modules/components/Delivery/DriversGroupAutoassign/index.js +14 -7
- package/_modules/components/Delivery/DriversGroupAutoassign/styles.js +5 -3
- package/_modules/components/Home/HomePage/index.js +3 -2
- package/_modules/components/MyProducts/OrderingWebsite/index.js +25 -18
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +1 -1
- package/_modules/components/Orders/AllInOne/index.js +15 -6
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +102 -9
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +19 -3
- package/_modules/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/index.js +21 -9
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +8 -5
- package/_modules/components/Orders/DeliveriesManager/index.js +11 -2
- package/_modules/components/Orders/DeliveryDashboard/index.js +6 -6
- package/_modules/components/Orders/OrderNotification/index.js +43 -14
- package/_modules/components/Orders/OrderNotification/styles.js +18 -3
- package/_modules/components/Orders/OrderStatusFilterBar/index.js +6 -6
- package/_modules/components/Orders/OrdersContentHeader/index.js +11 -2
- package/_modules/components/Orders/OrdersContentHeader/styles.js +20 -4
- package/_modules/components/Orders/OrdersDashboardList/index.js +34 -5
- package/_modules/components/Orders/OrdersFilterGroup/index.js +18 -1
- package/_modules/components/Orders/OrdersListing/index.js +6 -0
- package/_modules/components/Orders/OrdersManager/index.js +16 -7
- package/_modules/components/Orders/WebsocketStatus/index.js +6 -1
- package/_modules/components/Settings/WebhookListSelector/index.js +6 -0
- package/_modules/components/Shared/InputPhoneNumber/index.js +2 -3
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +6 -2
- package/_modules/components/Stores/BusinessDeviceDetail/index.js +1 -1
- package/_modules/components/Stores/BusinessProductsListing/index.js +5 -1
- package/_modules/components/Stores/BusinessSummary/index.js +7 -4
- package/_modules/components/Stores/BusinessWebhooks/index.js +6 -0
- package/_modules/components/Stores/ProductExtraOptionDetails/index.js +6 -1
- package/_modules/components/Stores/ProductExtraOptions/index.js +8 -2
- package/_modules/components/Stores/ProductExtraSuboption/index.js +6 -1
- package/_modules/components/Stores/ProductExtras/index.js +8 -3
- package/_modules/components/Stores/ProductSummary/index.js +4 -1
- package/_modules/components/Users/UserAddForm/index.js +0 -2
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +39 -17
- package/src/components/BusinessIntelligence/BusinessAnalytics/index.js +6 -1
- package/src/components/BusinessIntelligence/BusinessAnalytics/styles.js +2 -0
- package/src/components/BusinessIntelligence/ReportsAverageSales/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsAverageSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsCustomer/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsCustomer/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverDistance/index.js +10 -2
- package/src/components/BusinessIntelligence/ReportsDriverDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverOrder/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverOrder/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverSchedule/index.js +16 -8
- package/src/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverSpend/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverSpend/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsGeneralSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsGeneralSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsHeatMap/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsHeatMap/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrderDistance/index.js +10 -1
- package/src/components/BusinessIntelligence/ReportsOrderDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrderStatus/index.js +10 -2
- package/src/components/BusinessIntelligence/ReportsOrderStatus/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrders/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsOrders/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSpentTIme/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsSpentTIme/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsTopDrivers/index.js +9 -2
- package/src/components/BusinessIntelligence/ReportsTopDrivers/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsUsers/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsUsers/styles.js +34 -0
- package/src/components/Delivery/AddressList/index.js +11 -1
- package/src/components/Delivery/DriversGroupAutoassign/index.js +17 -6
- package/src/components/Delivery/DriversGroupAutoassign/styles.js +10 -0
- package/src/components/Home/HomePage/index.js +5 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +25 -12
- package/src/components/MyProducts/OrderingWebsite/styles.js +0 -2
- package/src/components/Orders/AllInOne/index.js +8 -2
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +118 -6
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +56 -0
- package/src/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/index.js +19 -11
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +3 -0
- package/src/components/Orders/DeliveriesManager/index.js +8 -2
- package/src/components/Orders/DeliveryDashboard/index.js +4 -4
- package/src/components/Orders/OrderNotification/index.js +31 -5
- package/src/components/Orders/OrderNotification/styles.js +37 -0
- package/src/components/Orders/OrderStatusFilterBar/index.js +10 -9
- package/src/components/Orders/OrdersContentHeader/index.js +17 -3
- package/src/components/Orders/OrdersContentHeader/styles.js +54 -0
- package/src/components/Orders/OrdersDashboardList/index.js +6 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +16 -0
- package/src/components/Orders/OrdersListing/index.js +7 -0
- package/src/components/Orders/OrdersManager/index.js +11 -3
- package/src/components/Orders/WebsocketStatus/index.js +5 -2
- package/src/components/Settings/WebhookListSelector/index.js +3 -1
- package/src/components/Shared/InputPhoneNumber/index.js +2 -3
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +16 -12
- package/src/components/Stores/BusinessDeviceDetail/index.js +1 -1
- package/src/components/Stores/BusinessProductsListing/index.js +4 -0
- package/src/components/Stores/BusinessSummary/index.js +21 -15
- package/src/components/Stores/BusinessWebhooks/index.js +3 -1
- package/src/components/Stores/ProductExtraOptionDetails/index.js +8 -0
- package/src/components/Stores/ProductExtraOptions/index.js +10 -1
- package/src/components/Stores/ProductExtraSuboption/index.js +7 -1
- package/src/components/Stores/ProductExtras/index.js +6 -1
- package/src/components/Stores/ProductSummary/index.js +7 -1
- package/src/components/Users/UserAddForm/index.js +0 -2
- package/template/config.json +1 -1
- /package/_bundles/{ordering-ui-admin.a29dbc53a1f823ce0ce5.js.LICENSE.txt → ordering-ui-admin.b84e1f62fd043e740aba.js.LICENSE.txt} +0 -0
|
@@ -33,7 +33,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
33
33
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
34
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
35
|
var BusinessSummary = function BusinessSummary(props) {
|
|
36
|
-
var _businessState$busine5, _businessState$busine6, _businessState$busine7, _businessState$busine8, _theme$images, _businessState$busine9;
|
|
36
|
+
var _configs$white_label_, _businessState$busine5, _businessState$busine6, _businessState$busine7, _businessState$busine8, _theme$images, _businessState$busine9;
|
|
37
37
|
var isAdmin = props.isAdmin,
|
|
38
38
|
businessState = props.businessState,
|
|
39
39
|
actionSidebar = props.actionSidebar,
|
|
@@ -81,6 +81,7 @@ var BusinessSummary = function BusinessSummary(props) {
|
|
|
81
81
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
82
82
|
confirm = _useState6[0],
|
|
83
83
|
setConfirm = _useState6[1];
|
|
84
|
+
var isEnabledWhiteLabelModule = configs === null || configs === void 0 || (_configs$white_label_ = configs.white_label_module) === null || _configs$white_label_ === void 0 ? void 0 : _configs$white_label_.value;
|
|
84
85
|
var handleOpenCategory = function handleOpenCategory() {
|
|
85
86
|
var _businessState$busine;
|
|
86
87
|
events.emit('go_to_page', {
|
|
@@ -200,7 +201,7 @@ var BusinessSummary = function BusinessSummary(props) {
|
|
|
200
201
|
onClick: function onClick() {
|
|
201
202
|
return handleDuplicateBusiness();
|
|
202
203
|
}
|
|
203
|
-
}, t('DUPLICATE', 'Duplicate')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
204
|
+
}, t('DUPLICATE', 'Duplicate')), !isEnabledWhiteLabelModule && /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
204
205
|
onClick: function onClick() {
|
|
205
206
|
return handleSelectedItem('personalization');
|
|
206
207
|
}
|
|
@@ -231,7 +232,7 @@ var BusinessSummary = function BusinessSummary(props) {
|
|
|
231
232
|
borderRadius: "8px",
|
|
232
233
|
onClick: handleOpenCategory,
|
|
233
234
|
disabled: businessState === null || businessState === void 0 ? void 0 : businessState.loading
|
|
234
|
-
}, t('CATEGORIES_AND_PRODUCTS', 'Categories & products')), /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
235
|
+
}, t('CATEGORIES_AND_PRODUCTS', 'Categories & products')), !isEnabledWhiteLabelModule && /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
235
236
|
color: "primary",
|
|
236
237
|
outline: true,
|
|
237
238
|
borderRadius: "8px",
|
|
@@ -245,7 +246,9 @@ var BusinessSummary = function BusinessSummary(props) {
|
|
|
245
246
|
return configs.key !== 'spoonity_key';
|
|
246
247
|
}) : businessConfigs.filter(function (c) {
|
|
247
248
|
return !itemsExcluded.includes(c.key);
|
|
248
|
-
})).
|
|
249
|
+
})).filter(function (item) {
|
|
250
|
+
return isEnabledWhiteLabelModule ? item.key !== 'personalization' : true;
|
|
251
|
+
}).map(function (config) {
|
|
249
252
|
return /*#__PURE__*/_react.default.createElement(_styles2.BusinessConfigItem, {
|
|
250
253
|
key: config.key,
|
|
251
254
|
active: selectedItem === config.key,
|
|
@@ -96,6 +96,12 @@ var BusinessWebhooksUI = function BusinessWebhooksUI(props) {
|
|
|
96
96
|
}, {
|
|
97
97
|
value: 'orders_delivery_failed_driver',
|
|
98
98
|
content: t('ORDERS_DELIVERY_FAILED_DRIVER')
|
|
99
|
+
}, {
|
|
100
|
+
value: 'preorder_updated',
|
|
101
|
+
content: t('PREORDER_UPDATED', 'Preorder updated')
|
|
102
|
+
}, {
|
|
103
|
+
value: 'drivers_changes',
|
|
104
|
+
content: t('DRIVERS_CHANGES', 'Driver changes')
|
|
99
105
|
}];
|
|
100
106
|
var timeList = [{
|
|
101
107
|
value: '',
|
|
@@ -65,6 +65,8 @@ var ProductExtraOptionDetailsUI = function ProductExtraOptionDetailsUI(props) {
|
|
|
65
65
|
handleChangeItem = props.handleChangeItem,
|
|
66
66
|
isAddForm = props.isAddForm,
|
|
67
67
|
setIsAddForm = props.setIsAddForm,
|
|
68
|
+
handleDuplicateOption = props.handleDuplicateOption,
|
|
69
|
+
handleDuplicateSubOption = props.handleDuplicateSubOption,
|
|
68
70
|
dragoverSubOptionId = props.dragoverSubOptionId,
|
|
69
71
|
isSubOptionsBottom = props.isSubOptionsBottom,
|
|
70
72
|
handleDragStart = props.handleDragStart,
|
|
@@ -231,6 +233,8 @@ var ProductExtraOptionDetailsUI = function ProductExtraOptionDetailsUI(props) {
|
|
|
231
233
|
}));
|
|
232
234
|
}
|
|
233
235
|
}, t('CUSTOM_FIELDS', 'Custom Fields')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
236
|
+
onClick: handleDuplicateOption
|
|
237
|
+
}, t('DUPLICATE', 'Duplicate')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
234
238
|
onClick: function onClick() {
|
|
235
239
|
return setOpenModal(_objectSpread(_objectSpread({}, openModal), {}, {
|
|
236
240
|
externalId: true
|
|
@@ -293,7 +297,8 @@ var ProductExtraOptionDetailsUI = function ProductExtraOptionDetailsUI(props) {
|
|
|
293
297
|
handleDragStart: handleDragStart,
|
|
294
298
|
hanldeDragOver: hanldeDragOver,
|
|
295
299
|
handleDrop: handleDrop,
|
|
296
|
-
handleDragEnd: handleDragEnd
|
|
300
|
+
handleDragEnd: handleDragEnd,
|
|
301
|
+
handleDuplicateSubOption: handleDuplicateSubOption
|
|
297
302
|
});
|
|
298
303
|
}), isAddForm && /*#__PURE__*/_react.default.createElement(_styles2.AdddSubOptionForm, {
|
|
299
304
|
onSubmit: handleSubmit(handleAddOption)
|
|
@@ -61,7 +61,9 @@ var ProductExtraOptionsUI = function ProductExtraOptionsUI(props) {
|
|
|
61
61
|
hanldeDragOver = props.hanldeDragOver,
|
|
62
62
|
handleDrop = props.handleDrop,
|
|
63
63
|
handleDragEnd = props.handleDragEnd,
|
|
64
|
-
handleUpdateExtraState = props.handleUpdateExtraState
|
|
64
|
+
handleUpdateExtraState = props.handleUpdateExtraState,
|
|
65
|
+
handleDuplicateExtra = props.handleDuplicateExtra,
|
|
66
|
+
setExtraState = props.setExtraState;
|
|
65
67
|
var theme = (0, _styledComponents.useTheme)();
|
|
66
68
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
67
69
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -281,6 +283,8 @@ var ProductExtraOptionsUI = function ProductExtraOptionsUI(props) {
|
|
|
281
283
|
}));
|
|
282
284
|
}
|
|
283
285
|
}, t('CUSTOM_FIELDS', 'Custom Fields')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
286
|
+
onClick: handleDuplicateExtra
|
|
287
|
+
}, t('DUPLICATE', 'Duplicate')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
284
288
|
onClick: function onClick() {
|
|
285
289
|
return setOpenModal(_objectSpread(_objectSpread({}, openModal), {}, {
|
|
286
290
|
externalId: true
|
|
@@ -468,7 +472,9 @@ var ProductExtraOptionsUI = function ProductExtraOptionsUI(props) {
|
|
|
468
472
|
},
|
|
469
473
|
handleUpdateBusinessState: handleUpdateBusinessState,
|
|
470
474
|
handleSucccessDeleteOption: handleSucccessDeleteOption,
|
|
471
|
-
isMaxError: isMaxError
|
|
475
|
+
isMaxError: isMaxError,
|
|
476
|
+
parentExtraState: extraState,
|
|
477
|
+
setParentExtraState: setExtraState
|
|
472
478
|
})), /*#__PURE__*/_react.default.createElement(_Shared.Modal, {
|
|
473
479
|
width: "70%",
|
|
474
480
|
open: openModal === null || openModal === void 0 ? void 0 : openModal.metaField,
|
|
@@ -50,7 +50,8 @@ var ProductExtraSuboption = function ProductExtraSuboption(props) {
|
|
|
50
50
|
handleDragStart = props.handleDragStart,
|
|
51
51
|
hanldeDragOver = props.hanldeDragOver,
|
|
52
52
|
handleDrop = props.handleDrop,
|
|
53
|
-
handleDragEnd = props.handleDragEnd
|
|
53
|
+
handleDragEnd = props.handleDragEnd,
|
|
54
|
+
handleDuplicateSubOption = props.handleDuplicateSubOption;
|
|
54
55
|
var theme = (0, _styledComponents.useTheme)();
|
|
55
56
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
56
57
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -360,6 +361,10 @@ var ProductExtraSuboption = function ProductExtraSuboption(props) {
|
|
|
360
361
|
}));
|
|
361
362
|
}
|
|
362
363
|
}, t('CUSTOM_FIELDS', 'Custom fields')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
364
|
+
onClick: function onClick() {
|
|
365
|
+
return handleDuplicateSubOption(subOption === null || subOption === void 0 ? void 0 : subOption.id);
|
|
366
|
+
}
|
|
367
|
+
}, t('DUPLICATE', 'Duplicate')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
363
368
|
onClick: function onClick() {
|
|
364
369
|
return setExternalIdOpen(true);
|
|
365
370
|
}
|
|
@@ -49,7 +49,8 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
49
49
|
hanldeDragOver = props.hanldeDragOver,
|
|
50
50
|
handleDrop = props.handleDrop,
|
|
51
51
|
handleDragEnd = props.handleDragEnd,
|
|
52
|
-
handleUpdateExtraState = props.handleUpdateExtraState
|
|
52
|
+
handleUpdateExtraState = props.handleUpdateExtraState,
|
|
53
|
+
setExtrasState = props.setExtrasState;
|
|
53
54
|
var history = (0, _reactRouterDom.useHistory)();
|
|
54
55
|
var query = new URLSearchParams((0, _reactRouterDom.useLocation)().search);
|
|
55
56
|
var theme = (0, _styledComponents.useTheme)();
|
|
@@ -248,7 +249,9 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
248
249
|
extra: currentExtra,
|
|
249
250
|
handleChangeExtraName: handleChangeExtraInput,
|
|
250
251
|
handleUpdateBusinessState: handleUpdateBusinessState,
|
|
251
|
-
handleUpdateExtraState: handleUpdateExtraState
|
|
252
|
+
handleUpdateExtraState: handleUpdateExtraState,
|
|
253
|
+
extrasState: extrasState,
|
|
254
|
+
setExtrasState: setExtrasState
|
|
252
255
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, openExtraDetails && /*#__PURE__*/_react.default.createElement(_Shared.Modal, {
|
|
253
256
|
width: "80%",
|
|
254
257
|
open: openExtraDetails,
|
|
@@ -265,7 +268,9 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
265
268
|
extra: currentExtra,
|
|
266
269
|
handleChangeExtraName: handleChangeExtraInput,
|
|
267
270
|
handleUpdateBusinessState: handleUpdateBusinessState,
|
|
268
|
-
handleUpdateExtraState: handleUpdateExtraState
|
|
271
|
+
handleUpdateExtraState: handleUpdateExtraState,
|
|
272
|
+
extrasState: extrasState,
|
|
273
|
+
setExtrasState: setExtrasState
|
|
269
274
|
}))), /*#__PURE__*/_react.default.createElement(_Shared.Alert, {
|
|
270
275
|
title: t('WEB_APPNAME', 'Ordering'),
|
|
271
276
|
content: alertState.content,
|
|
@@ -42,7 +42,8 @@ var ProductSummary = function ProductSummary(props) {
|
|
|
42
42
|
handleDeleteProduct = props.handleDeleteProduct,
|
|
43
43
|
showProductOption = props.showProductOption,
|
|
44
44
|
isExpand = props.isExpand,
|
|
45
|
-
setIsExpand = props.setIsExpand
|
|
45
|
+
setIsExpand = props.setIsExpand,
|
|
46
|
+
handleDuplicateProduct = props.handleDuplicateProduct;
|
|
46
47
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
47
48
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
48
49
|
t = _useLanguage2[1];
|
|
@@ -164,6 +165,8 @@ var ProductSummary = function ProductSummary(props) {
|
|
|
164
165
|
return setIsProductPreview(true);
|
|
165
166
|
}
|
|
166
167
|
}, t('PREVIEW', 'Preview')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
168
|
+
onClick: handleDuplicateProduct
|
|
169
|
+
}, t('DUPLICATE', 'Duplicate')), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Dropdown.Item, {
|
|
167
170
|
onClick: function onClick() {
|
|
168
171
|
return handleShowOption('custom_fields');
|
|
169
172
|
}
|
|
@@ -48,7 +48,6 @@ var UserAddFormUI = function UserAddFormUI(props) {
|
|
|
48
48
|
handleChangeUserType = props.handleChangeUserType,
|
|
49
49
|
handlechangeImage = props.handlechangeImage,
|
|
50
50
|
handleChangeSwtich = props.handleChangeSwtich,
|
|
51
|
-
defaultCountry = props.defaultCountry,
|
|
52
51
|
defaultPhoneNumber = props.defaultPhoneNumber,
|
|
53
52
|
isFromCustomOrder = props.isFromCustomOrder,
|
|
54
53
|
hideUserTypeSelector = props.hideUserTypeSelector;
|
|
@@ -302,7 +301,6 @@ var UserAddFormUI = function UserAddFormUI(props) {
|
|
|
302
301
|
autoComplete: "off"
|
|
303
302
|
}));
|
|
304
303
|
}), !!showInputPhoneNumber && /*#__PURE__*/_react.default.createElement(_Shared.InputPhoneNumber, {
|
|
305
|
-
defaultCountry: defaultCountry,
|
|
306
304
|
value: userPhoneNumber,
|
|
307
305
|
setValue: handleChangePhoneNumber,
|
|
308
306
|
handleIsValid: setIsValidPhoneNumber
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.1",
|
|
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.
|
|
86
|
+
"ordering-components-admin-external": "1.32.0",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|
|
@@ -30,29 +30,48 @@ export const AnalyticsDriverOrders = (props) => {
|
|
|
30
30
|
const [dataOptions, setDataOptions] = useState(null)
|
|
31
31
|
|
|
32
32
|
const generateData = () => {
|
|
33
|
-
|
|
33
|
+
if (!isOrders) {
|
|
34
|
+
const values = chartDataList.data.dataset.dataset.map((item, index) => {
|
|
35
|
+
const list = []
|
|
36
|
+
if (item?.data?.length > 0) {
|
|
37
|
+
for (const value of item?.data) {
|
|
38
|
+
list.push(value.y)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
label: item.label,
|
|
43
|
+
data: [...list],
|
|
44
|
+
fill: false,
|
|
45
|
+
backgroundColor: 'rgba(75,192,192,0.2)',
|
|
46
|
+
borderColor: lighten(index / 10, '#2C7BE5'),
|
|
47
|
+
tension: 0.4,
|
|
48
|
+
borderWidth: 3
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
return values
|
|
52
|
+
} else {
|
|
34
53
|
const list = []
|
|
35
|
-
if (
|
|
36
|
-
for (const value of
|
|
54
|
+
if (chartDataList.data.dataset.dataset?.data?.length > 0) {
|
|
55
|
+
for (const value of chartDataList.data.dataset.dataset?.data) {
|
|
37
56
|
list.push(value.y)
|
|
38
57
|
}
|
|
39
58
|
}
|
|
40
|
-
return {
|
|
41
|
-
label:
|
|
59
|
+
return [{
|
|
60
|
+
label: chartDataList.data.dataset?.dataset?.label,
|
|
42
61
|
data: [...list],
|
|
43
62
|
fill: false,
|
|
44
63
|
backgroundColor: 'rgba(75,192,192,0.2)',
|
|
45
|
-
borderColor:
|
|
64
|
+
borderColor: '#2C7BE5',
|
|
46
65
|
tension: 0.4,
|
|
47
66
|
borderWidth: 3
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return values
|
|
67
|
+
}]
|
|
68
|
+
}
|
|
51
69
|
}
|
|
52
70
|
|
|
53
71
|
const generateLabel = () => {
|
|
54
72
|
const values = []
|
|
55
|
-
chartDataList?.data?.dataset?.dataset?.
|
|
73
|
+
const chartData = isOrders ? chartDataList?.data?.dataset?.dataset?.data : chartDataList?.data?.dataset?.dataset?.[0]?.data
|
|
74
|
+
chartData && chartData.forEach(data => {
|
|
56
75
|
values.push(data.x)
|
|
57
76
|
})
|
|
58
77
|
return values
|
|
@@ -83,8 +102,8 @@ export const AnalyticsDriverOrders = (props) => {
|
|
|
83
102
|
|
|
84
103
|
const TotalOrders = () => {
|
|
85
104
|
let orders = 0
|
|
86
|
-
if (!chartDataList?.data?.dataset?.dataset
|
|
87
|
-
for (const data of chartDataList?.data?.dataset?.dataset
|
|
105
|
+
if (!chartDataList?.data?.dataset?.dataset?.data || chartDataList?.data?.dataset?.dataset?.data.length === 0) return orders
|
|
106
|
+
for (const data of chartDataList?.data?.dataset?.dataset?.data) {
|
|
88
107
|
orders += data.y
|
|
89
108
|
}
|
|
90
109
|
return orders
|
|
@@ -108,7 +127,8 @@ export const AnalyticsDriverOrders = (props) => {
|
|
|
108
127
|
|
|
109
128
|
const downloadCSV = () => {
|
|
110
129
|
let csv = `${t('TIME', 'Time')}, ${isOrders ? t('ORDERS', 'Orders') : t('SALES', 'Sales')}\n`
|
|
111
|
-
|
|
130
|
+
const chartData = isOrders ? chartDataList?.data?.dataset?.dataset?.data : chartDataList?.data?.dataset?.dataset[0]?.data
|
|
131
|
+
for (const row of chartData) {
|
|
112
132
|
csv += `${row.x},`
|
|
113
133
|
csv += `${row.y},`
|
|
114
134
|
csv += '\n'
|
|
@@ -126,12 +146,14 @@ export const AnalyticsDriverOrders = (props) => {
|
|
|
126
146
|
}
|
|
127
147
|
|
|
128
148
|
const previewChart = () => {
|
|
129
|
-
|
|
149
|
+
const chartData = isOrders ? chartDataList?.data?.dataset?.dataset?.data : chartDataList?.data?.dataset?.dataset[0]?.data
|
|
150
|
+
if (chartData.length === 0) return
|
|
130
151
|
setIsShowPreview(true)
|
|
131
152
|
}
|
|
132
153
|
|
|
133
154
|
useEffect(() => {
|
|
134
|
-
|
|
155
|
+
const chartData = isOrders ? chartDataList?.data?.dataset?.dataset?.data : chartDataList?.data?.dataset?.dataset[0]?.data
|
|
156
|
+
if (chartData && chartData?.length > 0) {
|
|
135
157
|
const defaultData = {
|
|
136
158
|
labels: generateLabel(),
|
|
137
159
|
datasets: generateData()
|
|
@@ -145,7 +167,7 @@ export const AnalyticsDriverOrders = (props) => {
|
|
|
145
167
|
<Container>
|
|
146
168
|
<ChartHeaderContainer>
|
|
147
169
|
<p>{isOrders ? t('ORDERS', 'Orders') : t('SALES', 'Sales')}</p>
|
|
148
|
-
<ActionBlock disabled={!chartDataList?.data?.dataset?.dataset[0]?.data
|
|
170
|
+
<ActionBlock disabled={!(isOrders ? chartDataList?.data?.dataset?.dataset?.data : chartDataList?.data?.dataset?.dataset[0]?.data)?.length}>
|
|
149
171
|
<BsArrowsAngleExpand onClick={previewChart} />
|
|
150
172
|
<BsDownload className='download-view' onClick={downloadCSV} />
|
|
151
173
|
</ActionBlock>
|
|
@@ -155,7 +177,7 @@ export const AnalyticsDriverOrders = (props) => {
|
|
|
155
177
|
chartDataList?.loading ? (
|
|
156
178
|
<Skeleton height={150} />
|
|
157
179
|
) : (
|
|
158
|
-
(chartDataList?.data?.dataset?.dataset[0]?.data
|
|
180
|
+
((isOrders ? chartDataList?.data?.dataset?.dataset?.data : chartDataList?.data?.dataset?.dataset[0]?.data)?.length > 0 && dataOptions) ? <Line data={dataOptions} options={options} ref={chartRef} /> : <EmptyContent>{t('NO_DATA', 'No Data')}</EmptyContent>
|
|
159
181
|
)
|
|
160
182
|
}
|
|
161
183
|
</ChartContentWrapper>
|
|
@@ -16,6 +16,7 @@ import { AnalyticsRegisterUsers } from '../AnalyticsRegisterUsers'
|
|
|
16
16
|
import { AnalyticsCustomerSatisfaction } from '../AnalyticsCustomerSatisfaction'
|
|
17
17
|
import { AnalyticsOrdersAcceptSpend } from '../AnalyticsOrdersAcceptSpend'
|
|
18
18
|
import { AnalyticsSpendList } from '../AnalyticsSpendList'
|
|
19
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
19
20
|
|
|
20
21
|
import {
|
|
21
22
|
BusinessAnalyticsContainer,
|
|
@@ -25,7 +26,8 @@ import {
|
|
|
25
26
|
BusinessFilterWrapper,
|
|
26
27
|
BusinessCalendarWrapper,
|
|
27
28
|
AnalyticsContentWrapper,
|
|
28
|
-
MapWrraper
|
|
29
|
+
MapWrraper,
|
|
30
|
+
AnalyticsTimeZoneWrapper
|
|
29
31
|
} from './styles'
|
|
30
32
|
import { ReportsBrandFilter } from '../ReportsBrandFilter'
|
|
31
33
|
import { CountryFilter } from '../CountryFilter'
|
|
@@ -88,6 +90,9 @@ const BusinessAnalyticsUI = (props) => {
|
|
|
88
90
|
{t('BUSINESS', 'Business')} ({filterList?.businessIds ? filterList?.businessIds.length : t('ALL', 'All')})
|
|
89
91
|
</Button>
|
|
90
92
|
</BusinessFilterWrapper>
|
|
93
|
+
<AnalyticsTimeZoneWrapper>
|
|
94
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
95
|
+
</AnalyticsTimeZoneWrapper>
|
|
91
96
|
<BusinessCalendarWrapper>
|
|
92
97
|
<AnalyticsCalendar
|
|
93
98
|
{...props}
|
|
@@ -109,6 +109,8 @@ export const BusinessCalendarWrapper = styled(BusinessFilterWrapper)`
|
|
|
109
109
|
}
|
|
110
110
|
`
|
|
111
111
|
|
|
112
|
+
export const AnalyticsTimeZoneWrapper = styled(BusinessFilterWrapper)``
|
|
113
|
+
|
|
112
114
|
export const AnalyticsContentWrapper = styled.div`
|
|
113
115
|
> div {
|
|
114
116
|
margin-top: 40px;
|
|
@@ -7,6 +7,7 @@ import { AnalyticsCalendar } from '../AnalyticsCalendar'
|
|
|
7
7
|
import { Modal } from '../../Shared'
|
|
8
8
|
import { ReportsDriverGroupFilter } from '../ReportsDriverGroupFilter'
|
|
9
9
|
import { ReportsBrandFilter } from '../ReportsBrandFilter'
|
|
10
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
10
11
|
import {
|
|
11
12
|
OrderStatusContainer,
|
|
12
13
|
Title,
|
|
@@ -20,7 +21,9 @@ import {
|
|
|
20
21
|
Tbody,
|
|
21
22
|
Tfoot,
|
|
22
23
|
TableWrapper,
|
|
23
|
-
EmptyContent
|
|
24
|
+
EmptyContent,
|
|
25
|
+
AnalyticsTimeZoneWrapper,
|
|
26
|
+
TimeZoneAndCalendar
|
|
24
27
|
} from './styles'
|
|
25
28
|
|
|
26
29
|
const ReportsAverageSalesUI = (props) => {
|
|
@@ -110,12 +113,17 @@ const ReportsAverageSalesUI = (props) => {
|
|
|
110
113
|
{t('BRAND', 'Brand')} ({filterList?.franchises_id ? filterList?.franchises_id?.length : t('ALL', 'All')})
|
|
111
114
|
</Button>
|
|
112
115
|
</BrandBusinessWrapper>
|
|
113
|
-
<
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
<TimeZoneAndCalendar>
|
|
117
|
+
<AnalyticsTimeZoneWrapper>
|
|
118
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
119
|
+
</AnalyticsTimeZoneWrapper>
|
|
120
|
+
<CalendarWrapper>
|
|
121
|
+
<AnalyticsCalendar
|
|
122
|
+
handleChangeDate={handleChangeDate}
|
|
123
|
+
defaultValue={filterList}
|
|
124
|
+
/>
|
|
125
|
+
</CalendarWrapper>
|
|
126
|
+
</TimeZoneAndCalendar>
|
|
119
127
|
</ButtonActionList>
|
|
120
128
|
<OrderStatusTableWrapper>
|
|
121
129
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -204,3 +204,37 @@ export const EmptyContent = styled.div`
|
|
|
204
204
|
justify-content: center;
|
|
205
205
|
padding: 10px;
|
|
206
206
|
`
|
|
207
|
+
|
|
208
|
+
export const AnalyticsTimeZoneWrapper = styled.div`
|
|
209
|
+
width: 100%;
|
|
210
|
+
button {
|
|
211
|
+
margin-top: 5px;
|
|
212
|
+
background: ${props => props.theme.colors.secundary};
|
|
213
|
+
border-radius: 7.6px;
|
|
214
|
+
padding: 7px 15px;
|
|
215
|
+
font-size: 14px;
|
|
216
|
+
color: ${props => props.theme.colors.secundaryContrast};
|
|
217
|
+
border: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@media (min-width: 600px) {
|
|
221
|
+
width: fit-content;
|
|
222
|
+
margin-left: 10px;
|
|
223
|
+
${props => props.theme.rtl && css`
|
|
224
|
+
margin-right: 10px;
|
|
225
|
+
margin-left: 0;
|
|
226
|
+
`}
|
|
227
|
+
}
|
|
228
|
+
`
|
|
229
|
+
|
|
230
|
+
export const TimeZoneAndCalendar = styled.div`
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
width: 100%;
|
|
235
|
+
|
|
236
|
+
@media (min-width: 600px) {
|
|
237
|
+
flex-direction: row;
|
|
238
|
+
width: fit-content;
|
|
239
|
+
}
|
|
240
|
+
`
|
|
@@ -10,6 +10,7 @@ import { AnalyticsBusinessFilter } from '../AnalyticsBusinessFilter'
|
|
|
10
10
|
import { ReportsBrandFilter } from '../ReportsBrandFilter'
|
|
11
11
|
import { ReportsBarChart } from '../ReportsBarChart'
|
|
12
12
|
import { CountryFilter } from '../CountryFilter'
|
|
13
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
13
14
|
import {
|
|
14
15
|
ReportsDistanceContainer,
|
|
15
16
|
Title,
|
|
@@ -26,7 +27,9 @@ import {
|
|
|
26
27
|
EmptyContent,
|
|
27
28
|
CustomerLegend,
|
|
28
29
|
LegendItem,
|
|
29
|
-
LegendContent
|
|
30
|
+
LegendContent,
|
|
31
|
+
AnalyticsTimeZoneWrapper,
|
|
32
|
+
TimeZoneAndCalendar
|
|
30
33
|
} from './styles'
|
|
31
34
|
|
|
32
35
|
const ReportsBusinessDistanceUI = (props) => {
|
|
@@ -162,12 +165,17 @@ const ReportsBusinessDistanceUI = (props) => {
|
|
|
162
165
|
</Button>
|
|
163
166
|
)}
|
|
164
167
|
</BrandBusinessWrapper>
|
|
168
|
+
<TimeZoneAndCalendar>
|
|
169
|
+
<AnalyticsTimeZoneWrapper>
|
|
170
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
171
|
+
</AnalyticsTimeZoneWrapper>
|
|
165
172
|
<CalendarWrapper>
|
|
166
173
|
<AnalyticsCalendar
|
|
167
174
|
handleChangeDate={handleChangeDate}
|
|
168
175
|
defaultValue={filterList}
|
|
169
176
|
/>
|
|
170
177
|
</CalendarWrapper>
|
|
178
|
+
</TimeZoneAndCalendar>
|
|
171
179
|
</ButtonActionList>
|
|
172
180
|
<DistancePerBrandWrapper>
|
|
173
181
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -248,3 +248,37 @@ export const LegendContent = styled.div`
|
|
|
248
248
|
color: ${props => props.theme?.colors.lightGray};
|
|
249
249
|
}
|
|
250
250
|
`
|
|
251
|
+
|
|
252
|
+
export const AnalyticsTimeZoneWrapper = styled.div`
|
|
253
|
+
width: 100%;
|
|
254
|
+
button {
|
|
255
|
+
margin-top: 5px;
|
|
256
|
+
background: ${props => props.theme.colors.secundary};
|
|
257
|
+
border-radius: 7.6px;
|
|
258
|
+
padding: 7px 15px;
|
|
259
|
+
font-size: 14px;
|
|
260
|
+
color: ${props => props.theme.colors.secundaryContrast};
|
|
261
|
+
border: none;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@media (min-width: 600px) {
|
|
265
|
+
width: fit-content;
|
|
266
|
+
margin-left: 10px;
|
|
267
|
+
${props => props.theme.rtl && css`
|
|
268
|
+
margin-right: 10px;
|
|
269
|
+
margin-left: 0;
|
|
270
|
+
`}
|
|
271
|
+
}
|
|
272
|
+
`
|
|
273
|
+
|
|
274
|
+
export const TimeZoneAndCalendar = styled.div`
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
flex-direction: column;
|
|
278
|
+
width: 100%;
|
|
279
|
+
|
|
280
|
+
@media (min-width: 600px) {
|
|
281
|
+
flex-direction: row;
|
|
282
|
+
width: fit-content;
|
|
283
|
+
}
|
|
284
|
+
`
|
|
@@ -12,6 +12,7 @@ import { Modal } from '../../Shared'
|
|
|
12
12
|
import { AnalyticsBusinessFilter } from '../AnalyticsBusinessFilter'
|
|
13
13
|
import { ReportsBrandFilter } from '../ReportsBrandFilter'
|
|
14
14
|
import { CountryFilter } from '../CountryFilter'
|
|
15
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
15
16
|
import {
|
|
16
17
|
ReportsBusinessSpendContainer,
|
|
17
18
|
Title,
|
|
@@ -25,7 +26,9 @@ import {
|
|
|
25
26
|
Tbody,
|
|
26
27
|
Tfoot,
|
|
27
28
|
TableWrapper,
|
|
28
|
-
EmptyContent
|
|
29
|
+
EmptyContent,
|
|
30
|
+
AnalyticsTimeZoneWrapper,
|
|
31
|
+
TimeZoneAndCalendar
|
|
29
32
|
} from './styles'
|
|
30
33
|
|
|
31
34
|
const ReportsBusinessSpendUI = (props) => {
|
|
@@ -129,12 +132,17 @@ const ReportsBusinessSpendUI = (props) => {
|
|
|
129
132
|
</Button>
|
|
130
133
|
)}
|
|
131
134
|
</BrandBusinessWrapper>
|
|
135
|
+
<TimeZoneAndCalendar>
|
|
136
|
+
<AnalyticsTimeZoneWrapper>
|
|
137
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
138
|
+
</AnalyticsTimeZoneWrapper>
|
|
132
139
|
<CalendarWrapper>
|
|
133
140
|
<AnalyticsCalendar
|
|
134
141
|
handleChangeDate={handleChangeDate}
|
|
135
142
|
defaultValue={filterList}
|
|
136
143
|
/>
|
|
137
144
|
</CalendarWrapper>
|
|
145
|
+
</TimeZoneAndCalendar>
|
|
138
146
|
</ButtonActionList>
|
|
139
147
|
<DistancePerBrandWrapper>
|
|
140
148
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -214,3 +214,37 @@ export const EmptyContent = styled.div`
|
|
|
214
214
|
justify-content: center;
|
|
215
215
|
padding: 10px;
|
|
216
216
|
`
|
|
217
|
+
|
|
218
|
+
export const AnalyticsTimeZoneWrapper = styled.div`
|
|
219
|
+
width: 100%;
|
|
220
|
+
button {
|
|
221
|
+
margin-top: 5px;
|
|
222
|
+
background: ${props => props.theme.colors.secundary};
|
|
223
|
+
border-radius: 7.6px;
|
|
224
|
+
padding: 7px 15px;
|
|
225
|
+
font-size: 14px;
|
|
226
|
+
color: ${props => props.theme.colors.secundaryContrast};
|
|
227
|
+
border: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@media (min-width: 600px) {
|
|
231
|
+
width: fit-content;
|
|
232
|
+
margin-left: 10px;
|
|
233
|
+
${props => props.theme.rtl && css`
|
|
234
|
+
margin-right: 10px;
|
|
235
|
+
margin-left: 0;
|
|
236
|
+
`}
|
|
237
|
+
}
|
|
238
|
+
`
|
|
239
|
+
|
|
240
|
+
export const TimeZoneAndCalendar = styled.div`
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
width: 100%;
|
|
245
|
+
|
|
246
|
+
@media (min-width: 600px) {
|
|
247
|
+
flex-direction: row;
|
|
248
|
+
width: fit-content;
|
|
249
|
+
}
|
|
250
|
+
`
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import { Download } from 'react-bootstrap-icons'
|
|
7
7
|
import { Bar } from 'react-chartjs-2'
|
|
8
8
|
import Skeleton from 'react-loading-skeleton'
|
|
9
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
9
10
|
|
|
10
11
|
import {
|
|
11
12
|
ReportsTopDriversContainer,
|
|
@@ -16,7 +17,9 @@ import {
|
|
|
16
17
|
ChartBlockWrapper,
|
|
17
18
|
ChartTitleBlock,
|
|
18
19
|
ChartWrapper,
|
|
19
|
-
EmptyContent
|
|
20
|
+
EmptyContent,
|
|
21
|
+
AnalyticsTimeZoneWrapper,
|
|
22
|
+
TimeZoneAndCalendar
|
|
20
23
|
} from './styles'
|
|
21
24
|
import { Button } from '../../../styles'
|
|
22
25
|
import { AnalyticsCalendar } from '../AnalyticsCalendar'
|
|
@@ -143,12 +146,17 @@ const ReportsCustomerUI = (props) => {
|
|
|
143
146
|
{t('APP_ID', 'App id')} ({filterList?.app_ids ? filterList?.app_ids.length : t('ALL', 'All')})
|
|
144
147
|
</Button>
|
|
145
148
|
</BrandBusinessWrapper>
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
<TimeZoneAndCalendar>
|
|
150
|
+
<AnalyticsTimeZoneWrapper>
|
|
151
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
152
|
+
</AnalyticsTimeZoneWrapper>
|
|
153
|
+
<CalendarWrapper>
|
|
154
|
+
<AnalyticsCalendar
|
|
155
|
+
handleChangeDate={handleChangeDate}
|
|
156
|
+
defaultValue={filterList}
|
|
157
|
+
/>
|
|
158
|
+
</CalendarWrapper>
|
|
159
|
+
</TimeZoneAndCalendar>
|
|
152
160
|
</ButtonActionList>
|
|
153
161
|
<ChartBlockWrapper>
|
|
154
162
|
<ChartTitleBlock active={reportData?.content?.dataset?.dataset?.data?.length > 0}>
|