ordering-ui-react-native 0.23.8 → 0.23.9
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/package.json +1 -1
- package/themes/business/src/components/Chat/index.tsx +2 -1
- package/themes/business/src/components/DriverMap/index.tsx +5 -0
- package/themes/business/src/components/OrderDetails/Delivery.tsx +20 -4
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +5 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +5 -1
- package/themes/business/src/components/OrdersOption/index.tsx +6 -2
- package/themes/business/src/components/PreviousMessages/index.tsx +6 -0
- package/themes/business/src/components/PreviousOrders/index.tsx +2 -2
- package/themes/business/src/utils/index.tsx +6 -0
- package/themes/original/src/components/MessageListing/index.tsx +1 -1
- package/themes/original/src/components/Messages/index.tsx +4 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +4 -1
- package/themes/original/src/components/OrderDetails/index.tsx +2 -2
- package/themes/original/src/components/OrderProgress/index.tsx +2 -2
- package/themes/original/src/components/OrdersOption/index.tsx +2 -2
- package/themes/original/src/utils/index.tsx +18 -0
package/package.json
CHANGED
|
@@ -98,7 +98,8 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
98
98
|
22: t('ORDER_LOOKING_FOR_DRIVER', 'Order looking for driver'),
|
|
99
99
|
23: t('ORDER_DRIVER_ON_WAY', 'Driver on way'),
|
|
100
100
|
24: t('ORDER_DRIVER_WAITING_FOR_ORDER', 'Driver waiting for order'),
|
|
101
|
-
25: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company')
|
|
101
|
+
25: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company'),
|
|
102
|
+
26: t('ORDER_DRIVER_ARRIVED_CUSTOMER', 'Driver arrived to customer')
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const getLogisticTag = (status: any) => {
|
|
@@ -236,6 +236,11 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
236
236
|
19: theme.colors.statusOrderBlue,
|
|
237
237
|
20: theme.colors.statusOrderBlue,
|
|
238
238
|
21: theme.colors.statusOrderBlue,
|
|
239
|
+
22: theme.colors.statusOrderBlue,
|
|
240
|
+
23: theme.colors.statusOrderBlue,
|
|
241
|
+
24: theme.colors.statusOrderBlue,
|
|
242
|
+
25: theme.colors.statusOrderBlue,
|
|
243
|
+
26: theme.colors.statusOrderBlue,
|
|
239
244
|
//GREEN
|
|
240
245
|
1: theme.colors.statusOrderGreen,
|
|
241
246
|
11: theme.colors.statusOrderGreen,
|
|
@@ -87,7 +87,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
87
87
|
|
|
88
88
|
const disabledActionsByInternet = !isNetConnected && canSaveChangesOffline === false
|
|
89
89
|
|
|
90
|
-
const validStatusComplete = [9, 19, 23]
|
|
90
|
+
const validStatusComplete = [9, 19, 23, 26]
|
|
91
91
|
|
|
92
92
|
const pendingOrderStatus = [1, 4, 7, 13]
|
|
93
93
|
|
|
@@ -460,8 +460,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
460
460
|
let locationMarker: any;
|
|
461
461
|
let isToFollow = false;
|
|
462
462
|
let isBusinessMarker = false;
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
const customerStatusses = [3, 9, 19, 23, 26]
|
|
464
|
+
const businessStatusses = [7, 8, 18]
|
|
465
|
+
if (businessStatusses?.includes(order?.status)) {
|
|
465
466
|
const markerBusiness = 'Business';
|
|
466
467
|
isBusinessMarker = true;
|
|
467
468
|
locationMarker = locations.find(
|
|
@@ -471,7 +472,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
471
472
|
if (order?.status === 8 || order?.status === 18) {
|
|
472
473
|
isToFollow = true;
|
|
473
474
|
}
|
|
474
|
-
} else if (
|
|
475
|
+
} else if (customerStatusses?.includes(order?.status)) {
|
|
475
476
|
const markerCustomer = 'Customer';
|
|
476
477
|
isToFollow = true;
|
|
477
478
|
isBusinessMarker = false;
|
|
@@ -513,6 +514,21 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
513
514
|
/>
|
|
514
515
|
</Pickup>
|
|
515
516
|
)}
|
|
517
|
+
|
|
518
|
+
{(order?.status === 9 || order?.status === 19) && order?.delivery_type === 1 && !props.order?.loading && (
|
|
519
|
+
<View style={{ paddingVertical: 20, marginBottom: 20 }}>
|
|
520
|
+
<OButton
|
|
521
|
+
style={styles.btnPickUp}
|
|
522
|
+
textStyle={{ color: theme.colors.primary }}
|
|
523
|
+
text={t('ARRIVED_TO_CUSTOMER', 'Arrived to customer')}
|
|
524
|
+
isDisabled={disabledActionsByInternet}
|
|
525
|
+
onClick={() =>
|
|
526
|
+
isGrantedPermissions ? handleChangeOrderStatus(26) : goToPermissionPage()
|
|
527
|
+
}
|
|
528
|
+
imgLeftStyle={{ tintColor: theme.colors.backArrow }}
|
|
529
|
+
/>
|
|
530
|
+
</View>
|
|
531
|
+
)}
|
|
516
532
|
{order?.status === 3 && order?.delivery_type === 1 && !isHideRejectButtons && isEnabledOrderNotReady && !props.order?.loading && (
|
|
517
533
|
<View style={{ paddingVertical: 20, marginBottom: 20 }}>
|
|
518
534
|
<OButton
|
|
@@ -102,6 +102,11 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
102
102
|
19: theme.colors.statusOrderBlue,
|
|
103
103
|
20: theme.colors.statusOrderBlue,
|
|
104
104
|
21: theme.colors.statusOrderBlue,
|
|
105
|
+
22: theme.colors.statusOrderBlue,
|
|
106
|
+
23: theme.colors.statusOrderBlue,
|
|
107
|
+
24: theme.colors.statusOrderBlue,
|
|
108
|
+
25: theme.colors.statusOrderBlue,
|
|
109
|
+
26: theme.colors.statusOrderBlue,
|
|
105
110
|
//GREEN
|
|
106
111
|
1: theme.colors.statusOrderGreen,
|
|
107
112
|
11: theme.colors.statusOrderGreen,
|
|
@@ -854,6 +854,10 @@ export const OrdersListManager = (props: OrdersOptionParams) => {
|
|
|
854
854
|
{
|
|
855
855
|
key: 25,
|
|
856
856
|
text: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company')
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
key: 26,
|
|
860
|
+
text: t('ORDER_DRIVER_ARRIVED_CUSTOMER', 'Driver arrived to customer')
|
|
857
861
|
}
|
|
858
862
|
],
|
|
859
863
|
tabs: [
|
|
@@ -866,7 +870,7 @@ export const OrdersListManager = (props: OrdersOptionParams) => {
|
|
|
866
870
|
{
|
|
867
871
|
key: 1,
|
|
868
872
|
text: t('IN_PROGRESS', 'In Progress'),
|
|
869
|
-
tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
873
|
+
tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
|
870
874
|
title: 'inProgress',
|
|
871
875
|
},
|
|
872
876
|
{
|
|
@@ -1169,13 +1169,17 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
1169
1169
|
{
|
|
1170
1170
|
key: 25,
|
|
1171
1171
|
text: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company')
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
key: 26,
|
|
1175
|
+
text: t('ORDER_DRIVER_ARRIVED_CUSTOMER', 'Driver arrived to customer')
|
|
1172
1176
|
}
|
|
1173
1177
|
],
|
|
1174
1178
|
tabs: combineTabs ? [
|
|
1175
1179
|
{
|
|
1176
1180
|
key: 0,
|
|
1177
1181
|
text: t('ACTIVE', 'Active'),
|
|
1178
|
-
tags: props?.orderGroupStatusCustom?.active ?? [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
1182
|
+
tags: props?.orderGroupStatusCustom?.active ?? [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
|
1179
1183
|
title: 'active',
|
|
1180
1184
|
},
|
|
1181
1185
|
{
|
|
@@ -1201,7 +1205,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
1201
1205
|
{
|
|
1202
1206
|
key: 1,
|
|
1203
1207
|
text: t('IN_PROGRESS', 'In Progress'),
|
|
1204
|
-
tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
1208
|
+
tags: props?.orderGroupStatusCustom?.inProgress ?? [3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
|
1205
1209
|
title: 'inProgress',
|
|
1206
1210
|
},
|
|
1207
1211
|
{
|
|
@@ -213,6 +213,12 @@ export const PreviousMessages = (props: PreviousMessagesParams) => {
|
|
|
213
213
|
value: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company'),
|
|
214
214
|
slug: 'ORDER_ACCEPTED_BY_DRIVER_COMPANY',
|
|
215
215
|
percentage: 25
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
key: 26,
|
|
219
|
+
value: t('ORDER_DRIVER_ARRIVED_CUSTOMER', 'Driver arrived to customer'),
|
|
220
|
+
slug: 'ORDER_DRIVER_ARRIVED_CUSTOMER',
|
|
221
|
+
percentage: 80
|
|
216
222
|
}
|
|
217
223
|
];
|
|
218
224
|
|
|
@@ -42,9 +42,9 @@ export const PreviousOrders = (props: any) => {
|
|
|
42
42
|
const [orderUpdateStatus, setOrderUpdateStatus] = useState<any>({ action: '', ids: [], body: {}, order: {} })
|
|
43
43
|
|
|
44
44
|
const pastOrderStatuses = [1, 2, 5, 6, 10, 11, 12, 16, 17]
|
|
45
|
-
const viewMapStatus = [9, 18, 19, 23]
|
|
45
|
+
const viewMapStatus = [9, 18, 19, 23, 26]
|
|
46
46
|
const deliveryPickupBtn = props.appTitle?.text?.includes('Delivery') && [3, 8, 18]
|
|
47
|
-
const deliveryStatusCompleteBtn = props.appTitle?.text?.includes('Delivery') && [9, 19, 23]
|
|
47
|
+
const deliveryStatusCompleteBtn = props.appTitle?.text?.includes('Delivery') && [9, 19, 23, 26]
|
|
48
48
|
const isHideRejectButtons = configs?.reject_orders_enabled && configs?.reject_orders_enabled?.value !== '1' && !isBusinessApp
|
|
49
49
|
const isEnabledOrderNotReady = configs?.order_not_ready_enabled?.value === '1'
|
|
50
50
|
const isEnabledFailedPickupDriver = configs?.failed_pickup_by_driver_enabled?.value === '1'
|
|
@@ -356,6 +356,12 @@ export const getOrderStatus = (s: string, t: any) => {
|
|
|
356
356
|
value: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company'),
|
|
357
357
|
slug: 'ORDER_ACCEPTED_BY_DRIVER_COMPANY',
|
|
358
358
|
percentage: 25
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
key: 26,
|
|
362
|
+
value: t('ORDER_DRIVER_ARRIVED_CUSTOMER', 'Driver arrived to customer'),
|
|
363
|
+
slug: 'ORDER_DRIVER_ARRIVED_CUSTOMER',
|
|
364
|
+
percentage: 80
|
|
359
365
|
}
|
|
360
366
|
];
|
|
361
367
|
|
|
@@ -200,7 +200,7 @@ export const OrderListing = (props: OrdersOptionParams) => {
|
|
|
200
200
|
const OrderListingProps = {
|
|
201
201
|
...props,
|
|
202
202
|
UIComponent: OrdersOptionUI,
|
|
203
|
-
orderStatus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
|
|
203
|
+
orderStatus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
|
204
204
|
useDefualtSessionManager: true,
|
|
205
205
|
paginationSettings: {
|
|
206
206
|
initialPage: 1,
|
|
@@ -39,7 +39,10 @@ const ORDER_STATUS: any = {
|
|
|
39
39
|
20: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
|
|
40
40
|
21: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
|
|
41
41
|
22: 'ORDER_LOOKING_FOR_DRIVER',
|
|
42
|
-
23: 'ORDER_DRIVER_ON_WAY'
|
|
42
|
+
23: 'ORDER_DRIVER_ON_WAY',
|
|
43
|
+
24: 'ORDER_DRIVER_WAITING_FOR_ORDER',
|
|
44
|
+
25: 'ORDER_ACCEPTED_BY_DRIVER_COMPANY',
|
|
45
|
+
26: 'ORDER_DRIVER_ARRIVED_CUSTOMER'
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
const filterSpecialStatus = ['prepared_in', 'delivered_in', 'delivery_datetime']
|
|
@@ -62,7 +62,10 @@ export const OrderHistory = (props: any) => {
|
|
|
62
62
|
20: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
|
|
63
63
|
21: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
|
|
64
64
|
22: 'ORDER_LOOKING_FOR_DRIVER',
|
|
65
|
-
23: 'ORDER_DRIVER_ON_WAY'
|
|
65
|
+
23: 'ORDER_DRIVER_ON_WAY',
|
|
66
|
+
24: 'ORDER_DRIVER_WAITING_FOR_ORDER',
|
|
67
|
+
25: 'ORDER_ACCEPTED_BY_DRIVER_COMPANY',
|
|
68
|
+
26: 'ORDER_DRIVER_ARRIVED_CUSTOMER'
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
const getLogisticTagStatus = (status: any) => {
|
|
@@ -129,10 +129,10 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
129
129
|
const [showTitle, setShowTitle] = useState(false)
|
|
130
130
|
|
|
131
131
|
const { order, businessData } = props.order;
|
|
132
|
-
const mapValidStatuses = [9, 19, 23]
|
|
132
|
+
const mapValidStatuses = [9, 19, 23, 26]
|
|
133
133
|
const placeSpotTypes = [3, 4, 5]
|
|
134
134
|
const directionTypes = [2, 3, 4, 5]
|
|
135
|
-
const activeStatus = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23]
|
|
135
|
+
const activeStatus = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26]
|
|
136
136
|
const reorderStatus = [1, 2, 5, 6, 10, 11, 12]
|
|
137
137
|
const [isPickup, setIsPickup] = useState(order?.delivery_type === 2)
|
|
138
138
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
@@ -41,7 +41,7 @@ const OrderProgressUI = (props: any) => {
|
|
|
41
41
|
const [lastOrder, setLastOrder] = useState<any>(null)
|
|
42
42
|
const imageFails = theme.images.general.emptyActiveOrders
|
|
43
43
|
const [initialLoaded, setInitialLoaded] = useState(false)
|
|
44
|
-
const statusToShow = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23]
|
|
44
|
+
const statusToShow = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26]
|
|
45
45
|
|
|
46
46
|
const styles = StyleSheet.create({
|
|
47
47
|
main: {
|
|
@@ -205,7 +205,7 @@ export const OrderProgress = (props: any) => {
|
|
|
205
205
|
const orderProgressProps = {
|
|
206
206
|
...props,
|
|
207
207
|
UIComponent: OrderProgressUI,
|
|
208
|
-
orderStatus: [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23],
|
|
208
|
+
orderStatus: [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
|
209
209
|
useDefualtSessionManager: true,
|
|
210
210
|
paginationSettings: {
|
|
211
211
|
initialPage: 1,
|
|
@@ -355,9 +355,9 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
355
355
|
UIComponent: OrdersOptionUI,
|
|
356
356
|
noGiftCardOrders: true,
|
|
357
357
|
orderStatus: getAllOrders
|
|
358
|
-
? [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
|
|
358
|
+
? [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
|
|
359
359
|
: props.preOrders ? [13] : props.activeOrders
|
|
360
|
-
? [0, 3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23]
|
|
360
|
+
? [0, 3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26]
|
|
361
361
|
: [1, 2, 5, 6, 10, 11, 12, 15, 16, 17],
|
|
362
362
|
useDefualtSessionManager: true,
|
|
363
363
|
paginationSettings: {
|
|
@@ -567,6 +567,24 @@ export const getOrderStatus = (s: string) => {
|
|
|
567
567
|
slug: 'ORDER_DRIVER_ON_WAY',
|
|
568
568
|
percentage: 0.8,
|
|
569
569
|
image: theme.images.order.status8
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
key: 24,
|
|
573
|
+
value: t('ORDER_DRIVER_WAITING_FOR_ORDER', 'Driver waiting for order'),
|
|
574
|
+
slug: 'ORDER_DRIVER_WAITING_FOR_ORDER',
|
|
575
|
+
percentage: 0.25
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
key: 25,
|
|
579
|
+
value: t('ORDER_ACCEPTED_BY_DRIVER_COMPANY', 'Accepted by driver company'),
|
|
580
|
+
slug: 'ORDER_ACCEPTED_BY_DRIVER_COMPANY',
|
|
581
|
+
percentage: 0.25
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
key: 26,
|
|
585
|
+
value: t('ORDER_DRIVER_ARRIVED_CUSTOMER', 'Driver arrived to customer'),
|
|
586
|
+
slug: 'ORDER_DRIVER_ARRIVED_CUSTOMER',
|
|
587
|
+
percentage: 0.8
|
|
570
588
|
}
|
|
571
589
|
];
|
|
572
590
|
|