ordering-ui-react-native 0.10.3 → 0.11.3

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 (35) hide show
  1. package/package.json +2 -1
  2. package/themes/business/index.tsx +12 -12
  3. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +49 -43
  4. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +4 -10
  5. package/themes/business/src/components/Chat/index.tsx +97 -60
  6. package/themes/business/src/components/DriverMap/index.tsx +196 -183
  7. package/themes/business/src/components/FloatingButton/index.tsx +61 -43
  8. package/themes/business/src/components/FloatingButton/styles.tsx +2 -5
  9. package/themes/business/src/components/GoogleMap/index.tsx +10 -8
  10. package/themes/business/src/components/Home/index.tsx +2 -5
  11. package/themes/business/src/components/Home/styles.tsx +1 -2
  12. package/themes/business/src/components/LanguageSelector/index.tsx +1 -3
  13. package/themes/business/src/components/MessagesOption/index.tsx +13 -18
  14. package/themes/business/src/components/MessagesOption/styles.tsx +3 -0
  15. package/themes/business/src/components/OrderDetails/Business.tsx +642 -0
  16. package/themes/business/src/components/OrderDetails/Delivery.tsx +436 -0
  17. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +378 -0
  18. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +148 -0
  19. package/themes/business/src/components/OrderDetails/styles.tsx +16 -74
  20. package/themes/business/src/components/OrderMessage/index.tsx +5 -2
  21. package/themes/business/src/components/OrdersOption/index.tsx +344 -302
  22. package/themes/business/src/components/OrdersOption/styles.tsx +4 -2
  23. package/themes/business/src/components/PreviousMessages/index.tsx +15 -8
  24. package/themes/business/src/components/PreviousOrders/index.tsx +86 -141
  25. package/themes/business/src/components/PreviousOrders/styles.tsx +4 -3
  26. package/themes/business/src/components/UserProfileForm/index.tsx +73 -6
  27. package/themes/business/src/components/UserProfileForm/styles.tsx +0 -2
  28. package/themes/business/src/components/shared/OModal.tsx +9 -7
  29. package/themes/business/src/components/shared/OTextarea.tsx +2 -1
  30. package/themes/business/src/layouts/SafeAreaContainer.tsx +2 -2
  31. package/themes/business/src/types/index.tsx +24 -13
  32. package/themes/business/src/utils/index.tsx +160 -0
  33. package/themes/business/src/components/OrderDetails/index.tsx +0 -1262
  34. package/themes/business/src/components/OrderDetailsDelivery/index.tsx +0 -1056
  35. package/themes/business/src/components/OrderDetailsDelivery/styles.tsx +0 -142
