ordering-ui-react-native 0.15.70 → 0.15.73

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 (23) hide show
  1. package/package.json +1 -1
  2. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +5 -5
  3. package/themes/original/src/components/AddressList/index.tsx +29 -17
  4. package/themes/original/src/components/BusinessProductsList/index.tsx +34 -32
  5. package/themes/original/src/components/BusinessProductsListing/index.tsx +55 -9
  6. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
  7. package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
  8. package/themes/original/src/components/BusinessesListing/index.tsx +13 -9
  9. package/themes/original/src/components/Cart/index.tsx +17 -11
  10. package/themes/original/src/components/Checkout/index.tsx +1 -1
  11. package/themes/original/src/components/MessageListing/index.tsx +10 -1
  12. package/themes/original/src/components/OrderTypeSelector/index.tsx +3 -1
  13. package/themes/original/src/components/OrdersOption/index.tsx +11 -2
  14. package/themes/original/src/components/PaymentOptionWallet/index.tsx +3 -2
  15. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
  16. package/themes/original/src/components/ProductForm/index.tsx +27 -27
  17. package/themes/original/src/components/ProductOptionSubOption/index.tsx +5 -3
  18. package/themes/original/src/components/SingleProductCard/index.tsx +9 -4
  19. package/themes/original/src/components/UpsellingProducts/index.tsx +86 -70
  20. package/themes/original/src/components/UserFormDetails/index.tsx +21 -19
  21. package/themes/original/src/components/UserProfileForm/index.tsx +20 -18
  22. package/themes/original/src/components/Wallets/index.tsx +17 -4
  23. package/themes/original/src/types/index.tsx +8 -3
@@ -19,7 +19,8 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
19
19
  typeSelected,
20
20
  defaultValue,
21
21
  configTypes,
22
- orderTypes
22
+ orderTypes,
23
+ setOrderTypeValue
23
24
  } = props
24
25
 
25
26
  const theme = useTheme();
@@ -39,6 +40,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
39
40
 
40
41
  const handleChangeOrderTypeCallback = (orderType: number) => {
41
42
  if (!orderState.loading) {
43
+ setOrderTypeValue && setOrderTypeValue(orderType)
42
44
  handleChangeOrderType(orderType)
43
45
  goToBack();
44
46
  }
@@ -33,7 +33,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
33
33
  loadMoreOrders,
34
34
  loadOrders,
35
35
  setOrdersLength,
36
- ordersLength
36
+ ordersLength,
37
+ refreshOrders,
38
+ setRefreshOrders
37
39
  } = props
38
40
 
39
41
  const theme = useTheme();
@@ -105,7 +107,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
105
107
 
106
108
  useFocusEffect(
107
109
  React.useCallback(() => {
108
- loadOrders()
110
+ loadOrders(false, false, false, true)
109
111
  }, [navigation])
110
112
  )
111
113
 
@@ -128,6 +130,13 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
128
130
  }
129
131
  }, [orders, activeOrders])
130
132
 
