ordering-ui-react-native 0.15.17 → 0.15.18-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.
Files changed (152) hide show
  1. package/package.json +5 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessTypeFilter/index.tsx +12 -2
  4. package/src/components/BusinessTypeFilter/styles.tsx +1 -1
  5. package/src/components/BusinessesListing/index.tsx +1 -1
  6. package/src/components/Checkout/index.tsx +0 -1
  7. package/src/components/LanguageSelector/index.tsx +1 -0
  8. package/src/components/OrderDetails/index.tsx +26 -5
  9. package/src/components/PaymentOptions/index.tsx +9 -16
  10. package/src/components/PaymentOptionsWebView/index.tsx +123 -124
  11. package/src/components/ProductForm/index.tsx +1 -1
  12. package/src/components/ProductForm/styles.tsx +1 -0
  13. package/src/components/StripeElementsForm/index.tsx +27 -48
  14. package/src/components/VerifyPhone/styles.tsx +1 -2
  15. package/src/config.json +0 -2
  16. package/src/navigators/HomeNavigator.tsx +6 -0
  17. package/src/pages/BusinessProductsList.tsx +1 -0
  18. package/src/pages/BusinessesListing.tsx +1 -1
  19. package/src/pages/Checkout.tsx +1 -1
  20. package/src/pages/Sessions.tsx +22 -0
  21. package/src/types/index.tsx +1 -9
  22. package/src/utils/index.tsx +68 -1
  23. package/themes/business/index.tsx +2 -0
  24. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +56 -8
  25. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +5 -0
  26. package/themes/business/src/components/Chat/index.tsx +38 -86
  27. package/themes/business/src/components/Home/index.tsx +128 -55
  28. package/themes/business/src/components/Home/styles.tsx +8 -1
  29. package/themes/business/src/components/NewOrderNotification/index.tsx +59 -98
  30. package/themes/business/src/components/OrderDetails/Business.tsx +2 -1
  31. package/themes/business/src/components/OrderDetails/Delivery.tsx +22 -13
  32. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +150 -89
  33. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +91 -17
  34. package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
  35. package/themes/business/src/components/OrdersListManager/index.tsx +874 -0
  36. package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
  37. package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
  38. package/themes/business/src/components/OrdersOption/index.tsx +54 -49
  39. package/themes/business/src/components/PreviousOrders/index.tsx +82 -23
  40. package/themes/business/src/types/index.tsx +2 -1
  41. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  42. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  43. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  44. package/themes/kiosk/src/components/BusinessController/index.tsx +27 -6
  45. package/themes/kiosk/src/components/BusinessController/styles.tsx +1 -1
  46. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +48 -21
  47. package/themes/kiosk/src/components/Cart/index.tsx +98 -24
  48. package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
  49. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
  50. package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
  51. package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
  52. package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
  53. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +6 -5
  54. package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
  55. package/themes/kiosk/src/components/Intro/index.tsx +13 -13
  56. package/themes/kiosk/src/components/LanguageSelector/index.tsx +12 -8
  57. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  58. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  59. package/themes/kiosk/src/components/OrderDetails/index.tsx +136 -41
  60. package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
  61. package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
  62. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
  63. package/themes/kiosk/src/components/ProductForm/index.tsx +174 -125
  64. package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
  65. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
  66. package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
  67. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
  68. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  69. package/themes/kiosk/src/components/shared/OCard.tsx +112 -78
  70. package/themes/kiosk/src/types/index.d.ts +2 -0
  71. package/themes/original/index.tsx +179 -0
  72. package/themes/original/src/components/AddressForm/index.tsx +15 -10
  73. package/themes/original/src/components/AddressList/index.tsx +56 -18
  74. package/themes/original/src/components/AppleLogin/index.tsx +117 -78
  75. package/themes/original/src/components/BusinessBasicInformation/index.tsx +96 -45
  76. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
  77. package/themes/original/src/components/BusinessController/index.tsx +52 -22
  78. package/themes/original/src/components/BusinessController/styles.tsx +22 -0
  79. package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
  80. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
  81. package/themes/original/src/components/BusinessListingSearch/index.tsx +4 -0
  82. package/themes/original/src/components/BusinessMenuList/index.tsx +11 -4
  83. package/themes/original/src/components/BusinessPreorder/index.tsx +141 -121
  84. package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
  85. package/themes/original/src/components/BusinessProductsList/index.tsx +129 -22
  86. package/themes/original/src/components/BusinessProductsList/styles.tsx +29 -2
  87. package/themes/original/src/components/BusinessProductsListing/index.tsx +92 -37
  88. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
  89. package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
  90. package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
  91. package/themes/original/src/components/BusinessesListing/index.tsx +48 -57
  92. package/themes/original/src/components/Cart/index.tsx +18 -14
  93. package/themes/original/src/components/CartContent/index.tsx +2 -2
  94. package/themes/original/src/components/Checkout/index.tsx +42 -27
  95. package/themes/original/src/components/CouponControl/index.tsx +1 -0
  96. package/themes/original/src/components/DriverTips/index.tsx +1 -1
  97. package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
  98. package/themes/original/src/components/Help/index.tsx +21 -4
  99. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
  100. package/themes/original/src/components/Home/index.tsx +1 -1
  101. package/themes/original/src/components/LastOrders/index.tsx +12 -1
  102. package/themes/original/src/components/LoginForm/index.tsx +73 -2
  103. package/themes/original/src/components/LoginForm/styles.tsx +6 -1
  104. package/themes/original/src/components/MessageListing/index.tsx +10 -1
  105. package/themes/original/src/components/Messages/index.tsx +50 -45
  106. package/themes/original/src/components/Messages/styles.tsx +1 -3
  107. package/themes/original/src/components/MomentOption/index.tsx +10 -1
  108. package/themes/original/src/components/MomentOption/styles.tsx +1 -1
  109. package/themes/original/src/components/OrderDetails/index.tsx +107 -111
  110. package/themes/original/src/components/OrderDetails/styles.tsx +3 -1
  111. package/themes/original/src/components/OrderProgress/index.tsx +4 -4
  112. package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
  113. package/themes/original/src/components/OrderSummary/index.tsx +2 -2
  114. package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -2
  115. package/themes/original/src/components/OrdersOption/index.tsx +25 -33
  116. package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
  117. package/themes/original/src/components/PaymentOptionWallet/index.tsx +10 -4
  118. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
  119. package/themes/original/src/components/PaymentOptions/index.tsx +9 -19
  120. package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
  121. package/themes/original/src/components/ProductForm/index.tsx +40 -33
  122. package/themes/original/src/components/ProductForm/styles.tsx +2 -2
  123. package/themes/original/src/components/ProductOptionSubOption/index.tsx +5 -3
  124. package/themes/original/src/components/Promotions/index.tsx +250 -0
  125. package/themes/original/src/components/Promotions/styles.tsx +60 -0
  126. package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
  127. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  128. package/themes/original/src/components/Sessions/index.tsx +160 -0
  129. package/themes/original/src/components/Sessions/styles.tsx +15 -0
  130. package/themes/original/src/components/SingleProductCard/index.tsx +47 -21
  131. package/themes/original/src/components/SingleProductCard/styles.tsx +28 -1
  132. package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
  133. package/themes/original/src/components/TaxInformation/index.tsx +17 -7
  134. package/themes/original/src/components/UpsellingProducts/index.tsx +87 -71
  135. package/themes/original/src/components/UserDetails/index.tsx +4 -95
  136. package/themes/original/src/components/UserFormDetails/index.tsx +32 -31
  137. package/themes/original/src/components/UserProfile/index.tsx +70 -20
  138. package/themes/original/src/components/UserProfileForm/index.tsx +28 -24
  139. package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
  140. package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
  141. package/themes/original/src/components/Wallets/index.tsx +75 -8
  142. package/themes/original/src/components/Wallets/styles.tsx +21 -0
  143. package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
  144. package/themes/original/src/components/shared/index.tsx +2 -0
  145. package/themes/original/src/config/constants.tsx +6 -6
  146. package/themes/original/src/types/index.tsx +71 -26
  147. package/themes/original/src/utils/index.tsx +12 -2
  148. package/themes/single-business/src/components/AddressList/index.tsx +1 -1
  149. package/themes/single-business/src/components/OrderTypeSelector/index.tsx +6 -6
  150. package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
  151. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  152. package/src/components/StripeMethodForm/index.tsx +0 -168
