ordering-ui-react-native 0.15.35 → 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.
Files changed (79) hide show
  1. package/package.json +3 -2
  2. package/src/components/BusinessTypeFilter/index.tsx +4 -1
  3. package/src/components/LanguageSelector/index.tsx +1 -0
  4. package/src/components/OrderDetails/index.tsx +2 -2
  5. package/src/components/PaymentOptions/index.tsx +2 -2
  6. package/src/components/StripeMethodForm/index.tsx +22 -21
  7. package/src/pages/BusinessProductsList.tsx +1 -0
  8. package/src/pages/BusinessesListing.tsx +1 -1
  9. package/themes/business/src/components/Home/index.tsx +128 -55
  10. package/themes/business/src/components/Home/styles.tsx +8 -1
  11. package/themes/business/src/components/NewOrderNotification/index.tsx +59 -98
  12. package/themes/business/src/components/OrderDetails/Delivery.tsx +9 -9
  13. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +152 -91
  14. package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
  15. package/themes/business/src/components/OrdersListManager/index.tsx +51 -48
  16. package/themes/business/src/components/OrdersOption/index.tsx +52 -48
  17. package/themes/business/src/components/PreviousOrders/index.tsx +50 -14
  18. package/themes/kiosk/src/components/Cart/index.tsx +99 -25
  19. package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
  20. package/themes/kiosk/src/components/OrderDetails/index.tsx +134 -39
  21. package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
  22. package/themes/kiosk/src/components/ProductForm/index.tsx +2 -2
  23. package/themes/kiosk/src/types/index.d.ts +2 -0
  24. package/themes/original/index.tsx +176 -1
  25. package/themes/original/src/components/AddressForm/index.tsx +15 -10
  26. package/themes/original/src/components/AddressList/index.tsx +28 -2
  27. package/themes/original/src/components/AppleLogin/index.tsx +118 -77
  28. package/themes/original/src/components/BusinessBasicInformation/index.tsx +96 -45
  29. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
  30. package/themes/original/src/components/BusinessController/index.tsx +28 -6
  31. package/themes/original/src/components/BusinessController/styles.tsx +22 -0
  32. package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
  33. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
  34. package/themes/original/src/components/BusinessListingSearch/index.tsx +4 -0
  35. package/themes/original/src/components/BusinessMenuList/index.tsx +11 -4
  36. package/themes/original/src/components/BusinessPreorder/index.tsx +141 -121
  37. package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
  38. package/themes/original/src/components/BusinessProductsList/index.tsx +126 -21
  39. package/themes/original/src/components/BusinessProductsList/styles.tsx +32 -2
  40. package/themes/original/src/components/BusinessProductsListing/index.tsx +27 -6
  41. package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
  42. package/themes/original/src/components/BusinessesListing/index.tsx +23 -22
  43. package/themes/original/src/components/Cart/index.tsx +1 -3
  44. package/themes/original/src/components/CartContent/index.tsx +2 -2
  45. package/themes/original/src/components/Checkout/index.tsx +2 -1
  46. package/themes/original/src/components/Home/index.tsx +1 -1
  47. package/themes/original/src/components/LoginForm/index.tsx +73 -2
  48. package/themes/original/src/components/LoginForm/styles.tsx +6 -1
  49. package/themes/original/src/components/LogoutButton/index.tsx +7 -1
  50. package/themes/original/src/components/Messages/index.tsx +5 -0
  51. package/themes/original/src/components/Messages/styles.tsx +1 -3
  52. package/themes/original/src/components/MomentOption/index.tsx +10 -1
  53. package/themes/original/src/components/MomentOption/styles.tsx +1 -1
  54. package/themes/original/src/components/OrderDetails/index.tsx +11 -5
  55. package/themes/original/src/components/OrderProgress/index.tsx +3 -3
  56. package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
  57. package/themes/original/src/components/OrderSummary/index.tsx +2 -2
  58. package/themes/original/src/components/PaymentOptionWallet/index.tsx +6 -2
  59. package/themes/original/src/components/PaymentOptions/index.tsx +3 -1
  60. package/themes/original/src/components/PhoneInputNumber/index.tsx +10 -4
  61. package/themes/original/src/components/PreviousOrders/index.tsx +14 -12
  62. package/themes/original/src/components/ProductForm/index.tsx +20 -13
  63. package/themes/original/src/components/Promotions/index.tsx +232 -0
  64. package/themes/original/src/components/Promotions/styles.tsx +80 -0
  65. package/themes/original/src/components/SignupForm/index.tsx +109 -13
  66. package/themes/original/src/components/SingleProductCard/index.tsx +39 -18
  67. package/themes/original/src/components/SingleProductCard/styles.tsx +28 -1
  68. package/themes/original/src/components/TaxInformation/index.tsx +10 -4
  69. package/themes/original/src/components/UserFormDetails/index.tsx +13 -2
  70. package/themes/original/src/components/UserProfile/index.tsx +53 -8
  71. package/themes/original/src/components/Wallets/index.tsx +57 -3
  72. package/themes/original/src/components/Wallets/styles.tsx +21 -0
  73. package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
  74. package/themes/original/src/components/shared/index.tsx +2 -0
  75. package/themes/original/src/config/constants.tsx +6 -6
  76. package/themes/original/src/types/index.tsx +21 -1
  77. package/themes/original/src/utils/index.tsx +9 -0
  78. package/themes/single-business/src/components/AddressList/index.tsx +1 -1
  79. package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