@@ -0,0 +1,378 @@
1
+ import React from 'react'
2
+
3
+ import { Platform, StyleSheet, View } from 'react-native';
4
+
5
+ import { OText, OLink } from '../shared'
6
+ import {
7
+ OrderContent,
8
+ OrderBusiness,
9
+ OrderCustomer,
10
+ OrderProducts,
11
+ Table,
12
+ OrderBill,
13
+ Total,
14
+ } from './styles';
15
+
16
+ import { ProductItemAccordion } from '../ProductItemAccordion';
17
+
18
+ import { verifyDecimals } from '../../utils';
19
+
20
+ import {
21
+ useLanguage,
22
+ useUtils,
23
+ useConfig,
24
+ } from 'ordering-components/native';
25
+ import { useTheme } from 'styled-components/native';
26
+
27
+
28
+ interface OrderContent {
29
+ order: any
30
+ }
31
+
32
+ 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
+
41
+ const styles = StyleSheet.create({
42
+ linkWithIcons: {
43
+ flexDirection: 'row',
44
+ alignItems: 'center',
45
+ justifyContent: 'space-between',
46
+ marginBottom: 5,
47
+ flex: 1,
48
+ },
49
+ textBold: {
50
+ fontWeight: '600',
51
+ },
52
+ })
53
+ return (
54
+ <OrderContent>
55
+ <OrderBusiness>
56
+ <OText style={{ marginBottom: 5 }} size={16} weight="600">
57
+ {t('BUSINESS_DETAILS', 'Business details')}
58
+ </OText>
59
+
60
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
61
+ {order?.business?.name}
62
+ </OText>
63
+
64
+ {!!order?.business?.email && (
65
+ <View style={styles.linkWithIcons}>
66
+ <OLink
67
+ PressStyle={styles.linkWithIcons}
68
+ url={`mailto:${order?.business?.email}`}
69
+ shorcut={order?.business?.email}
70
+ />
71
+ </View>
72
+ )}
73
+
74
+ {!!order?.business?.cellphone && (
75
+ <View style={styles.linkWithIcons}>
76
+ <OLink
77
+ PressStyle={styles.linkWithIcons}
78
+ url={`tel:${order?.business?.cellphone}`}
79
+ shorcut={`${order?.business?.cellphone}`}
80
+ />
81
+ </View>
82
+ )}
83
+
84
+ {!!order?.business?.phone && (
85
+ <View style={styles.linkWithIcons}>
86
+ <OLink
87
+ PressStyle={styles.linkWithIcons}
88
+ url={`tel:${order?.business?.phone}`}
89
+ shorcut={order?.business?.phone}
90
+ />
91
+ </View>
92
+ )}
93
+
94
+ {!!order?.business?.address && (
95
+ <View style={styles.linkWithIcons}>
96
+ <OLink
97
+ PressStyle={styles.linkWithIcons}
98
+ url={Platform.select({
99
+ ios: `maps:0,0?q=${order?.business?.address}`,
100
+ android: `geo:0,0?q=${order?.business?.address}`,
101
+ })}
102
+ shorcut={order?.business?.address}
103
+ />
104
+ </View>
105
+ )}
106
+
107
+ {!!order?.business?.address_notes && (
108
+ <View style={styles.linkWithIcons}>
109
+ <OLink
110
+ PressStyle={styles.linkWithIcons}
111
+ url={Platform.select({
112
+ ios: `maps:0,0?q=${order?.business?.address_notes}`,
113
+ android: `geo:0,0?q=${order?.business?.address_notes}`,
114
+ })}
115
+ shorcut={order?.business?.address_notes}
116
+ />
117
+ </View>
118
+ )}
119
+ </OrderBusiness>
120
+
121
+ <OrderCustomer>
122
+ <OText style={{ marginBottom: 5 }} size={16} weight="600">
123
+ {t('CUSTOMER_DETAILS', 'Customer details')}
124
+ </OText>
125
+
126
+ <View style={{ flexDirection: 'row' }}>
127
+ <OText numberOfLines={2} mBottom={4}>
128
+ <OText
129
+ numberOfLines={1}
130
+ mBottom={4}
131
+ ellipsizeMode="tail"
132
+ space>
133
+ {order?.customer?.name}
134
+ </OText>
135
+
136
+ <OText
137
+ numberOfLines={1}
138
+ mBottom={4}
139
+ ellipsizeMode="tail"
140
+ space>
141
+ {order?.customer?.middle_name}
142
+ </OText>
143
+
144
+ <OText
145
+ numberOfLines={1}
146
+ mBottom={4}
147
+ ellipsizeMode="tail"
148
+ space>
149
+ {order?.customer?.lastname}
150
+ </OText>
151
+
152
+ <OText
153
+ numberOfLines={1}
154
+ mBottom={4}
155
+ ellipsizeMode="tail"
156
+ space>
157
+ {order?.customer?.second_lastname}
158
+ </OText>
159
+ </OText>
160
+ </View>
161
+
162
+ {!!order?.customer?.email && (
163
+ <View style={styles.linkWithIcons}>
164
+ <OLink
165
+ PressStyle={styles.linkWithIcons}
166
+ url={`mailto:${order?.customer?.email}`}
167
+ shorcut={order?.customer?.email}
168
+ />
169
+ </View>
170
+ )}
171
+
172
+ {!!order?.customer?.cellphone && (
173
+ <View style={styles.linkWithIcons}>
174
+ <OLink
175
+ PressStyle={styles.linkWithIcons}
176
+ url={`tel:${order?.customer?.cellphone}`}
177
+ shorcut={order?.customer?.cellphone}
178
+ />
179
+ </View>
180
+ )}
181
+
182
+ {!!order?.customer?.phone && (
183
+ <View style={styles.linkWithIcons}>
184
+ <OLink
185
+ PressStyle={styles.linkWithIcons}
186
+ url={`tel:${order?.customer?.phone}`}
187
+ shorcut={order?.customer?.phone}
188
+ />
189
+ </View>
190
+ )}
191
+
192
+ {!!order?.customer?.address && (
193
+ <View style={styles.linkWithIcons}>
194
+ <OLink
195
+ PressStyle={styles.linkWithIcons}
196
+ url={Platform.select({
197
+ ios: `maps:0,0?q=${order?.customer?.address}`,
198
+ android: `geo:0,0?q=${order?.customer?.address}`,
199
+ })}
200
+ shorcut={order?.customer?.address}
201
+ />
202
+ </View>
203
+ )}
204
+
205
+ {!!order?.customer?.internal_number && (
206
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
207
+ {order?.customer?.internal_number}
208
+ </OText>
209
+ )}
210
+
211
+ {!!order?.customer?.address_notes && (
212
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
213
+ {order?.customer?.address_notes}
214
+ </OText>
215
+ )}
216
+
217
+ {!!order?.customer.zipcode && (
218
+ <OText numberOfLines={1} mBottom={4} ellipsizeMode="tail">
219
+ {order?.customer?.zipcode}
220
+ </OText>
221
+ )}
222
+ </OrderCustomer>
223
+
224
+ <OrderProducts>
225
+ <OText style={{ marginBottom: 5 }} size={16} weight="600">
226
+ {t('ORDER_DETAILS', 'Order Details')}
227
+ </OText>
228
+
229
+ {order?.products?.length &&
230
+ order?.products.map((product: any, i: number) => (
231
+ <ProductItemAccordion
232
+ key={product?.id || i}
233
+ product={product}
234
+ />
235
+ ))}
236
+ </OrderProducts>
237
+
238
+ <OrderBill>
239
+ <Table>
240
+ <OText mBottom={4}>{t('SUBTOTAL', 'Subtotal')}</OText>
241
+ <OText mBottom={4}>
242
+ {parsePrice(
243
+ order.tax_type === 1
244
+ ? order?.summary?.subtotal + order?.summary?.tax ?? 0
245
+ : order?.summary?.subtotal ?? 0,
246
+ )}
247
+ </OText>
248
+ </Table>
249
+
250
+ {order?.tax_type !== 1 && (
251
+ <Table>
252
+ <OText mBottom={4}>
253
+ {t('TAX', 'Tax')}
254
+ {`(${verifyDecimals(
255
+ order?.summary?.tax_rate,
256
+ parseNumber,
257
+ )}%)`}
258
+ </OText>
259
+
260
+ <OText mBottom={4}>
261
+ {parsePrice(order?.summary?.tax ?? 0)}
262
+ </OText>
263
+ </Table>
264
+ )}
265
+
266
+ {order?.summary?.discount > 0 && (
267
+ <Table>
268
+ {order?.offer_type === 1 ? (
269
+ <OText mBottom={4}>
270
+ <OText>{t('DISCOUNT', 'Discount')}</OText>
271
+
272
+ <OText>
273
+ {`(${verifyDecimals(
274
+ order?.offer_rate,
275
+ parsePrice,
276
+ )}%)`}
277
+ </OText>
278
+ </OText>
279
+ ) : (
280
+ <OText mBottom={4}>{t('DISCOUNT', 'Discount')}</OText>
281
+ )}
282
+
283
+ <OText mBottom={4}>
284
+ - {parsePrice(order?.summary?.discount)}
285
+ </OText>
286
+ </Table>
287
+ )}
288
+
289
+ {order?.summary?.subtotal_with_discount > 0 &&
290
+ order?.summary?.discount > 0 &&
291
+ order?.summary?.total >= 0 && (
292
+ <Table>
293
+ <OText mBottom={4}>
294
+ {t(
295
+ 'SUBTOTAL_WITH_DISCOUNT',
296
+ 'Subtotal with discount',
297
+ )}
298
+ </OText>
299
+ {order?.tax_type === 1 ? (
300
+ <OText mBottom={4}>
301
+ {parsePrice(
302
+ order?.summary?.subtotal_with_discount +
303
+ order?.summary?.tax ?? 0,
304
+ )}
305
+ </OText>
306
+ ) : (
307
+ <OText mBottom={4}>
308
+ {parsePrice(
309
+ order?.summary?.subtotal_with_discount ?? 0,
310
+ )}
311
+ </OText>
312
+ )}
313
+ </Table>
314
+ )}
315
+
316
+ {order?.summary?.delivery_price > 0 && (
317
+ <Table>
318
+ <OText mBottom={4}>
319
+ {t('DELIVERY_FEE', 'Delivery Fee')}
320
+ </OText>
321
+
322
+ <OText mBottom={4}>
323
+ {parsePrice(order?.summary?.delivery_price)}
324
+ </OText>
325
+ </Table>
326
+ )}
327
+
328
+ <Table>
329
+ <OText mBottom={4}>
330
+ {t('DRIVER_TIP', 'Driver tip')}{' '}
331
+ {order?.summary?.driver_tip > 0 &&
332
+ parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
333
+ !parseInt(configs?.driver_tip_use_custom?.value, 10) &&
334
+ `(${verifyDecimals(
335
+ order?.summary?.driver_tip,
336
+ parseNumber,
337
+ )}%)`}
338
+ </OText>
339
+
340
+ <OText mBottom={4}>
341
+ {parsePrice(order?.summary?.driver_tip ?? 0)}
342
+ </OText>
343
+ </Table>
344
+
345
+ {order?.summary?.service_fee > 0 && (
346
+ <Table>
347
+ <OText mBottom={4}>
348
+ {t('SERVICE_FEE', 'Service Fee')}{' '}
349
+ {`(${verifyDecimals(
350
+ order?.summary?.service_fee,
351
+ parseNumber,
352
+ )}%)`}
353
+ </OText>
354
+
355
+ <OText mBottom={4}>
356
+ {parsePrice(order?.summary?.service_fee)}
357
+ </OText>
358
+ </Table>
359
+ )}
360
+
361
+ <Total>
362
+ <Table>
363
+ <OText mBottom={4} style={styles.textBold}>
364
+ {t('TOTAL', 'Total')}
365
+ </OText>
366
+
367
+ <OText
368
+ mBottom={4}
369
+ style={styles.textBold}
370
+ color={theme.colors.primary}>
371
+ {parsePrice(order?.summary?.total ?? 0)}
372
+ </OText>
373
+ </Table>
374
+ </Total>
375
+ </OrderBill>
376
+ </OrderContent>
377
+ )
378
+ }
@@ -0,0 +1,148 @@
1
+ import React from 'react';
2
+
3
+ //Styles
4
+ import {
5
+ Actions,
6
+ Header,
7
+ OrderHeader,
8
+ } from './styles';
9
+
10
+ //Components
11
+ import {
12
+ OIconButton,
13
+ OText,
14
+ } from '../shared'
15
+
16
+ import { useTheme } from 'styled-components/native';
17
+ import { StyleSheet } from 'react-native';
18
+
19
+ import {
20
+ useLanguage,
21
+ useUtils,
22
+ } from 'ordering-components/native';
23
+
24
+ interface OrderHeader {
25
+ order?: any,
26
+ handleArrowBack?: any,
27
+ handleOpenMapView?: any,
28
+ handleOpenMessagesForBusiness?: any,
29
+ getOrderStatus?: any
30
+ }
31
+
32
+ export const OrderHeaderComponent = (props: OrderHeader) => {
33
+ const { order, handleArrowBack, handleOpenMapView, handleOpenMessagesForBusiness, getOrderStatus } = props
34
+ const theme = useTheme();
35
+ const [, t] = useLanguage();
36
+ const [{ parseDate }] = useUtils();
37
+
38
+ const styles = StyleSheet.create({
39
+ icons: {
40
+ maxWidth: 40,
41
+ height: 25,
42
+ alignItems: 'flex-end',
43
+ },
44
+ })
45
+
46
+ const colors: any = {
47
+ //BLUE
48
+ 0: theme.colors.statusOrderBlue,
49
+ 3: theme.colors.statusOrderBlue,
50
+ 4: theme.colors.statusOrderBlue,
51
+ 7: theme.colors.statusOrderBlue,
52
+ 8: theme.colors.statusOrderBlue,
53
+ 9: theme.colors.statusOrderBlue,
54
+ 13: theme.colors.statusOrderBlue,
55
+ 14: theme.colors.statusOrderBlue,
56
+ 18: theme.colors.statusOrderBlue,
57
+ 19: theme.colors.statusOrderBlue,
58
+ 20: theme.colors.statusOrderBlue,
59
+ 21: theme.colors.statusOrderBlue,
60
+ //GREEN
61
+ 1: theme.colors.statusOrderGreen,
62
+ 11: theme.colors.statusOrderGreen,
63
+ 15: theme.colors.statusOrderGreen,
64
+ //RED
65
+ 2: theme.colors.statusOrderRed,
66
+ 5: theme.colors.statusOrderRed,
67
+ 6: theme.colors.statusOrderRed,
68
+ 10: theme.colors.statusOrderRed,
69
+ 12: theme.colors.statusOrderRed,
70
+ 16: theme.colors.statusOrderRed,
71
+ 17: theme.colors.statusOrderRed,
72
+ };
73
+
74
+ return (
75
+ <>
76
+ <Header>
77
+ <OIconButton
78
+ icon={theme.images.general.arrow_left}
79
+ iconStyle={{ width: 20, height: 20 }}
80
+ borderColor={theme.colors.clear}
81
+ style={{ ...styles.icons, justifyContent: 'flex-end' }}
82
+ onClick={() => handleArrowBack()}
83
+ />
84
+
85
+ <Actions>
86
+ <OIconButton
87
+ icon={theme.images.general.map}
88
+ iconStyle={{
89
+ width: 20,
90
+ height: 20,
91
+ tintColor: theme.colors.backArrow,
92
+ }}
93
+ borderColor={theme.colors.clear}
94
+ style={styles.icons}
95
+ onClick={() => handleOpenMapView()}
96
+ />
97
+
98
+ <OIconButton
99
+ icon={theme.images.general.messages}
100
+ iconStyle={{
101
+ width: 20,
102
+ height: 20,
103
+ tintColor: theme.colors.backArrow,
104
+ }}
105
+ borderColor={theme.colors.clear}
106
+ style={styles.icons}
107
+ onClick={() => handleOpenMessagesForBusiness()}
108
+ />
109
+ </Actions>
110
+ </Header>
111
+ <OrderHeader>
112
+ <OText size={13} style={{ marginBottom: 5 }}>
113
+ {order?.delivery_datetime_utc
114
+ ? parseDate(order?.delivery_datetime_utc)
115
+ : parseDate(order?.delivery_datetime, { utc: false })}
116
+ </OText>
117
+
118
+ <OText numberOfLines={2} size={20} weight="600">
119
+ <>
120
+ {`${t('INVOICE_ORDER_NO', 'Order No.')} ${order.id} ${t(
121
+ 'IS',
122
+ 'is',
123
+ )} `}
124
+ <OText
125
+ size={20}
126
+ weight="600"
127
+ color={colors[order?.status] || theme.colors.primary}>
128
+ {getOrderStatus(order?.status, t)?.value}
129
+ </OText>
130
+ </>
131
+ </OText>
132
+ <OText size={13}>
133
+ {`${order?.paymethod?.name} - ${
134
+ order.delivery_type === 1
135
+ ? t('DELIVERY', 'Delivery')
136
+ : order.delivery_type === 2
137
+ ? t('PICKUP', 'Pickup')
138
+ : order.delivery_type === 3
139
+ ? t('EAT_IN', 'Eat in')
140
+ : order.delivery_type === 4
141
+ ? t('CURBSIDE', 'Curbside')
142
+ : t('DRIVER_THRU', 'Driver thru')
143
+ }`}
144
+ </OText>
145
+ </OrderHeader>
146
+ </>
147
+ )
148
+ }
@@ -2,31 +2,16 @@ import styled from 'styled-components/native';
2
2
 
