ordering-ui-react-native 0.12.30 → 0.12.34

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.
Files changed (166) hide show
  1. package/package.json +2 -1
  2. package/themes/business/src/components/OrderDetails/Delivery.tsx +206 -178
  3. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +344 -334
  4. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +83 -69
  5. package/themes/business/src/components/OrdersOption/index.tsx +122 -77
  6. package/themes/business/src/components/OrdersOption/styles.tsx +1 -0
  7. package/themes/business/src/components/PreviousOrders/index.tsx +124 -73
  8. package/themes/business/src/components/PreviousOrders/styles.tsx +7 -0
  9. package/themes/business/src/components/ProductItemAccordion/index.tsx +26 -25
  10. package/themes/business/src/components/SearchBar/index.tsx +1 -1
  11. package/themes/business/src/components/StoresList/index.tsx +12 -12
  12. package/themes/business/src/components/shared/OButton.tsx +0 -1
  13. package/themes/business/src/components/shared/OIcon.tsx +2 -0
  14. package/themes/business/src/types/index.tsx +5 -0
  15. package/themes/uber-eats/src/components/AddressList/index.tsx +1 -1
  16. package/themes/uber-eats/src/components/Messages/index.tsx +4 -4
  17. package/themes/uber-eats/src/components/shared/OButton.tsx +0 -1
  18. package/themes/uber-eats/src/components/shared/ODropDown.tsx +3 -2
  19. package/themes/uber-eats/src/components/shared/OIcon.tsx +3 -2
  20. package/themes/business/src/assets/fonts/Poppins-Bold.ttf +0 -0
  21. package/themes/business/src/assets/fonts/Poppins-Light.ttf +0 -0
  22. package/themes/business/src/assets/fonts/Poppins-Medium.ttf +0 -0
  23. package/themes/business/src/assets/fonts/Poppins-Regular.ttf +0 -0
  24. package/themes/business/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
  25. package/themes/business/src/assets/fonts/Poppins-Thin.ttf +0 -0
  26. package/themes/business/src/assets/icons/Close.png +0 -0
  27. package/themes/business/src/assets/icons/arrow_down.png +0 -0
  28. package/themes/business/src/assets/icons/arrow_left.png +0 -0
  29. package/themes/business/src/assets/icons/arrow_return_left.png +0 -0
  30. package/themes/business/src/assets/icons/arrow_right.png +0 -0
  31. package/themes/business/src/assets/icons/arrow_up.png +0 -0
  32. package/themes/business/src/assets/icons/attach.png +0 -0
  33. package/themes/business/src/assets/icons/camera.png +0 -0
  34. package/themes/business/src/assets/icons/cellphone.png +0 -0
  35. package/themes/business/src/assets/icons/chevron-down.png +0 -0
  36. package/themes/business/src/assets/icons/docFile.png +0 -0
  37. package/themes/business/src/assets/icons/drop_down.png +0 -0
  38. package/themes/business/src/assets/icons/email.png +0 -0
  39. package/themes/business/src/assets/icons/image-chat.png +0 -0
  40. package/themes/business/src/assets/icons/imageFile.png +0 -0
  41. package/themes/business/src/assets/icons/information.png +0 -0
  42. package/themes/business/src/assets/icons/logout.png +0 -0
  43. package/themes/business/src/assets/icons/map.png +0 -0
  44. package/themes/business/src/assets/icons/messages.png +0 -0
  45. package/themes/business/src/assets/icons/orders.png +0 -0
  46. package/themes/business/src/assets/icons/password.png +0 -0
  47. package/themes/business/src/assets/icons/pdfFile.png +0 -0
  48. package/themes/business/src/assets/icons/phone.png +0 -0
  49. package/themes/business/src/assets/icons/profile-default-photo.png +0 -0
  50. package/themes/business/src/assets/icons/profile.png +0 -0
  51. package/themes/business/src/assets/icons/reload.png +0 -0
  52. package/themes/business/src/assets/icons/search.png +0 -0
  53. package/themes/business/src/assets/icons/stores.png +0 -0
  54. package/themes/business/src/assets/images/background.png +0 -0
  55. package/themes/business/src/assets/images/dummies/store.png +0 -0
  56. package/themes/business/src/assets/images/image.png +0 -0
  57. package/themes/business/src/assets/images/loading-splash.png +0 -0
  58. package/themes/business/src/assets/images/logo-long.png +0 -0
  59. package/themes/business/src/assets/images/logo-white.png +0 -0
  60. package/themes/business/src/assets/images/logo.png +0 -0
  61. package/themes/business/src/assets/images/logotype-invert.png +0 -0
  62. package/themes/business/src/assets/images/logotype.png +0 -0
  63. package/themes/business/src/assets/images/not-found.png +0 -0
  64. package/themes/business/src/assets/json/order.json +0 -205
  65. package/themes/business/src/assets/json/orders.json +0 -3592
  66. package/themes/uber-eats/src/assets/fonts/Poppins-Bold.ttf +0 -0
  67. package/themes/uber-eats/src/assets/fonts/Poppins-Light.ttf +0 -0
  68. package/themes/uber-eats/src/assets/fonts/Poppins-Medium.ttf +0 -0
  69. package/themes/uber-eats/src/assets/fonts/Poppins-Regular.ttf +0 -0
  70. package/themes/uber-eats/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
  71. package/themes/uber-eats/src/assets/fonts/Poppins-Thin.ttf +0 -0
  72. package/themes/uber-eats/src/assets/icons/add-circular-outlined-button.png +0 -0
  73. package/themes/uber-eats/src/assets/icons/alert.png +0 -0
  74. package/themes/uber-eats/src/assets/icons/arrow_left.png +0 -0
  75. package/themes/uber-eats/src/assets/icons/arrow_right.png +0 -0
  76. package/themes/uber-eats/src/assets/icons/arrow_up.png +0 -0
  77. package/themes/uber-eats/src/assets/icons/autograph.png +0 -0
  78. package/themes/uber-eats/src/assets/icons/calendar.png +0 -0
  79. package/themes/uber-eats/src/assets/icons/camera.png +0 -0
  80. package/themes/uber-eats/src/assets/icons/canceled.png +0 -0
  81. package/themes/uber-eats/src/assets/icons/card-delivery.png +0 -0
  82. package/themes/uber-eats/src/assets/icons/card.png +0 -0
  83. package/themes/uber-eats/src/assets/icons/cash.png +0 -0
  84. package/themes/uber-eats/src/assets/icons/cc-stripe.png +0 -0
  85. package/themes/uber-eats/src/assets/icons/chat.png +0 -0
  86. package/themes/uber-eats/src/assets/icons/checkmark.png +0 -0
  87. package/themes/uber-eats/src/assets/icons/close.png +0 -0
  88. package/themes/uber-eats/src/assets/icons/completed.png +0 -0
  89. package/themes/uber-eats/src/assets/icons/credit-card.png +0 -0
  90. package/themes/uber-eats/src/assets/icons/delete.png +0 -0
  91. package/themes/uber-eats/src/assets/icons/drop_down.png +0 -0
  92. package/themes/uber-eats/src/assets/icons/group.png +0 -0
  93. package/themes/uber-eats/src/assets/icons/help.png +0 -0
  94. package/themes/uber-eats/src/assets/icons/home.png +0 -0
  95. package/themes/uber-eats/src/assets/icons/ic_email.png +0 -0
  96. package/themes/uber-eats/src/assets/icons/ic_lock.png +0 -0
  97. package/themes/uber-eats/src/assets/icons/image.png +0 -0
  98. package/themes/uber-eats/src/assets/icons/inprogress.png +0 -0
  99. package/themes/uber-eats/src/assets/icons/lunch.png +0 -0
  100. package/themes/uber-eats/src/assets/icons/mail.png +0 -0
  101. package/themes/uber-eats/src/assets/icons/map.png +0 -0
  102. package/themes/uber-eats/src/assets/icons/menu-help.png +0 -0
  103. package/themes/uber-eats/src/assets/icons/menu-logout.png +0 -0
  104. package/themes/uber-eats/src/assets/icons/menu-orders.png +0 -0
  105. package/themes/uber-eats/src/assets/icons/menu-user.png +0 -0
  106. package/themes/uber-eats/src/assets/icons/menu.png +0 -0
  107. package/themes/uber-eats/src/assets/icons/paypal.png +0 -0
  108. package/themes/uber-eats/src/assets/icons/paypal2.png +0 -0
  109. package/themes/uber-eats/src/assets/icons/pending.png +0 -0
  110. package/themes/uber-eats/src/assets/icons/phone.png +0 -0
  111. package/themes/uber-eats/src/assets/icons/pin_outline.png +0 -0
  112. package/themes/uber-eats/src/assets/icons/send.png +0 -0
  113. package/themes/uber-eats/src/assets/icons/speech-bubble.png +0 -0
  114. package/themes/uber-eats/src/assets/icons/stripe-s.png +0 -0
  115. package/themes/uber-eats/src/assets/icons/stripe-sb.png +0 -0
  116. package/themes/uber-eats/src/assets/icons/stripe.png +0 -0
  117. package/themes/uber-eats/src/assets/icons/trash.png +0 -0
  118. package/themes/uber-eats/src/assets/icons/upload.png +0 -0
  119. package/themes/uber-eats/src/assets/icons/wallet.png +0 -0
  120. package/themes/uber-eats/src/assets/images/business.png +0 -0
  121. package/themes/uber-eats/src/assets/images/categories/category-all.png +0 -0
  122. package/themes/uber-eats/src/assets/images/dummies/product.png +0 -0
  123. package/themes/uber-eats/src/assets/images/dummies/store.png +0 -0
  124. package/themes/uber-eats/src/assets/images/empty-active-orders.png +0 -0
  125. package/themes/uber-eats/src/assets/images/empty-past-orders.png +0 -0
  126. package/themes/uber-eats/src/assets/images/home-hero.png +0 -0
  127. package/themes/uber-eats/src/assets/images/image.png +0 -0
  128. package/themes/uber-eats/src/assets/images/logo-long.png +0 -0
  129. package/themes/uber-eats/src/assets/images/logo-white.png +0 -0
  130. package/themes/uber-eats/src/assets/images/logo.png +0 -0
  131. package/themes/uber-eats/src/assets/images/logotype-invert.png +0 -0
  132. package/themes/uber-eats/src/assets/images/logotype.png +0 -0
  133. package/themes/uber-eats/src/assets/images/marker.png +0 -0
  134. package/themes/uber-eats/src/assets/images/not-found.png +0 -0
  135. package/themes/uber-eats/src/assets/images/paper-plane.png +0 -0
  136. package/themes/uber-eats/src/assets/images/slide1.png +0 -0
  137. package/themes/uber-eats/src/assets/images/slide2.png +0 -0
  138. package/themes/uber-eats/src/assets/images/slide3.png +0 -0
  139. package/themes/uber-eats/src/assets/images/slide4.png +0 -0
  140. package/themes/uber-eats/src/assets/images/slide5.png +0 -0
  141. package/themes/uber-eats/src/assets/images/slide6.png +0 -0
  142. package/themes/uber-eats/src/assets/images/status-0.png +0 -0
  143. package/themes/uber-eats/src/assets/images/status-1.png +0 -0
  144. package/themes/uber-eats/src/assets/images/status-10.png +0 -0
  145. package/themes/uber-eats/src/assets/images/status-11.png +0 -0
  146. package/themes/uber-eats/src/assets/images/status-12.png +0 -0
  147. package/themes/uber-eats/src/assets/images/status-13.png +0 -0
  148. package/themes/uber-eats/src/assets/images/status-14.png +0 -0
  149. package/themes/uber-eats/src/assets/images/status-15.png +0 -0
  150. package/themes/uber-eats/src/assets/images/status-16.png +0 -0
  151. package/themes/uber-eats/src/assets/images/status-17.png +0 -0
  152. package/themes/uber-eats/src/assets/images/status-18.png +0 -0
  153. package/themes/uber-eats/src/assets/images/status-19.png +0 -0
  154. package/themes/uber-eats/src/assets/images/status-2.png +0 -0
  155. package/themes/uber-eats/src/assets/images/status-20.png +0 -0
  156. package/themes/uber-eats/src/assets/images/status-21.png +0 -0
  157. package/themes/uber-eats/src/assets/images/status-3.png +0 -0
  158. package/themes/uber-eats/src/assets/images/status-4.png +0 -0
  159. package/themes/uber-eats/src/assets/images/status-5.png +0 -0
  160. package/themes/uber-eats/src/assets/images/status-6.png +0 -0
  161. package/themes/uber-eats/src/assets/images/status-7.png +0 -0
  162. package/themes/uber-eats/src/assets/images/status-8.png +0 -0
  163. package/themes/uber-eats/src/assets/images/status-9.png +0 -0
  164. package/themes/uber-eats/src/assets/images/store.png +0 -0
  165. package/themes/uber-eats/src/assets/json/order.json +0 -205
  166. package/themes/uber-eats/src/assets/json/orders.json +0 -3592
