ordering-ui-react-native 0.15.37 → 0.15.38-test
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 +3 -2
- package/src/components/BusinessTypeFilter/index.tsx +4 -1
- package/src/components/LanguageSelector/index.tsx +1 -0
- package/src/components/OrderDetails/index.tsx +2 -2
- package/src/components/PaymentOptions/index.tsx +2 -2
- package/src/components/StripeMethodForm/index.tsx +22 -21
- package/src/pages/BusinessProductsList.tsx +1 -0
- package/src/pages/BusinessesListing.tsx +1 -1
- 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/Delivery.tsx +9 -9
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +152 -91
- package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +51 -48
- package/themes/business/src/components/OrdersOption/index.tsx +52 -48
- package/themes/business/src/components/PreviousOrders/index.tsx +50 -14
- package/themes/kiosk/src/components/Cart/index.tsx +99 -25
- package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
- package/themes/kiosk/src/components/OrderDetails/index.tsx +134 -39
- package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
- package/themes/kiosk/src/components/ProductForm/index.tsx +2 -2
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +165 -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/AppleLogin/index.tsx +118 -77
- 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 +28 -9
- 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 +126 -21
- package/themes/original/src/components/BusinessProductsList/styles.tsx +32 -2
- package/themes/original/src/components/BusinessProductsListing/index.tsx +12 -5
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
- package/themes/original/src/components/BusinessesListing/index.tsx +1 -2
- package/themes/original/src/components/Cart/index.tsx +1 -3
- package/themes/original/src/components/CartContent/index.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +2 -1
- package/themes/original/src/components/Home/index.tsx +1 -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/LogoutButton/index.tsx +7 -1
- package/themes/original/src/components/Messages/index.tsx +5 -0
- 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 +1 -3
- package/themes/original/src/components/OrderProgress/index.tsx +3 -3
- 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/PaymentOptionWallet/index.tsx +6 -2
- package/themes/original/src/components/PaymentOptions/index.tsx +3 -1
- package/themes/original/src/components/PhoneInputNumber/index.tsx +10 -4
- package/themes/original/src/components/PreviousOrders/index.tsx +14 -12
- package/themes/original/src/components/ProductForm/index.tsx +4 -4
- package/themes/original/src/components/Promotions/index.tsx +232 -0
- package/themes/original/src/components/Promotions/styles.tsx +80 -0
- package/themes/original/src/components/SignupForm/index.tsx +109 -13
- package/themes/original/src/components/SingleProductCard/index.tsx +39 -18
- package/themes/original/src/components/SingleProductCard/styles.tsx +28 -1
- package/themes/original/src/components/TaxInformation/index.tsx +10 -4
- package/themes/original/src/components/UserFormDetails/index.tsx +13 -2
- package/themes/original/src/components/UserProfile/index.tsx +53 -8
- package/themes/original/src/components/Wallets/index.tsx +57 -3
- 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 +21 -1
- package/themes/original/src/utils/index.tsx +9 -0
- package/themes/single-business/src/components/AddressList/index.tsx +1 -1
- package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
|
@@ -27,7 +27,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
27
27
|
hideUpdateButton,
|
|
28
28
|
setWillVerifyOtpState,
|
|
29
29
|
isVerifiedPhone,
|
|
30
|
-
handleChangePromotions
|
|
30
|
+
handleChangePromotions,
|
|
31
31
|
} = props;
|
|
32
32
|
|
|
33
33
|
const theme = useTheme();
|
|
@@ -182,6 +182,16 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
182
182
|
handleChangeInput(phoneNumber, true);
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
+
const changeCountry = (country : any) => {
|
|
186
|
+
let countryCode = {
|
|
187
|
+
country_code: {
|
|
188
|
+
name: 'country_code',
|
|
189
|
+
value: country.cca2
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
handleChangeInput(countryCode, true);
|
|
193
|
+
}
|
|
194
|
+
|
|
185
195
|
useEffect(() => {
|
|
186
196
|
if (Object.keys(errors).length > 0) {
|
|
187
197
|
const list = Object.values(errors);
|
|
@@ -315,8 +325,9 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
315
325
|
<PhoneInputNumber
|
|
316
326
|
data={phoneInputData}
|
|
317
327
|
handleData={(val: any) => handleChangePhoneNumber(val)}
|
|
328
|
+
changeCountry={(val : any) => changeCountry(val)}
|
|
318
329
|
defaultValue={phoneUpdate ? '' : user?.cellphone}
|
|
319
|
-
defaultCode={user?.country_phone_code
|
|
330
|
+
defaultCode={user?.country_code ?? user?.country_phone_code ?? null}
|
|
320
331
|
boxStyle={styles.phoneSelect}
|
|
321
332
|
inputStyle={styles.phoneInputStyle}
|
|
322
333
|
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
UserFormDetails as UserProfileController,
|
|
4
4
|
useSession,
|
|
@@ -16,7 +16,9 @@ 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 MaterialIcons from 'react-native-vector-icons/MaterialIcons'
|
|
19
20
|
import FastImage from 'react-native-fast-image'
|
|
21
|
+
import { OAlert } from '../../../../../src/components/shared'
|
|
20
22
|
|
|
21
23
|
import {
|
|
22
24
|
OIcon,
|
|
@@ -34,7 +36,9 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
34
36
|
const ProfileListUI = (props: ProfileParams) => {
|
|
35
37
|
const {
|
|
36
38
|
navigation,
|
|
37
|
-
formState
|
|
39
|
+
formState,
|
|
40
|
+
handleRemoveAccount,
|
|
41
|
+
removeAccountState
|
|
38
42
|
} = props;
|
|
39
43
|
|
|
40
44
|
const theme = useTheme();
|
|
@@ -91,17 +95,21 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
91
95
|
});
|
|
92
96
|
|
|
93
97
|
|
|
94
|
-
const [{ user }] = useSession();
|
|
98
|
+
const [{ user }, { logout }] = useSession();
|
|
95
99
|
const [, t] = useLanguage();
|
|
96
100
|
const [{ configs }] = useConfig();
|
|
97
101
|
const [, { showToast }] = useToast();
|
|
98
102
|
const { errors } = useForm();
|
|
99
103
|
|
|
104
|
+
const isAdmin = user?.level === 0
|
|
105
|
+
|
|
100
106
|
const { height } = useWindowDimensions();
|
|
101
107
|
const { top, bottom } = useSafeAreaInsets();
|
|
102
108
|
|
|
103
|
-
const
|
|
109
|
+
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
104
110
|
|
|
111
|
+
const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
|
|
112
|
+
const IsPromotionsEnabled = configs?.advanced_offers_module === '1' || configs?.advanced_offers_module === 'true'
|
|
105
113
|
const onRedirect = (route: string, params?: any) => {
|
|
106
114
|
navigation.navigate(route, params)
|
|
107
115
|
}
|
|
@@ -135,11 +143,29 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
135
143
|
onNavigationRedirect: (route: string, params: any) => props.navigation.navigate(route, params)
|
|
136
144
|
}
|
|
137
145
|
|
|
146
|
+
const onRemoveAccount = () => {
|
|
147
|
+
setConfirm({
|
|
148
|
+
open: true,
|
|
149
|
+
content: [t('QUESTION_REMOVE_ACCOUNT', 'Are you sure that you want to remove your account?')],
|
|
150
|
+
title: t('ACCOUNT_ALERT', 'Account alert'),
|
|
151
|
+
handleOnAccept: () => {
|
|
152
|
+
setConfirm({ ...confirm, open: false })
|
|
153
|
+
handleRemoveAccount && handleRemoveAccount(user?.id)
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
if (removeAccountState?.result === 'OK') {
|
|
160
|
+
logout()
|
|
161
|
+
}
|
|
162
|
+
}, [removeAccountState])
|
|
163
|
+
|
|
138
164
|
return (
|
|
139
|
-
<View style={{ flex: 1, height: height - top - bottom - 62 }}>
|
|
140
|
-
<OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
165
|
+
<View style={{ flex: 1, height: height - top - bottom - 62, paddingTop: 20 }}>
|
|
166
|
+
{/* <OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
141
167
|
{t('PROFILE', 'Profile')}
|
|
142
|
-
</OText>
|
|
168
|
+
</OText> */}
|
|
143
169
|
<CenterView style={styles.pagePadding}>
|
|
144
170
|
{user?.photo && (
|
|
145
171
|
<View style={styles.photo}>
|
|
@@ -166,7 +192,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
166
192
|
<Actions>
|
|
167
193
|
<ListItem onPress={() => onRedirect('AddressList', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
168
194
|
<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('
|
|
195
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('SAVED_PLACES', 'My saved places')}</OText>
|
|
170
196
|
</ListItem>
|
|
171
197
|
<ListItem onPress={() => onRedirect('Messages', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
172
198
|
<MessageCircle name='message1' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
@@ -178,6 +204,12 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
178
204
|
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('WALLETS', 'Wallets')}</OText>
|
|
179
205
|
</ListItem>
|
|
180
206
|
)}
|
|
207
|
+
{IsPromotionsEnabled && (
|
|
208
|
+
<ListItem onPress={() => onRedirect('Promotions', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
209
|
+
<MaterialIcons name='local-offer' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
210
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('PROMOTIONS', 'Promotions')}</OText>
|
|
211
|
+
</ListItem>
|
|
212
|
+
)}
|
|
181
213
|
<ListItem onPress={() => navigation.navigate('Help', {})} activeOpacity={0.7}>
|
|
182
214
|
<OIcon src={theme.images.general.ic_help} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
183
215
|
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('HELP', 'Help')}</OText>
|
|
@@ -188,8 +220,21 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
188
220
|
<LanguageSelector iconColor={theme.colors.textNormal} pickerStyle={langPickerStyle} />
|
|
189
221
|
<View style={{ height: 17 }} />
|
|
190
222
|
<LogoutButton color={theme.colors.textNormal} text={t('LOGOUT', 'Logout')} />
|
|
223
|
+
<View style={{ height: 17 }} />
|
|
224
|
+
<ListItem disabled={isAdmin} onPress={() => onRemoveAccount()} activeOpacity={0.7}>
|
|
225
|
+
<OIcon src={theme.images.general.user} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
226
|
+
<OText size={14} lineHeight={24} weight={'400'} style={{ opacity: isAdmin ? 0.5 : 1 }} color={theme.colors.danger5}>{t('REMOVE_ACCOUNT', 'Remove account')}</OText>
|
|
227
|
+
</ListItem>
|
|
191
228
|
</Actions>
|
|
192
229
|
</ListWrap>
|
|
230
|
+
<OAlert
|
|
231
|
+
open={confirm.open}
|
|
232
|
+
title={confirm.title}
|
|
233
|
+
content={confirm.content}
|
|
234
|
+
onAccept={confirm.handleOnAccept}
|
|
235
|
+
onCancel={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
236
|
+
onClose={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
237
|
+
/>
|
|
193
238
|
</View>
|
|
194
239
|
);
|
|
195
240
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
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,
|
|
8
9
|
useUtils,
|
|
9
|
-
useConfig
|
|
10
|
+
useConfig,
|
|
11
|
+
useSession
|
|
10
12
|
} from 'ordering-components/native'
|
|
11
13
|
|
|
12
14
|
import {
|
|
@@ -15,7 +17,10 @@ import {
|
|
|
15
17
|
TransactionsWrapper,
|
|
16
18
|
OTabs,
|
|
17
19
|
OTab,
|
|
18
|
-
SectionContent
|
|
20
|
+
SectionContent,
|
|
21
|
+
LoyaltyContent,
|
|
22
|
+
LoyaltyWrapp,
|
|
23
|
+
LoyaltyImg
|
|
19
24
|
} from './styles'
|
|
20
25
|
|
|
21
26
|
import NavBar from '../NavBar'
|
|
@@ -34,16 +39,32 @@ const WalletsUI = (props: any) => {
|
|
|
34
39
|
} = props
|
|
35
40
|
|
|
36
41
|
const [, t] = useLanguage()
|
|
42
|
+
const [{ user }] = useSession()
|
|
37
43
|
const theme = useTheme()
|
|
38
44
|
const [{ parsePrice }] = useUtils()
|
|
39
45
|
const [{ configs }] = useConfig()
|
|
40
46
|
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
logoStyle: {
|
|
49
|
+
width: 120,
|
|
50
|
+
height: 120,
|
|
51
|
+
borderRadius: 8,
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderColor: theme.colors.border,
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
41
60
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
42
61
|
|
|
43
62
|
const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
44
63
|
|
|
45
64
|
const currentWalletSelected = (walletList.wallets?.length > 0 && walletList.wallets?.find((w: any) => w.type === tabSelected)) ?? null
|
|
46
65
|
|
|
66
|
+
const loyaltyLevel = Object.keys(user?.loyalty_level).length > 0 && user?.loyalty_level
|
|
67
|
+
|
|
47
68
|
const walletName: any = {
|
|
48
69
|
cash: {
|
|
49
70
|
name: t('CASH_WALLET', 'Cash Wallet'),
|
|
@@ -106,6 +127,39 @@ const WalletsUI = (props: any) => {
|
|
|
106
127
|
</OTabs>
|
|
107
128
|
|
|
108
129
|
<SectionContent>
|
|
130
|
+
{!!loyaltyLevel && (
|
|
131
|
+
<LoyaltyContent>
|
|
132
|
+
<LoyaltyWrapp>
|
|
133
|
+
<OText size={20}>
|
|
134
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
|
|
135
|
+
</OText>
|
|
136
|
+
{loyaltyLevel.image ? (
|
|
137
|
+
<FastImage
|
|
138
|
+
style={styles.logoStyle}
|
|
139
|
+
source={{
|
|
140
|
+
uri: loyaltyLevel.image,
|
|
141
|
+
priority: FastImage.priority.high,
|
|
142
|
+
cache:FastImage.cacheControl.web
|
|
143
|
+
}}
|
|
144
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
145
|
+
/>
|
|
146
|
+
) : (
|
|
147
|
+
<LoyaltyImg
|
|
148
|
+
source={theme.images.dummies.loyaltyLevel}
|
|
149
|
+
resizeMode='contain'
|
|
150
|
+
/>
|
|
151
|
+
)}
|
|
152
|
+
<OText
|
|
153
|
+
size={22}
|
|
154
|
+
weight='bold'
|
|
155
|
+
style={{ textTransform: 'uppercase' }}
|
|
156
|
+
color={theme.colors.primary}
|
|
157
|
+
>
|
|
158
|
+
{loyaltyLevel.name}
|
|
159
|
+
</OText>
|
|
160
|
+
</LoyaltyWrapp>
|
|
161
|
+
</LoyaltyContent>
|
|
162
|
+
)}
|
|
109
163
|
<BalanceElement>
|
|
110
164
|
<OText size={20} style={{fontWeight: '600'}}>
|
|
111
165
|
{currentWalletSelected?.type === 'cash'
|
|
@@ -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 {
|
|
@@ -100,6 +104,8 @@ export interface SignupParams {
|
|
|
100
104
|
handleCheckPhoneCode?: any;
|
|
101
105
|
notificationState?: any;
|
|
102
106
|
handleChangePromotions: () => void;
|
|
107
|
+
enableReCaptcha?: boolean;
|
|
108
|
+
handleReCaptcha?: () => void;
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
export interface PhoneInputParams {
|
|
@@ -116,6 +122,7 @@ export interface PhoneInputParams {
|
|
|
116
122
|
flagStyle?: any;
|
|
117
123
|
isDisabled?: any;
|
|
118
124
|
isStartValidation?: any;
|
|
125
|
+
changeCountry?: any;
|
|
119
126
|
}
|
|
120
127
|
|
|
121
128
|
export interface LanguageSelectorParams {
|
|
@@ -236,7 +243,11 @@ export interface BusinessProductsListParams {
|
|
|
236
243
|
handleCancelSearch?: () => void,
|
|
237
244
|
categoriesLayout?: any,
|
|
238
245
|
setCategoriesLayout?: any,
|
|
239
|
-
currentCart?: any
|
|
246
|
+
currentCart?: any,
|
|
247
|
+
setSubcategoriesSelected?: any,
|
|
248
|
+
subcategoriesSelected?: any,
|
|
249
|
+
onClickCategory?: any,
|
|
250
|
+
lazyLoadProductsRecommended?: boolean
|
|
240
251
|
}
|
|
241
252
|
export interface SingleProductCardParams {
|
|
242
253
|
businessId: any,
|
|
@@ -566,3 +577,12 @@ export interface PlaceSpotParams {
|
|
|
566
577
|
getPlacesList?: any,
|
|
567
578
|
setOpenPlaceModal?: any
|
|
568
579
|
}
|
|
580
|
+
|
|
581
|
+
export interface PromotionParams {
|
|
582
|
+
navigation: any,
|
|
583
|
+
offersState: any,
|
|
584
|
+
handleSearchValue: any,
|
|
585
|
+
searchValue: string,
|
|
586
|
+
offerSelected: any,
|
|
587
|
+
setOfferSelected: any,
|
|
588
|
+
}
|
|
@@ -170,6 +170,15 @@ export const getTypesText = (value: number) => {
|
|
|
170
170
|
return ret?.content;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* List shape for ribbon
|
|
175
|
+
*/
|
|
176
|
+
export const shape = {
|
|
177
|
+
rectangle: 'rectangle',
|
|
178
|
+
rectangleRound: 'rectangle_round',
|
|
179
|
+
capsuleShape: 'capsule_shape'
|
|
180
|
+
}
|
|
181
|
+
|
|
173
182
|
/**
|
|
174
183
|
* Function to transform degree to radian
|
|
175
184
|
* @param {number} value for transform
|
|
@@ -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}
|
|
@@ -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 }} />
|