133
+ useEffect(() => {
134
+ if(refreshOrders){
135
+ loadOrders(false, false, false, true)
136
+ setRefreshOrders && setRefreshOrders(false)
137
+ }
138
+ }, [refreshOrders])
139
+
131
140
  return (
132
141
  <>
133
142
  {!loading && ordersLength.activeOrdersLength === 0 && ordersLength.previousOrdersLength === 0 && !activeOrders && (
@@ -100,12 +100,13 @@ const PaymentOptionWalletUI = (props: any) => {
100
100
  <Container
101
101
  key={wallet.id}
102
102
  isBottomBorder={idx === walletsState.result?.filter((wallet: any) => wallet.valid)?.length - 1}
103
+ onPress={() => handleOnChange(idx, wallet)}
104
+ disabled={(cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0}
103
105
  >
104
106
  <SectionLeft>
105
107
  <CheckBox
106
108
  value={checkedState[idx]}
107
- onValueChange={() => handleOnChange(idx, wallet)}
108
- disabled={(cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0 }
109
+ disabled={(cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0}
109
110
  boxType={'square'}
110
111
  tintColors={{
111
112
  true: theme.colors.primary,
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from 'styled-components/native'
2
2
 
3
- export const Container = styled.View`
3
+ export const Container = styled.TouchableOpacity`
4
4
  width: 100%;
5
5
  display: flex;
6
6
  padding: 20px 0;
@@ -292,20 +292,20 @@ export const ProductOptionsUI = (props: any) => {
292
292
  let _videoId = keys[keys.length - 1]
293
293
 
294
294
  if (_videoId.includes('watch')) {
295
- const __url = _videoId.split('=')[1]
296
- _videoId = __url
295
+ const __url = _videoId.split('=')[1]
296
+ _videoId = __url
297
297
  } else if (_videoId.includes('?')) {
298
- const __url = _videoId.split('?')[0]
299
- _videoId = __url
298
+ const __url = _videoId.split('?')[0]
299
+ _videoId = __url
300
300
  }
301
301
 
302
302
  if (_videoId.search(/&/i) >= 0) {
303
- _videoId = _videoId.split('&')[0]
303
+ _videoId = _videoId.split('&')[0]
304
304
  } else if (_videoId.search(/\?/i) >= 0) {
305
- _videoId = _videoId.split('?')[0]
305
+ _videoId = _videoId.split('?')[0]
306
306
  }
307
307
  if ((_videoId.length === 11)) {
308
- videoList.push(_videoId)
308
+ videoList.push(_videoId)
309
309
  }
310
310
  }
311
311
  }
@@ -326,25 +326,6 @@ export const ProductOptionsUI = (props: any) => {
326
326
 
327
327
  const ExtraOptions = ({ eID, options }: any) => (
328
328
  <>
329
- {product?.ingredients.length > 0 && (
330
- <TouchableOpacity
331
- key={`eopt_all_00`}
332
- onPress={() => setSelectedOpt(-1)}
333
- style={[
334
- styles.extraItem,
335
- {
336
- borderBottomColor:
337
- selOpt == -1 ? theme.colors.textNormal : theme.colors.border,
338
- },
339
- ]}>
340
- <OText
341
- color={selOpt == -1 ? theme.colors.textNormal : theme.colors.textSecondary}
342
- size={selOpt == -1 ? 14 : 12}
343
- weight={selOpt == -1 ? '600' : 'normal'}>
344
- {t('INGREDIENTS', 'Ingredients')}
345
- </OText>
346
- </TouchableOpacity>
347
- )}
348
329
  {options.map(({ id, name, respect_to, suboptions }: any) => (
349
330
  <React.Fragment key={`cont_key_${id}`}>
350
331
  {respect_to == null && suboptions?.length > 0 && (
@@ -665,6 +646,25 @@ export const ProductOptionsUI = (props: any) => {
665
646
  {t('ALL', 'All')}
666
647
  </OText>
667
648
  </TouchableOpacity>
649
+ {product?.ingredients.length > 0 && (
650
+ <TouchableOpacity
651
+ key={`eopt_all_00`}
652
+ onPress={() => setSelectedOpt(-1)}
653
+ style={[
654
+ styles.extraItem,
655
+ {
656
+ borderBottomColor:
657
+ selOpt == -1 ? theme.colors.textNormal : theme.colors.border,
658
+ },
659
+ ]}>
660
+ <OText
661
+ color={selOpt == -1 ? theme.colors.textNormal : theme.colors.textSecondary}
662
+ size={selOpt == -1 ? 14 : 12}
663
+ weight={selOpt == -1 ? '600' : 'normal'}>
664
+ {t('INGREDIENTS', 'Ingredients')}
665
+ </OText>
666
+ </TouchableOpacity>
667
+ )}
668
668
  {product?.extras.map((extra: any) =>
669
669
  <ExtraOptions key={extra.id} options={extra.options} />
670
670
  )}
@@ -694,7 +694,7 @@ export const ProductOptionsUI = (props: any) => {
694
694
  </WrapperIngredients>
695
695
  </View>
696
696
  )}
697
- {product?.extras.map((extra: any) =>
697
+ {product?.extras.sort((a: any, b: any) => a.rank - b.rank).map((extra: any) =>
698
698
  extra.options.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => {
699
699
  const currentState =
700
700
  productCart.options[`id:${option.id}`] || {};
@@ -130,9 +130,11 @@ export const ProductOptionSubOptionUI = (props: any) => {
130
130
  </>
131
131
  )}
132
132
  </PositionControl>
133
- <OText size={12} lineHeight={18} color={theme.colors.textSecondary}>
134
- + {parsePrice(price)}
135
- </OText>
133
+ {price > 0 && (
134
+ <OText size={12} lineHeight={18} color={theme.colors.textSecondary}>
135
+ + {parsePrice(price)}
136
+ </OText>
137
+ )}
136
138
  </Container>
137
139
  {showMessage && <OText size={10} mLeft={4} mRight={4} style={{ flex: 1, textAlign: 'center' }} color={theme.colors.primary}>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</OText>}
138
140
  </View>
@@ -13,9 +13,14 @@ import { OText, OIcon } from '../shared';
13
13
  import FastImage from 'react-native-fast-image'
14
14
  import { shape } from '../../utils';
15
15
 
16
- export const SingleProductCard = (props: SingleProductCardParams) => {
16
+ function SingleProductCardPropsAreEqual(prevProps : any, nextProps : any) {
17
+ return JSON.stringify(prevProps.product) === JSON.stringify(nextProps.product) &&
18
+ prevProps.isSoldOut === nextProps.isSoldOut &&
19
+ prevProps.productAddedToCartLength === nextProps.productAddedToCartLength
20
+ }
21
+
22
+ export const SingleProductCard = React.memo((props: SingleProductCardParams) => {
17
23
  const {
18
- businessId,
19
24
  product,
20
25
  isSoldOut,
21
26
  onProductClick,
@@ -148,7 +153,7 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
148
153
  weight={'400'}
149
154
  color={theme.colors.white}
150
155
  numberOfLines={2}
151
- ellipsizeMode='tail'
156
+ ellipsizeMode='tail'
152
157
  lineHeight={13}
153
158
  >
154
159
  {product?.ribbon?.text}
@@ -181,4 +186,4 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
181
186
  )}
182
187
  </CardContainer>
183
188
  );
184
- };
189
+ }, SingleProductCardPropsAreEqual);
@@ -4,7 +4,7 @@ import {
4
4
  UpsellingPage as UpsellingPageController,
5
5
  useUtils,
6
6
  useLanguage,
7
- useOrder
7
+ useOrder
8
8
  } from 'ordering-components/native'
9
9
  import { useTheme } from 'styled-components/native';
10
10
  import { OText, OIcon, OBottomPopup, OButton } from '../shared'
@@ -62,7 +62,19 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
62
62
  borderRadius: 7.6,
63
63
  borderColor: theme.colors.textSecondary,
64
64
  height: 38
65
- }
65
+ },
66
+ headerItem: {
67
+ flexDirection: 'row',
68
+ alignItems: 'center',
69
+ marginVertical: 2,
70
+ marginHorizontal: 20,
71
+ },
72
+ btnBackArrow: {
73
+ borderWidth: 0,
74
+ backgroundColor: theme.colors.clear,
75
+ shadowColor: theme.colors.clear,
76
+ padding: 40,
77
+ },
66
78
  })
67
79
 
68
80
  const [modalIsOpen, setModalIsOpen] = useState(false)
@@ -77,11 +89,11 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
77
89
  ? cart?.products.map((product: any) => product.id)
78
90
  : []
79
91
 
80
- const productsList = !upsellingProducts.loading && !upsellingProducts.error
81
- ? upsellingProducts?.products?.length
82
- ? upsellingProducts?.products.filter((product: any) => !cartProducts.includes(product.id))
83
- : (props?.products ?? []).filter((product: any) => !cartProducts.includes(product.id)) ?? []
84
- : []
92
+ const productsList = !upsellingProducts.loading && !upsellingProducts.error
93
+ ? upsellingProducts?.products?.length
94
+ ? upsellingProducts?.products.filter((product: any) => !cartProducts.includes(product.id))
95
+ : (props?.products ?? []).filter((product: any) => !cartProducts.includes(product.id)) ?? []
96
+ : []
85
97
 
86
98
  useEffect(() => {
87
99
  if (!isCustomMode && !props.products) {
@@ -100,10 +112,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
100
112
  }, [cart, isCheckout])
101
113
 
102
114
  const handleFormProduct = (product: any) => {
103
- onNavigationRedirect && onNavigationRedirect('ProductDetails', {
104
- product: product,
105
- businessId: product?.api?.businessId,
106
- businessSlug: business.slug,
115
+ onNavigationRedirect && onNavigationRedirect('ProductDetails', {
116
+ product: product,
117
+ businessId: product?.api?.businessId,
118
+ businessSlug: business.slug,
107
119
  })
108
120
  }
109
121
 
@@ -119,8 +131,8 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
119
131
  !upsellingProducts.loading && (
120
132
  <>
121
133
  {
122
- !upsellingProducts.error ? productsList.map((product: any) => (
123
- <Item key={product.id}>
134
+ !upsellingProducts.error ? productsList.map((product: any, i: number) => (
135
+ <Item key={`${product.id}_${i}`}>
124
136
  <View style={{ flexBasis: '57%' }}>
125
137
  <Details>
126
138
  <OText size={12} lineHeight={18} numberOfLines={1} ellipsizeMode='tail'>{product.name}</OText>
@@ -148,50 +160,54 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
148
160
  )
149
161
  }
150
162
 
151
- const UpsellingContent = () => {
152
- return (
153
- <>
154
- <TopBar style={{ paddingTop: Platform.OS == 'ios' ? 10 : 30 }}>
155
- <TopActions onPress={() => onGoBack()}>
156
- <OIcon src={theme.images.general.arrow_left} width={15} />
157
- </TopActions>
158
- </TopBar>
159
- <ScrollView style={{ marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
163
+ const UpsellingContent = () => {
164
+ return (
165
+ <>
166
+ <View style={{ ...styles.headerItem, flex: 1 }}>
167
+ <OButton
168
+ imgLeftSrc={theme.images.general.arrow_left}
169
+ imgRightSrc={null}
170
+ style={styles.btnBackArrow}
171
+ onClick={() => onGoBack()}
172
+ imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
173
+ />
174
+ </View>
175
+ <ScrollView style={{ marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
160
176
  {productsList.length > 0 &&
161
- <View style={{ paddingHorizontal: 40, overflow: 'visible' }}>
162
- <OText size={16} lineHeight={24} weight={'500'}>{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}</OText>
163
- <UpsellingLayout />
164
- </View>
165
- }
166
- <View style={{ paddingHorizontal: 40 }}>
167
- <OText size={20} lineHeight={30} weight={600} style={{ marginTop: 10, marginBottom: 17 }}>{t('YOUR_CART', 'Your cart')}</OText>
168
- <OrderSummary
169
- cart={cart}
170
- isCartPending={cart?.status === 2}
171
- onNavigationRedirect={onNavigationRedirect}
172
- />
173
- </View>
174
- </ScrollView>
175
- <View
176
- style={{
177
- alignItems: 'center',
178
- bottom: props.isPage ? Platform.OS === 'ios' ? 0 : 20 : Platform.OS === 'ios' ? bottom + 59 : bottom + 125
179
- }}
180
- >
181
- <OButton
182
- imgRightSrc=''
183
- text={t('CHECKOUT', 'Checkout')}
184
- style={{...styles.closeUpsellingButton}}
185
- textStyle={{ color: theme.colors.white, fontSize: 14 }}
186
- onClick={() => {
187
- handleUpsellingPage()
188
- setIsCheckout(true)
189
- }}
190
- />
191
- </View>
192
- </>
193
- )
194
- }
177
+ <View style={{ paddingHorizontal: 40, overflow: 'visible' }}>
178
+ <OText size={16} lineHeight={24} weight={'500'}>{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}</OText>
179
+ <UpsellingLayout />
180
+ </View>
181
+ }
182
+ <View style={{ paddingHorizontal: 40 }}>
183
+ <OText size={20} lineHeight={30} weight={600} style={{ marginTop: 10, marginBottom: 17 }}>{t('YOUR_CART', 'Your cart')}</OText>
184
+ <OrderSummary
185
+ cart={cart}
186
+ isCartPending={cart?.status === 2}
187
+ onNavigationRedirect={onNavigationRedirect}
188
+ />
189
+ </View>
190
+ </ScrollView>
191
+ <View
192
+ style={{
193
+ alignItems: 'center',
194
+ bottom: props.isPage ? Platform.OS === 'ios' ? 0 : 20 : Platform.OS === 'ios' ? bottom + 59 : bottom + 125
195
+ }}
196
+ >
197
+ <OButton
198
+ imgRightSrc=''
199
+ text={t('CHECKOUT', 'Checkout')}
200
+ style={{ ...styles.closeUpsellingButton }}
201
+ textStyle={{ color: theme.colors.white, fontSize: 14 }}
202
+ onClick={() => {
203
+ handleUpsellingPage()
204
+ setIsCheckout(true)
205
+ }}
206
+ />
207
+ </View>
208
+ </>
209
+ )
210
+ }
195
211
 
196
212
  return (
197
213
  <>
@@ -199,20 +215,20 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
199
215
  <UpsellingLayout />
200
216
  ) : (
201
217
  <>
202
- {props.isPage ? (
203
- <UpsellingContent />
204
- ) : (
205
- canOpenUpselling && !modalIsOpen && (
206
- <OBottomPopup
207
- title={''}
208
- open={openUpselling}
209
- onClose={() => handleUpsellingPage()}
210
- isStatusBar
211
- >
212
- <UpsellingContent />
213
- </OBottomPopup>
214
- )
215
- )}
218
+ {props.isPage ? (
219
+ <UpsellingContent />
220
+ ) : (
221
+ canOpenUpselling && !modalIsOpen && (
222
+ <OBottomPopup
223
+ title={''}
224
+ open={openUpselling}
225
+ onClose={() => handleUpsellingPage()}
226
+ isStatusBar
227
+ >
228
+ <UpsellingContent />
229
+ </OBottomPopup>
230
+ )
231
+ )}
216
232
  </>
217
233
  )}
218
234
  </>
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { Platform, StyleSheet, View } from 'react-native';
2
+ import { Platform, StyleSheet, TouchableOpacity } from 'react-native';
3
3
  import { useSession, useLanguage, ToastType, useToast, useConfig } from 'ordering-components/native';
4
4
  import { useTheme } from 'styled-components/native';
5
5
  import { useForm, Controller } from 'react-hook-form';
@@ -182,7 +182,7 @@ export const UserFormDetailsUI = (props: any) => {
182
182
  handleChangeInput(phoneNumber, true);
183
183
  };
184
184
 
185
- const changeCountry = (country : any) => {
185
+ const changeCountry = (country: any) => {
186
186
  let countryCode = {
187
187
  country_code: {
188
188
  name: 'country_code',
@@ -325,7 +325,7 @@ export const UserFormDetailsUI = (props: any) => {
325
325
  <PhoneInputNumber
326
326
  data={phoneInputData}
327
327
  handleData={(val: any) => handleChangePhoneNumber(val)}
328
- changeCountry={(val : any) => changeCountry(val)}
328
+ changeCountry={(val: any) => changeCountry(val)}
329
329
  defaultValue={phoneUpdate ? '' : user?.cellphone}
330
330
  defaultCode={user?.country_code ?? user?.country_phone_code ?? null}
331
331
  boxStyle={styles.phoneSelect}
@@ -379,16 +379,18 @@ export const UserFormDetailsUI = (props: any) => {
379
379
  rules={getInputRules({ name: 'password', code: 'password' })}
380
380
  defaultValue=''
381
381
  />
382
- <View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20, width: '100%' }}>
383
- <Controller
384
- control={control}
385
- render={({ onChange, value }: any) => (
382
+ <Controller
383
+ control={control}
384
+ render={({ onChange, value }: any) => (
385
+ <TouchableOpacity
386
+ style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20, width: '100%' }}
387
+ onPress={() => {
388
+ onChange(!value)
389
+ handleChangePromotions(!value)
390
+ }}
391
+ >
386
392
  <CheckBox
387
393
  value={value}
388
- onValueChange={newValue => {
389
- onChange(newValue)
390
- handleChangePromotions(newValue)
391
- }}
392
394
  boxType={'square'}
393
395
  tintColors={{
394
396
  true: theme.colors.primary,
@@ -399,14 +401,14 @@ export const UserFormDetailsUI = (props: any) => {
399
401
  onTintColor={theme.colors.primary}
400
402
  style={Platform.OS === 'ios' && styles.checkBoxStyle}
401
403
  />
402
- )}
403
- name='promotions'
404
- defaultValue={formState?.result?.result
405
- ? !!formState?.result?.result?.settings?.notification?.newsletter
406
- : !!(formState?.changes?.settings?.notification?.newsletter ?? (user && user?.settings?.notification?.newsletter))}
407
- />
408
- <OText style={{ fontSize: 14, paddingHorizontal: 5 }}>{t('RECEIVE_NEWS_EXCLUSIVE_PROMOTIONS', 'Receive newsletters and exclusive promotions')}</OText>
409
- </View>
404
+ <OText style={{ fontSize: 14, paddingHorizontal: 5, paddingLeft: 10 }}>{t('RECEIVE_NEWS_EXCLUSIVE_PROMOTIONS', 'Receive newsletters and exclusive promotions')}</OText>
405
+ </TouchableOpacity>
406
+ )}
407
+ name='promotions'
408
+ defaultValue={formState?.result?.result
409
+ ? !!formState?.result?.result?.settings?.notification?.newsletter
410
+ : !!(formState?.changes?.settings?.notification?.newsletter ?? (user && user?.settings?.notification?.newsletter))}
411
+ />
410
412
  </UDWrapper>
411
413
  )}
412
414
  {validationFields?.loading && (
@@ -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
- cellphone: cellphone,
209
- country_phone_code: countryPhoneCode
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 }}
287
+ />
280
288
  <KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
281
289
  <Container noPadding>
282
- <NavBar
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', bottom: -2, alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
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
- phone={phoneInputData.phone}
330
- verifyPhoneState={verifyPhoneState}
331
- checkPhoneCodeState={checkPhoneCodeState}
332
- handleCheckPhoneCode={handleCheckPhoneCode}
333
- setCheckPhoneCodeState={setCheckPhoneCodeState}
334
- handleVerifyCodeClick={handleVerifyCodeClick}
335
- 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)}
336
338
  />
337
339
  </OModal>
338
340
  </>
@@ -35,7 +35,10 @@ const WalletsUI = (props: any) => {
35
35
  transactionsList,
36
36
  setWalletSelected,
37
37
  isWalletCashEnabled,
38
- isWalletPointsEnabled
38
+ isWalletPointsEnabled,
39
+ getWallets,
40
+ refreshWallets,
41
+ setRefreshWallets
39
42
  } = props
40
43
 
41
44
  const [, t] = useLanguage()
@@ -95,6 +98,13 @@ const WalletsUI = (props: any) => {
95
98
  }
96
99
  }, [configs])
97
100
 
101
+ useEffect(() => {
102
+ if(refreshWallets){
103
+ getWallets()
104
+ setRefreshWallets && setRefreshWallets(false)
105
+ }
106
+ }, [refreshWallets])
107
+
98
108
  return (
99
109
  <Container>
100
110
  <NavBar
@@ -111,14 +121,17 @@ const WalletsUI = (props: any) => {
111
121
  walletList.wallets?.length > 0 &&
112
122
  (
113
123
  <>
114
- <OTabs>
124
+ <OTabs
125
+ horizontal
126
+ showsHorizontalScrollIndicator={false}
127
+ >
115
128
  {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
116
129
  <Pressable
117
130
  key={wallet.id}
118
131
  onPress={() => handleChangeTab(wallet)}
119
132
  >
120
- <OTab>
121
- <OText size={18} color={tabSelected === wallet.type ? theme.colors.primary : theme.colors.disabled}>
133
+ <OTab isSelected={tabSelected === wallet.type}>
134
+ <OText size={18}>
122
135
  {walletName[wallet.type]?.name}
123
136
  </OText>
124
137
  </OTab>
@@ -59,6 +59,7 @@ export interface AddressListParams {
59
59
  isFromProductsList?: boolean;
60
60
  afterSignup?: boolean;
61
61
  isFromCheckout?: boolean
62
+ loadAddresses: () => void
62
63
  }
63
64
 
64
65
  export interface AddressFormParams {
@@ -164,7 +165,7 @@ export interface BusinessTypeFilterParams {
164
165
  setBusinessTypes?: any
165
166
  }
166
167
  export interface BusinessControllerParams {
167
- key?: number;
168
+ key?: string | number;
168
169
  business?: any;
169
170
  handleCustomClick?: any;
170
171
  orderType?: any;
@@ -247,7 +248,8 @@ export interface BusinessProductsListParams {
247
248
  setSubcategoriesSelected?: any,
248
249
  subcategoriesSelected?: any,
249
250
  onClickCategory?: any,
250
- lazyLoadProductsRecommended?: boolean
251
+ lazyLoadProductsRecommended?: boolean,
252
+ isFiltMode?: boolean
251
253
  }
252
254
  export interface SingleProductCardParams {
253
255
  businessId: any,
@@ -303,7 +305,9 @@ export interface OrdersOptionParams {
303
305
  ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
304
306
  setSelectedOrderId?: any,
305
307
  setOpenMessges?: any,
306
- loadMoreStatus?: boolean
308
+ loadMoreStatus?: boolean,
309
+ refreshOrders?: boolean,
310
+ setRefreshOrders?: (value : boolean) => void
307
311
  }
308
312
  export interface ActiveOrdersParams {
309
313
  orders?: any,
@@ -489,6 +493,7 @@ export interface OrderTypeSelectParams {
489
493
  defaultValue?: number;
490
494
  configTypes?: Array<any>;
491
495
  orderTypes: Array<any>;
496
+ setOrderTypeValue?: (value : number) => any
492
497
  }
493
498
  export interface UpsellingProductsParams {
494
499
  isCustomMode?: boolean;