@@ -4,13 +4,13 @@ import { Platform, StyleSheet, View } from 'react-native';
4
4
 
5
5
  import { OButton, OText, OLink, OModal } from '../shared'
6
6
  import {
7
- OrderContent,
8
- OrderBusiness,
9
- OrderCustomer,
10
- OrderProducts,
11
- Table,
12
- OrderBill,
13
- Total,
7
+ OrderContent,
8
+ OrderBusiness,
9
+ OrderCustomer,
10
+ OrderProducts,
11
+ Table,
12
+ OrderBill,
13
+ Total,
14
14
  } from './styles';
15
15
 
16
16
  import { ProductItemAccordion } from '../ProductItemAccordion';
@@ -18,289 +18,293 @@ import { ProductItemAccordion } from '../ProductItemAccordion';
18
18
  import { verifyDecimals } from '../../utils';
19
19
 
20
20
  import {
21
- useLanguage,
22
- useUtils,
23
- useConfig,
21
+ useLanguage,
22
+ useUtils,
23
+ useConfig,
24
24
  } from 'ordering-components/native';
25
25
  import { useTheme } from 'styled-components/native';
26
26
  import { ReviewCustomer } from '../ReviewCustomer'
27
27
 
28
28
  interface OrderContent {
29
- order: any
29
+ order: any,
30
+ logisticOrderStatus?: Array<number>
30
31
  }