3
3
  export const OrderDetailsContainer = styled.ScrollView`
4
4
  flex: 1;
5
- padding-horizontal: 20px;
6
- margin-bottom: 50px;
7
5
  `;
8
6
 
9
7
  export const Pickup = styled.View`
10
8
  padding-vertical: 10px;
11
- margin-bottom: 5px;
9
+ margin-bottom: 20px;
12
10
  `;
13
11
 
14
- export const NavBack = styled.TouchableOpacity``;
15
-
16
12
  export const Header = styled.View`
17
13
  flex-direction: row;
18
14
  justify-content: space-between;
19
- padding-top: 10px;
20
- padding-horizontal: 20px;
21
- `;
22
-
23
- export const DriverItem = styled.View`
24
- padding: 15px;
25
- justify-content: space-between;
26
- align-items: center;
27
- flex-direction: row;
28
- justify-content: ${(props: any) =>
29
- props?.justifyContent ? props?.justifyContent : 'flex-start'};
30
15
  `;
31
16
 
32
17
  export const Actions = styled.View`
@@ -43,70 +28,25 @@ export const OrderContent = styled.View`
43
28
  `;
44
29
 
45
30
  export const OrderHeader = styled.View`
46
- padding-vertical: 10px;
31
+ padding-vertical: 20px;
47
32
  border-bottom-width: 10px;