@@ -1,4 +1,4 @@
1
- import styled from 'styled-components/native'
1
+ import styled, { css } from 'styled-components/native'
2
2
 
3
3
  export const CardContainer = styled.TouchableOpacity`
4
4
  flex: 1;
@@ -31,3 +31,30 @@ export const PricesContainer = styled.View`
31
31
  flex-direction: row;
32
32
  align-items: center;
33
33
  `
34
+
35
+ export const LogoWrapper = styled.View`
36
+ position: relative;
37
+ margin-left: 12px;
38
+ `
39
+
40
+ export const RibbonBox = styled.View`
41
+ position: absolute;
42
+ z-index: 1;
43
+ top: -4px;
44
+ right: -4px;
45
+ background-color: ${(props: any) => props.theme.colors.primary};
46
+ padding: 1px 8px;
47
+ max-width: 60px;
48
+
49
+ ${(props: any) => props.bgColor && css`
50
+ background-color: ${props.bgColor};
51
+ `}
52
+
53
+ ${(props: any) => props.isRoundRect && css`
54
+ border-radius: 7.6px;
55
+ `}
56
+
57
+ ${(props: any) => props.isCapsule && css`
58
+ border-radius: 50px;
59
+ `}
60
+ `
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { useLanguage } from 'ordering-components/native'
2
+ import { useLanguage, useUtils } from 'ordering-components/native'
3
3
  import { SingleProductCard } from '../SingleProductCard'
4
4
  import { TaxInformationContainer, ProductContainer } from './styles'
5
5
  import { OText } from '../shared'
@@ -13,8 +13,9 @@ interface taxInformationParams {
13
13
  fixed?: number,
14
14
  percentage?: number,
15
15
  id: number,
16
- discounts?: any
17
- } | null,
16
+ discounts?: any,
17
+ rate_type?: number
18
+ },
18
19
  products: Array<any>,
19
20
  type: string
20
21
  }
@@ -27,6 +28,7 @@ export const TaxInformation = (props: taxInformationParams) => {
27
28
  } = props
28
29
 
29
30
  const [, t] = useLanguage()
31
+ const [{ parsePrice }] = useUtils()
30
32
 
31
33
  const includedOnPriceString = data?.type === 1 ? `(${t('INCLUDED_ON_PRICE', 'Included on price')})` : `(${t('NOT_INCLUDED_ON_PRICE', 'Not included on price')})`
32
34
  const offersHideArray = ['offer_target_2', 'offer_target_3']
@@ -56,8 +58,12 @@ export const TaxInformation = (props: taxInformationParams) => {
56
58
 
57
59
  return (
58
60
  <TaxInformationContainer>
61
+ <OText size={24} style={{ alignSelf: 'center', textAlign: 'center' }} mBottom={10}>
62
+ {`${data?.name ||
63
+ t('INHERIT_FROM_BUSINESS', 'Inherit from business')} ${data?.rate_type !== 2 ? `(${typeof data?.rate === 'number' ? `${data?.rate}%` : `${parsePrice(data?.fixed ?? 0)} + ${data?.percentage}%`})` : ''} `}
64
+ </OText>
59
65
  {!!data?.description ? (
60
- <OText size={24} style={{ alignSelf: 'center', textAlign: 'center' }} mBottom={10}>
66
+ <OText size={20} style={{ alignSelf: 'center', textAlign: 'center' }} mBottom={10}>
61
67
  {t('DESCRIPTION', 'Description')}: {data?.description} {data?.type && !type?.includes('offer') && includedOnPriceString}
62
68
  </OText>
63
69
  ) : (
@@ -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 || null}
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 isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
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('MY_SAVED_PLACES', 'My saved places')}</OText>
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: 'DELIVERY_DESCRIPTION'
11
+ description: 'ORDERTYPE_DESCRIPTION_DELIVERY'
12
12
  },
13
13
  {
14
14
  value: 2,
15
15
  content: 'PICKUP',
16
- description: 'PICKUP_DESCRIPTION',
16
+ description: 'ORDERTYPE_DESCRIPTION_PICKUP',
17
17
  },
18
18
  {
19
19
  value: 3,
20
20
  content: 'EAT_IN',
21
- description: 'EAT_IN_DESCRIPTION',
21
+ description: 'ORDERTYPE_DESCRIPTION_EATIN',
22
22
  },
23
23
  {
24
24
  value: 4,
25
25
  content: 'CURBSIDE',
26
- description: 'CURBSIDE_DESCRIPTION',
26
+ description: 'ORDERTYPE_DESCRIPTION_CURBSIDE',
27
27
  },
28
28
  {
29
29
  value: 5,
30
30
  content: 'DRIVE_THRU',
31
- description: 'DRIVE_THRU_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('MY_SAVED_PLACES', 'My saved places')}
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('MY_SAVED_PLACES', 'My saved places')}</OText>
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 }} />