ordering-ui-react-native 0.15.5 → 0.15.7-release
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 +5 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessTypeFilter/index.tsx +12 -2
- package/src/components/BusinessTypeFilter/styles.tsx +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +0 -1
- package/src/components/Home/index.tsx +3 -5
- package/src/components/LanguageSelector/index.tsx +66 -97
- package/src/components/LanguageSelector/styles.tsx +4 -17
- package/src/components/Messages/index.tsx +38 -30
- package/src/components/MomentOption/index.tsx +3 -1
- package/src/components/OrderDetails/index.tsx +25 -4
- package/src/components/PaymentOptions/index.tsx +9 -16
- package/src/components/PaymentOptionsWebView/index.tsx +123 -124
- package/src/components/ProductForm/index.tsx +1 -1
- package/src/components/ProductForm/styles.tsx +1 -0
- package/src/components/StripeElementsForm/index.tsx +27 -48
- package/src/components/UserProfileForm/index.tsx +35 -1
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/config.json +0 -2
- package/src/pages/Checkout.tsx +1 -1
- package/src/types/index.tsx +2 -9
- package/src/utils/index.tsx +2 -1
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/Chat/index.tsx +32 -31
- package/themes/business/src/components/Home/index.tsx +128 -55
- package/themes/business/src/components/Home/styles.tsx +8 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +59 -98
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -0
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +27 -0
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +85 -17
- package/themes/business/src/components/OrdersListManager/index.tsx +874 -0
- package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
- package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
- package/themes/business/src/components/OrdersOption/index.tsx +70 -116
- package/themes/business/src/components/OrdersOption/styles.tsx +2 -5
- package/themes/business/src/components/PreviousOrders/index.tsx +82 -23
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessController/index.tsx +27 -6
- package/themes/kiosk/src/components/BusinessController/styles.tsx +1 -1
- package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +51 -24
- package/themes/kiosk/src/components/Cart/index.tsx +1 -1
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
- package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
- package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
- package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +7 -5
- package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
- package/themes/kiosk/src/components/Intro/index.tsx +13 -13
- package/themes/kiosk/src/components/LanguageSelector/index.tsx +12 -8
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +2 -2
- package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
- package/themes/kiosk/src/components/ProductForm/index.tsx +174 -126
- package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
- package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
- package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/components/shared/OCard.tsx +112 -78
- package/themes/original/index.tsx +177 -0
- package/themes/original/src/components/AddressForm/index.tsx +15 -10
- package/themes/original/src/components/AddressList/index.tsx +28 -2
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +100 -45
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
- package/themes/original/src/components/BusinessController/index.tsx +32 -21
- package/themes/original/src/components/BusinessListingSearch/index.tsx +7 -3
- package/themes/original/src/components/BusinessMenuList/index.tsx +11 -4
- package/themes/original/src/components/BusinessPreorder/index.tsx +141 -121
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
- package/themes/original/src/components/BusinessProductsList/index.tsx +6 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +23 -30
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
- package/themes/original/src/components/BusinessesListing/index.tsx +40 -53
- package/themes/original/src/components/Cart/index.tsx +40 -9
- package/themes/original/src/components/CartContent/index.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +58 -33
- package/themes/original/src/components/Checkout/styles.tsx +7 -0
- package/themes/original/src/components/CouponControl/index.tsx +1 -0
- package/themes/original/src/components/DriverTips/index.tsx +1 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +8 -12
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
- package/themes/original/src/components/Home/index.tsx +1 -1
- package/themes/original/src/components/LoginForm/index.tsx +156 -70
- package/themes/original/src/components/LoginForm/styles.tsx +6 -1
- package/themes/original/src/components/Messages/index.tsx +52 -45
- package/themes/original/src/components/Messages/styles.tsx +1 -3
- package/themes/original/src/components/MomentOption/index.tsx +10 -1
- package/themes/original/src/components/MomentOption/styles.tsx +1 -1
- package/themes/original/src/components/OrderDetails/index.tsx +104 -126
- package/themes/original/src/components/OrderDetails/styles.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +4 -4
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
- package/themes/original/src/components/OrderSummary/index.tsx +34 -1
- package/themes/original/src/components/OrdersOption/index.tsx +15 -46
- package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +6 -2
- package/themes/original/src/components/PaymentOptions/index.tsx +24 -25
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -8
- package/themes/original/src/components/PlaceSpot/index.tsx +114 -0
- package/themes/original/src/components/PlaceSpot/styles.tsx +11 -0
- package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
- package/themes/original/src/components/ProductForm/index.tsx +35 -16
- package/themes/original/src/components/ProductForm/styles.tsx +2 -2
- package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/SignupForm/index.tsx +173 -154
- package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
- package/themes/original/src/components/TaxInformation/index.tsx +17 -7
- package/themes/original/src/components/UpsellingProducts/index.tsx +6 -6
- package/themes/original/src/components/UserDetails/index.tsx +4 -95
- package/themes/original/src/components/UserFormDetails/index.tsx +2 -14
- package/themes/original/src/components/UserProfile/index.tsx +16 -16
- package/themes/original/src/components/UserProfileForm/index.tsx +8 -6
- package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
- package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
- package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
- package/themes/original/src/components/shared/index.tsx +2 -0
- package/themes/original/src/config/constants.tsx +6 -6
- package/themes/original/src/types/index.tsx +63 -23
- package/themes/single-business/src/components/AddressList/index.tsx +1 -1
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +5 -5
- package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/StripeMethodForm/index.tsx +0 -168
|
@@ -3,17 +3,14 @@ import { TouchableOpacity, View } from 'react-native';
|
|
|
3
3
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
4
4
|
|
|
5
5
|
import { UDContainer, UDHeader, UDForm, UDInfo, EditBtn } from './styles';
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
UserFormDetails as UserFormController,
|
|
8
9
|
useLanguage,
|
|
9
10
|
useSession,
|
|
10
|
-
ToastType,
|
|
11
|
-
useToast
|
|
12
11
|
} from 'ordering-components/native';
|
|
13
12
|
import { useTheme } from 'styled-components/native';
|
|
14
|
-
import { OIcon, OText
|
|
15
|
-
import { VerifyPhone } from '../VerifyPhone';
|
|
16
|
-
import Spinner from 'react-native-loading-spinner-overlay';
|
|
13
|
+
import { OIcon, OText } from '../shared';
|
|
17
14
|
|
|
18
15
|
import { UserFormDetailsUI } from '../UserFormDetails';
|
|
19
16
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
@@ -29,33 +26,15 @@ const UserDetailsUI = (props: any) => {
|
|
|
29
26
|
isUserDetailsEdit,
|
|
30
27
|
phoneUpdate,
|
|
31
28
|
togglePhoneUpdate,
|
|
32
|
-
isCheckout
|
|
33
|
-
checkPhoneCodeState,
|
|
34
|
-
handleSendVerifyCode,
|
|
35
|
-
handleCheckPhoneCode,
|
|
36
|
-
verifyPhoneState,
|
|
37
|
-
isVerifiedPhone,
|
|
38
|
-
setCheckPhoneCodeState
|
|
29
|
+
isCheckout
|
|
39
30
|
} = props
|
|
40
31
|
|
|
41
32
|
const theme = useTheme();
|
|
42
33
|
|
|
43
34
|
const [, t] = useLanguage()
|
|
44
35
|
const [{ user }] = useSession()
|
|
45
|
-
const [, { showToast }] = useToast();
|
|
46
|
-
|
|
47
36
|
const userData = props.userData || (!formState.result.error && formState.result?.result) || user
|
|
48
37
|
|
|
49
|
-
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
50
|
-
const [willVerifyOtpState, setWillVerifyOtpState] = useState(false);
|
|
51
|
-
const [phoneInputData, setPhoneInputData] = useState({
|
|
52
|
-
error: '',
|
|
53
|
-
phone: {
|
|
54
|
-
country_phone_code: null,
|
|
55
|
-
cellphone: null,
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
38
|
|
|
60
39
|
useEffect(() => {
|
|
61
40
|
if (isUserDetailsEdit) {
|
|
@@ -76,54 +55,6 @@ const UserDetailsUI = (props: any) => {
|
|
|
76
55
|
}
|
|
77
56
|
}, [user?.country_phone_code])
|
|
78
57
|
|
|
79
|
-
const handleVerifyCodeClick = () => {
|
|
80
|
-
if (formState?.changes?.cellphone && formState?.changes?.country_phone_code) {
|
|
81
|
-
const { cellphone, country_phone_code: countryPhoneCode } = formState?.changes
|
|
82
|
-
|
|
83
|
-
setPhoneInputData({
|
|
84
|
-
error: '',
|
|
85
|
-
phone: {
|
|
86
|
-
country_phone_code: countryPhoneCode,
|
|
87
|
-
cellphone: cellphone,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
handleSendVerifyCode({
|
|
91
|
-
cellphone: cellphone,
|
|
92
|
-
country_phone_code: countryPhoneCode
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
useEffect(() => {
|
|
98
|
-
if (willVerifyOtpState) handleVerifyCodeClick()
|
|
99
|
-
}, [willVerifyOtpState])
|
|
100
|
-
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
if (verifyPhoneState && !verifyPhoneState?.loading) {
|
|
103
|
-
if (verifyPhoneState.result?.error) {
|
|
104
|
-
const message = typeof verifyPhoneState?.result?.result === 'string'
|
|
105
|
-
? verifyPhoneState?.result?.result
|
|
106
|
-
: verifyPhoneState?.result?.result[0]
|
|
107
|
-
verifyPhoneState.result?.result && showToast(
|
|
108
|
-
ToastType.Error,
|
|
109
|
-
message
|
|
110
|
-
)
|
|
111
|
-
setWillVerifyOtpState(false)
|
|
112
|
-
return
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const okResult = verifyPhoneState.result?.result === 'OK'
|
|
116
|
-
if (okResult) {
|
|
117
|
-
!isModalVisible && setIsModalVisible(true)
|
|
118
|
-
setWillVerifyOtpState(false)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}, [verifyPhoneState])
|
|
122
|
-
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
if (isVerifiedPhone) setIsModalVisible(false)
|
|
125
|
-
}, [isVerifiedPhone])
|
|
126
|
-
|
|
127
58
|
return (
|
|
128
59
|
<>
|
|
129
60
|
{(validationFields.loading || formState.loading) && (
|
|
@@ -186,32 +117,10 @@ const UserDetailsUI = (props: any) => {
|
|
|
186
117
|
)}
|
|
187
118
|
</UDInfo>
|
|
188
119
|
) : (
|
|
189
|
-
<UserFormDetailsUI
|
|
190
|
-
{...props}
|
|
191
|
-
phoneUpdate={phoneUpdate}
|
|
192
|
-
togglePhoneUpdate={togglePhoneUpdate}
|
|
193
|
-
isCheckout={isCheckout}
|
|
194
|
-
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
195
|
-
/>
|
|
120
|
+
<UserFormDetailsUI {...props} phoneUpdate={phoneUpdate} togglePhoneUpdate={togglePhoneUpdate} isCheckout={isCheckout} />
|
|
196
121
|
)}
|
|
197
122
|
</UDContainer>
|
|
198
123
|
)}
|
|
199
|
-
<OModal
|
|
200
|
-
open={isModalVisible}
|
|
201
|
-
onClose={() => setIsModalVisible(false)}
|
|
202
|
-
entireModal
|
|
203
|
-
>
|
|
204
|
-
<VerifyPhone
|
|
205
|
-
phone={phoneInputData.phone}
|
|
206
|
-
verifyPhoneState={verifyPhoneState}
|
|
207
|
-
checkPhoneCodeState={checkPhoneCodeState}
|
|
208
|
-
handleCheckPhoneCode={handleCheckPhoneCode}
|
|
209
|
-
setCheckPhoneCodeState={setCheckPhoneCodeState}
|
|
210
|
-
handleVerifyCodeClick={handleVerifyCodeClick}
|
|
211
|
-
onClose={() => setIsModalVisible(false)}
|
|
212
|
-
/>
|
|
213
|
-
</OModal>
|
|
214
|
-
<Spinner visible={verifyPhoneState?.loading} />
|
|
215
124
|
</>
|
|
216
125
|
)
|
|
217
126
|
}
|
|
@@ -25,8 +25,6 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
25
25
|
handleButtonUpdateClick,
|
|
26
26
|
phoneUpdate,
|
|
27
27
|
hideUpdateButton,
|
|
28
|
-
setWillVerifyOtpState,
|
|
29
|
-
isVerifiedPhone,
|
|
30
28
|
handleChangePromotions
|
|
31
29
|
} = props;
|
|
32
30
|
|
|
@@ -141,8 +139,8 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
141
139
|
if (
|
|
142
140
|
formState.changes?.cellphone === null &&
|
|
143
141
|
((validationFields?.fields?.checkout?.cellphone?.enabled &&
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
validationFields?.fields?.checkout?.cellphone?.required) ||
|
|
143
|
+
configs?.verification_phone_required?.value === '1')
|
|
146
144
|
) {
|
|
147
145
|
showToast(
|
|
148
146
|
ToastType.Error,
|
|
@@ -153,9 +151,6 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
153
151
|
);
|
|
154
152
|
return;
|
|
155
153
|
}
|
|
156
|
-
if (formState?.changes?.cellphone && !isVerifiedPhone) {
|
|
157
|
-
showToast(ToastType.Error, t('VERIFY_ERROR_PHONE_NUMBER', 'The Phone Number field is not verified'))
|
|
158
|
-
}
|
|
159
154
|
let changes = null;
|
|
160
155
|
if (user?.cellphone && !userPhoneNumber) {
|
|
161
156
|
changes = {
|
|
@@ -216,13 +211,6 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
216
211
|
}
|
|
217
212
|
}
|
|
218
213
|
}, [user, isEdit]);
|
|
219
|
-
|
|
220
|
-
useEffect(() => {
|
|
221
|
-
if (!phoneInputData.error && phoneInputData?.phone?.country_phone_code && phoneInputData?.phone?.cellphone) {
|
|
222
|
-
setWillVerifyOtpState(true)
|
|
223
|
-
}
|
|
224
|
-
}, [phoneInputData])
|
|
225
|
-
|
|
226
214
|
return (
|
|
227
215
|
<>
|
|
228
216
|
<UDForm>
|
|
@@ -16,6 +16,7 @@ import { LogoutButton } from '../LogoutButton'
|
|
|
16
16
|
import { LanguageSelector } from '../LanguageSelector'
|
|
17
17
|
import MessageCircle from 'react-native-vector-icons/AntDesign'
|
|
18
18
|
import Ionicons from 'react-native-vector-icons/Ionicons'
|
|
19
|
+
import FastImage from 'react-native-fast-image'
|
|
19
20
|
|
|
20
21
|
import {
|
|
21
22
|
OIcon,
|
|
@@ -135,24 +136,23 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
return (
|
|
138
|
-
<View style={{ flex: 1, height: height - top - bottom - 62 }}>
|
|
139
|
-
<OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
139
|
+
<View style={{ flex: 1, height: height - top - bottom - 62, paddingTop: 20 }}>
|
|
140
|
+
{/* <OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
140
141
|
{t('PROFILE', 'Profile')}
|
|
141
|
-
</OText>
|
|
142
|
+
</OText> */}
|
|
142
143
|
<CenterView style={styles.pagePadding}>
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
{user?.photo && (
|
|
145
|
+
<View style={styles.photo}>
|
|
146
|
+
<FastImage
|
|
147
|
+
style={{ height: 60, width: 60, borderRadius: 8 }}
|
|
148
|
+
source={{
|
|
149
|
+
uri: user?.photo,
|
|
150
|
+
priority: FastImage.priority.normal,
|
|
151
|
+
}}
|
|
152
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
151
153
|
/>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
)}
|
|
155
|
-
</View>
|
|
154
|
+
</View>
|
|
155
|
+
)}
|
|
156
156
|
<View style={{ flexBasis: '70%' }}>
|
|
157
157
|
<OText size={20} lineHeight={30} weight={Platform.OS === 'ios' ? '500' : 'bold'} color={theme.colors.textNormal}>{user?.name} {user?.lastname}</OText>
|
|
158
158
|
<TouchableOpacity onPress={() => navigation.navigate('ProfileForm', { ...detailProps })}>
|
|
@@ -166,7 +166,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
166
166
|
<Actions>
|
|
167
167
|
<ListItem onPress={() => onRedirect('AddressList', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
168
168
|
<OIcon src={theme.images.general.pin} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
169
|
-
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('
|
|
169
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('SAVED_PLACES', 'My saved places')}</OText>
|
|
170
170
|
</ListItem>
|
|
171
171
|
<ListItem onPress={() => onRedirect('Messages', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
172
172
|
<MessageCircle name='message1' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
@@ -21,6 +21,7 @@ import NavBar from '../NavBar';
|
|
|
21
21
|
import { Container } from '../../layouts/Container';
|
|
22
22
|
import { VerifyPhone } from '../VerifyPhone'
|
|
23
23
|
import Ionicons from 'react-native-vector-icons/Ionicons'
|
|
24
|
+
import FastImage from 'react-native-fast-image'
|
|
24
25
|
|
|
25
26
|
const ProfileUI = (props: ProfileParams) => {
|
|
26
27
|
const {
|
|
@@ -288,12 +289,13 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
288
289
|
<CenterView style={styles.pagePadding}>
|
|
289
290
|
<View style={styles.photo}>
|
|
290
291
|
{user?.photo ? (
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
292
|
+
<FastImage
|
|
293
|
+
style={{ height: 60, width: 80, borderRadius: 8 }}
|
|
294
|
+
source={{
|
|
295
|
+
uri: user?.photo,
|
|
296
|
+
priority: FastImage.priority.normal,
|
|
297
|
+
}}
|
|
298
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
297
299
|
/>
|
|
298
300
|
) : (
|
|
299
301
|
<Ionicons name='person-outline' size={50} />
|
|
@@ -37,8 +37,8 @@ export const VerifyPhone = (props: any) => {
|
|
|
37
37
|
height: 75,
|
|
38
38
|
marginBottom: 25,
|
|
39
39
|
borderWidth: 1,
|
|
40
|
-
borderColor: theme.colors.
|
|
41
|
-
borderRadius:
|
|
40
|
+
borderColor: theme.colors.disabled,
|
|
41
|
+
borderRadius: 20,
|
|
42
42
|
textAlign: 'center',
|
|
43
43
|
fontSize: 40
|
|
44
44
|
}
|
|
@@ -131,11 +131,11 @@ export const VerifyPhone = (props: any) => {
|
|
|
131
131
|
|
|
132
132
|
return (
|
|
133
133
|
<Container>
|
|
134
|
-
<OText size={
|
|
135
|
-
{t('
|
|
134
|
+
<OText size={30} style={{ textAlign: 'left' }}>
|
|
135
|
+
{t('VERIFY_PHONE', 'Verify Phone')}
|
|
136
136
|
</OText>
|
|
137
137
|
{lastNumbers && (
|
|
138
|
-
<OText size={
|
|
138
|
+
<OText size={20} color={theme.colors.disabled}>
|
|
139
139
|
{`${t('MESSAGE_ENTER_VERIFY_CODE', 'Please, enter the verification code we sent to your mobile ending with')} **${lastNumbers}`}
|
|
140
140
|
</OText>
|
|
141
141
|
)}
|
|
@@ -174,7 +174,7 @@ export const VerifyPhone = (props: any) => {
|
|
|
174
174
|
).result?.result)?.map((e: any, i: number) => (
|
|
175
175
|
<OText
|
|
176
176
|
key={i}
|
|
177
|
-
size={
|
|
177
|
+
size={20}
|
|
178
178
|
color={theme.colors.error}
|
|
179
179
|
>
|
|
180
180
|
{`* ${t(getTraduction(e))}`}
|
|
@@ -183,9 +183,12 @@ export const VerifyPhone = (props: any) => {
|
|
|
183
183
|
</ErrorSection>
|
|
184
184
|
)}
|
|
185
185
|
<ResendSection>
|
|
186
|
+
<OText size={16} style={{ marginRight: 5 }}>
|
|
187
|
+
{t('ARE_YOU_NOT_SEEING_THE_CODE', 'Are you not seeing the code?')}
|
|
188
|
+
</OText>
|
|
186
189
|
<Pressable onPress={() => handleSendCodeAgain()}>
|
|
187
190
|
<OText size={16} color={theme.colors.primary}>
|
|
188
|
-
{t('
|
|
191
|
+
{t('SEND_AGAIN', 'Send Again')}
|
|
189
192
|
</OText>
|
|
190
193
|
</Pressable>
|
|
191
194
|
</ResendSection>
|
|
@@ -19,12 +19,13 @@ export const CountDownContainer = styled.View`
|
|
|
19
19
|
export const ResendSection = styled.View`
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: row;
|
|
22
|
+
justify-content: center;
|
|
22
23
|
margin-bottom: 30px;
|
|
23
24
|
`
|
|
24
25
|
|
|
25
26
|
export const WrappCountdown = styled.View`
|
|
26
27
|
padding-top: 20px;
|
|
27
|
-
padding-bottom:
|
|
28
|
+
padding-bottom: 20px;
|
|
28
29
|
`
|
|
29
30
|
|
|
30
31
|
export const InputsSection = styled.View`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import OText from './OText';
|
|
4
|
+
|
|
5
|
+
const HeaderTitle = (props: any) => {
|
|
6
|
+
const { text, style } = props
|
|
7
|
+
return (
|
|
8
|
+
<OText
|
|
9
|
+
size={24}
|
|
10
|
+
style={style ?? {
|
|
11
|
+
marginTop: Platform.OS === 'android' ? 50 : 30,
|
|
12
|
+
paddingHorizontal: 40,
|
|
13
|
+
textTransform: 'capitalize'
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
{text}
|
|
17
|
+
</OText>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default HeaderTitle
|
|
@@ -11,6 +11,7 @@ import OKeyButton from './OKeyButton'
|
|
|
11
11
|
import OModal from './OModal'
|
|
12
12
|
import OAlert from './OAlert'
|
|
13
13
|
import OBottomPopup from './OBottomPopup'
|
|
14
|
+
import HeaderTitle from './HeaderTitle'
|
|
14
15
|
|
|
15
16
|
export {
|
|
16
17
|
OText,
|
|
@@ -26,4 +27,5 @@ export {
|
|
|
26
27
|
OAlert,
|
|
27
28
|
OModal,
|
|
28
29
|
OBottomPopup,
|
|
30
|
+
HeaderTitle
|
|
29
31
|
}
|
|
@@ -8,26 +8,26 @@ export const ORDER_TYPES = [
|
|
|
8
8
|
{
|
|
9
9
|
value: 1,
|
|
10
10
|
content: 'DELIVERY',
|
|
11
|
-
description: '
|
|
11
|
+
description: 'ORDERTYPE_DESCRIPTION_DELIVERY'
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
value: 2,
|
|
15
15
|
content: 'PICKUP',
|
|
16
|
-
description: '
|
|
16
|
+
description: 'ORDERTYPE_DESCRIPTION_PICKUP',
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
value: 3,
|
|
20
20
|
content: 'EAT_IN',
|
|
21
|
-
description: '
|
|
21
|
+
description: 'ORDERTYPE_DESCRIPTION_EATIN',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
value: 4,
|
|
25
25
|
content: 'CURBSIDE',
|
|
26
|
-
description: '
|
|
26
|
+
description: 'ORDERTYPE_DESCRIPTION_CURBSIDE',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
value: 5,
|
|
30
30
|
content: 'DRIVE_THRU',
|
|
31
|
-
description: '
|
|
31
|
+
description: 'ORDERTYPE_DESCRIPTION_DRIVETHRU',
|
|
32
32
|
}
|
|
33
|
-
]
|
|
33
|
+
]
|
|
@@ -17,6 +17,8 @@ export interface LoginParams {
|
|
|
17
17
|
handleSendVerifyCode?: any;
|
|
18
18
|
handleCheckPhoneCode?: any;
|
|
19
19
|
notificationState?: any;
|
|
20
|
+
handleReCaptcha?: any;
|
|
21
|
+
enableReCaptcha?: any;
|
|
20
22
|
}
|
|
21
23
|
export interface ProfileParams {
|
|
22
24
|
navigation?: any;
|
|
@@ -100,6 +102,8 @@ export interface SignupParams {
|
|
|
100
102
|
handleCheckPhoneCode?: any;
|
|
101
103
|
notificationState?: any;
|
|
102
104
|
handleChangePromotions: () => void;
|
|
105
|
+
enableReCaptcha?: boolean;
|
|
106
|
+
handleReCaptcha?: () => void;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
export interface PhoneInputParams {
|
|
@@ -115,6 +119,8 @@ export interface PhoneInputParams {
|
|
|
115
119
|
noDropIcon?: boolean;
|
|
116
120
|
flagStyle?: any;
|
|
117
121
|
isDisabled?: any;
|
|
122
|
+
isStartValidation?: any;
|
|
123
|
+
changeCountry?: any;
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
export interface LanguageSelectorParams {
|
|
@@ -142,9 +148,9 @@ export interface BusinessesListingParams {
|
|
|
142
148
|
export interface HighestRatedBusinessesParams {
|
|
143
149
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
144
150
|
onBusinessClick?: void;
|
|
145
|
-
navigation
|
|
151
|
+
navigation?: any;
|
|
146
152
|
isLoading?: boolean;
|
|
147
|
-
getBusinesses: (newFetch
|
|
153
|
+
getBusinesses: (newFetch: boolean) => void
|
|
148
154
|
}
|
|
149
155
|
export interface BusinessTypeFilterParams {
|
|
150
156
|
businessTypes?: Array<any>;
|
|
@@ -165,7 +171,15 @@ export interface BusinessControllerParams {
|
|
|
165
171
|
businessWillCloseSoonMinutes?: number
|
|
166
172
|
isBusinessClose?: number,
|
|
167
173
|
navigation?: any,
|
|
168
|
-
style?: ViewStyle
|
|
174
|
+
style?: ViewStyle,
|
|
175
|
+
businessHeader?: string,
|
|
176
|
+
businessFeatured?: boolean,
|
|
177
|
+
businessLogo?: string,
|
|
178
|
+
businessReviews?: any,
|
|
179
|
+
businessDeliveryPrice?: number,
|
|
180
|
+
businessDeliveryTime?: string,
|
|
181
|
+
businessPickupTime?: string,
|
|
182
|
+
businessDistance?: number
|
|
169
183
|
}
|
|
170
184
|
export interface BusinessProductsListingParams {
|
|
171
185
|
navigation?: any;
|
|
@@ -181,7 +195,7 @@ export interface BusinessProductsListingParams {
|
|
|
181
195
|
header?: any;
|
|
182
196
|
logo?: any;
|
|
183
197
|
productModal?: any;
|
|
184
|
-
|
|
198
|
+
getNextProducts?: () => {};
|
|
185
199
|
handleChangeCategory: (value: any) => {};
|
|
186
200
|
setProductLogin?: () => {};
|
|
187
201
|
updateProductModal?: (value: any) => {};
|
|
@@ -193,6 +207,7 @@ export interface BusinessBasicInformationParams {
|
|
|
193
207
|
isBusinessInfoShow?: boolean;
|
|
194
208
|
header?: any;
|
|
195
209
|
logo?: any;
|
|
210
|
+
isPreOrder?: boolean;
|
|
196
211
|
}
|
|
197
212
|
export interface BusinessProductsCategoriesParams {
|
|
198
213
|
categories: Array<any>;
|
|
@@ -207,8 +222,8 @@ export interface BusinessProductsCategoriesParams {
|
|
|
207
222
|
categoriesLayout?: any;
|
|
208
223
|
selectedCategoryId?: any;
|
|
209
224
|
lazyLoadProductsRecommended?: any;
|
|
210
|
-
|
|
211
|
-
|
|
225
|
+
setSelectedCategoryId?: any
|
|
226
|
+
setCategoryClicked?: any
|
|
212
227
|
}
|
|
213
228
|
export interface BusinessProductsListParams {
|
|
214
229
|
errors?: any;
|
|
@@ -226,7 +241,11 @@ export interface BusinessProductsListParams {
|
|
|
226
241
|
handleCancelSearch?: () => void,
|
|
227
242
|
categoriesLayout?: any,
|
|
228
243
|
setCategoriesLayout?: any,
|
|
229
|
-
currentCart?: any
|
|
244
|
+
currentCart?: any,
|
|
245
|
+
setSubcategoriesSelected?: any,
|
|
246
|
+
subcategoriesSelected?: any,
|
|
247
|
+
onClickCategory?: any,
|
|
248
|
+
lazyLoadProductsRecommended?: boolean
|
|
230
249
|
}
|
|
231
250
|
export interface SingleProductCardParams {
|
|
232
251
|
businessId: any,
|
|
@@ -319,7 +338,10 @@ export interface OrderDetailsParams {
|
|
|
319
338
|
isFromCheckout?: boolean,
|
|
320
339
|
driverLocation?: any,
|
|
321
340
|
isFromRoot?: any,
|
|
322
|
-
goToBusinessList?: boolean
|
|
341
|
+
goToBusinessList?: boolean,
|
|
342
|
+
onNavigationRedirect?: any,
|
|
343
|
+
reorderState?: any,
|
|
344
|
+
handleReorder?: any,
|
|
323
345
|
}
|
|
324
346
|
export interface ProductItemAccordionParams {
|
|
325
347
|
key?: any;
|
|
@@ -353,7 +375,7 @@ export interface ReviewProductParams {
|
|
|
353
375
|
formState?: any,
|
|
354
376
|
handleChangeFormState?: any,
|
|
355
377
|
handleSendProductReview?: any
|
|
356
|
-
|
|
378
|
+
}
|
|
357
379
|
export interface SingleProductReviewParams {
|
|
358
380
|
product: any,
|
|
359
381
|
formState?: any,
|
|
@@ -381,7 +403,7 @@ export interface MessagesParams {
|
|
|
381
403
|
handleSend?: () => {},
|
|
382
404
|
setImage?: (image: string | null) => {},
|
|
383
405
|
setMessage?: (comment: string) => {},
|
|
384
|
-
setMessages?: () => {},
|
|
406
|
+
setMessages?: (image: any | null) => {},
|
|
385
407
|
readMessages?: () => {},
|
|
386
408
|
onClose?: () => void,
|
|
387
409
|
isMeesageListing?: boolean,
|
|
@@ -520,27 +542,45 @@ export interface HelpGuideParams {
|
|
|
520
542
|
export interface HelpAccountAndPaymentParams {
|
|
521
543
|
navigation: any;
|
|
522
544
|
}
|
|
523
|
-
|
|
545
|
+
|
|
524
546
|
export interface MessageListingParams {
|
|
525
547
|
navigation: any;
|
|
526
548
|
franchiseId?: any;
|
|
527
549
|
}
|
|
528
550
|
|
|
529
|
-
export interface BusinessSearchParams {
|
|
551
|
+
export interface BusinessSearchParams {
|
|
530
552
|
navigation: any,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
553
|
+
businessesSearchList: any,
|
|
554
|
+
onBusinessClick: any,
|
|
555
|
+
handleChangeTermValue: (term: string) => void,
|
|
556
|
+
termValue: string,
|
|
557
|
+
paginationProps: any,
|
|
558
|
+
handleSearchbusinessAndProducts: (newFetch?: boolean) => void,
|
|
559
|
+
handleChangeFilters: (prop: string, value: any) => void,
|
|
560
|
+
filters: any,
|
|
561
|
+
businessTypes: Array<number>,
|
|
562
|
+
setFilters: (filters: any) => void,
|
|
541
563
|
lazySearch?: boolean
|
|
542
564
|
}
|
|
543
|
-
|
|
565
|
+
|
|
544
566
|
export interface NoNetworkParams {
|
|
545
567
|
image?: any,
|
|
546
568
|
}
|
|
569
|
+
|
|
570
|
+
export interface PlaceSpotParams {
|
|
571
|
+
isOpenPlaceSpot?: boolean,
|
|
572
|
+
cart?: any,
|
|
573
|
+
placesState?: any,
|
|
574
|
+
handleChangePlace?: any,
|
|
575
|
+
getPlacesList?: any,
|
|
576
|
+
setOpenPlaceModal?: any
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export interface PromotionParams {
|
|
580
|
+
navigation: any,
|
|
581
|
+
offersState: any,
|
|
582
|
+
handleSearchValue: any,
|
|
583
|
+
searchValue: string,
|
|
584
|
+
offerSelected: any,
|
|
585
|
+
setOfferSelected: any,
|
|
586
|
+
}
|
|
@@ -140,7 +140,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
140
140
|
<AddressListContainer>
|
|
141
141
|
{isProfile && (
|
|
142
142
|
<NavBar
|
|
143
|
-
title={t('
|
|
143
|
+
title={t('SAVED_PLACES', 'My saved places')}
|
|
144
144
|
titleAlign={'center'}
|
|
145
145
|
onActionLeft={() => goToBack()}
|
|
146
146
|
showCall={false}
|
|
@@ -97,27 +97,27 @@ export const OrderTypeSelector = (props: any) => {
|
|
|
97
97
|
{
|
|
98
98
|
value: 1,
|
|
99
99
|
content: t('DELIVERY', 'Delivery'),
|
|
100
|
-
description: t('ORDERTYPE_DESCRIPTION_DELIVERY', '
|
|
100
|
+
description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description')
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
value: 2,
|
|
104
104
|
content: t('PICKUP', 'Pickup'),
|
|
105
|
-
description: t('ORDERTYPE_DESCRIPTION_PICKUP', '
|
|
105
|
+
description: t('ORDERTYPE_DESCRIPTION_PICKUP', 'Pickup description')
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
value: 3,
|
|
109
109
|
content: t('EAT_IN', 'Eat in'),
|
|
110
|
-
description: t('ORDERTYPE_DESCRIPTION_EATIN', '
|
|
110
|
+
description: t('ORDERTYPE_DESCRIPTION_EATIN', 'Eat in description')
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
value: 4,
|
|
114
114
|
content: t('CURBSIDE', 'Curbside'),
|
|
115
|
-
description: t('ORDERTYPE_DESCRIPTION_CURBSIDE', '
|
|
115
|
+
description: t('ORDERTYPE_DESCRIPTION_CURBSIDE', 'Curbside description')
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
value: 5,
|
|
119
119
|
content: t('DRIVE_THRU', 'Drive thru'),
|
|
120
|
-
description: t('ORDERTYPE_DESCRIPTION_DRIVETHRU', '
|
|
120
|
+
description: t('ORDERTYPE_DESCRIPTION_DRIVETHRU', 'Drive Thru description')
|
|
121
121
|
}
|
|
122
122
|
]
|
|
123
123
|
}
|
|
@@ -154,7 +154,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
154
154
|
<Actions>
|
|
155
155
|
<ListItem onPress={() => onRedirect('AddressList', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
156
156
|
<OIcon src={theme.images.general.pin} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
157
|
-
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('
|
|
157
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('SAVED_PLACES', 'My saved places')}</OText>
|
|
158
158
|
</ListItem>
|
|
159
159
|
<ListItem onPress={() => navigation.navigate('Help', {})} activeOpacity={0.7}>
|
|
160
160
|
<OIcon src={theme.images.general.help} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
@@ -144,7 +144,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
144
144
|
{isFarAway && (
|
|
145
145
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
146
146
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
147
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
147
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'Your are far from this address')}</OText>
|
|
148
148
|
</FarAwayMessage>
|
|
149
149
|
)}
|
|
150
150
|
<View style={styles.wrapperOrderOptions}>
|