ordering-ui-admin-external 1.30.4 → 1.30.6
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.78d273d2999264e3e020.js → ordering-ui-admin.7f043fd81bc0483e027b.js} +2 -2
- package/_modules/components/BusinessIntelligence/CountryFilter/index.js +3 -1
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/index.js +17 -12
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/index.js +13 -8
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/index.js +22 -17
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/index.js +13 -8
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +13 -8
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/index.js +13 -8
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/index.js +15 -10
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/index.js +28 -23
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/index.js +17 -12
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/index.js +20 -15
- package/_modules/components/BusinessIntelligence/ReportsOrders/index.js +18 -13
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +13 -8
- package/_modules/components/BusinessIntelligence/ReportsSales/index.js +17 -12
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/index.js +1 -2
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +2 -1
- package/_modules/components/Orders/CreateCustomOrder/OrderTypeSelector/styles.js +16 -0
- package/_modules/components/Orders/CreateCustomOrder/SelectProducts/index.js +1 -1
- package/_modules/components/Orders/OrderLogisticInformation/index.js +1 -3
- package/_modules/components/Orders/OrdersTable/index.js +1 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/CountryFilter/index.js +3 -1
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsDriverDistance/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsDriverOrder/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsDriverSpend/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsGeneralSales/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsHeatMap/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsOrderDistance/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsOrderStatus/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsOrders/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/index.js +7 -7
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsSales/index.js +16 -11
- package/src/components/BusinessIntelligence/ReportsTopDrivers/index.js +7 -8
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +2 -0
- package/src/components/Orders/CreateCustomOrder/OrderTypeSelector/styles.js +35 -0
- package/src/components/Orders/CreateCustomOrder/SelectProducts/index.js +1 -1
- package/src/components/Orders/OrderLogisticInformation/index.js +1 -1
- package/src/components/Orders/OrdersTable/index.js +0 -1
- /package/_bundles/{ordering-ui-admin.78d273d2999264e3e020.js.LICENSE.txt → ordering-ui-admin.7f043fd81bc0483e027b.js.LICENSE.txt} +0 -0
|
@@ -34,6 +34,8 @@ const ReportsOrderDistanceUI = (props) => {
|
|
|
34
34
|
} = props
|
|
35
35
|
|
|
36
36
|
const [, t] = useLanguage()
|
|
37
|
+
const [isOneMoreCountry, setIsOneMoreCountry] = useState(false)
|
|
38
|
+
|
|
37
39
|
const tableRef = useRef(null)
|
|
38
40
|
const [isBusinessFilter, setIsBusinessFilter] = useState(false)
|
|
39
41
|
const [isBrandFilter, setIsBrandFilter] = useState(false)
|
|
@@ -148,18 +150,20 @@ const ReportsOrderDistanceUI = (props) => {
|
|
|
148
150
|
>
|
|
149
151
|
{t('BUSINESS', 'Business')} ({filterList?.businessIds ? filterList?.businessIds.length : t('ALL', 'All')})
|
|
150
152
|
</Button>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
{isOneMoreCountry && (
|
|
154
|
+
<Button
|
|
155
|
+
onClick={() => setOpenCountryFilter(true)}
|
|
156
|
+
>
|
|
157
|
+
{t('COUNTRY', 'Country')}
|
|
158
|
+
</Button>
|
|
159
|
+
)}
|
|
156
160
|
</BrandBusinessWrapper>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
<CalendarWrapper>
|
|
162
|
+
<AnalyticsCalendar
|
|
163
|
+
handleChangeDate={handleChangeDate}
|
|
164
|
+
defaultValue={filterList}
|
|
165
|
+
/>
|
|
166
|
+
</CalendarWrapper>
|
|
163
167
|
</ButtonActionList>
|
|
164
168
|
<DistancePerBrandWrapper>
|
|
165
169
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -255,6 +259,7 @@ const ReportsOrderDistanceUI = (props) => {
|
|
|
255
259
|
</Modal>
|
|
256
260
|
<CountryFilter
|
|
257
261
|
{...props}
|
|
262
|
+
setIsOneMoreCountry={setIsOneMoreCountry}
|
|
258
263
|
openCountryFilter={openCountryFilter}
|
|
259
264
|
setOpenCountryFilter={setOpenCountryFilter}
|
|
260
265
|
/>
|
|
@@ -35,6 +35,8 @@ const ReportsOrderStatusUI = (props) => {
|
|
|
35
35
|
|
|
36
36
|
const [, t] = useLanguage()
|
|
37
37
|
const [{ parsePrice }] = useUtils()
|
|
38
|
+
const [isOneMoreCountry, setIsOneMoreCountry] = useState(false)
|
|
39
|
+
|
|
38
40
|
const [isBusinessFilter, setIsBusinessFilter] = useState(false)
|
|
39
41
|
const [isBrandFilter, setIsBrandFilter] = useState(false)
|
|
40
42
|
const [openCountryFilter, setOpenCountryFilter] = useState(true)
|
|
@@ -129,18 +131,20 @@ const ReportsOrderStatusUI = (props) => {
|
|
|
129
131
|
>
|
|
130
132
|
{t('ORDER_TYPE', 'Order type')} ({filterList?.delivery_types_ids ? filterList?.delivery_types_ids.length : t('ALL', 'All')})
|
|
131
133
|
</Button>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
{isOneMoreCountry && (
|
|
135
|
+
<Button
|
|
136
|
+
onClick={() => setOpenCountryFilter(true)}
|
|
137
|
+
>
|
|
138
|
+
{t('COUNTRY', 'Country')}
|
|
139
|
+
</Button>
|
|
140
|
+
)}
|
|
137
141
|
</BrandBusinessWrapper>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
<CalendarWrapper>
|
|
143
|
+
<AnalyticsCalendar
|
|
144
|
+
handleChangeDate={handleChangeDate}
|
|
145
|
+
defaultValue={filterList}
|
|
146
|
+
/>
|
|
147
|
+
</CalendarWrapper>
|
|
144
148
|
</ButtonActionList>
|
|
145
149
|
<OrderStatusTableWrapper>
|
|
146
150
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -297,6 +301,7 @@ const ReportsOrderStatusUI = (props) => {
|
|
|
297
301
|
</Modal>
|
|
298
302
|
<CountryFilter
|
|
299
303
|
{...props}
|
|
304
|
+
setIsOneMoreCountry={setIsOneMoreCountry}
|
|
300
305
|
openCountryFilter={openCountryFilter}
|
|
301
306
|
setOpenCountryFilter={setOpenCountryFilter}
|
|
302
307
|
/>
|
|
@@ -35,6 +35,8 @@ const ReportsOrdersUI = (props) => {
|
|
|
35
35
|
} = props
|
|
36
36
|
|
|
37
37
|
const [, t] = useLanguage()
|
|
38
|
+
const [isOneMoreCountry, setIsOneMoreCountry] = useState(false)
|
|
39
|
+
|
|
38
40
|
const [dataOptions, setDataOptions] = useState(null)
|
|
39
41
|
const [isBusinessFilter, setIsBusinessFilter] = useState(false)
|
|
40
42
|
const [openCountryFilter, setOpenCountryFilter] = useState(true)
|
|
@@ -149,18 +151,20 @@ const ReportsOrdersUI = (props) => {
|
|
|
149
151
|
>
|
|
150
152
|
{t('BUSINESS', 'Business')} ({filterList?.businessIds ? filterList?.businessIds.length : t('ALL', 'All')})
|
|
151
153
|
</Button>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
{isOneMoreCountry && (
|
|
155
|
+
<Button
|
|
156
|
+
onClick={() => setOpenCountryFilter(true)}
|
|
157
|
+
>
|
|
158
|
+
{t('COUNTRY', 'Country')}
|
|
159
|
+
</Button>
|
|
160
|
+
)}
|
|
157
161
|
</BrandBusinessWrapper>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
<CalendarWrapper>
|
|
163
|
+
<AnalyticsCalendar
|
|
164
|
+
handleChangeDate={handleChangeDate}
|
|
165
|
+
defaultValue={filterList}
|
|
166
|
+
/>
|
|
167
|
+
</CalendarWrapper>
|
|
164
168
|
</ButtonActionList>
|
|
165
169
|
<ChartBlockWrapper>
|
|
166
170
|
<ChartTitleBlock active={reportData?.content?.dataset?.dataset?.data?.length > 0}>
|
|
@@ -215,6 +219,7 @@ const ReportsOrdersUI = (props) => {
|
|
|
215
219
|
</Modal>
|
|
216
220
|
<CountryFilter
|
|
217
221
|
{...props}
|
|
222
|
+
setIsOneMoreCountry={setIsOneMoreCountry}
|
|
218
223
|
openCountryFilter={openCountryFilter}
|
|
219
224
|
setOpenCountryFilter={setOpenCountryFilter}
|
|
220
225
|
/>
|
|
@@ -103,7 +103,7 @@ const ReportsPaymethodSalesUI = (props) => {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
const thObj = {
|
|
106
|
-
REPORT_HEADER_PAYMETHOD: 'Paymethod'
|
|
106
|
+
REPORT_HEADER_PAYMETHOD: 'Paymethod'
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
return (
|
|
@@ -122,12 +122,12 @@ const ReportsPaymethodSalesUI = (props) => {
|
|
|
122
122
|
{t('BRAND', 'Brand')} ({filterList?.franchises_id ? filterList?.franchises_id?.length : t('ALL', 'All')})
|
|
123
123
|
</Button>
|
|
124
124
|
</BrandBusinessWrapper>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
<CalendarWrapper>
|
|
126
|
+
<AnalyticsCalendar
|
|
127
|
+
handleChangeDate={handleChangeDate}
|
|
128
|
+
defaultValue={filterList}
|
|
129
|
+
/>
|
|
130
|
+
</CalendarWrapper>
|
|
131
131
|
</ButtonActionList>
|
|
132
132
|
<DistancePerBrandWrapper>
|
|
133
133
|
<DistanceTitleBlock active={reportData?.content?.body?.rows?.length > 0}>
|
|
@@ -35,6 +35,8 @@ const ReportsSaleAndCategoryUI = (props) => {
|
|
|
35
35
|
} = props
|
|
36
36
|
|
|
37
37
|
const [, t] = useLanguage()
|
|
38
|
+
const [isOneMoreCountry, setIsOneMoreCountry] = useState(false)
|
|
39
|
+
|
|
38
40
|
const [isBusinessFilter, setIsBusinessFilter] = useState(false)
|
|
39
41
|
const [isBrandFilter, setIsBrandFilter] = useState(false)
|
|
40
42
|
const [openCountryFilter, setOpenCountryFilter] = useState(true)
|
|
@@ -172,18 +174,20 @@ const ReportsSaleAndCategoryUI = (props) => {
|
|
|
172
174
|
>
|
|
173
175
|
{t('BUSINESS', 'Business')} ({filterList?.businessIds ? filterList?.businessIds.length : t('ALL', 'All')})
|
|
174
176
|
</Button>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
{isOneMoreCountry && (
|
|
178
|
+
<Button
|
|
179
|
+
onClick={() => setOpenCountryFilter(true)}
|
|
180
|
+
>
|
|
181
|
+
{t('COUNTRY', 'Country')}
|
|
182
|
+
</Button>
|
|
183
|
+
)}
|
|
180
184
|
</BrandBusinessWrapper>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
<CalendarWrapper>
|
|
186
|
+
<AnalyticsCalendar
|
|
187
|
+
handleChangeDate={handleChangeDate}
|
|
188
|
+
defaultValue={filterList}
|
|
189
|
+
/>
|
|
190
|
+
</CalendarWrapper>
|
|
187
191
|
</ButtonActionList>
|
|
188
192
|
<ChartListWrapper>
|
|
189
193
|
<ChartBlockWrapper>
|
|
@@ -250,6 +254,7 @@ const ReportsSaleAndCategoryUI = (props) => {
|
|
|
250
254
|
</Modal>
|
|
251
255
|
<CountryFilter
|
|
252
256
|
{...props}
|
|
257
|
+
setIsOneMoreCountry={setIsOneMoreCountry}
|
|
253
258
|
openCountryFilter={openCountryFilter}
|
|
254
259
|
setOpenCountryFilter={setOpenCountryFilter}
|
|
255
260
|
/>
|
|
@@ -37,6 +37,8 @@ const ReportsSalesUI = (props) => {
|
|
|
37
37
|
|
|
38
38
|
const [, t] = useLanguage()
|
|
39
39
|
const [{ parsePrice }] = useUtils()
|
|
40
|
+
const [isOneMoreCountry, setIsOneMoreCountry] = useState(false)
|
|
41
|
+
|
|
40
42
|
const [dataOptions, setDataOptions] = useState(null)
|
|
41
43
|
const [isBusinessFilter, setIsBusinessFilter] = useState(false)
|
|
42
44
|
const [isBrandFilter, setIsBrandFilter] = useState(false)
|
|
@@ -151,18 +153,20 @@ const ReportsSalesUI = (props) => {
|
|
|
151
153
|
>
|
|
152
154
|
{t('BUSINESS', 'Business')} ({filterList?.businessIds ? filterList?.businessIds.length : t('ALL', 'All')})
|
|
153
155
|
</Button>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
{isOneMoreCountry && (
|
|
157
|
+
<Button
|
|
158
|
+
onClick={() => setOpenCountryFilter(true)}
|
|
159
|
+
>
|
|
160
|
+
{t('COUNTRY', 'Country')}
|
|
161
|
+
</Button>
|
|
162
|
+
)}
|
|
159
163
|
</BrandBusinessWrapper>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
<CalendarWrapper>
|
|
165
|
+
<AnalyticsCalendar
|
|
166
|
+
handleChangeDate={handleChangeDate}
|
|
167
|
+
defaultValue={filterList}
|
|
168
|
+
/>
|
|
169
|
+
</CalendarWrapper>
|
|
166
170
|
</ButtonActionList>
|
|
167
171
|
<ChartBlockWrapper>
|
|
168
172
|
<ChartTitleBlock active={reportData?.content?.dataset?.dataset?.data?.length > 0}>
|
|
@@ -217,6 +221,7 @@ const ReportsSalesUI = (props) => {
|
|
|
217
221
|
</Modal>
|
|
218
222
|
<CountryFilter
|
|
219
223
|
{...props}
|
|
224
|
+
setIsOneMoreCountry={setIsOneMoreCountry}
|
|
220
225
|
openCountryFilter={openCountryFilter}
|
|
221
226
|
setOpenCountryFilter={setOpenCountryFilter}
|
|
222
227
|
/>
|
|
@@ -84,7 +84,7 @@ const ReportsTopDriversUI = (props) => {
|
|
|
84
84
|
labels: generateLabels(),
|
|
85
85
|
datasets: [
|
|
86
86
|
{
|
|
87
|
-
label: t('
|
|
87
|
+
label: t('CONTROL_PANEL_ORDERS', 'Orders'),
|
|
88
88
|
data: generateData(),
|
|
89
89
|
fill: true,
|
|
90
90
|
borderColor: '#2C7BE5',
|
|
@@ -145,7 +145,6 @@ const ReportsTopDriversUI = (props) => {
|
|
|
145
145
|
return label
|
|
146
146
|
},
|
|
147
147
|
beforeFooter: (tooltipItem) => {
|
|
148
|
-
console.log(tooltipItem[0])
|
|
149
148
|
let time = ''
|
|
150
149
|
if (reportData?.content?.dataset?.dataset?.data?.length > 0) {
|
|
151
150
|
reportData?.content?.dataset?.dataset?.data && reportData.content.dataset.dataset.data.forEach(item => {
|
|
@@ -176,12 +175,12 @@ const ReportsTopDriversUI = (props) => {
|
|
|
176
175
|
{t('DRIVER', 'Driver')} ({filterList?.drivers_ids ? filterList?.drivers_ids.length : t('ALL', 'All')})
|
|
177
176
|
</Button>
|
|
178
177
|
</BrandBusinessWrapper>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
178
|
+
<CalendarWrapper>
|
|
179
|
+
<AnalyticsCalendar
|
|
180
|
+
handleChangeDate={handleChangeDate}
|
|
181
|
+
defaultValue={filterList}
|
|
182
|
+
/>
|
|
183
|
+
</CalendarWrapper>
|
|
185
184
|
</ButtonActionList>
|
|
186
185
|
<ChartBlockWrapper>
|
|
187
186
|
<ChartTitleBlock active={reportData?.content?.dataset?.dataset?.data?.length > 0}>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useMemo } from 'react'
|
|
2
2
|
import { useLanguage, useOrder, CustomOrderDetails as CustomOrderDetailsController } from 'ordering-components-admin-external'
|
|
3
3
|
import { SelectCustomer } from '../SelectCustomer'
|
|
4
|
+
import { OrderTypeSelector } from '../OrderTypeSelector'
|
|
4
5
|
import { SelectBusinesses } from '../SelectBusinesses'
|
|
5
6
|
import { Map } from '../Map'
|
|
6
7
|
import { SelectProducts } from '../SelectProducts'
|
|
@@ -83,6 +84,7 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
83
84
|
/>
|
|
84
85
|
{customerAddress?.location && (
|
|
85
86
|
<>
|
|
87
|
+
<OrderTypeSelector />
|
|
86
88
|
<SelectBusinesses
|
|
87
89
|
businessList={businessList}
|
|
88
90
|
selectedBusiness={selectedBusiness}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const SelectWrapper = styled.div`
|
|
4
|
+
margin: 50px 0 30px 0;
|
|
5
|
+
|
|
6
|
+
> p {
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
line-height: 24px;
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
margin-bottom: 11px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.select {
|
|
15
|
+
width: 100%;
|
|
16
|
+
background: ${props => props.theme.colors.secundary};
|
|
17
|
+
border: none;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
|
|
20
|
+
> div:first-child {
|
|
21
|
+
padding-top: 4px;
|
|
22
|
+
padding-bottom: 4px;
|
|
23
|
+
}
|
|
24
|
+
.list {
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
|
+
|
|
30
|
+
export const Option = styled.div`
|
|
31
|
+
> span {
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
@@ -131,7 +131,7 @@ const LogisticInformationUI = (props) => {
|
|
|
131
131
|
<>
|
|
132
132
|
{logisticInformation.data.logistic_attempts.map(attempt => (
|
|
133
133
|
<BubbleConsole key={attempt.id}>
|
|
134
|
-
<strong>{t('DRIVER_GROUP', 'Driver group')}</strong>: <strong>{attempt?.driver_group_id}</strong> {t('AT', 'at')} {parseDate(attempt?.created_at
|
|
134
|
+
<strong>{t('DRIVER_GROUP', 'Driver group')}</strong>: <strong>{attempt?.driver_group_id}</strong> {t('AT', 'at')} {parseDate(attempt?.created_at)}
|
|
135
135
|
</BubbleConsole>
|
|
136
136
|
))}
|
|
137
137
|
</>
|