ordering-ui-admin-external 1.42.10 → 1.42.12
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.a6c2ee87196753ef2f38.js → ordering-ui-admin.7ac3213b0400f85d229c.js} +2 -2
- package/_modules/components/Orders/DriverMapMarkerAndInfo/index.js +4 -2
- package/_modules/components/Orders/DriverMapMarkerAndInfo/styles.js +11 -13
- package/_modules/components/Orders/DriversLocation/index.js +8 -4
- package/_modules/components/Orders/OrdersListing/index.js +83 -2
- package/_modules/components/Orders/OrdersListing/styles.js +4 -3
- package/_modules/components/Orders/OrdersTable/index.js +1 -9
- package/_modules/themes/origin/src/components/DriverMapMarkerAndInfo/index.js +4 -2
- package/_modules/themes/origin/src/components/DriverMapMarkerAndInfo/styles.js +10 -11
- package/_modules/themes/origin/src/components/DriversLocation/index.js +4 -0
- package/package.json +1 -1
- package/src/components/Orders/DriverMapMarkerAndInfo/index.js +9 -1
- package/src/components/Orders/DriverMapMarkerAndInfo/styles.js +2 -9
- package/src/components/Orders/DriversLocation/index.js +2 -0
- package/src/components/Orders/OrdersListing/index.js +120 -27
- package/src/components/Orders/OrdersListing/styles.js +12 -0
- package/src/components/Orders/OrdersTable/index.js +1 -9
- package/src/themes/origin/src/components/DriverMapMarkerAndInfo/index.js +9 -1
- package/src/themes/origin/src/components/DriverMapMarkerAndInfo/styles.js +1 -5
- package/src/themes/origin/src/components/DriversLocation/index.js +4 -0
- /package/_bundles/{ordering-ui-admin.a6c2ee87196753ef2f38.js.LICENSE.txt → ordering-ui-admin.7ac3213b0400f85d229c.js.LICENSE.txt} +0 -0
|
@@ -10,8 +10,10 @@ import {
|
|
|
10
10
|
WrapperNoneOrders,
|
|
11
11
|
WrapperOrderListContent,
|
|
12
12
|
InnerNoneOrdersContainer,
|
|
13
|
-
InfoMessage
|
|
13
|
+
InfoMessage,
|
|
14
|
+
ColumnPopoverContainer
|
|
14
15
|
} from './styles'
|
|
16
|
+
import { ColumnAllowSettingPopover } from '../../Shared'
|
|
15
17
|
|
|
16
18
|
export const OrdersListing = memo((props) => {
|
|
17
19
|
const {
|
|
@@ -67,6 +69,84 @@ export const OrdersListing = memo((props) => {
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
|
|
72
|
+
const optionsDefault = [
|
|
73
|
+
{
|
|
74
|
+
value: 'status',
|
|
75
|
+
content: t('STATUS', 'Status')
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 'orderNumber',
|
|
79
|
+
content: t('INVOICE_ORDER_NO', 'Order No.')
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: 'agent',
|
|
83
|
+
content: t('AGENT', 'Agent')
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: 'cartGroupId',
|
|
87
|
+
content: t('GROUP_ORDER', 'Group Order')
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
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')
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
value: 'business',
|
|
99
|
+
content: t('BUSINESS', 'Business')
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: 'customer',
|
|
103
|
+
content: t('CUSTOMER', 'Customer')
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: 'driver',
|
|
107
|
+
content: t('DRIVER', 'Driver')
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: 'advanced',
|
|
111
|
+
content: t('ADVANCED_LOGISTICS', 'Advance Logistics')
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
value: 'timer',
|
|
115
|
+
content: t('SLA_TIMER', 'SLA’s timer')
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
value: 'eta',
|
|
119
|
+
content: t('ETA', 'ETA')
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
value: 'total',
|
|
123
|
+
content: t('EXPORT_TOTAL', 'Total')
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: 'externalId',
|
|
127
|
+
content: t('EXTERNAL_ID', 'External id')
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
value: 'channel',
|
|
131
|
+
content: t('CHANNEL', 'Channel')
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
const handleChangeAllowColumns = (type) => {
|
|
136
|
+
let _column = {}
|
|
137
|
+
if (type === 'channel') {
|
|
138
|
+
_column = { visable: allowColumns[type].visable, title: t('CHANNEL', 'Channel'), className: 'channelInfo', draggable: true, colSpan: 1, order: 12 }
|
|
139
|
+
} else {
|
|
140
|
+
_column = allowColumns[type]
|
|
141
|
+
}
|
|
142
|
+
const updatedAllowColumns = {
|
|
143
|
+
...allowColumns,
|
|
144
|
+
[type]: { ..._column, visable: !_column?.visable }
|
|
145
|
+
}
|
|
146
|
+
setAllowColumns(updatedAllowColumns)
|
|
147
|
+
saveUserSettings(JSON.parse(JSON.stringify(updatedAllowColumns)))
|
|
148
|
+
}
|
|
149
|
+
|
|
70
150
|
useEffect(() => {
|
|
71
151
|
if (orderList.loading || !messageListView) return
|
|
72
152
|
if (orderList.orders.length === 0 || messageOrder) return
|
|
@@ -128,33 +208,46 @@ export const OrdersListing = memo((props) => {
|
|
|
128
208
|
maxHeight={orderListView !== 'table'}
|
|
129
209
|
onDoubleClick={handleDobleClick}
|
|
130
210
|
>
|
|
211
|
+
|
|
131
212
|
{orderListView === 'table' ? (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
213
|
+
<>
|
|
214
|
+
{allowColumns && !(Object.keys(allowColumns).filter(col => allowColumns[col]?.visable && allowColumns[col]?.order !== 0).length === 0) && (
|
|
215
|
+
<ColumnPopoverContainer>
|
|
216
|
+
<ColumnAllowSettingPopover
|
|
217
|
+
allowColumns={allowColumns}
|
|
218
|
+
optionsDefault={optionsDefault}
|
|
219
|
+
handleChangeAllowColumns={handleChangeAllowColumns}
|
|
220
|
+
isOrder
|
|
221
|
+
/>
|
|
222
|
+
</ColumnPopoverContainer>
|
|
223
|
+
)}
|
|
224
|
+
<OrdersTable
|
|
225
|
+
hidePhoto={hidePhoto}
|
|
226
|
+
setSelectedOrderIds={setSelectedOrderIds}
|
|
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
|
+
</>
|
|
158
251
|
) : (
|
|
159
252
|
<OrdersCards
|
|
160
253
|
isMessagesView={isMessagesView}
|
|
@@ -107,3 +107,15 @@ export const InfoMessage = styled.div`
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
`
|
|
110
|
+
|
|
111
|
+
export const ColumnPopoverContainer = styled.div`
|
|
112
|
+
position: relative;
|
|
113
|
+
button {
|
|
114
|
+
right: 0px;
|
|
115
|
+
position: absolute;
|
|
116
|
+
transform: translateY(-3px);
|
|
117
|
+
z-index: 1000;
|
|
118
|
+
background: white;
|
|
119
|
+
padding: 0 10px;
|
|
120
|
+
}
|
|
121
|
+
`
|
|
@@ -267,7 +267,7 @@ export const OrdersTable = memo((props) => {
|
|
|
267
267
|
_column = { visable:allowColumns[type].visable ,title: t('CHANNEL', 'Channel'), className: 'channelInfo', draggable: true, colSpan: 1, order: 12 }
|
|
268
268
|
}else{
|
|
269
269
|
_column = allowColumns[type]
|
|
270
|
-
|
|
270
|
+
}
|
|
271
271
|
const updatedAllowColumns = {
|
|
272
272
|
...allowColumns,
|
|
273
273
|
[type]: { ..._column, visable: !_column?.visable }
|
|
@@ -460,14 +460,6 @@ export const OrdersTable = memo((props) => {
|
|
|
460
460
|
</div>
|
|
461
461
|
</DragTh>
|
|
462
462
|
)}
|
|
463
|
-
<th className='orderPrice' key={`noDragTh-${i}`}>
|
|
464
|
-
<ColumnAllowSettingPopover
|
|
465
|
-
allowColumns={allowColumns}
|
|
466
|
-
optionsDefault={optionsDefault}
|
|
467
|
-
handleChangeAllowColumns={handleChangeAllowColumns}
|
|
468
|
-
isOrder
|
|
469
|
-
/>
|
|
470
|
-
</th>
|
|
471
463
|
</React.Fragment>
|
|
472
464
|
)
|
|
473
465
|
}
|
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
} from './styles'
|
|
12
12
|
export const DriverMapMarkerAndInfo = (props) => {
|
|
13
13
|
const {
|
|
14
|
-
driver
|
|
14
|
+
driver,
|
|
15
|
+
timeStatus
|
|
15
16
|
} = props
|
|
16
17
|
const [, t] = useLanguage()
|
|
17
18
|
const theme = useTheme()
|
|
@@ -67,6 +68,13 @@ export const DriverMapMarkerAndInfo = (props) => {
|
|
|
67
68
|
offline={!(driver.enabled && driver.available && !driver.busy)}
|
|
68
69
|
onMouseOver={() => setInfoShow(true)}
|
|
69
70
|
onMouseLeave={() => setInfoShow(false)}
|
|
71
|
+
borderColor={timeStatus === 'delayed'
|
|
72
|
+
? '#E63757'
|
|
73
|
+
: !driver?.available
|
|
74
|
+
? '#6c757d'
|
|
75
|
+
: driver.busy
|
|
76
|
+
? '#007bff'
|
|
77
|
+
: '#28a745'}
|
|
70
78
|
>
|
|
71
79
|
{driver.photo ? (
|
|
72
80
|
<MapMarkerImg bgimage={driver.photo} />
|
|
@@ -4,16 +4,12 @@ export const WrapperMapMarker = styled.div`
|
|
|
4
4
|
width: 40px;
|
|
5
5
|
height: 40px;
|
|
6
6
|
background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
|
|
7
|
-
border: 5px solid
|
|
7
|
+
border: 5px solid ${props => props.borderColor};
|
|
8
8
|
box-shadow: 0px 3px 6px #00000029;
|
|
9
9
|
border-radius: 6px;
|
|
10
10
|
position: absolute;
|
|
11
11
|
transform: translate(-50%, -50%);
|
|
12
12
|
z-index: 1;
|
|
13
|
-
|
|
14
|
-
${({ offline }) => offline && css`
|
|
15
|
-
border: 5px solid #9D9B9B;
|
|
16
|
-
`}
|
|
17
13
|
`
|
|
18
14
|
const MapMarkerImgStyled = styled.div`
|
|
19
15
|
display: flex;
|
|
@@ -192,6 +192,7 @@ export const DriversLocation = (props) => {
|
|
|
192
192
|
<DriverMapMarkerAndInfo
|
|
193
193
|
key={driver.id}
|
|
194
194
|
driver={driver}
|
|
195
|
+
timeStatus={interActionMapOrder?.time_status}
|
|
195
196
|
lat={driver.location !== null ? driver.location.lat : defaultCenter.lat}
|
|
196
197
|
lng={driver.location !== null ? driver.location.lng : defaultCenter.lng}
|
|
197
198
|
/>
|
|
@@ -201,6 +202,7 @@ export const DriversLocation = (props) => {
|
|
|
201
202
|
<DriverMapMarkerAndInfo
|
|
202
203
|
key={driver.id}
|
|
203
204
|
driver={driver}
|
|
205
|
+
timeStatus={interActionMapOrder?.time_status}
|
|
204
206
|
lat={driver.location !== null ? driver.location.lat : defaultCenter.lat}
|
|
205
207
|
lng={driver.location !== null ? driver.location.lng : defaultCenter.lng}
|
|
206
208
|
/>
|
|
@@ -210,6 +212,7 @@ export const DriversLocation = (props) => {
|
|
|
210
212
|
<DriverMapMarkerAndInfo
|
|
211
213
|
key={driver.id}
|
|
212
214
|
driver={driver}
|
|
215
|
+
timeStatus={interActionMapOrder?.time_status}
|
|
213
216
|
lat={driver.location !== null ? driver.location.lat : defaultCenter.lat}
|
|
214
217
|
lng={driver.location !== null ? driver.location.lng : defaultCenter.lng}
|
|
215
218
|
/>
|
|
@@ -235,6 +238,7 @@ export const DriversLocation = (props) => {
|
|
|
235
238
|
{!(driverAvailable === 'online' || driverAvailable === 'offline') && interActionMapOrder !== null && interActionMapOrder?.driver !== null && (
|
|
236
239
|
<InterActOrderMarker
|
|
237
240
|
driver={interActionMapOrder?.driver}
|
|
241
|
+
timeStatus={interActionMapOrder?.time_status}
|
|
238
242
|
lat={interActionOrderDriverLocation ? interActionOrderDriverLocation?.lat : defaultCenter.lat}
|
|
239
243
|
lng={interActionOrderDriverLocation ? interActionOrderDriverLocation?.lng : defaultCenter.lng}
|
|
240
244
|
image={interActionMapOrder?.driver?.photo}
|