48
33
  border-bottom-color: ${(props: any) => props.theme.colors.inputChat};
49
- padding-horizontal: 20px;
50
34
  `;
51
35
 
52
36
  export const OrderBusiness = styled.View`
37
+ position: relative;
53
38
  bottom: 10px;
54
- padding-vertical: 10px;
39
+ padding-vertical: 20px;
55
40
  flex-direction: column;
56
- `;
57
- export const Icons = styled.View`
58
- margin-top: 10px;
59
- display: flex;
60
- flex-direction: row;
61
- align-items: center;
62
- `;
63
-
64
- export const OrderInfo = styled.View`
65
- padding: 20px;
66
- flex: 1;
67
- `;
68
-
69
- export const OrderData = styled.View`
70
- flex: 1;
71
- `;
72
-
73
- export const OrderStatus = styled.View`
74
- padding: 20px;
75
- align-items: center;
76
- width: 35%;
77
- flex-wrap: wrap;
41
+ border-bottom-width: 10px;
42
+ border-bottom-color: ${(props: any) => props.theme.colors.inputChat};
43
+ align-items: flex-start;
78
44
  `;
79
45
 
80
- export const StaturBar = styled.View``;
81
-
82
- export const StatusImage = styled.View``;
83
-
84
- export const SectionTitle = styled.View``;
85
-
86
46
  export const OrderCustomer = styled.View`
