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.
- package/package.json +2 -1
- package/themes/business/index.tsx +12 -12
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +49 -43
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +4 -10
- package/themes/business/src/components/Chat/index.tsx +97 -60
- package/themes/business/src/components/DriverMap/index.tsx +196 -183
- package/themes/business/src/components/FloatingButton/index.tsx +61 -43
- package/themes/business/src/components/FloatingButton/styles.tsx +2 -5
- package/themes/business/src/components/GoogleMap/index.tsx +10 -8
- package/themes/business/src/components/Home/index.tsx +2 -5
- package/themes/business/src/components/Home/styles.tsx +1 -2
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -3
- package/themes/business/src/components/MessagesOption/index.tsx +13 -18
- package/themes/business/src/components/MessagesOption/styles.tsx +3 -0
- package/themes/business/src/components/OrderDetails/Business.tsx +642 -0
- package/themes/business/src/components/OrderDetails/Delivery.tsx +436 -0
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +378 -0
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +148 -0
- package/themes/business/src/components/OrderDetails/styles.tsx +16 -74
- package/themes/business/src/components/OrderMessage/index.tsx +5 -2
- package/themes/business/src/components/OrdersOption/index.tsx +344 -302
- package/themes/business/src/components/OrdersOption/styles.tsx +4 -2
- package/themes/business/src/components/PreviousMessages/index.tsx +15 -8
- package/themes/business/src/components/PreviousOrders/index.tsx +86 -141
- package/themes/business/src/components/PreviousOrders/styles.tsx +4 -3
- package/themes/business/src/components/UserProfileForm/index.tsx +73 -6
- package/themes/business/src/components/UserProfileForm/styles.tsx +0 -2
- package/themes/business/src/components/shared/OModal.tsx +9 -7
- package/themes/business/src/components/shared/OTextarea.tsx +2 -1
- package/themes/business/src/layouts/SafeAreaContainer.tsx +2 -2
- package/themes/business/src/types/index.tsx +24 -13
- package/themes/business/src/utils/index.tsx +160 -0
- package/themes/business/src/components/OrderDetails/index.tsx +0 -1262
- package/themes/business/src/components/OrderDetailsDelivery/index.tsx +0 -1056
- package/themes/business/src/components/OrderDetailsDelivery/styles.tsx +0 -142
|
@@ -5,10 +5,12 @@ export const FiltersTab = styled.View`
|
|
|
5
5
|
`;
|
|
6
6
|
|
|
7
7
|
export const TabsContainer = styled.View`
|
|
8
|
-
|
|
9
|
-
width: auto;
|
|
8
|
+
width: ${({ width }: { width: number }) => `${width-42}px`};
|
|
10
9
|
display: flex;
|
|
11
10
|
flex-direction: row;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
border-bottom-width: 1px;
|
|
13
|
+
border-bottom-color: ${(props: any) => props.theme.colors.tabBar};
|
|
12
14
|
`;
|
|
13
15
|
|
|
14
16
|
export const Tag = styled.Pressable`
|
|
@@ -188,32 +188,39 @@ export const PreviousMessages = (props: PreviousMessagesParams) => {
|
|
|
188
188
|
flex: 1,
|
|
189
189
|
minHeight: 64,
|
|
190
190
|
marginBottom: 30,
|
|
191
|
+
marginLeft: 3,
|
|
191
192
|
},
|
|
192
193
|
icon: {
|
|
193
194
|
borderRadius: 7.6,
|
|
194
|
-
width:
|
|
195
|
-
height:
|
|
195
|
+
width: 75,
|
|
196
|
+
height: 75,
|
|
196
197
|
},
|
|
197
198
|
logo: {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
width: 78,
|
|
200
|
+
height: 78,
|
|
201
|
+
borderRadius: 25,
|
|
202
|
+
shadowColor: 'rgba(0.0, 0.0, 0.0, 0.5)',
|
|
201
203
|
shadowOffset: {
|
|
202
204
|
width: 0,
|
|
203
205
|
height: 1.5,
|
|
204
206
|
},
|
|
205
207
|
shadowOpacity: 0.21,
|
|
206
|
-
shadowRadius:
|
|
208
|
+
shadowRadius: 5,
|
|
207
209
|
elevation: 7,
|
|
210
|
+
justifyContent: 'center',
|
|
211
|
+
alignItems: 'center',
|
|
212
|
+
marginLeft: 3,
|
|
208
213
|
},
|
|
209
214
|
title: {
|
|
215
|
+
marginBottom: 6,
|
|
210
216
|
fontFamily: 'Poppins',
|
|
211
217
|
fontStyle: 'normal',
|
|
212
218
|
fontWeight: '600',
|
|
213
|
-
fontSize:
|
|
219
|
+
fontSize: 16,
|
|
214
220
|
color: theme.colors.textGray,
|
|
215
221
|
},
|
|
216
222
|
badge: {
|
|
223
|
+
marginBottom: 6,
|
|
217
224
|
fontFamily: 'Poppins',
|
|
218
225
|
fontStyle: 'normal',
|
|
219
226
|
fontWeight: 'normal',
|
|
@@ -221,6 +228,7 @@ export const PreviousMessages = (props: PreviousMessagesParams) => {
|
|
|
221
228
|
color: theme.colors.primary,
|
|
222
229
|
},
|
|
223
230
|
date: {
|
|
231
|
+
marginBottom: 6,
|
|
224
232
|
fontFamily: 'Poppins',
|
|
225
233
|
fontStyle: 'normal',
|
|
226
234
|
fontWeight: 'normal',
|
|
@@ -284,7 +292,6 @@ export const PreviousMessages = (props: PreviousMessagesParams) => {
|
|
|
284
292
|
style={styles.orderType}
|
|
285
293
|
mRight={5}
|
|
286
294
|
numberOfLines={1}
|
|
287
|
-
size={18}
|
|
288
295
|
adjustsFontSizeToFit>
|
|
289
296
|
{getOrderStatus(order?.status)?.value}
|
|
290
297
|
</OText>
|
|
@@ -1,37 +1,19 @@
|
|
|
1
|
-
// React & React Native
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
4
|
-
|
|
5
|
-
// Ordering
|
|
6
3
|
import { useTheme } from 'styled-components/native';
|
|
7
4
|
import { useLanguage, useUtils } from 'ordering-components/native';
|
|
8
|
-
|
|
9
|
-
// Own
|
|
5
|
+
import { OIcon, OText } from '../shared';
|
|
10
6
|
import { Card, Logo, Information, MyOrderOptions } from './styles';
|
|
11
|
-
import { NotFoundSource } from '../NotFoundSource';
|
|
12
|
-
import { OIcon, OText, OButton } from '../shared';
|
|
13
|
-
import { PreviousOrdersParams } from '../../types';
|
|
14
|
-
import dayjs from 'dayjs';
|
|
15
7
|
|
|
16
|
-
export const PreviousOrders = (props:
|
|
17
|
-
const {
|
|
18
|
-
data: { orders, pagination, loading, error },
|
|
19
|
-
tab,
|
|
20
|
-
loadOrders,
|
|
21
|
-
isRefreshing,
|
|
22
|
-
tagsFilter,
|
|
23
|
-
getOrderStatus,
|
|
24
|
-
onNavigationRedirect,
|
|
25
|
-
} = props;
|
|
26
|
-
|
|
27
|
-
// Hooks
|
|
8
|
+
export const PreviousOrders = (props: any) => {
|
|
9
|
+
const { orders, onNavigationRedirect, getOrderStatus } = props;
|
|
28
10
|
const [, t] = useLanguage();
|
|
29
11
|
const [{ parseDate, optimizeImage }] = useUtils();
|
|
30
12
|
const theme = useTheme();
|
|
31
13
|
|
|
32
|
-
// Handles
|
|
33
14
|
const handlePressOrder = (order: any) => {
|
|
34
|
-
onNavigationRedirect
|
|
15
|
+
onNavigationRedirect &&
|
|
16
|
+
onNavigationRedirect('OrderDetails', { order: order });
|
|
35
17
|
};
|
|
36
18
|
|
|
37
19
|
const styles = StyleSheet.create({
|
|
@@ -39,32 +21,39 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
|
|
|
39
21
|
flex: 1,
|
|
40
22
|
minHeight: 64,
|
|
41
23
|
marginBottom: 30,
|
|
24
|
+
marginLeft: 3,
|
|
42
25
|
},
|
|
43
26
|
icon: {
|
|
44
27
|
borderRadius: 7.6,
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
28
|
+
width: 75,
|
|
29
|
+
height: 75,
|
|
47
30
|
},
|
|
48
31
|
logo: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
width: 78,
|
|
33
|
+
height: 78,
|
|
34
|
+
borderRadius: 25,
|
|
35
|
+
shadowColor: 'rgba(0.0, 0.0, 0.0, 0.5)',
|
|
52
36
|
shadowOffset: {
|
|
53
37
|
width: 0,
|
|
54
38
|
height: 1.5,
|
|
55
39
|
},
|
|
56
40
|
shadowOpacity: 0.21,
|
|
57
|
-
shadowRadius:
|
|
41
|
+
shadowRadius: 5,
|
|
58
42
|
elevation: 7,
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
marginLeft: 3,
|
|
59
46
|
},
|
|
60
47
|
title: {
|
|
48
|
+
marginBottom: 6,
|
|
61
49
|
fontFamily: 'Poppins',
|
|
62
50
|
fontStyle: 'normal',
|
|
63
51
|
fontWeight: '600',
|
|
64
|
-
fontSize:
|
|
52
|
+
fontSize: 16,
|
|
65
53
|
color: theme.colors.textGray,
|
|
66
54
|
},
|
|
67
55
|
date: {
|
|
56
|
+
marginBottom: 6,
|
|
68
57
|
fontFamily: 'Poppins',
|
|
69
58
|
fontStyle: 'normal',
|
|
70
59
|
fontWeight: 'normal',
|
|
@@ -72,130 +61,86 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
|
|
|
72
61
|
color: theme.colors.unselectText,
|
|
73
62
|
},
|
|
74
63
|
orderType: {
|
|
64
|
+
fontSize: 15,
|
|
75
65
|
fontFamily: 'Poppins',
|
|
76
66
|
fontStyle: 'normal',
|
|
77
67
|
fontWeight: 'normal',
|
|
78
68
|
color: theme.colors.orderTypeColor,
|
|
79
69
|
},
|
|
80
|
-
loadButton: {
|
|
81
|
-
borderRadius: 7.6,
|
|
82
|
-
height: 44,
|
|
83
|
-
marginRight: 10,
|
|
84
|
-
marginBottom: 10,
|
|
85
|
-
marginTop: 5,
|
|
86
|
-
},
|
|
87
|
-
loadButtonText: {
|
|
88
|
-
color: theme.colors.inputTextColor,
|
|
89
|
-
fontFamily: 'Poppins',
|
|
90
|
-
fontStyle: 'normal',
|
|
91
|
-
fontWeight: 'normal',
|
|
92
|
-
fontSize: 18,
|
|
93
|
-
},
|
|
94
70
|
});
|
|
95
71
|
|
|
72
|
+
let hash: any = {};
|
|
73
|
+
|
|
96
74
|
return (
|
|
97
75
|
<>
|
|
98
|
-
{
|
|
99
|
-
(!orders?.filter((order: any) => tagsFilter?.includes(order.status))
|
|
100
|
-
?.length ||
|
|
101
|
-
error ||
|
|
102
|
-
!tagsFilter?.length) && (
|
|
103
|
-
<NotFoundSource
|
|
104
|
-
content={
|
|
105
|
-
!error
|
|
106
|
-
? t('NO_RESULTS_FOUND', 'Sorry, no results found')
|
|
107
|
-
: error[0]?.message ||
|
|
108
|
-
error[0] ||
|
|
109
|
-
t('NETWORK_ERROR', 'Network Error')
|
|
110
|
-
}
|
|
111
|
-
image={theme.images.general.notFound}
|
|
112
|
-
conditioned={false}
|
|
113
|
-
/>
|
|
114
|
-
)}
|
|
115
|
-
|
|
116
|
-
{orders?.length > 0 &&
|
|
76
|
+
{orders && orders?.length > 0 &&
|
|
117
77
|
orders
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
)}
|
|
140
|
-
|
|
141
|
-
<Information>
|
|
142
|
-
<OText numberOfLines={1} style={styles.title}>
|
|
143
|
-
{order.business?.name}
|
|
144
|
-
</OText>
|
|
78
|
+
.filter((order: any) => hash[order?.id] ? false : (hash[order?.id] = true))
|
|
79
|
+
.map((order: any) =>
|
|
80
|
+
(
|
|
81
|
+
<React.Fragment key={order.id}>
|
|
82
|
+
<TouchableOpacity
|
|
83
|
+
onPress={() => handlePressOrder(order)}
|
|
84
|
+
style={styles.cardButton}
|
|
85
|
+
activeOpacity={1}
|
|
86
|
+
>
|
|
87
|
+
<Card key={order.id}>
|
|
88
|
+
{!!order.business?.logo && (
|
|
89
|
+
<Logo style={styles.logo}>
|
|
90
|
+
<OIcon
|
|
91
|
+
url={optimizeImage(
|
|
92
|
+
order.business?.logo,
|
|
93
|
+
'h_300,c_limit',
|
|
94
|
+
)}
|
|
95
|
+
style={styles.icon}
|
|
96
|
+
/>
|
|
97
|
+
</Logo>
|
|
98
|
+
)}
|
|
145
99
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
size={20}>
|
|
151
|
-
{t('INVOICE_ORDER_NO', 'Order No.') + order.id + ' · '}
|
|
152
|
-
{order?.delivery_datetime_utc
|
|
153
|
-
? parseDate(order?.delivery_datetime_utc)
|
|
154
|
-
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
155
|
-
</OText>
|
|
100
|
+
<Information>
|
|
101
|
+
<OText numberOfLines={1} style={styles.title}>
|
|
102
|
+
{order.business?.name}
|
|
103
|
+
</OText>
|
|
156
104
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
? t('PICKUP', 'Pickup')
|
|
168
|
-
: order.delivery_type === 3
|
|
169
|
-
? t('EAT_IN', 'Eat in')
|
|
170
|
-
: order.delivery_type === 4
|
|
171
|
-
? t('CURBSIDE', 'Curbside')
|
|
172
|
-
: t('DRIVER_THRU', 'Driver thru')}
|
|
173
|
-
{` · ${getOrderStatus?.(order.status)}`}
|
|
174
|
-
</OText>
|
|
175
|
-
</MyOrderOptions>
|
|
176
|
-
</Information>
|
|
177
|
-
</Card>
|
|
178
|
-
</TouchableOpacity>
|
|
179
|
-
</React.Fragment>
|
|
180
|
-
))}
|
|
105
|
+
<OText
|
|
106
|
+
style={styles.date}
|
|
107
|
+
numberOfLines={1}
|
|
108
|
+
adjustsFontSizeToFit
|
|
109
|
+
size={20}>
|
|
110
|
+
{t('INVOICE_ORDER_NO', 'Order No.') + order.id + ' · '}
|
|
111
|
+
{order?.delivery_datetime_utc
|
|
112
|
+
? parseDate(order?.delivery_datetime_utc)
|
|
113
|
+
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
114
|
+
</OText>
|
|
181
115
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
116
|
+
<MyOrderOptions>
|
|
117
|
+
<OText
|
|
118
|
+
style={styles.orderType}
|
|
119
|
+
mRight={5}
|
|
120
|
+
numberOfLines={1}
|
|
121
|
+
adjustsFontSizeToFit
|
|
122
|
+
>
|
|
123
|
+
{order.delivery_type === 1
|
|
124
|
+
? t('DELIVERY', 'Delivery')
|
|
125
|
+
: order.delivery_type === 2
|
|
126
|
+
? t('PICKUP', 'Pickup')
|
|
127
|
+
: order.delivery_type === 3
|
|
128
|
+
? t('EAT_IN', 'Eat in')
|
|
129
|
+
: order.delivery_type === 4
|
|
130
|
+
? t('CURBSIDE', 'Curbside')
|
|
131
|
+
: t('DRIVER_THRU', 'Driver thru')}
|
|
132
|
+
{` · ${getOrderStatus(order.status)}`}
|
|
133
|
+
</OText>
|
|
134
|
+
</MyOrderOptions>
|
|
135
|
+
</Information>
|
|
136
|
+
</Card>
|
|
137
|
+
</TouchableOpacity>
|
|
138
|
+
</React.Fragment>
|
|
139
|
+
))}
|
|
199
140
|
</>
|
|
200
141
|
);
|
|
201
142
|
};
|
|
143
|
+
|
|
144
|
+
PreviousOrders.defaultProps = {
|
|
145
|
+
orders: []
|
|
146
|
+
}
|
|
@@ -3,6 +3,8 @@ import styled from 'styled-components/native';
|
|
|
3
3
|
export const Card = styled.View`
|
|
4
4
|
flex: 1;
|
|
5
5
|
flex-direction: row;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
justify-content: center;
|
|
6
8
|
`;
|
|
7
9
|
|
|
8
10
|
export const Logo = styled.View`
|
|
@@ -11,11 +13,10 @@ export const Logo = styled.View`
|
|
|
11
13
|
`;
|
|
12
14
|
|
|
13
15
|
export const Information = styled.View`
|
|
14
|
-
justify-content:
|
|
15
|
-
align-items: flex-start;
|
|
16
|
+
justify-content: flex-start;
|
|
16
17
|
margin-horizontal: 10px;
|
|
17
18
|
flex: 1;
|
|
18
|
-
|
|
19
|
+
max-height: 70px;
|
|
19
20
|
`;
|
|
20
21
|
|
|
21
22
|
export const MyOrderOptions = styled.View`
|
|
@@ -64,6 +64,44 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
66
|
const [phoneUpdate, setPhoneUpdate] = useState(false);
|
|
67
|
+
const [userPhoneNumber, setUserPhoneNumber] = useState<any>(null);
|
|
68
|
+
const [phoneToShow, setPhoneToShow] = useState('');
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (phoneInputData.phone.cellphone) {
|
|
72
|
+
const codeNumberPhone = phoneInputData.phone.cellphone.slice(0, 3);
|
|
73
|
+
const numberPhone = phoneInputData.phone.cellphone.slice(
|
|
74
|
+
3,
|
|
75
|
+
phoneInputData.phone.cellphone?.length,
|
|
76
|
+
);
|
|
77
|
+
setPhoneToShow(`(${codeNumberPhone}) ${numberPhone}`);
|
|
78
|
+
}
|
|
79
|
+
}, [phoneInputData.phone.cellphone]);
|
|
80
|
+
|
|
81
|
+
const setUserCellPhone = (isEdit = false) => {
|
|
82
|
+
if (userPhoneNumber && !userPhoneNumber.includes('null') && !isEdit) {
|
|
83
|
+
setUserPhoneNumber(userPhoneNumber);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (user?.cellphone) {
|
|
87
|
+
let phone = null;
|
|
88
|
+
if (user?.country_phone_code) {
|
|
89
|
+
phone = `+${user?.country_phone_code} ${user?.cellphone}`;
|
|
90
|
+
} else {
|
|
91
|
+
phone = user?.cellphone;
|
|
92
|
+
}
|
|
93
|
+
setUserPhoneNumber(phone);
|
|
94
|
+
setPhoneInputData({
|
|
95
|
+
...phoneInputData,
|
|
96
|
+
phone: {
|
|
97
|
+
country_phone_code: user?.country_phone_code || null,
|
|
98
|
+
cellphone: user?.cellphone || null,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
setUserPhoneNumber(user?.cellphone || '');
|
|
104
|
+
};
|
|
67
105
|
|
|
68
106
|
const handleImagePicker = () => {
|
|
69
107
|
launchImageLibrary(
|
|
@@ -120,6 +158,16 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
120
158
|
}
|
|
121
159
|
}, [userState?.loadingDriver]);
|
|
122
160
|
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
if ((user || !isEdit) && !formState?.loading) {
|
|
163
|
+
setUserCellPhone();
|
|
164
|
+
if (!isEdit && !formState?.loading) {
|
|
165
|
+
cleanFormState && cleanFormState({ changes: {} });
|
|
166
|
+
setUserCellPhone(true);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}, [user, isEdit]);
|
|
170
|
+
|
|
123
171
|
useEffect(() => {
|
|
124
172
|
if (formState.result.result && !formState.loading) {
|
|
125
173
|
if (formState.result?.error) {
|
|
@@ -295,12 +343,17 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
295
343
|
|
|
296
344
|
{user?.level === 4 && (
|
|
297
345
|
<EnabledStatusDriver>
|
|
298
|
-
<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
346
|
+
<View style={{ flex: 1 }}>
|
|
347
|
+
<OText
|
|
348
|
+
numberOfLines={2}
|
|
349
|
+
adjustsFontSizeToFit
|
|
350
|
+
style={{ ...styles.label, paddingHorizontal: 0 }}>
|
|
351
|
+
{t(
|
|
352
|
+
'AVAILABLE_TO_RECEIVE_ORDERS',
|
|
353
|
+
'Available to receive orders',
|
|
354
|
+
)}
|
|
355
|
+
</OText>
|
|
356
|
+
</View>
|
|
304
357
|
|
|
305
358
|
{userState.loadingDriver ? (
|
|
306
359
|
<ActivityIndicator size="small" color={theme.colors.primary} />
|
|
@@ -379,6 +432,20 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
379
432
|
selectionColor={theme.colors.primary}
|
|
380
433
|
color={theme.colors.textGray}
|
|
381
434
|
/>
|
|
435
|
+
|
|
436
|
+
<OText style={styles.label}>{t('PHONE', 'Phone')}</OText>
|
|
437
|
+
|
|
438
|
+
<OInput
|
|
439
|
+
isSecured={true}
|
|
440
|
+
placeholder={
|
|
441
|
+
phoneToShow || `${t('NOT_PHONE', 'Not Phone')}`
|
|
442
|
+
}
|
|
443
|
+
placeholderTextColor={theme.colors.textGray}
|
|
444
|
+
style={styles.inputStyle}
|
|
445
|
+
isDisabled={true}
|
|
446
|
+
selectionColor={theme.colors.primary}
|
|
447
|
+
color={theme.colors.textGray}
|
|
448
|
+
/>
|
|
382
449
|
</UDWrapper>
|
|
383
450
|
)}
|
|
384
451
|
</UserData>
|
|
@@ -9,7 +9,6 @@ export const UserData = styled.View`
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
width: 100%;
|
|
12
|
-
margin-top: 20px;
|
|
13
12
|
`;
|
|
14
13
|
|
|
15
14
|
export const EditButton = styled.View`
|
|
@@ -23,7 +22,6 @@ export const EnabledStatusDriver = styled.View`
|
|
|
23
22
|
flex-direction: row;
|
|
24
23
|
justify-content: space-between;
|
|
25
24
|
align-items: center;
|
|
26
|
-
width: 100%;
|
|
27
25
|
`;
|
|
28
26
|
|
|
29
27
|
export const Actions = styled.View`
|
|
@@ -68,14 +68,16 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
68
68
|
flexDirection: 'row',
|
|
69
69
|
justifyContent: 'space-between',
|
|
70
70
|
alignItems: 'center',
|
|
71
|
-
paddingHorizontal:
|
|
72
|
-
|
|
71
|
+
paddingHorizontal: 30,
|
|
72
|
+
paddingTop: 30,
|
|
73
|
+
paddingBottom: 25,
|
|
73
74
|
borderBottomWidth: 2,
|
|
74
75
|
borderBottomColor: '#e6e6e6',
|
|
75
76
|
},
|
|
76
77
|
titleGroups: {
|
|
77
78
|
alignItems: 'center',
|
|
78
79
|
flexDirection: 'row',
|
|
80
|
+
minHeight: 33,
|
|
79
81
|
},
|
|
80
82
|
titleIcons: {
|
|
81
83
|
height: 33,
|
|
@@ -87,7 +89,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
87
89
|
height: 34,
|
|
88
90
|
width: 34,
|
|
89
91
|
alignItems: 'center',
|
|
90
|
-
justifyContent: '
|
|
92
|
+
justifyContent: 'flex-start',
|
|
91
93
|
marginLeft: 15,
|
|
92
94
|
backgroundColor: theme.colors.clear,
|
|
93
95
|
paddingHorizontal: 3,
|
|
@@ -104,16 +106,16 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
104
106
|
cancelBtn: {
|
|
105
107
|
marginRight: 5,
|
|
106
108
|
zIndex: 10000,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
maxWidth: 40,
|
|
110
|
+
height: 25,
|
|
109
111
|
justifyContent: 'flex-end',
|
|
112
|
+
alignItems: 'flex-start',
|
|
110
113
|
},
|
|
111
114
|
modalText: {
|
|
112
115
|
fontFamily: 'Poppins',
|
|
113
116
|
fontStyle: 'normal',
|
|
114
117
|
fontWeight: '600',
|
|
115
118
|
color: theme.colors.textGray,
|
|
116
|
-
textAlign: 'center',
|
|
117
119
|
zIndex: 10,
|
|
118
120
|
},
|
|
119
121
|
wrapperIcon: {
|
|
@@ -203,7 +205,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
203
205
|
<View style={styles.titleGroups}>
|
|
204
206
|
<OIconButton
|
|
205
207
|
icon={theme.images.general.arrow_left}
|
|
206
|
-
iconStyle={{ width:
|
|
208
|
+
iconStyle={{ width: 20, height: 20 }}
|
|
207
209
|
borderColor={theme.colors.clear}
|
|
208
210
|
style={styleCloseButton || styles.cancelBtn}
|
|
209
211
|
onClick={onClose}
|
|
@@ -3,7 +3,6 @@ import styled from 'styled-components/native';
|
|
|
3
3
|
import { useTheme } from 'styled-components/native';
|
|
4
4
|
|
|
5
5
|
const Wrapper = styled.View`
|
|
6
|
-
padding: 10px;
|
|
7
6
|
border-radius: 10px;
|
|
8
7
|
border: 1px solid ${(props: any) => props.theme.colors.lightGray};
|
|
9
8
|
`;
|
|
@@ -18,6 +17,7 @@ interface Props {
|
|
|
18
17
|
onChange?: any;
|
|
19
18
|
onFocus?: any;
|
|
20
19
|
textTareaRef?: any;
|
|
20
|
+
autoFocus?: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const OTextarea = (props: Props) => {
|
|
@@ -34,6 +34,7 @@ const OTextarea = (props: Props) => {
|
|
|
34
34
|
numberOfLines={props.lines}
|
|
35
35
|
underlineColorAndroid={'transparent'}
|
|
36
36
|
value={props.value}
|
|
37
|
+
autoFocus={props.autoFocus}
|
|
37
38
|
multiline={true}
|
|
38
39
|
selectionColor={theme.colors.primary}
|
|
39
40
|
color={theme.colors.textGray}
|
|
@@ -252,19 +252,28 @@ export interface MessagesOptionParams {
|
|
|
252
252
|
setSortBy?: any;
|
|
253
253
|
}
|
|
254
254
|
export interface OrdersOptionParams {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
) =>
|
|
267
|
-
|
|
255
|
+
orderList?: any;
|
|
256
|
+
activeOrders?: boolean;
|
|
257
|
+
pagination?: any;
|
|
258
|
+
setRememberOrderStatus?: any;
|
|
259
|
+
rememberOrderStatus?: any;
|
|
260
|
+
titleContent?: string;
|
|
261
|
+
customArray?: Array<any>;
|
|
262
|
+
loadMoreOrders?: () => {};
|
|
263
|
+
loadOrders?: ({}: any) => {};
|
|
264
|
+
messages?: any;
|
|
265
|
+
setMessages?: () => {};
|
|
266
|
+
loadMessages?: () => {};
|
|
267
|
+
navigation?: any;
|
|
268
|
+
setUpdateOtherStatus?: any;
|
|
269
|
+
onNavigationRedirect?: any;
|
|
270
|
+
orderStatus?: any;
|
|
271
|
+
tabs?: any;
|
|
272
|
+
currentTabSelected?: any;
|
|
273
|
+
setCurrentTabSelected?: any;
|
|
274
|
+
ordersGroup?: any;
|
|
275
|
+
setOrdersGroup?: any;
|
|
276
|
+
setCurrentFilters?: any;
|
|
268
277
|
}
|
|
269
278
|
export interface ActiveOrdersParams {
|
|
270
279
|
orders?: any;
|
|
@@ -412,6 +421,8 @@ export interface FloatingButtonParams {
|
|
|
412
421
|
btnRightValue?: string;
|
|
413
422
|
btnText: string;
|
|
414
423
|
secondBtnText?: string;
|
|
424
|
+
isPadding?: boolean;
|
|
425
|
+
widthButton?: number | string;
|
|
415
426
|
firstButtonClick?: any;
|
|
416
427
|
secondButtonClick?: any;
|
|
417
428
|
color?: string;
|