ordering-ui-admin-external 1.43.98 → 1.44.100
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.332418468be0f49b4414.js → ordering-ui-admin.c0e9ca479ed5caf68614.js} +2 -2
- package/_modules/components/Orders/DeliveriesLocation/index.js +22 -37
- package/_modules/components/Orders/DeliveriesManager/index.js +3 -1
- package/_modules/components/Orders/DeliveryDashboard/index.js +4 -5
- package/_modules/components/Orders/OrdersExportCSV/index.js +13 -5
- package/_modules/components/Orders/OrdersListing/index.js +43 -20
- package/_modules/components/Orders/OrdersTable/Order.js +1 -1
- package/_modules/components/Orders/OrdersTable/index.js +56 -32
- package/package.json +2 -2
- package/src/components/Orders/DeliveriesLocation/index.js +5 -10
- package/src/components/Orders/DeliveriesManager/index.js +2 -0
- package/src/components/Orders/DeliveryDashboard/index.js +4 -5
- package/src/components/Orders/OrdersExportCSV/index.js +10 -4
- package/src/components/Orders/OrdersListing/index.js +132 -106
- package/src/components/Orders/OrdersTable/Order.js +2 -2
- package/src/components/Orders/OrdersTable/index.js +238 -209
- /package/_bundles/{ordering-ui-admin.332418468be0f49b4414.js.LICENSE.txt → ordering-ui-admin.c0e9ca479ed5caf68614.js.LICENSE.txt} +0 -0
|
@@ -22,14 +22,14 @@ const ExportCSVUI = (props) => {
|
|
|
22
22
|
const [modalOpen, setModalOpen] = useState(false)
|
|
23
23
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
24
24
|
|
|
25
|
-
const handleExportAll = () => {
|
|
25
|
+
const handleExportAll = (withoutMetafields) => {
|
|
26
26
|
setPopoverOpen(false)
|
|
27
|
-
getCSV(false)
|
|
27
|
+
getCSV(false, withoutMetafields)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const handleExportFiltered = () => {
|
|
30
|
+
const handleExportFiltered = (withoutMetafields) => {
|
|
31
31
|
setPopoverOpen(false)
|
|
32
|
-
getCSV(true)
|
|
32
|
+
getCSV(true, withoutMetafields)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const closePopover = () => {
|
|
@@ -80,6 +80,12 @@ const ExportCSVUI = (props) => {
|
|
|
80
80
|
<Item onClick={() => handleExportFiltered()}>
|
|
81
81
|
{t('EXPORT_FILTERED', 'Export filtered')}
|
|
82
82
|
</Item>
|
|
83
|
+
<Item onClick={() => handleExportAll(true)}>
|
|
84
|
+
{t('EXPORT_ALL_WITHOUT_METAFIELDS', 'Export all without metafields')}
|
|
85
|
+
</Item>
|
|
86
|
+
<Item onClick={() => handleExportFiltered(true)}>
|
|
87
|
+
{t('EXPORT_FILTERED_WITHOUT_METAFIELDS', 'Export filtered without metafields')}
|
|
88
|
+
</Item>
|
|
83
89
|
</PopoverContainer>
|
|
84
90
|
)}
|
|
85
91
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { memo, useState, useEffect
|
|
2
|
-
import { useLanguage } from 'ordering-components-admin-external'
|
|
1
|
+
import React, { memo, useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage, useConfig } from 'ordering-components-admin-external'
|
|
3
3
|
import { useTheme } from 'styled-components'
|
|
4
4
|
import { OrdersTable } from '../OrdersTable'
|
|
5
5
|
import { OrdersCards } from '../OrdersCards'
|
|
6
|
-
import { Button
|
|
6
|
+
import { Button } from '../../../styles'
|
|
7
7
|
import AiOutlineInfoCircle from '@meronex/icons/ai/AiOutlineInfoCircle'
|
|
8
8
|
|
|
9
9
|
import {
|
|
@@ -61,8 +61,11 @@ export const OrdersListing = memo((props) => {
|
|
|
61
61
|
|
|
62
62
|
const theme = useTheme()
|
|
63
63
|
const [, t] = useLanguage()
|
|
64
|
+
const [configState] = useConfig()
|
|
64
65
|
const [filterApplied, setFilterApplied] = useState(false)
|
|
65
66
|
|
|
67
|
+
const showExternalId = configState?.configs?.change_order_id?.value === '1'
|
|
68
|
+
|
|
66
69
|
const handleDobleClick = () => {
|
|
67
70
|
if (handleSetOpenOrderDetail && orderDetailId) {
|
|
68
71
|
handleSetOpenOrderDetail(true)
|
|
@@ -72,63 +75,78 @@ export const OrdersListing = memo((props) => {
|
|
|
72
75
|
const optionsDefault = [
|
|
73
76
|
{
|
|
74
77
|
value: 'status',
|
|
75
|
-
content: t('STATUS', 'Status')
|
|
78
|
+
content: t('STATUS', 'Status'),
|
|
79
|
+
enabled: true
|
|
76
80
|
},
|
|
77
81
|
{
|
|
78
82
|
value: 'orderNumber',
|
|
79
|
-
content: t('INVOICE_ORDER_NO', 'Order No.')
|
|
83
|
+
content: t('INVOICE_ORDER_NO', 'Order No.'),
|
|
84
|
+
enabled: !showExternalId
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: 'dateTime',
|
|
88
|
+
content: t('DATE_TIME', 'Date and time'),
|
|
89
|
+
enabled: true
|
|
80
90
|
},
|
|
81
91
|
{
|
|
82
92
|
value: 'agent',
|
|
83
|
-
content: t('AGENT', 'Agent')
|
|
93
|
+
content: t('AGENT', 'Agent'),
|
|
94
|
+
enabled: true
|
|
84
95
|
},
|
|
85
96
|
{
|
|
86
97
|
value: 'cartGroupId',
|
|
87
|
-
content: t('GROUP_ORDER', 'Group Order')
|
|
98
|
+
content: t('GROUP_ORDER', 'Group Order'),
|
|
99
|
+
enabled: true
|
|
88
100
|
},
|
|
89
101
|
{
|
|
90
102
|
value: 'driverGroupId',
|
|
91
|
-
content: t('EXPORT_DRIVER_GROUP_ID', 'Driver Group Id')
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
value: 'dateTime',
|
|
95
|
-
content: t('DATE_TIME', 'Date and time')
|
|
103
|
+
content: t('EXPORT_DRIVER_GROUP_ID', 'Driver Group Id'),
|
|
104
|
+
enabled: true
|
|
96
105
|
},
|
|
97
106
|
{
|
|
98
107
|
value: 'business',
|
|
99
|
-
content: t('BUSINESS', 'Business')
|
|
108
|
+
content: t('BUSINESS', 'Business'),
|
|
109
|
+
enabled: true
|
|
100
110
|
},
|
|
101
111
|
{
|
|
102
112
|
value: 'customer',
|
|
103
|
-
content: t('CUSTOMER', 'Customer')
|
|
113
|
+
content: t('CUSTOMER', 'Customer'),
|
|
114
|
+
enabled: true
|
|
104
115
|
},
|
|
105
116
|
{
|
|
106
117
|
value: 'driver',
|
|
107
|
-
content: t('DRIVER', 'Driver')
|
|
118
|
+
content: t('DRIVER', 'Driver'),
|
|
119
|
+
enabled: true
|
|
108
120
|
},
|
|
109
121
|
{
|
|
110
122
|
value: 'advanced',
|
|
111
|
-
content: t('ADVANCED_LOGISTICS', 'Advance Logistics')
|
|
123
|
+
content: t('ADVANCED_LOGISTICS', 'Advance Logistics'),
|
|
124
|
+
enabled: true
|
|
112
125
|
},
|
|
113
126
|
{
|
|
114
127
|
value: 'timer',
|
|
115
|
-
content: t('SLA_TIMER', 'SLA’s timer')
|
|
128
|
+
content: t('SLA_TIMER', 'SLA’s timer'),
|
|
129
|
+
enabled: true
|
|
116
130
|
},
|
|
117
131
|
{
|
|
118
132
|
value: 'eta',
|
|
119
|
-
content: t('ETA', 'ETA')
|
|
133
|
+
content: t('ETA', 'ETA'),
|
|
134
|
+
enabled: true
|
|
120
135
|
},
|
|
121
136
|
{
|
|
122
137
|
value: 'total',
|
|
123
|
-
content: t('EXPORT_TOTAL', 'Total')
|
|
138
|
+
content: t('EXPORT_TOTAL', 'Total'),
|
|
139
|
+
enabled: true
|
|
124
140
|
},
|
|
125
141
|
{
|
|
126
142
|
value: 'externalId',
|
|
127
|
-
content: t('EXTERNAL_ID', 'External id')
|
|
143
|
+
content: t('EXTERNAL_ID', 'External id'),
|
|
144
|
+
enabled: true
|
|
128
145
|
},
|
|
129
146
|
{
|
|
130
147
|
value: 'channel',
|
|
131
|
-
content: t('CHANNEL', 'Channel')
|
|
148
|
+
content: t('CHANNEL', 'Channel'),
|
|
149
|
+
enabled: true
|
|
132
150
|
}
|
|
133
151
|
]
|
|
134
152
|
|
|
@@ -182,95 +200,101 @@ export const OrdersListing = memo((props) => {
|
|
|
182
200
|
<>
|
|
183
201
|
{((ordersStatusGroup === groupStatus) || isMessagesView) && (
|
|
184
202
|
<>
|
|
185
|
-
{!orderList.loading && pagination?.total === 0
|
|
186
|
-
|
|
187
|
-
<
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
{!orderList.loading && pagination?.total === 0
|
|
204
|
+
? (
|
|
205
|
+
<WrapperNoneOrders>
|
|
206
|
+
<InnerNoneOrdersContainer small={orderListView === 'small'}>
|
|
207
|
+
<img src={theme?.images?.dummies?.noOrders} alt='none' />
|
|
208
|
+
{filterApplied
|
|
209
|
+
? (
|
|
210
|
+
<>
|
|
211
|
+
<p>{t('NOT_FOUND_FILTERED_ORDERS', 'No orders with the current filters applied.')}</p>
|
|
212
|
+
<Button
|
|
213
|
+
outline
|
|
214
|
+
borderRadius='8px'
|
|
215
|
+
color='primary'
|
|
216
|
+
onClick={() => setFilterModalOpen(true)}
|
|
217
|
+
>
|
|
218
|
+
{t('FILTERS', 'Filters')}
|
|
219
|
+
</Button>
|
|
220
|
+
</>
|
|
221
|
+
)
|
|
222
|
+
: (
|
|
223
|
+
<p>{t('MOBILE_NO_ORDERS', 'No Orders yet.')}</p>
|
|
224
|
+
)}
|
|
225
|
+
</InnerNoneOrdersContainer>
|
|
226
|
+
</WrapperNoneOrders>
|
|
227
|
+
)
|
|
228
|
+
: (
|
|
229
|
+
<WrapperOrderListContent
|
|
230
|
+
maxHeight={orderListView !== 'table'}
|
|
231
|
+
onDoubleClick={handleDobleClick}
|
|
232
|
+
>
|
|
211
233
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
234
|
+
{orderListView === 'table'
|
|
235
|
+
? (
|
|
236
|
+
<>
|
|
237
|
+
{allowColumns && !(Object.keys(allowColumns).filter(col => allowColumns[col]?.visable && allowColumns[col]?.order !== 0).length === 0) && (
|
|
238
|
+
<ColumnPopoverContainer>
|
|
239
|
+
<ColumnAllowSettingPopover
|
|
240
|
+
allowColumns={allowColumns}
|
|
241
|
+
optionsDefault={optionsDefault?.filter(({ enabled }) => enabled)}
|
|
242
|
+
handleChangeAllowColumns={handleChangeAllowColumns}
|
|
243
|
+
isOrder
|
|
244
|
+
/>
|
|
245
|
+
</ColumnPopoverContainer>
|
|
246
|
+
)}
|
|
247
|
+
<OrdersTable
|
|
248
|
+
hidePhoto={hidePhoto}
|
|
249
|
+
setSelectedOrderIds={setSelectedOrderIds}
|
|
250
|
+
isSelectedOrders={isSelectedOrders}
|
|
251
|
+
orderList={orderList}
|
|
252
|
+
pagination={pagination}
|
|
253
|
+
selectedOrderIds={selectedOrderIds}
|
|
254
|
+
orderDetailId={orderDetailId}
|
|
255
|
+
loadMoreOrders={loadMoreOrders}
|
|
256
|
+
getPageOrders={getPageOrders}
|
|
257
|
+
handleUpdateOrderStatus={handleUpdateOrderStatus}
|
|
258
|
+
handleSelectedOrderIds={handleSelectedOrderIds}
|
|
259
|
+
handleOpenOrderDetail={handleOpenOrderDetail}
|
|
260
|
+
currentTourStep={currentTourStep}
|
|
261
|
+
isTourOpen={isTourOpen}
|
|
262
|
+
handleOpenTour={handleOpenTour}
|
|
263
|
+
setIsTourOpen={setIsTourOpen}
|
|
264
|
+
slaSettingTime={slaSettingTime}
|
|
265
|
+
groupStatus={groupStatus}
|
|
217
266
|
allowColumns={allowColumns}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
267
|
+
setAllowColumns={setAllowColumns}
|
|
268
|
+
handleDrop={handleDrop}
|
|
269
|
+
saveUserSettings={saveUserSettings}
|
|
270
|
+
isUseQuery={isUseQuery}
|
|
271
|
+
franchisesList={props.franchisesList}
|
|
221
272
|
/>
|
|
222
|
-
|
|
223
|
-
)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
isSelectedOrders={isSelectedOrders}
|
|
228
|
-
orderList={orderList}
|
|
229
|
-
pagination={pagination}
|
|
230
|
-
selectedOrderIds={selectedOrderIds}
|
|
231
|
-
orderDetailId={orderDetailId}
|
|
232
|
-
loadMoreOrders={loadMoreOrders}
|
|
233
|
-
getPageOrders={getPageOrders}
|
|
234
|
-
handleUpdateOrderStatus={handleUpdateOrderStatus}
|
|
235
|
-
handleSelectedOrderIds={handleSelectedOrderIds}
|
|
236
|
-
handleOpenOrderDetail={handleOpenOrderDetail}
|
|
237
|
-
currentTourStep={currentTourStep}
|
|
238
|
-
isTourOpen={isTourOpen}
|
|
239
|
-
handleOpenTour={handleOpenTour}
|
|
240
|
-
setIsTourOpen={setIsTourOpen}
|
|
241
|
-
slaSettingTime={slaSettingTime}
|
|
242
|
-
groupStatus={groupStatus}
|
|
243
|
-
allowColumns={allowColumns}
|
|
244
|
-
setAllowColumns={setAllowColumns}
|
|
245
|
-
handleDrop={handleDrop}
|
|
246
|
-
saveUserSettings={saveUserSettings}
|
|
247
|
-
isUseQuery={isUseQuery}
|
|
248
|
-
franchisesList={props.franchisesList}
|
|
249
|
-
/>
|
|
250
|
-
</>
|
|
251
|
-
) : (
|
|
252
|
-
<OrdersCards
|
|
253
|
-
isMessagesView={isMessagesView}
|
|
273
|
+
</>
|
|
274
|
+
)
|
|
275
|
+
: (
|
|
276
|
+
<OrdersCards
|
|
277
|
+
isMessagesView={isMessagesView}
|
|
254
278
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
279
|
+
orderList={orderList}
|
|
280
|
+
pagination={pagination}
|
|
281
|
+
selectedOrderIds={selectedOrderIds}
|
|
282
|
+
loadMoreOrders={loadMoreOrders}
|
|
283
|
+
getPageOrders={getPageOrders}
|
|
284
|
+
handleUpdateOrderStatus={handleUpdateOrderStatus}
|
|
285
|
+
handleSelectedOrderIds={handleSelectedOrderIds}
|
|
286
|
+
handleOpenOrderDetail={handleOpenOrderDetail}
|
|
287
|
+
selectedOrderCard={selectedOrderCard}
|
|
288
|
+
handleOrderCardClick={handleOrderCardClick}
|
|
289
|
+
handleUpdateDriverLocation={handleUpdateDriverLocation}
|
|
290
|
+
slaSettingTime={slaSettingTime}
|
|
291
|
+
isDelivery={isDelivery}
|
|
292
|
+
isUseQuery={isUseQuery}
|
|
293
|
+
franchisesList={props.franchisesList}
|
|
294
|
+
/>
|
|
295
|
+
)}
|
|
296
|
+
</WrapperOrderListContent>
|
|
297
|
+
)}
|
|
274
298
|
{(handleSetOpenOrderDetail && orderDetailId) && (
|
|
275
299
|
<InfoMessage>
|
|
276
300
|
<AiOutlineInfoCircle />
|
|
@@ -282,3 +306,5 @@ export const OrdersListing = memo((props) => {
|
|
|
282
306
|
</>
|
|
283
307
|
)
|
|
284
308
|
})
|
|
309
|
+
|
|
310
|
+
OrdersListing.displayName = 'OrdersListing'
|
|
@@ -72,7 +72,7 @@ export const Order = React.memo((props) => {
|
|
|
72
72
|
</td>
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
|
-
if (column === 'orderNumber') {
|
|
75
|
+
if (showExternalId ? column === 'dateTime' : column === 'orderNumber') {
|
|
76
76
|
return (
|
|
77
77
|
<td
|
|
78
78
|
className={!(allowColumns?.orderNumber?.visable || allowColumns?.dateTime?.visable) ? 'small' : ''}
|
|
@@ -280,7 +280,7 @@ export const Order = React.memo((props) => {
|
|
|
280
280
|
<EtaInfo>
|
|
281
281
|
<p className='bold'>{''}</p>
|
|
282
282
|
</EtaInfo>
|
|
283
|
-
|
|
283
|
+
</td>
|
|
284
284
|
)
|
|
285
285
|
}
|
|
286
286
|
if (column === 'channel') {
|