87
- padding-vertical: 10px;
88
47
  border-bottom-width: 10px;
89
48
  border-bottom-color: ${(props: any) => props.theme.colors.inputChat};
90
- `;
91
-
92
- export const OrderDriver = styled(OrderCustomer)``;
93
-
94
- export const Customer = styled.View`
95
- flex-direction: row;
96
- align-items: center;
97
- `;
98
-
99
- export const CustomerPhoto = styled.View`
100
- margin-right: 20px;
101
- `;
102
-
103
- export const InfoBlock = styled.View`
104
- width: 70%;
105
- `;
106
-
107
- export const HeaderInfo = styled.View`
108
- flex: 1;
109
- width: 80%;
49
+ padding-vertical: 20px;
110
50
  `;
111
51
 
112
52
  export const OrderProducts = styled(OrderCustomer)``;
@@ -119,7 +59,7 @@ export const Table = styled.View`
119
59
  `;
120
60
 
121
61
  export const OrderBill = styled.View`
122
- padding-vertical: 10px;
62
+ padding-vertical: 20px;
123
63
  flex: 1;
124
64
  `;
125
65
 
@@ -129,11 +69,13 @@ export const Total = styled.View`
129
69
  padding-vertical: 10px;
130
70
  `;
131
71
 
132
- export const Map = styled.View`
133
- width: 100%;
134
- height: 90%;
135
- margin-top: 20px;
136
- border-radius: 20px;
72
+ export const DriverItem = styled.View`
73
+ padding: 15px;
74
+ justify-content: space-between;
75
+ align-items: center;
76
+ flex-direction: row;
77
+ justify-content: ${(props: any) =>
78
+ props?.justifyContent ? props?.justifyContent : 'flex-start'};
137
79
  `;
