ordering-ui-react-native 0.16.97 → 0.16.98
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
CHANGED
|
@@ -44,33 +44,6 @@ import { USER_TYPE } from '../../config/constants';
|
|
|
44
44
|
|
|
45
45
|
import SignatureScreen from 'react-native-signature-canvas';
|
|
46
46
|
|
|
47
|
-
const ORDER_STATUS: any = {
|
|
48
|
-
0: 'ORDER_STATUS_PENDING',
|
|
49
|
-
1: 'ORDERS_COMPLETED',
|
|
50
|
-
2: 'ORDER_REJECTED',
|
|
51
|
-
3: 'ORDER_STATUS_IN_BUSINESS',
|
|
52
|
-
4: 'ORDER_READY',
|
|
53
|
-
5: 'ORDER_REJECTED_RESTAURANT',
|
|
54
|
-
6: 'ORDER_STATUS_CANCELLEDBYDRIVER',
|
|
55
|
-
7: 'ORDER_STATUS_ACCEPTEDBYRESTAURANT',
|
|
56
|
-
8: 'ORDER_CONFIRMED_ACCEPTED_BY_DRIVER',
|
|
57
|
-
9: 'ORDER_PICKUP_COMPLETED_BY_DRIVER',
|
|
58
|
-
10: 'ORDER_PICKUP_FAILED_BY_DRIVER',
|
|
59
|
-
11: 'ORDER_DELIVERY_COMPLETED_BY_DRIVER',
|
|
60
|
-
12: 'ORDER_DELIVERY_FAILED_BY_DRIVER',
|
|
61
|
-
13: 'PREORDER',
|
|
62
|
-
14: 'ORDER_NOT_READY',
|
|
63
|
-
15: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
|
|
64
|
-
16: 'ORDER_STATUS_CANCELLED_BY_CUSTOMER',
|
|
65
|
-
17: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
|
|
66
|
-
18: 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS',
|
|
67
|
-
19: 'ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER',
|
|
68
|
-
20: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
|
|
69
|
-
21: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
|
|
70
|
-
22: 'ORDER_LOOKING_FOR_DRIVER',
|
|
71
|
-
23: 'ORDER_DRIVER_ON_WAY'
|
|
72
|
-
}
|
|
73
|
-
|
|
74
47
|
const filterSpecialStatus = ['prepared_in', 'delivered_in', 'delivery_datetime']
|
|
75
48
|
|
|
76
49
|
const ChatUI = (props: MessagesParams) => {
|
|
@@ -97,6 +70,33 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
97
70
|
const theme = useTheme();
|
|
98
71
|
const [messageList, setMessageList] = useState<any>([])
|
|
99
72
|
|
|
73
|
+
const ORDER_STATUS: any = {
|
|
74
|
+
0: t('ORDER_STATUS_PENDING', 'Order status pending'),
|
|
75
|
+
1: t('ORDERS_COMPLETED', 'Order completed'),
|
|
76
|
+
2: t('ORDER_REJECTED', 'Order rejected'),
|
|
77
|
+
3: t('ORDER_STATUS_IN_BUSINESS', 'Order status in business'),
|
|
78
|
+
4: t('ORDER_READY', 'Order ready'),
|
|
79
|
+
5: t('ORDER_REJECTED_RESTAURANT', 'Order rejected by restaurant'),
|
|
80
|
+
6: t('ORDER_STATUS_CANCELLEDBYDRIVER', 'Order status cancelled by driver'),
|
|
81
|
+
7: t('ORDER_STATUS_ACCEPTEDBYRESTAURANT', 'Order status accepted by restaurant'),
|
|
82
|
+
8: t('ORDER_CONFIRMED_ACCEPTED_BY_DRIVER', 'Order confirmed accepted by driver'),
|
|
83
|
+
9: t('ORDER_PICKUP_COMPLETED_BY_DRIVER', 'Order pickup completed by driver'),
|
|
84
|
+
10: t('ORDER_PICKUP_FAILED_BY_DRIVER', 'Order pickup failed by driver'),
|
|
85
|
+
11: t('ORDER_DELIVERY_COMPLETED_BY_DRIVER', 'Order delivery completed by driver'),
|
|
86
|
+
12: t('ORDER_DELIVERY_FAILED_BY_DRIVER', 'Order delivery failed by driver'),
|
|
87
|
+
13: t('PREORDER', 'Preorder'),
|
|
88
|
+
14: t('ORDER_NOT_READY', 'Order not ready'),
|
|
89
|
+
15: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', 'Order picked up completed by customer'),
|
|
90
|
+
16: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', 'Order status cancelled by customer'),
|
|
91
|
+
17: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', 'Order not picked up by customer'),
|
|
92
|
+
18: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', 'Order driver almost arrived to business'),
|
|
93
|
+
19: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', 'Order driver almost arrived to customer'),
|
|
94
|
+
20: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Order customer almost arrived to business'),
|
|
95
|
+
21: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Order customer arrived to business'),
|
|
96
|
+
22: t('ORDER_LOOKING_FOR_DRIVER', 'Order looking for driver'),
|
|
97
|
+
23: t('ORDER_DRIVER_ON_WAY', 'Driver on way')
|
|
98
|
+
}
|
|
99
|
+
|
|
100
100
|
const storeMessageList: any = [
|
|
101
101
|
{ key: 'store_message_1', text: t('STORE_MESSAGE_1', 'store_message_1') },
|
|
102
102
|
{ key: 'store_message_2', text: t('STORE_MESSAGE_2', 'store_message_2') },
|
|
@@ -377,7 +377,7 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
377
377
|
?
|
|
378
378
|
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute) ?
|
|
379
379
|
`${message.change.old === null ? '0' : message.change.old} ${t('TO', 'to')} ${message.change.new} ${t('MINUTES', 'Minutes')}` :
|
|
380
|
-
`${message.change.old !== null &&
|
|
380
|
+
`${message.change.old !== null && ORDER_STATUS[parseInt(message.change.old, 10)]} ${t('TO', 'to')} ${ORDER_STATUS[parseInt(message.change.new, 10)]}`
|
|
381
381
|
}`
|
|
382
382
|
: message.change.new
|
|
383
383
|
?
|
|
@@ -179,6 +179,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
179
179
|
'An error occurred while trying to pay by PayPal',
|
|
180
180
|
ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY:
|
|
181
181
|
'Error adding product, very far for delivery',
|
|
182
|
+
ERROR_AUTH_DRIVER_LOGIN_VALIDATION: 'Error auth driver login validation'
|
|
182
183
|
};
|
|
183
184
|
|
|
184
185
|
return keyList[key] ? t(key, keyList[key]) : t(key);
|
|
@@ -280,7 +280,7 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
|
|
|
280
280
|
}}
|
|
281
281
|
style={{ height: 35, paddingLeft: 5, paddingRight: 5, marginHorizontal: 3, marginVertical: 10 }}
|
|
282
282
|
imgRightSrc={isSelectedComment(commentItem.key) ? theme.images.general.close : null}
|
|
283
|
-
imgRightStyle={{
|
|
283
|
+
imgRightStyle={{ right: 5, margin: 5 }}
|
|
284
284
|
onClick={() => handleChangeComment(commentItem) }
|
|
285
285
|
/>
|
|
286
286
|
))}
|
|
@@ -38,6 +38,8 @@ export const getTraduction = (key: string, t: any) => {
|
|
|
38
38
|
ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
|
|
39
39
|
ERROR_USER_UPDATE_YOU_HAVE_ASSIGNED_ORDERS:
|
|
40
40
|
"You can't because you have assigned orders",
|
|
41
|
+
ERROR_INVALID_OFFER: 'The offer doesn\'t exist',
|
|
42
|
+
ERROR_AUTH_DRIVER_LOGIN_VALIDATION: 'Error auth driver login validation'
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
return keyList[key] ? t(key, keyList[key]) : t(key);
|