@@ -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 {
@@ -55,7 +56,8 @@ const ProfileUI = (props: ProfileParams) => {
55
56
  },
56
57
  pagePadding: {
57
58
  paddingLeft: 40,
58
- paddingRight: 40
59
+ paddingRight: 40,
60
+ justifyContent: 'center',
59
61
  },
60
62
  navBarStyle: {
61
63
  paddingLeft: 40,
@@ -204,8 +206,8 @@ const ProfileUI = (props: ProfileParams) => {
204
206
  },
205
207
  });
206
208
  handleSendVerifyCode({
207
- cellphone: cellphone,
208
- country_phone_code: countryPhoneCode
209
+ cellphone: cellphone,
210
+ country_phone_code: countryPhoneCode
209
211
  })
210
212
  }
211
213
  }
@@ -276,24 +278,26 @@ const ProfileUI = (props: ProfileParams) => {
276
278
 
277
279
  return (
278
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
+ />
279
288
  <KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
280
289
  <Container noPadding>
281
- <NavBar
282
- onActionLeft={() => navigation.goBack()}
283
- btnStyle={{ paddingStart: 0 }}
284
- title={t('ACCOUNT', 'Account')}
285
- isVertical
286
- style={styles.navBarStyle}
287
- />
290
+
288
291
  <CenterView style={styles.pagePadding}>
289
292
  <View style={styles.photo}>
290
293
  {user?.photo ? (
291
- <OIcon
292
- url={user?.photo}
293
- cover
294
- width={60}
295
- height={60}
296
- borderRadius={8}
294
+ <FastImage
295
+ style={{ height: 60, width: 80, borderRadius: 8 }}
296
+ source={{
297
+ uri: user?.photo,
298
+ priority: FastImage.priority.normal,
299
+ }}
300
+ resizeMode={FastImage.resizeMode.cover}
297
301
  />
298
302
  ) : (
299
303
  <Ionicons name='person-outline' size={50} />
@@ -303,7 +307,7 @@ const ProfileUI = (props: ProfileParams) => {
303
307
  icon={theme.images.general.camera}
304
308
  borderColor={theme.colors.clear}
305
309
  iconStyle={{ width: 20, height: 20 }}
306
- style={{ maxWidth: 40, position: 'absolute', bottom: -2, alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
310
+ style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
307
311
  onClick={() => handleImagePicker()}
308
312
  />
309
313
  </CenterView>
@@ -324,13 +328,13 @@ const ProfileUI = (props: ProfileParams) => {
324
328
  entireModal
325
329
  >
326
330
  <VerifyPhone
327
- phone={phoneInputData.phone}
328
- verifyPhoneState={verifyPhoneState}
329
- checkPhoneCodeState={checkPhoneCodeState}
330
- handleCheckPhoneCode={handleCheckPhoneCode}
331
- setCheckPhoneCodeState={setCheckPhoneCodeState}
332
- handleVerifyCodeClick={handleVerifyCodeClick}
333
- onClose={() => setIsModalVisible(false)}
331
+ phone={phoneInputData.phone}
332
+ verifyPhoneState={verifyPhoneState}
333
+ checkPhoneCodeState={checkPhoneCodeState}
334
+ handleCheckPhoneCode={handleCheckPhoneCode}
335
+ setCheckPhoneCodeState={setCheckPhoneCodeState}
336
+ handleVerifyCodeClick={handleVerifyCodeClick}
337
+ onClose={() => setIsModalVisible(false)}
334
338
  />
335
339
  </OModal>
336
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.inputBorderColor,
41
- borderRadius: 8,
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={26} style={{ textAlign: 'left', fontWeight: '600', marginTop: 10, marginBottom: 30 }}>
135
- {t('ENTER_VERIFICATION_CODE', 'Enter verification code')}
134
+ <OText size={30} style={{ textAlign: 'left' }}>
135
+ {t('VERIFY_PHONE', 'Verify Phone')}
136
136
  </OText>
137
137
  {lastNumbers && (
138
- <OText size={16} color={theme.colors.disabled}>
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={16}
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('RESEND_CODE', 'Resend code')}
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: 50px;
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} color={tabSelected === wallet.type ? theme.colors.primary : theme.colors.disabled}>
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: '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 {
@@ -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 {
@@ -143,9 +151,9 @@ export interface BusinessesListingParams {
143
151
  export interface HighestRatedBusinessesParams {
144
152
  businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
145
153
  onBusinessClick?: void;
146
- navigation? :any;
154
+ navigation?: any;
147
155
  isLoading?: boolean;
148
- getBusinesses: (newFetch : boolean) => void
156
+ getBusinesses: (newFetch: boolean) => void
149
157
  }
150
158
  export interface BusinessTypeFilterParams {
151
159
  businessTypes?: Array<any>;
@@ -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;
@@ -182,7 +198,7 @@ export interface BusinessProductsListingParams {
182
198
  header?: any;
183
199
  logo?: any;
184
200
  productModal?: any;
185
- getNextProducts?: () => {};
201
+ getNextProducts?: () => {};
186
202
  handleChangeCategory: (value: any) => {};
187
203
  setProductLogin?: () => {};
188
204
  updateProductModal?: (value: any) => {};
@@ -209,11 +225,12 @@ export interface BusinessProductsCategoriesParams {
209
225
  categoriesLayout?: any;
210
226
  selectedCategoryId?: any;
211
227
  lazyLoadProductsRecommended?: any;
212
- setSelectedCategoryId?: any
213
- setCategoryClicked?: any
228
+ setSelectedCategoryId?: any
229
+ setCategoryClicked?: any
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,
@@ -321,7 +345,10 @@ export interface OrderDetailsParams {
321
345
  isFromCheckout?: boolean,
322
346
  driverLocation?: any,
323
347
  isFromRoot?: any,
324
- goToBusinessList?: boolean
348
+ goToBusinessList?: boolean,
349
+ onNavigationRedirect?: any,
350
+ reorderState?: any,
351
+ handleReorder?: any,
325
352
  }
326
353
  export interface ProductItemAccordionParams {
327
354
  key?: any;
@@ -355,7 +382,7 @@ export interface ReviewProductParams {
355
382
  formState?: any,
356
383
  handleChangeFormState?: any,
357
384
  handleSendProductReview?: any
358
- }
385
+ }
359
386
  export interface SingleProductReviewParams {
360
387
  product: any,
361
388
  formState?: any,
@@ -383,7 +410,7 @@ export interface MessagesParams {
383
410
  handleSend?: () => {},
384
411
  setImage?: (image: string | null) => {},
385
412
  setMessage?: (comment: string) => {},
386
- setMessages?: () => {},
413
+ setMessages?: (image: any | null) => {},
387
414
  readMessages?: () => {},
388
415
  onClose?: () => void,
389
416
  isMeesageListing?: boolean,
@@ -467,6 +494,7 @@ export interface OrderTypeSelectParams {
467
494
  defaultValue?: number;
468
495
  configTypes?: Array<any>;
469
496
  orderTypes: Array<any>;
497
+ setOrderTypeValue?: (value : number) => any
470
498
  }
471
499
  export interface UpsellingProductsParams {
472
500
  isCustomMode?: boolean;
@@ -522,36 +550,53 @@ export interface HelpGuideParams {
522
550
  export interface HelpAccountAndPaymentParams {
523
551
  navigation: any;
524
552
  }
525
-
553
+
526
554
  export interface MessageListingParams {
527
555
  navigation: any;
528
556
  franchiseId?: any;
529
557
  }
530
558
 
531
- export interface BusinessSearchParams {
559
+ export interface BusinessSearchParams {
532
560
  navigation: any,
533
- businessesSearchList: any,
534
- onBusinessClick: any,
535
- handleChangeTermValue: (term: string) => void,
536
- termValue: string,
537
- paginationProps: any,
538
- handleSearchbusinessAndProducts: (newFetch?: boolean) => void,
539
- handleChangeFilters: (prop : string, value : any) => void,
540
- filters: any,
541
- businessTypes: Array<number>,
542
- setFilters: (filters: any) => void,
561
+ businessesSearchList: any,
562
+ onBusinessClick: any,
563
+ handleChangeTermValue: (term: string) => void,
564
+ termValue: string,
565
+ paginationProps: any,
566
+ handleSearchbusinessAndProducts: (newFetch?: boolean) => void,
567
+ handleChangeFilters: (prop: string, value: any) => void,
568
+ filters: any,
569
+ businessTypes: Array<number>,
570
+ setFilters: (filters: any) => void,
543
571
  lazySearch?: boolean
544
572
  }
545
-
573
+
546
574
  export interface NoNetworkParams {
547
575
  image?: any,
548
576
  }
549
577
 
550
578
  export interface PlaceSpotParams {
551
579
  isOpenPlaceSpot?: boolean,
552
- cart?: any ,
580
+ cart?: any,
553
581
  placesState?: any,
554
582
  handleChangePlace?: any,
555
583
  getPlacesList?: any,
556
584
  setOpenPlaceModal?: any
557
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('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}