138
80
 
139
81
  export const AssignDriver = styled.View`
@@ -14,6 +14,7 @@ import { OrderDetailsParams } from '../../types';
14
14
  import { USER_TYPE } from '../../config/constants';
15
15
  import { useTheme } from 'styled-components/native';
16
16
  import Alert from '../../providers/AlertProvider';
17
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
17
18
 
18
19
  export const OrderMessageUI = (props: OrderDetailsParams) => {
19
20
  const {
@@ -33,6 +34,7 @@ export const OrderMessageUI = (props: OrderDetailsParams) => {
33
34
  business: false,
34
35
  driver: false,
35
36
  });
37
+ const { top } = useSafeAreaInsets();
36
38
  const [{ user }] = useSession();
37
39
  const { order, loading } = props.order;
38
40
  const [alertState, setAlertState] = useState<{
@@ -110,8 +112,9 @@ export const OrderMessageUI = (props: OrderDetailsParams) => {
110
112
  flexDirection: 'row',
111
113
  justifyContent: 'space-between',
112
114
  alignItems: 'center',
113
- paddingHorizontal: 20,
114
- height: 45,
115
+ paddingHorizontal: 30,
116
+ paddingTop: 30,
117
+ paddingBottom: 25,
115
118
  borderBottomWidth: 2,
116
119
  borderBottomColor: '#e6e6e6',
117
120
  },