ordering-ui-react-native 0.15.21 → 0.15.22-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/LanguageSelector/index.tsx +1 -0
- package/src/components/OrderDetails/index.tsx +26 -5
- package/src/components/PaymentOptions/index.tsx +9 -16
- package/src/components/PaymentOptionsWebView/index.tsx +123 -124
- package/src/components/StripeElementsForm/index.tsx +27 -48
- package/src/components/UserProfileForm/index.tsx +63 -6
- package/src/components/UserProfileForm/styles.tsx +8 -0
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/config.json +0 -2
- package/src/navigators/HomeNavigator.tsx +6 -0
- package/src/pages/BusinessProductsList.tsx +1 -0
- package/src/pages/BusinessesListing.tsx +1 -1
- package/src/pages/Checkout.tsx +1 -1
- package/src/pages/Sessions.tsx +22 -0
- package/src/types/index.tsx +3 -9
- package/src/utils/index.tsx +68 -1
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +56 -8
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +5 -0
- package/themes/business/src/components/Chat/index.tsx +38 -86
- 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 +2 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +22 -13
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +151 -89
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +91 -17
- package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
- 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 +53 -49
- package/themes/business/src/components/PreviousOrders/index.tsx +75 -22
- package/themes/business/src/types/index.tsx +2 -1
- 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 +48 -21
- package/themes/kiosk/src/components/Cart/index.tsx +98 -24
- package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
- 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 +6 -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 +136 -41
- package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
- 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 -125
- 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/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +178 -1
- package/themes/original/src/components/AddressForm/index.tsx +15 -10
- package/themes/original/src/components/AddressList/index.tsx +56 -18
- package/themes/original/src/components/AppleLogin/index.tsx +117 -78
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +96 -45
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
- package/themes/original/src/components/BusinessController/index.tsx +52 -22
- package/themes/original/src/components/BusinessController/styles.tsx +22 -0
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +4 -0
- 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 +127 -20
- package/themes/original/src/components/BusinessProductsList/styles.tsx +29 -2
- package/themes/original/src/components/BusinessProductsListing/index.tsx +92 -37
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
- package/themes/original/src/components/BusinessesListing/index.tsx +48 -57
- package/themes/original/src/components/Cart/index.tsx +18 -14
- package/themes/original/src/components/CartContent/index.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +42 -27
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
- package/themes/original/src/components/GoogleMap/index.tsx +1 -0
- package/themes/original/src/components/Help/index.tsx +21 -4
- 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/LastOrders/index.tsx +12 -1
- package/themes/original/src/components/LoginForm/index.tsx +73 -2
- package/themes/original/src/components/LoginForm/styles.tsx +6 -1
- package/themes/original/src/components/MessageListing/index.tsx +10 -1
- package/themes/original/src/components/Messages/index.tsx +34 -25
- 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 +34 -27
- package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
- 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 +2 -2
- package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -2
- package/themes/original/src/components/OrdersOption/index.tsx +25 -33
- package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +10 -4
- package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptions/index.tsx +9 -19
- package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
- package/themes/original/src/components/ProductForm/index.tsx +40 -33
- package/themes/original/src/components/ProductForm/styles.tsx +2 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +5 -3
- package/themes/original/src/components/Promotions/index.tsx +250 -0
- package/themes/original/src/components/Promotions/styles.tsx +60 -0
- 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/Sessions/index.tsx +160 -0
- package/themes/original/src/components/Sessions/styles.tsx +15 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +47 -21
- package/themes/original/src/components/SingleProductCard/styles.tsx +28 -1
- package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
- package/themes/original/src/components/TaxInformation/index.tsx +10 -4
- package/themes/original/src/components/UpsellingProducts/index.tsx +87 -71
- package/themes/original/src/components/UserDetails/index.tsx +4 -95
- package/themes/original/src/components/UserFormDetails/index.tsx +32 -31
- package/themes/original/src/components/UserProfile/index.tsx +62 -14
- package/themes/original/src/components/UserProfileForm/index.tsx +20 -18
- 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/Wallets/index.tsx +75 -8
- package/themes/original/src/components/Wallets/styles.tsx +21 -0
- 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 +46 -4
- package/themes/original/src/utils/index.tsx +12 -2
- package/themes/single-business/src/components/AddressList/index.tsx +1 -1
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +6 -6
- 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
|
@@ -56,7 +56,8 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
56
56
|
},
|
|
57
57
|
pagePadding: {
|
|
58
58
|
paddingLeft: 40,
|
|
59
|
-
paddingRight: 40
|
|
59
|
+
paddingRight: 40,
|
|
60
|
+
justifyContent: 'center',
|
|
60
61
|
},
|
|
61
62
|
navBarStyle: {
|
|
62
63
|
paddingLeft: 40,
|
|
@@ -205,8 +206,8 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
205
206
|
},
|
|
206
207
|
});
|
|
207
208
|
handleSendVerifyCode({
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
cellphone: cellphone,
|
|
210
|
+
country_phone_code: countryPhoneCode
|
|
210
211
|
})
|
|
211
212
|
}
|
|
212
213
|
}
|
|
@@ -277,15 +278,16 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
277
278
|
|
|
278
279
|
return (
|
|
279
280
|
<>
|
|
281
|
+
<NavBar
|
|
282
|
+
title={t('ACCOUNT', 'Account')}
|
|
283
|
+
titleAlign={'center'}
|
|
284
|
+
onActionLeft={() => navigation.goBack()}
|
|
285
|
+
showCall={false}
|
|
286
|
+
style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 30 , marginTop: Platform.OS === 'ios' ? 50 : 40 }}
|
|
287
|
+
/>
|
|
280
288
|
<KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
|
|
281
289
|
<Container noPadding>
|
|
282
|
-
|
|
283
|
-
onActionLeft={() => navigation.goBack()}
|
|
284
|
-
btnStyle={{ paddingStart: 0 }}
|
|
285
|
-
title={t('ACCOUNT', 'Account')}
|
|
286
|
-
isVertical
|
|
287
|
-
style={styles.navBarStyle}
|
|
288
|
-
/>
|
|
290
|
+
|
|
289
291
|
<CenterView style={styles.pagePadding}>
|
|
290
292
|
<View style={styles.photo}>
|
|
291
293
|
{user?.photo ? (
|
|
@@ -305,7 +307,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
305
307
|
icon={theme.images.general.camera}
|
|
306
308
|
borderColor={theme.colors.clear}
|
|
307
309
|
iconStyle={{ width: 20, height: 20 }}
|
|
308
|
-
style={{ maxWidth: 40, position: 'absolute',
|
|
310
|
+
style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
|
|
309
311
|
onClick={() => handleImagePicker()}
|
|
310
312
|
/>
|
|
311
313
|
</CenterView>
|
|
@@ -326,13 +328,13 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
326
328
|
entireModal
|
|
327
329
|
>
|
|
328
330
|
<VerifyPhone
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
331
|
+
phone={phoneInputData.phone}
|
|
332
|
+
verifyPhoneState={verifyPhoneState}
|
|
333
|
+
checkPhoneCodeState={checkPhoneCodeState}
|
|
334
|
+
handleCheckPhoneCode={handleCheckPhoneCode}
|
|
335
|
+
setCheckPhoneCodeState={setCheckPhoneCodeState}
|
|
336
|
+
handleVerifyCodeClick={handleVerifyCodeClick}
|
|
337
|
+
onClose={() => setIsModalVisible(false)}
|
|
336
338
|
/>
|
|
337
339
|
</OModal>
|
|
338
340
|
</>
|
|
@@ -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`
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { Pressable, View } from 'react-native';
|
|
2
|
+
import { Pressable, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useTheme } from 'styled-components/native'
|
|
4
4
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
5
|
+
import FastImage from 'react-native-fast-image'
|
|
5
6
|
import {
|
|
6
7
|
WalletList,
|
|
7
8
|
useLanguage,
|
|
@@ -15,7 +16,10 @@ import {
|
|
|
15
16
|
TransactionsWrapper,
|
|
16
17
|
OTabs,
|
|
17
18
|
OTab,
|
|
18
|
-
SectionContent
|
|
19
|
+
SectionContent,
|
|
20
|
+
LoyaltyContent,
|
|
21
|
+
LoyaltyWrapp,
|
|
22
|
+
LoyaltyImg
|
|
19
23
|
} from './styles'
|
|
20
24
|
|
|
21
25
|
import NavBar from '../NavBar'
|
|
@@ -27,10 +31,14 @@ const WalletsUI = (props: any) => {
|
|
|
27
31
|
const {
|
|
28
32
|
navigation,
|
|
29
33
|
walletList,
|
|
34
|
+
userLoyaltyLevel,
|
|
30
35
|
transactionsList,
|
|
31
36
|
setWalletSelected,
|
|
32
37
|
isWalletCashEnabled,
|
|
33
|
-
isWalletPointsEnabled
|
|
38
|
+
isWalletPointsEnabled,
|
|
39
|
+
getWallets,
|
|
40
|
+
refreshWallets,
|
|
41
|
+
setRefreshWallets
|
|
34
42
|
} = props
|
|
35
43
|
|
|
36
44
|
const [, t] = useLanguage()
|
|
@@ -38,12 +46,27 @@ const WalletsUI = (props: any) => {
|
|
|
38
46
|
const [{ parsePrice }] = useUtils()
|
|
39
47
|
const [{ configs }] = useConfig()
|
|
40
48
|
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
logoStyle: {
|
|
51
|
+
width: 120,
|
|
52
|
+
height: 120,
|
|
53
|
+
borderRadius: 8,
|
|
54
|
+
borderWidth: 1,
|
|
55
|
+
borderColor: theme.colors.border,
|
|
56
|
+
flexDirection: 'column',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
41
62
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
42
63
|
|
|
43
64
|
const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
44
65
|
|
|
45
66
|
const currentWalletSelected = (walletList.wallets?.length > 0 && walletList.wallets?.find((w: any) => w.type === tabSelected)) ?? null
|
|
46
67
|
|
|
68
|
+
const loyaltyLevel = Object.keys(userLoyaltyLevel.loyaltyLevel ?? {}).length > 0 && userLoyaltyLevel.loyaltyLevel
|
|
69
|
+
|
|
47
70
|
const walletName: any = {
|
|
48
71
|
cash: {
|
|
49
72
|
name: t('CASH_WALLET', 'Cash Wallet'),
|
|
@@ -74,6 +97,13 @@ const WalletsUI = (props: any) => {
|
|
|
74
97
|
}
|
|
75
98
|
}, [configs])
|
|
76
99
|
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if(refreshWallets){
|
|
102
|
+
getWallets()
|
|
103
|
+
setRefreshWallets && setRefreshWallets(false)
|
|
104
|
+
}
|
|
105
|
+
}, [refreshWallets])
|
|
106
|
+
|
|
77
107
|
return (
|
|
78
108
|
<Container>
|
|
79
109
|
<NavBar
|
|
@@ -86,18 +116,22 @@ const WalletsUI = (props: any) => {
|
|
|
86
116
|
/>
|
|
87
117
|
|
|
88
118
|
{!walletList.loading &&
|
|
119
|
+
!userLoyaltyLevel.loading &&
|
|
89
120
|
!walletList.error &&
|
|
90
121
|
walletList.wallets?.length > 0 &&
|
|
91
122
|
(
|
|
92
123
|
<>
|
|
93
|
-
<OTabs
|
|
124
|
+
<OTabs
|
|
125
|
+
horizontal
|
|
126
|
+
showsHorizontalScrollIndicator={false}
|
|
127
|
+
>
|
|
94
128
|
{walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
|
|
95
129
|
<Pressable
|
|
96
130
|
key={wallet.id}
|
|
97
131
|
onPress={() => handleChangeTab(wallet)}
|
|
98
132
|
>
|
|
99
|
-
<OTab>
|
|
100
|
-
<OText size={18}
|
|
133
|
+
<OTab isSelected={tabSelected === wallet.type}>
|
|
134
|
+
<OText size={18}>
|
|
101
135
|
{walletName[wallet.type]?.name}
|
|
102
136
|
</OText>
|
|
103
137
|
</OTab>
|
|
@@ -106,6 +140,39 @@ const WalletsUI = (props: any) => {
|
|
|
106
140
|
</OTabs>
|
|
107
141
|
|
|
108
142
|
<SectionContent>
|
|
143
|
+
{!!loyaltyLevel && (
|
|
144
|
+
<LoyaltyContent>
|
|
145
|
+
<LoyaltyWrapp>
|
|
146
|
+
<OText size={20}>
|
|
147
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
|
|
148
|
+
</OText>
|
|
149
|
+
{loyaltyLevel.image ? (
|
|
150
|
+
<FastImage
|
|
151
|
+
style={styles.logoStyle}
|
|
152
|
+
source={{
|
|
153
|
+
uri: loyaltyLevel.image,
|
|
154
|
+
priority: FastImage.priority.high,
|
|
155
|
+
cache:FastImage.cacheControl.web
|
|
156
|
+
}}
|
|
157
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
158
|
+
/>
|
|
159
|
+
) : (
|
|
160
|
+
<LoyaltyImg
|
|
161
|
+
source={theme.images.dummies.loyaltyLevel}
|
|
162
|
+
resizeMode='contain'
|
|
163
|
+
/>
|
|
164
|
+
)}
|
|
165
|
+
<OText
|
|
166
|
+
size={22}
|
|
167
|
+
weight='bold'
|
|
168
|
+
style={{ textTransform: 'uppercase' }}
|
|
169
|
+
color={theme.colors.primary}
|
|
170
|
+
>
|
|
171
|
+
{loyaltyLevel.name}
|
|
172
|
+
</OText>
|
|
173
|
+
</LoyaltyWrapp>
|
|
174
|
+
</LoyaltyContent>
|
|
175
|
+
)}
|
|
109
176
|
<BalanceElement>
|
|
110
177
|
<OText size={20} style={{fontWeight: '600'}}>
|
|
111
178
|
{currentWalletSelected?.type === 'cash'
|
|
@@ -172,7 +239,7 @@ const WalletsUI = (props: any) => {
|
|
|
172
239
|
</>
|
|
173
240
|
)}
|
|
174
241
|
|
|
175
|
-
{walletList?.loading && (
|
|
242
|
+
{(walletList?.loading || userLoyaltyLevel.loading) && (
|
|
176
243
|
<>
|
|
177
244
|
<View>
|
|
178
245
|
<Placeholder Animation={Fade}>
|
|
@@ -196,7 +263,7 @@ const WalletsUI = (props: any) => {
|
|
|
196
263
|
</>
|
|
197
264
|
)}
|
|
198
265
|
|
|
199
|
-
{!walletList?.loading && (walletList?.error || !walletList?.wallets?.length) && (
|
|
266
|
+
{!walletList?.loading && !userLoyaltyLevel.loading && (walletList?.error || !walletList?.wallets?.length) && (
|
|
200
267
|
<NotFoundSource
|
|
201
268
|
content={walletList?.error
|
|
202
269
|
? t('ERROR_NOT_FOUND_WALLETS', 'Sorry, an error has occurred')
|
|
@@ -41,3 +41,24 @@ export const OTabs = styled.View`
|
|
|
41
41
|
export const OTab = styled.View`
|
|
42
42
|
padding-horizontal: 10px;
|
|
43
43
|
`;
|
|
44
|
+
|
|
45
|
+
export const LoyaltyContent = styled.View`
|
|
46
|
+
width: 100%;
|
|
47
|
+
margin-bottom: 20px;
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export const LoyaltyWrapp = styled.View`
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
`
|
|
55
|
+
|
|
56
|
+
export const LoyaltyImg = styled.ImageBackground`
|
|
57
|
+
position: relative;
|
|
58
|
+
height: 150px;
|
|
59
|
+
width: 100%;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
`
|
|
@@ -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;
|
|
@@ -37,6 +39,8 @@ export interface ProfileParams {
|
|
|
37
39
|
verifyPhoneState?: any;
|
|
38
40
|
setCheckPhoneCodeState?: any;
|
|
39
41
|
isVerifiedPhone?: any;
|
|
42
|
+
handleRemoveAccount?: any;
|
|
43
|
+
removeAccountState?: any;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
export interface AddressListParams {
|
|
@@ -55,6 +59,7 @@ export interface AddressListParams {
|
|
|
55
59
|
isFromProductsList?: boolean;
|
|
56
60
|
afterSignup?: boolean;
|
|
57
61
|
isFromCheckout?: boolean
|
|
62
|
+
loadAddresses: () => void
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
export interface AddressFormParams {
|
|
@@ -100,6 +105,8 @@ export interface SignupParams {
|
|
|
100
105
|
handleCheckPhoneCode?: any;
|
|
101
106
|
notificationState?: any;
|
|
102
107
|
handleChangePromotions: () => void;
|
|
108
|
+
enableReCaptcha?: boolean;
|
|
109
|
+
handleReCaptcha?: () => void;
|
|
103
110
|
}
|
|
104
111
|
|
|
105
112
|
export interface PhoneInputParams {
|
|
@@ -116,6 +123,7 @@ export interface PhoneInputParams {
|
|
|
116
123
|
flagStyle?: any;
|
|
117
124
|
isDisabled?: any;
|
|
118
125
|
isStartValidation?: any;
|
|
126
|
+
changeCountry?: any;
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
export interface LanguageSelectorParams {
|
|
@@ -157,7 +165,7 @@ export interface BusinessTypeFilterParams {
|
|
|
157
165
|
setBusinessTypes?: any
|
|
158
166
|
}
|
|
159
167
|
export interface BusinessControllerParams {
|
|
160
|
-
key?: number;
|
|
168
|
+
key?: string | number;
|
|
161
169
|
business?: any;
|
|
162
170
|
handleCustomClick?: any;
|
|
163
171
|
orderType?: any;
|
|
@@ -166,7 +174,15 @@ export interface BusinessControllerParams {
|
|
|
166
174
|
businessWillCloseSoonMinutes?: number
|
|
167
175
|
isBusinessClose?: number,
|
|
168
176
|
navigation?: any,
|
|
169
|
-
style?: ViewStyle
|
|
177
|
+
style?: ViewStyle,
|
|
178
|
+
businessHeader?: string,
|
|
179
|
+
businessFeatured?: boolean,
|
|
180
|
+
businessLogo?: string,
|
|
181
|
+
businessReviews?: any,
|
|
182
|
+
businessDeliveryPrice?: number,
|
|
183
|
+
businessDeliveryTime?: string,
|
|
184
|
+
businessPickupTime?: string,
|
|
185
|
+
businessDistance?: number
|
|
170
186
|
}
|
|
171
187
|
export interface BusinessProductsListingParams {
|
|
172
188
|
navigation?: any;
|
|
@@ -214,6 +230,7 @@ export interface BusinessProductsCategoriesParams {
|
|
|
214
230
|
}
|
|
215
231
|
export interface BusinessProductsListParams {
|
|
216
232
|
errors?: any;
|
|
233
|
+
isFiltMode?: any;
|
|
217
234
|
businessId?: number;
|
|
218
235
|
category?: any;
|
|
219
236
|
categories: Array<any>;
|
|
@@ -228,7 +245,12 @@ export interface BusinessProductsListParams {
|
|
|
228
245
|
handleCancelSearch?: () => void,
|
|
229
246
|
categoriesLayout?: any,
|
|
230
247
|
setCategoriesLayout?: any,
|
|
231
|
-
currentCart?: any
|
|
248
|
+
currentCart?: any,
|
|
249
|
+
setSubcategoriesSelected?: any,
|
|
250
|
+
subcategoriesSelected?: any,
|
|
251
|
+
onClickCategory?: any,
|
|
252
|
+
lazyLoadProductsRecommended?: boolean,
|
|
253
|
+
isFiltMode?: boolean
|
|
232
254
|
}
|
|
233
255
|
export interface SingleProductCardParams {
|
|
234
256
|
businessId: any,
|
|
@@ -284,7 +306,9 @@ export interface OrdersOptionParams {
|
|
|
284
306
|
ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
|
|
285
307
|
setSelectedOrderId?: any,
|
|
286
308
|
setOpenMessges?: any,
|
|
287
|
-
loadMoreStatus?: boolean
|
|
309
|
+
loadMoreStatus?: boolean,
|
|
310
|
+
refreshOrders?: boolean,
|
|
311
|
+
setRefreshOrders?: (value : boolean) => void
|
|
288
312
|
}
|
|
289
313
|
export interface ActiveOrdersParams {
|
|
290
314
|
orders?: any,
|
|
@@ -470,6 +494,7 @@ export interface OrderTypeSelectParams {
|
|
|
470
494
|
defaultValue?: number;
|
|
471
495
|
configTypes?: Array<any>;
|
|
472
496
|
orderTypes: Array<any>;
|
|
497
|
+
setOrderTypeValue?: (value : number) => any
|
|
473
498
|
}
|
|
474
499
|
export interface UpsellingProductsParams {
|
|
475
500
|
isCustomMode?: boolean;
|
|
@@ -558,3 +583,20 @@ export interface PlaceSpotParams {
|
|
|
558
583
|
getPlacesList?: any,
|
|
559
584
|
setOpenPlaceModal?: any
|
|
560
585
|
}
|
|
586
|
+
|
|
587
|
+
export interface PromotionParams {
|
|
588
|
+
navigation: any,
|
|
589
|
+
offersState: any,
|
|
590
|
+
handleSearchValue: any,
|
|
591
|
+
searchValue: string,
|
|
592
|
+
offerSelected: any,
|
|
593
|
+
setOfferSelected: any,
|
|
594
|
+
loadOffers: any
|
|
595
|
+
}
|
|
596
|
+
export interface SessionsParams {
|
|
597
|
+
navigation: any,
|
|
598
|
+
sessionsList: any,
|
|
599
|
+
actionState: any,
|
|
600
|
+
handleDeleteSession: any,
|
|
601
|
+
handleDeleteAllSessions: any
|
|
602
|
+
}
|
|
@@ -33,7 +33,8 @@ export const getTraduction = (key: string) => {
|
|
|
33
33
|
ERROR_PLACE_PAY_WITH_CARD1: 'An error occurred while trying to pay by card',
|
|
34
34
|
ERROR_PLACE_PAY_WITH_PAYPAL_CAPTURE: 'An error occurred while trying to pay by PayPal',
|
|
35
35
|
ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
|
|
36
|
-
ERROR_PRODUCT_NOT_FOUND: 'Error with the product'
|
|
36
|
+
ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
|
|
37
|
+
ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
return keyList[key] ? t(key, keyList[key]) : t(key)
|
|
@@ -170,6 +171,15 @@ export const getTypesText = (value: number) => {
|
|
|
170
171
|
return ret?.content;
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
/**
|
|
175
|
+
* List shape for ribbon
|
|
176
|
+
*/
|
|
177
|
+
export const shape = {
|
|
178
|
+
rectangle: 'rectangle',
|
|
179
|
+
rectangleRound: 'rectangle_round',
|
|
180
|
+
capsuleShape: 'capsule_shape'
|
|
181
|
+
}
|
|
182
|
+
|
|
173
183
|
/**
|
|
174
184
|
* Function to transform degree to radian
|
|
175
185
|
* @param {number} value for transform
|
|
@@ -202,4 +212,4 @@ export const formatUrlVideo = (url : string) => {
|
|
|
202
212
|
const match = url.match(regExp)
|
|
203
213
|
const id = (match && match[7].length === 11) ? match[7] : false
|
|
204
214
|
return `https://www.youtube-nocookie.com/embed/${id}`
|
|
205
|
-
}
|
|
215
|
+
}
|
|
@@ -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}
|
|
@@ -58,7 +58,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
58
58
|
btnStyle={{ paddingLeft: 0 }}
|
|
59
59
|
paddingTop={0}
|
|
60
60
|
style={{ paddingBottom: 0 }}
|
|
61
|
-
title={t('
|
|
61
|
+
title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
|
|
62
62
|
titleAlign={'center'}
|
|
63
63
|
titleStyle={{ fontSize: 14 }}
|
|
64
64
|
/>
|
|
@@ -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}>
|