ordering-ui-admin-external 1.30.7 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{ordering-ui-admin.a29dbc53a1f823ce0ce5.js → ordering-ui-admin.2f5049887bf500c65392.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/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/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.2f5049887bf500c65392.js.LICENSE.txt} +0 -0
|
@@ -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.0",
|
|
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.31.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}>
|
|
@@ -134,3 +134,37 @@ export const EmptyContent = styled.div`
|
|
|
134
134
|
justify-content: center;
|
|
135
135
|
padding: 10px;
|
|
136
136
|
`
|
|
137
|
+
|
|
138
|
+
export const AnalyticsTimeZoneWrapper = styled.div`
|
|
139
|
+
width: 100%;
|
|
140
|
+
button {
|
|
141
|
+
margin-top: 5px;
|
|
142
|
+
background: ${props => props.theme.colors.secundary};
|
|
143
|
+
border-radius: 7.6px;
|
|
144
|
+
padding: 7px 15px;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
color: ${props => props.theme.colors.secundaryContrast};
|
|
147
|
+
border: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@media (min-width: 600px) {
|
|
151
|
+
width: fit-content;
|
|
152
|
+
margin-left: 10px;
|
|
153
|
+
${props => props.theme.rtl && css`
|
|
154
|
+
margin-right: 10px;
|
|
155
|
+
margin-left: 0;
|
|
156
|
+
`}
|
|
157
|
+
}
|
|
158
|
+
`
|
|
159
|
+
|
|
160
|
+
export const TimeZoneAndCalendar = styled.div`
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
width: 100%;
|
|
165
|
+
|
|
166
|
+
@media (min-width: 600px) {
|
|
167
|
+
flex-direction: row;
|
|
168
|
+
width: fit-content;
|
|
169
|
+
}
|
|
170
|
+
`
|
|
@@ -9,6 +9,7 @@ import { AnalyticsBusinessFilter } from '../AnalyticsBusinessFilter'
|
|
|
9
9
|
import { ReportsDriverFilter } from '../ReportsDriverFilter'
|
|
10
10
|
import { ReportsDriverGroupFilter } from '../ReportsDriverGroupFilter'
|
|
11
11
|
import { CountryFilter } from '../CountryFilter'
|
|
12
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
12
13
|
import {
|
|
13
14
|
DriverDistanceContainer,
|
|
14
15
|
Title,
|
|
@@ -22,7 +23,9 @@ import {
|
|
|
22
23
|
Tbody,
|
|
23
24
|
Tfoot,
|
|
24
25
|
TableWrapper,
|
|
25
|
-
EmptyContent
|
|
26
|
+
EmptyContent,
|
|
27
|
+
AnalyticsTimeZoneWrapper,
|
|
28
|
+
TimeZoneAndCalendar
|
|
26
29
|
} from './styles'
|
|
27
30
|
|
|
28
31
|
const ReportsDriverDistanceUI = (props) => {
|
|
@@ -138,12 +141,17 @@ const ReportsDriverDistanceUI = (props) => {
|
|
|
138
141
|
</Button>
|
|
139
142
|
)}
|
|
140
143
|
</BrandBusinessWrapper>
|
|
144
|
+
<TimeZoneAndCalendar>
|
|
145
|
+
<AnalyticsTimeZoneWrapper>
|
|
146
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
147
|
+
</AnalyticsTimeZoneWrapper>
|
|
141
148
|
<CalendarWrapper>
|
|
142
149
|
<AnalyticsCalendar
|
|
143
150
|
handleChangeDate={handleChangeDate}
|
|
144
151
|
defaultValue={filterList}
|
|
145
152
|
/>
|
|
146
153
|
</CalendarWrapper>
|
|
154
|
+
</TimeZoneAndCalendar>
|
|
147
155
|
</ButtonActionList>
|
|
148
156
|
<DistancePerBrandWrapper>
|
|
149
157
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -254,7 +262,7 @@ const ReportsDriverDistanceUI = (props) => {
|
|
|
254
262
|
/>
|
|
255
263
|
</DriverDistanceContainer>
|
|
256
264
|
<Alert
|
|
257
|
-
title={t('
|
|
265
|
+
title={t('DRIVER_DISTANCE', 'Driver distance')}
|
|
258
266
|
content={alertState.content}
|
|
259
267
|
acceptText={t('ACCEPT', 'Accept')}
|
|
260
268
|
open={alertState.open}
|
|
@@ -210,3 +210,37 @@ export const EmptyContent = styled.div`
|
|
|
210
210
|
justify-content: center;
|
|
211
211
|
padding: 10px;
|
|
212
212
|
`
|
|
213
|
+
|
|
214
|
+
export const AnalyticsTimeZoneWrapper = styled.div`
|
|
215
|
+
width: 100%;
|
|
216
|
+
button {
|
|
217
|
+
margin-top: 5px;
|
|
218
|
+
background: ${props => props.theme.colors.secundary};
|
|
219
|
+
border-radius: 7.6px;
|
|
220
|
+
padding: 7px 15px;
|
|
221
|
+
font-size: 14px;
|
|
222
|
+
color: ${props => props.theme.colors.secundaryContrast};
|
|
223
|
+
border: none;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@media (min-width: 600px) {
|
|
227
|
+
width: fit-content;
|
|
228
|
+
margin-left: 10px;
|
|
229
|
+
${props => props.theme.rtl && css`
|
|
230
|
+
margin-right: 10px;
|
|
231
|
+
margin-left: 0;
|
|
232
|
+
`}
|
|
233
|
+
}
|
|
234
|
+
`
|
|
235
|
+
|
|
236
|
+
export const TimeZoneAndCalendar = styled.div`
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
width: 100%;
|
|
241
|
+
|
|
242
|
+
@media (min-width: 600px) {
|
|
243
|
+
flex-direction: row;
|
|
244
|
+
width: fit-content;
|
|
245
|
+
}
|
|
246
|
+
`
|
|
@@ -8,6 +8,7 @@ import { Modal } from '../../Shared'
|
|
|
8
8
|
import { AnalyticsBusinessFilter } from '../AnalyticsBusinessFilter'
|
|
9
9
|
import { ReportsBrandFilter } from '../ReportsBrandFilter'
|
|
10
10
|
import { CountryFilter } from '../CountryFilter'
|
|
11
|
+
import { AnalyticsFilterTimeZone } from '../AnalyticsFilterTimeZone'
|
|
11
12
|
import {
|
|
12
13
|
ReportsBusinessSpendContainer,
|
|
13
14
|
Title,
|
|
@@ -21,7 +22,9 @@ import {
|
|
|
21
22
|
Tbody,
|
|
22
23
|
Tfoot,
|
|
23
24
|
TableWrapper,
|
|
24
|
-
EmptyContent
|
|
25
|
+
EmptyContent,
|
|
26
|
+
AnalyticsTimeZoneWrapper,
|
|
27
|
+
TimeZoneAndCalendar
|
|
25
28
|
} from './styles'
|
|
26
29
|
|
|
27
30
|
const ReportsDriverOrderUI = (props) => {
|
|
@@ -112,12 +115,17 @@ const ReportsDriverOrderUI = (props) => {
|
|
|
112
115
|
</Button>
|
|
113
116
|
)}
|
|
114
117
|
</BrandBusinessWrapper>
|
|
118
|
+
<TimeZoneAndCalendar>
|
|
119
|
+
<AnalyticsTimeZoneWrapper>
|
|
120
|
+
<AnalyticsFilterTimeZone {...props} />
|
|
121
|
+
</AnalyticsTimeZoneWrapper>
|
|
115
122
|
<CalendarWrapper>
|
|
116
123
|
<AnalyticsCalendar
|
|
117
124
|
handleChangeDate={handleChangeDate}
|
|
118
125
|
defaultValue={filterList}
|
|
119
126
|
/>
|
|
120
127
|
</CalendarWrapper>
|
|
128
|
+
</TimeZoneAndCalendar>
|
|
121
129
|
</ButtonActionList>
|
|
122
130
|
<DistancePerBrandWrapper>
|
|
123
131
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|