31
32
 
32
33
  export const OrderContentComponent = (props: OrderContent) => {
33
- const [, t] = useLanguage();
34
- const theme = useTheme()
35
-
36
- const { order } = props;
37
-
38
- const [{ parsePrice, parseNumber }] = useUtils();
39
- const [{ configs }] = useConfig();
40
- const [openReviewModal, setOpenReviewModal] = useState(false)
41
- const [isCustomerReviewed, setIsCustomerReviewed] = useState(false)
42
-
43
- const pastOrderStatuses = [1, 2, 5, 6, 10, 11, 12, 16, 17]
44
-
45
- const styles = StyleSheet.create({
46
- linkWithIcons: {
47
- flexDirection: 'row',
48
- alignItems: 'center',
49
- justifyContent: 'space-between',
50
- marginBottom: 5,
51
- flex: 1,
52
- },
53
- textBold: {
54
- fontWeight: '600',
55
- },
56
- textLink: {
57
- color: '#365CC7'
58
- },
59
- btnReview: {
60
- borderWidth: 0,
61
- backgroundColor: theme.colors.primary,
62
- borderRadius: 8,
63
- }
64
- })
65
-
66
- const handleSuccessReviewed = () => {
67
- setOpenReviewModal(false)
68
- setIsCustomerReviewed(true)
34
+ const [, t] = useLanguage();
35
+ const theme = useTheme()
36
+
37
+ const { order, logisticOrderStatus } = props;
38
+ const [{ parsePrice, parseNumber }] = useUtils();
39
+ const [{ configs }] = useConfig();
40
+ const [openReviewModal, setOpenReviewModal] = useState(false)
41
+ const [isCustomerReviewed, setIsCustomerReviewed] = useState(false)
42
+
43
+ const pastOrderStatuses = [1, 2, 5, 6, 10, 11, 12, 16, 17]
44
+
45
+ const styles = StyleSheet.create({
46
+ linkWithIcons: {
47
+ flexDirection: 'row',
48
+ alignItems: 'center',
49
+ justifyContent: 'space-between',
50
+ marginBottom: 5,
51
+ flex: 1,
52
+ },
53
+ textBold: {
54
+ fontWeight: '600',
55
+ },
56
+ textLink: {
57
+ color: '#365CC7'
58
+ },
59
+ btnReview: {
60
+ borderWidth: 0,
61
+ backgroundColor: theme.colors.primary,
62
+ borderRadius: 8,
69
63
  }
70
- return (
71
- <OrderContent>
72
- <OrderBusiness>
73
- <OText style={{ marginBottom: 5 }} size={16} weight="600">
74
- {t('BUSINESS_DETAILS', 'Business details')}
75
- </OText>
76
-
77
- <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
78
- {order?.business?.name}
79
- </OText>
80
-
81
- {!!order?.business?.email && (
82
- <View style={styles.linkWithIcons}>
83
- <OLink
84
- PressStyle={styles.linkWithIcons}
85
- url={`mailto:${order?.business?.email}`}
86
- shorcut={order?.business?.email}
87
- TextStyle={styles.textLink}
88
- />
89
- </View>
90
- )}
91
-
92
- {!!order?.business?.cellphone && (
93
- <View style={styles.linkWithIcons}>
94
- <OLink
95
- PressStyle={styles.linkWithIcons}
96
- url={`tel:${order?.business?.cellphone}`}
97
- shorcut={`${order?.business?.cellphone}`}
98
- TextStyle={styles.textLink}
99
- />
100
- </View>
101
- )}
102
-
103
- {!!order?.business?.phone && (
104
- <View style={styles.linkWithIcons}>
105
- <OLink
106
- PressStyle={styles.linkWithIcons}
107
- url={`tel:${order?.business?.phone}`}
108
- shorcut={order?.business?.phone}
109
- TextStyle={styles.textLink}
110
- />
111
- </View>
112
- )}
113
-
114
- {!!order?.business?.address && (
115
- <View style={styles.linkWithIcons}>
116
- <OLink
117
- PressStyle={styles.linkWithIcons}
118
- url={Platform.select({
119
- ios: `maps:0,0?q=${order?.business?.address}`,
120
- android: `geo:0,0?q=${order?.business?.address}`,
121
- })}
122
- shorcut={order?.business?.address}
123
- TextStyle={styles.textLink}
124
- />
125
- </View>
126
- )}
127
-
128
- {!!order?.business?.address_notes && (
129
- <View style={styles.linkWithIcons}>
130
- <OLink
131
- PressStyle={styles.linkWithIcons}
132
- url={Platform.select({
133
- ios: `maps:0,0?q=${order?.business?.address_notes}`,
134
- android: `geo:0,0?q=${order?.business?.address_notes}`,
135
- })}
136
- shorcut={order?.business?.address_notes}
137
- TextStyle={styles.textLink}
138
- />
139
- </View>
140
- )}
141
- </OrderBusiness>
142
-
143
- <OrderCustomer>
144
- <OText style={{ marginBottom: 5 }} size={16} weight="600">
145
- {t('CUSTOMER_DETAILS', 'Customer details')}
146
- </OText>
147
-
148
- <View style={{ flexDirection: 'row' }}>
149
- <OText numberOfLines={2} mBottom={4}>
150
- <OText
151
- numberOfLines={1}
152
- mBottom={4}
153
- ellipsizeMode="tail"
154
- space>
155
- {order?.customer?.name}
156
- </OText>
157
-
158
- <OText
159
- numberOfLines={1}
160
- mBottom={4}
161
- ellipsizeMode="tail"
162
- space>
163
- {order?.customer?.middle_name}
164
- </OText>
64
+ })
65
+
66
+ const handleSuccessReviewed = () => {
67
+ setOpenReviewModal(false)
68
+ setIsCustomerReviewed(true)
69
+ }
70
+
71
+ return (
72
+ <OrderContent>
73
+ <OrderBusiness>
74
+ <OText style={{ marginBottom: 5 }} size={16} weight="600">
75
+ {t('BUSINESS_DETAILS', 'Business details')}
76
+ </OText>
77
+
78
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
79
+ {order?.business?.name}
80
+ </OText>
81
+ {(!order?.isLogistic || !logisticOrderStatus?.includes(order?.status)) && (
82
+ <>
83
+ {!!order?.business?.email && (
84
+ <View style={styles.linkWithIcons}>
85
+ <OLink
86
+ PressStyle={styles.linkWithIcons}
87
+ url={`mailto:${order?.business?.email}`}
88
+ shorcut={order?.business?.email}
89
+ TextStyle={styles.textLink}
90
+ />
91
+ </View>
92
+ )}
165
93
 
166
- <OText
167
- numberOfLines={1}
168
- mBottom={4}
169
- ellipsizeMode="tail"
170
- space>
171
- {order?.customer?.lastname}
172
- </OText>
94
+ {!!order?.business?.cellphone && (
95
+ <View style={styles.linkWithIcons}>
96
+ <OLink
97
+ PressStyle={styles.linkWithIcons}
98
+ url={`tel:${order?.business?.cellphone}`}
99
+ shorcut={`${order?.business?.cellphone}`}
100
+ TextStyle={styles.textLink}
101
+ />
102
+ </View>
103
+ )}
173
104
 
174
- <OText
175
- numberOfLines={1}
176
- mBottom={4}
177
- ellipsizeMode="tail"
178
- space>
179
- {order?.customer?.second_lastname}
180
- </OText>
181
- </OText>
105
+ {!!order?.business?.phone && (
106
+ <View style={styles.linkWithIcons}>
107
+ <OLink
108
+ PressStyle={styles.linkWithIcons}
109
+ url={`tel:${order?.business?.phone}`}
110
+ shorcut={order?.business?.phone}
111
+ TextStyle={styles.textLink}
112
+ />
113
+ </View>
114
+ )}
115
+ </>
116
+ )}
117
+
118
+ {!!order?.business?.address && (
119
+ <View style={styles.linkWithIcons}>
120
+ <OLink
121
+ PressStyle={styles.linkWithIcons}
122
+ url={Platform.select({
123
+ ios: `maps:0,0?q=${order?.business?.address}`,
124
+ android: `geo:0,0?q=${order?.business?.address}`,
125
+ })}
126
+ shorcut={order?.business?.address}
127
+ TextStyle={styles.textLink}
128
+ />
129
+ </View>
130
+ )}
131
+
132
+ {!!order?.business?.address_notes && (
133
+ <View style={styles.linkWithIcons}>
134
+ <OLink
135
+ PressStyle={styles.linkWithIcons}
136
+ url={Platform.select({
137
+ ios: `maps:0,0?q=${order?.business?.address_notes}`,
138
+ android: `geo:0,0?q=${order?.business?.address_notes}`,
139
+ })}
140
+ shorcut={order?.business?.address_notes}
141
+ TextStyle={styles.textLink}
142
+ />
182
143
  </View>
144
+ )}
145
+ </OrderBusiness>
146
+
147
+ <OrderCustomer>
148
+ <OText style={{ marginBottom: 5 }} size={16} weight="600">
149
+ {t('CUSTOMER_DETAILS', 'Customer details')}
150
+ </OText>
151
+
152
+ <View style={{ flexDirection: 'row' }}>
153
+ <OText numberOfLines={2} mBottom={4}>
154
+ <OText
155
+ numberOfLines={1}
156
+ mBottom={4}
157
+ ellipsizeMode="tail"
158
+ space>
159
+ {order?.customer?.name}
160
+ </OText>
183
161
 
184
- {!!order?.customer?.email && (
185
- <View style={styles.linkWithIcons}>
186
- <OLink
187
- PressStyle={styles.linkWithIcons}
188
- url={`mailto:${order?.customer?.email}`}
189
- shorcut={order?.customer?.email}
190
- TextStyle={styles.textLink}
191
-
192
- />
193
- </View>
194
- )}
195
-
196
- {!!order?.customer?.cellphone && (
197
- <View style={styles.linkWithIcons}>
198
- <OLink
199
- PressStyle={styles.linkWithIcons}
200
- url={`tel:${order?.customer?.cellphone}`}
201
- shorcut={order?.customer?.cellphone}
202
- TextStyle={styles.textLink}
203
- />
204
- </View>
205
- )}
206
-
207
- {!!order?.customer?.phone && (
208
- <View style={styles.linkWithIcons}>
209
- <OLink
210
- PressStyle={styles.linkWithIcons}
211
- url={`tel:${order?.customer?.phone}`}
212
- shorcut={order?.customer?.phone}
213
- TextStyle={styles.textLink}
214
- />
215
- </View>
216
- )}
217
-
218
- {!!order?.customer?.address && (
219
- <View style={styles.linkWithIcons}>
220
- <OLink
221
- PressStyle={styles.linkWithIcons}
222
- url={Platform.select({
223
- ios: `maps:0,0?q=${order?.customer?.address}`,
224
- android: `geo:0,0?q=${order?.customer?.address}`,
225
- })}
226
- shorcut={order?.customer?.address}
227
- TextStyle={styles.textLink}
228
- />
229
- </View>
230
- )}
231
-
232
- {!!order?.customer?.internal_number && (
233
- <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
234
- {order?.customer?.internal_number}
162
+ <OText
163
+ numberOfLines={1}
164
+ mBottom={4}
165
+ ellipsizeMode="tail"
166
+ space>
167
+ {order?.customer?.middle_name}
235
168
  </OText>
236
- )}
237
169
 
238
- {!!order?.customer?.address_notes && (
239
- <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
240
- {order?.customer?.address_notes}
170
+ <OText
171
+ numberOfLines={1}
172
+ mBottom={4}
173
+ ellipsizeMode="tail"
174
+ space>
175
+ {order?.customer?.lastname}
241
176
  </OText>
242
- )}
243
177
 
244
- {!!order?.customer.zipcode && (
245
- <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
246
- {order?.customer?.zipcode}
178
+ <OText
179
+ numberOfLines={1}
180
+ mBottom={4}
181
+ ellipsizeMode="tail"
182
+ space>
183
+ {order?.customer?.second_lastname}
247
184
  </OText>
248
- )}
249
-
250
- {!order?.user_review && pastOrderStatuses.includes(order?.status) && !isCustomerReviewed && (
251
- <OButton
252
- style={styles.btnReview}
253
- textStyle={{ color: theme.colors.white }}
254
- text={t('REVIEW_CUSTOMER', 'Review customer')}
255
- imgRightSrc={false}
256
- onClick={() => setOpenReviewModal(true)}
185
+ </OText>
186
+ </View>
187
+
188
+ {!!order?.customer?.email && (
189
+ <View style={styles.linkWithIcons}>
190
+ <OLink
191
+ PressStyle={styles.linkWithIcons}
192
+ url={`mailto:${order?.customer?.email}`}
193
+ shorcut={order?.customer?.email}
194
+ TextStyle={styles.textLink}
195
+
196
+ />
197
+ </View>
198
+ )}
199
+
200
+ {!!order?.customer?.cellphone && (
201
+ <View style={styles.linkWithIcons}>
202
+ <OLink
203
+ PressStyle={styles.linkWithIcons}
204
+ url={`tel:${order?.customer?.cellphone}`}
205
+ shorcut={order?.customer?.cellphone}
206
+ TextStyle={styles.textLink}
207
+ />
208
+ </View>
209
+ )}
210
+
211
+ {!!order?.customer?.phone && (
212
+ <View style={styles.linkWithIcons}>
213
+ <OLink
214
+ PressStyle={styles.linkWithIcons}
215
+ url={`tel:${order?.customer?.phone}`}
216
+ shorcut={order?.customer?.phone}
217
+ TextStyle={styles.textLink}
218
+ />
219
+ </View>
220
+ )}
221
+
222
+ {!!order?.customer?.address && (
223
+ <View style={styles.linkWithIcons}>
224
+ <OLink
225
+ PressStyle={styles.linkWithIcons}
226
+ url={Platform.select({
227
+ ios: `maps:0,0?q=${order?.customer?.address}`,
228
+ android: `geo:0,0?q=${order?.customer?.address}`,
229
+ })}
230
+ shorcut={order?.customer?.address}
231
+ TextStyle={styles.textLink}
257
232
  />
258
- )}
259
- </OrderCustomer>
233
+ </View>
234
+ )}
260
235
 
261
- <OrderProducts>
262
- <OText style={{ marginBottom: 5 }} size={16} weight="600">
263
- {t('ORDER_DETAILS', 'Order Details')}
236
+ {!!order?.customer?.internal_number && (
237
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
238
+ {order?.customer?.internal_number}
264
239
  </OText>
240
+ )}
265
241
 
266
- {order?.products?.length &&
267
- order?.products.map((product: any, i: number) => (
268
- <ProductItemAccordion
269
- key={product?.id || i}
270
- product={product}
271
- />
272
- ))}
273
- </OrderProducts>
242
+ {!!order?.customer?.address_notes && (
243
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
244
+ {order?.customer?.address_notes}
245
+ </OText>
246
+ )}
274
247
 
275
- <OrderBill>
248
+ {!!order?.customer?.zipcode && (
249
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
250
+ {order?.customer?.zipcode}
251
+ </OText>
252
+ )}
253
+ {!order?.user_review && pastOrderStatuses.includes(order?.status) && !isCustomerReviewed && (
254
+ <OButton
255
+ style={styles.btnReview}
256
+ textStyle={{ color: theme.colors.white }}
257
+ text={t('REVIEW_CUSTOMER', 'Review customer')}
258
+ imgRightSrc={false}
259
+ onClick={() => setOpenReviewModal(true)}
260
+ />
261
+ )}
262
+ </OrderCustomer>
263
+
264
+ <OrderProducts>
265
+ <OText style={{ marginBottom: 5 }} size={16} weight="600">
266
+ {t('ORDER_DETAILS', 'Order Details')}
267
+ </OText>
268
+
269
+ {order?.products?.length > 0 &&
270
+ order?.products.map((product: any, i: number) => (
271
+ <ProductItemAccordion
272
+ key={product?.id || i}
273
+ product={product}
274
+ />
275
+ ))}
276
+ </OrderProducts>
277
+
278
+ <OrderBill>
279
+ <Table>
280
+ <OText mBottom={4}>{t('SUBTOTAL', 'Subtotal')}</OText>
281
+ <OText mBottom={4}>
282
+ {parsePrice(
283
+ order.tax_type === 1
284
+ ? order?.summary?.subtotal + order?.summary?.tax ?? 0
285
+ : order?.summary?.subtotal ?? 0,
286
+ )}
287
+ </OText>
288
+ </Table>
289
+
290
+ {order?.tax_type !== 1 && (
276
291
  <Table>
277
- <OText mBottom={4}>{t('SUBTOTAL', 'Subtotal')}</OText>
278
292
  <OText mBottom={4}>
279
- {parsePrice(
280
- order.tax_type === 1
281
- ? order?.summary?.subtotal + order?.summary?.tax ?? 0
282
- : order?.summary?.subtotal ?? 0,
283
- )}
293
+ {t('TAX', 'Tax')}
294
+ {`(${verifyDecimals(
295
+ order?.summary?.tax_rate,
296
+ parseNumber,
297
+ )}%)`}
284
298
  </OText>
285
- </Table>
286
299
 
287
- {order?.tax_type !== 1 && (
288
- <Table>
289
- <OText mBottom={4}>
290
- {t('TAX', 'Tax')}
291
- {`(${verifyDecimals(
292
- order?.summary?.tax_rate,
293
- parseNumber,
294
- )}%)`}
295
- </OText>
296
-
297
- <OText mBottom={4}>
298
- {parsePrice(order?.summary?.tax ?? 0)}
299
- </OText>
300
- </Table>
301
- )}
300
+ <OText mBottom={4}>
301
+ {parsePrice(order?.summary?.tax ?? 0)}
302
+ </OText>
303
+ </Table >
304
+ )}
302
305
 
303
- {order?.summary?.discount > 0 && (
306
+ {
307
+ order?.summary?.discount > 0 && (
304
308
  <Table>
305
309
  {order?.offer_type === 1 ? (
306
310
  <OText mBottom={4}>
@@ -321,36 +325,40 @@ export const OrderContentComponent = (props: OrderContent) => {
321
325
  - {parsePrice(order?.summary?.discount)}
322
326
  </OText>
323
327
  </Table>
324
- )}
328
+ )
329
+ }
325
330
 
326
- {order?.summary?.subtotal_with_discount > 0 &&
327
- order?.summary?.discount > 0 &&
328
- order?.summary?.total >= 0 && (
329
- <Table>
331
+ {
332
+ order?.summary?.subtotal_with_discount > 0 &&
333
+ order?.summary?.discount > 0 &&
334
+ order?.summary?.total >= 0 && (
335
+ <Table>
336
+ <OText mBottom={4}>
337
+ {t(
338
+ 'SUBTOTAL_WITH_DISCOUNT',
339
+ 'Subtotal with discount',
340
+ )}
341
+ </OText>
342
+ {order?.tax_type === 1 ? (
330
343
  <OText mBottom={4}>
331
- {t(
332
- 'SUBTOTAL_WITH_DISCOUNT',
333
- 'Subtotal with discount',
344
+ {parsePrice(
345
+ order?.summary?.subtotal_with_discount +
346
+ order?.summary?.tax ?? 0,
334
347
  )}
335
348
  </OText>
336
- {order?.tax_type === 1 ? (
337
- <OText mBottom={4}>
338
- {parsePrice(
339
- order?.summary?.subtotal_with_discount +
340
- order?.summary?.tax ?? 0,
341
- )}
342
- </OText>
343
- ) : (
344
- <OText mBottom={4}>
345
- {parsePrice(
346
- order?.summary?.subtotal_with_discount ?? 0,
347
- )}
348
- </OText>
349
- )}
350
- </Table>
351
- )}
349
+ ) : (
350
+ <OText mBottom={4}>
351
+ {parsePrice(
352
+ order?.summary?.subtotal_with_discount ?? 0,
353
+ )}
354
+ </OText>
355
+ )}
356
+ </Table>
357
+ )
358
+ }
352
359
 
353
- {order?.summary?.delivery_price > 0 && (
360
+ {
361
+ order?.summary?.delivery_price > 0 && (
354
362
  <Table>
355
363
  <OText mBottom={4}>
356
364
  {t('DELIVERY_FEE', 'Delivery Fee')}
@@ -360,26 +368,28 @@ export const OrderContentComponent = (props: OrderContent) => {
360
368
  {parsePrice(order?.summary?.delivery_price)}
361
369
  </OText>
362
370
  </Table>
363
- )}
371
+ )
372
+ }
364
373
 
365
- <Table>
366
- <OText mBottom={4}>
367
- {t('DRIVER_TIP', 'Driver tip')}{' '}
368
- {order?.summary?.driver_tip > 0 &&
369
- parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
370
- !parseInt(configs?.driver_tip_use_custom?.value, 10) &&
371
- `(${verifyDecimals(
372
- order?.summary?.driver_tip,
373
- parseNumber,
374
- )}%)`}
375
- </OText>
374
+ <Table>
375
+ <OText mBottom={4}>
376
+ {t('DRIVER_TIP', 'Driver tip')}{' '}
377
+ {order?.summary?.driver_tip > 0 &&
378
+ parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
379
+ !parseInt(configs?.driver_tip_use_custom?.value, 10) &&
380
+ `(${verifyDecimals(
381
+ order?.summary?.driver_tip,
382
+ parseNumber,
383
+ )}%)`}
384
+ </OText>
376
385
 
377
- <OText mBottom={4}>
378
- {parsePrice(order?.summary?.driver_tip ?? 0)}
379
- </OText>
380
- </Table>
386
+ <OText mBottom={4}>
387
+ {parsePrice(order?.summary?.driver_tip ?? 0)}
388
+ </OText>
389
+ </Table>
381
390
 
382
- {order?.summary?.service_fee > 0 && (
391
+ {
392
+ order?.summary?.service_fee > 0 && (
383
393
  <Table>
384
394
  <OText mBottom={4}>
385
395
  {t('SERVICE_FEE', 'Service Fee')}{' '}
@@ -393,36 +403,36 @@ export const OrderContentComponent = (props: OrderContent) => {
393
403
  {parsePrice(order?.summary?.service_fee)}
394
404
  </OText>
395
405
  </Table>
396
- )}
406
+ )
407
+ }
397
408
 
398
- <Total>
399
- <Table>
400
- <OText mBottom={4} style={styles.textBold}>
401
- {t('TOTAL', 'Total')}
402
- </OText>
409
+ <Total>
410
+ <Table>
411
+ <OText mBottom={4} style={styles.textBold}>
412
+ {t('TOTAL', 'Total')}
413
+ </OText>
403
414
 
404
- <OText
405
- mBottom={4}
406
- style={styles.textBold}
407
- color={theme.colors.primary}>
408
- {parsePrice(order?.summary?.total ?? 0)}
409
- </OText>
410
- </Table>
411
- </Total>
412
- </OrderBill>
413
-
414
- <OModal
415
- open={openReviewModal}
416
- onClose={() => setOpenReviewModal(false)}
417
- entireModal
418
- customClose
419
- >
420
- <ReviewCustomer
421
- order={order}
422
- closeModal={() => setOpenReviewModal(false)}
423
- onClose={() => handleSuccessReviewed()}
424
- />
425
- </OModal>
426
- </OrderContent>
427
- )
415
+ <OText
416
+ mBottom={4}
417
+ style={styles.textBold}
418
+ color={theme.colors.primary}>
419
+ {parsePrice(order?.summary?.total ?? 0)}
420
+ </OText>
421
+ </Table>
422
+ </Total>
423
+ </OrderBill >
424
+ <OModal
425
+ open={openReviewModal}
426
+ onClose={() => setOpenReviewModal(false)}
427
+ entireModal
428
+ customClose
429
+ >
430
+ <ReviewCustomer
431
+ order={order}
432
+ closeModal={() => setOpenReviewModal(false)}
433
+ onClose={() => handleSuccessReviewed()}
434
+ />
435
+ </OModal>
436
+ </OrderContent>
437
+ )
428
438
  }