ordering-ui-react-native 0.11.12 → 0.11.16

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/components/OrderDetails/index.tsx +1 -5
  3. package/themes/business/src/components/FloatingButton/index.tsx +1 -0
  4. package/themes/business/src/components/FloatingButton/styles.tsx +1 -1
  5. package/themes/business/src/types/index.tsx +1 -0
  6. package/themes/doordash/src/components/SignupForm/index.tsx +52 -3
  7. package/themes/instacart/src/components/SignupForm/index.tsx +57 -2
  8. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +35 -47
  9. package/themes/kiosk/src/components/Cart/index.tsx +2 -2
  10. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +2 -2
  11. package/themes/kiosk/src/components/CustomerName/index.tsx +2 -2
  12. package/themes/kiosk/src/components/OrderDetails/index.tsx +15 -12
  13. package/themes/kiosk/src/components/OrderDetails/styles.tsx +4 -0
  14. package/themes/kiosk/src/components/shared/OSegment.tsx +2 -2
  15. package/themes/original/src/components/BusinessInformation/index.tsx +2 -2
  16. package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -1
  17. package/themes/original/src/components/Cart/index.tsx +2 -0
  18. package/themes/original/src/components/CartContent/index.tsx +1 -0
  19. package/themes/original/src/components/DriverTips/index.tsx +2 -2
  20. package/themes/original/src/components/DriverTips/styles.tsx +6 -5
  21. package/themes/original/src/components/LanguageSelector/index.tsx +3 -3
  22. package/themes/original/src/components/LanguageSelector/styles.tsx +3 -0
  23. package/themes/original/src/components/LoginForm/index.tsx +8 -8
  24. package/themes/original/src/components/Messages/index.tsx +30 -49
  25. package/themes/original/src/components/OrderTypeSelector/index.tsx +7 -1
  26. package/themes/original/src/components/SearchBar/index.tsx +1 -1
  27. package/themes/original/src/components/SignupForm/index.tsx +71 -17
  28. package/themes/original/src/components/StripeElementsForm/index.tsx +5 -5
  29. package/themes/original/src/components/UpsellingProducts/index.tsx +13 -6
  30. package/themes/original/src/components/shared/OBottomPopup.tsx +5 -2
  31. package/themes/original/src/components/shared/OModal.tsx +1 -1
  32. package/themes/original/src/types/index.tsx +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.11.12",
3
+ "version": "0.11.16",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -469,12 +469,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
469
469
  {
470
470
  (
471
471
  parseInt(order?.status) === 1 ||
472
- parseInt(order?.status) === 2 ||
473
- parseInt(order?.status) === 5 ||
474
- parseInt(order?.status) === 6 ||
475
- parseInt(order?.status) === 10 ||
476
472
  parseInt(order?.status) === 11 ||
477
- parseInt(order?.status) === 12
473
+ parseInt(order?.status) === 15
478
474
  ) && !order.review && !isReviewed && (
479
475
  <OButton
480
476
  onClick={() => handleClickOrderReview(order)}
@@ -53,6 +53,7 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
53
53
  return (
54
54
  <Container
55
55
  isIos={Platform.OS === 'ios'}
56
+ paddingBottomIos={props.paddingBottomIos}
56
57
  style={{ paddingHorizontal: props.isPadding ? 30 : 0 }}>
57
58
  <View
58
59
  style={{
@@ -15,7 +15,7 @@ export const Container = styled.View`
15
15
  ${(props: any) =>
16
16
  props.isIos &&
17
17
  css`
18
- padding-bottom: 5px;
18
+ padding-bottom: ${(props: any) => props.paddingBottomIos ? `${props.paddingBottomIos}px` : '5px'};
19
19
  `}
20
20
  `;
21
21
 
@@ -436,6 +436,7 @@ export interface FloatingButtonParams {
436
436
  secondButton?: boolean;
437
437
  firstColorCustom?: string;
438
438
  secondColorCustom?: string;
439
+ paddingBottomIos?: any;
439
440
  }
440
441
  export interface MomentOptionParams {
441
442
  navigation: any;
@@ -1,9 +1,9 @@
1
1
  import React, { createRef, useEffect, useRef, useState } from 'react';
2
- import { View, Pressable, StyleSheet, Keyboard, TextStyle } from 'react-native';
2
+ import { View, Pressable, StyleSheet, Keyboard, TextStyle, Linking, TouchableOpacity, Platform } from 'react-native';
3
3
  import { useForm, Controller } from 'react-hook-form';
4
4
  import Spinner from 'react-native-loading-spinner-overlay';
5
5
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'
6
-
6
+ import CheckBox from '@react-native-community/checkbox';
7
7
  import { PhoneInputNumber } from '../PhoneInputNumber'
8
8
  import { FacebookLogin } from '../FacebookLogin'
9
9
 
@@ -99,7 +99,11 @@ const SignupFormUI = (props: SignupParams) => {
99
99
  flexDirection: 'row',
100
100
  justifyContent: 'space-between',
101
101
  marginBottom: 30
102
- }
102
+ },
103
+ checkBoxStyle: {
104
+ width: 25,
105
+ height: 25,
106
+ }
103
107
  });
104
108
  const showInputPhoneNumber = validationFields?.fields?.checkout?.cellphone?.enabled ?? false
105
109
 
@@ -259,6 +263,15 @@ const SignupFormUI = (props: SignupParams) => {
259
263
  onChange(value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''))
260
264
  }
261
265
 
266
+ const handleOpenTermsUrl = async (url: any) => {
267
+ const supported = await Linking.canOpenURL(url);
268
+ if (supported) {
269
+ await Linking.openURL(url);
270
+ } else {
271
+ showToast(ToastType.Error, t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('URL', 'URL')))
272
+ }
273
+ }
274
+
262
275
  useEffect(() => {
263
276
  if (!formState.loading && formState.result?.error) {
264
277
  formState.result?.result && showToast(
@@ -509,6 +522,42 @@ const SignupFormUI = (props: SignupParams) => {
509
522
  <Spinner visible />
510
523
  )}
511
524
 
525
+ {configs?.terms_and_conditions?.value === 'true' && (
526
+ <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: 10 }}>
527
+ <Controller
528
+ control={control}
529
+ render={({ onChange, value }: any) => (
530
+ <CheckBox
531
+ value={value}
532
+ onValueChange={newValue => {
533
+ onChange(newValue)
534
+ }}
535
+ boxType={'square'}
536
+ tintColors={{
537
+ true: theme.colors.primary,
538
+ false: theme.colors.disabled
539
+ }}
540
+ tintColor={theme.colors.disabled}
541
+ onCheckColor={theme.colors.primary}
542
+ onTintColor={theme.colors.primary}
543
+ style={Platform.OS === 'ios' && registerStyles.checkBoxStyle}
544
+ />
545
+ )}
546
+ name='termsAccept'
547
+ rules={{
548
+ required: t('VALIDATION_ERROR_ACCEPTED', 'The _attribute_ must be accepted.').replace('_attribute_', t('TERMS_AND_CONDITIONS', 'Terms & Conditions'))
549
+ }}
550
+ defaultValue={false}
551
+ />
552
+ <OText style={{ ...theme.labels.middle, paddingHorizontal: 5 }}>{t('TERMS_AND_CONDITIONS_TEXT', 'I’m agree with')}</OText>
553
+ <TouchableOpacity
554
+ onPress={() => handleOpenTermsUrl(configs?.terms_and_conditions_url?.value)}
555
+ >
556
+ <OText style={{ ...theme.labels.middle }} color={theme.colors.primary}>{t('TERMS_AND_CONDITIONS', 'Terms & Conditions')}</OText>
557
+ </TouchableOpacity>
558
+ </View>
559
+ )}
560
+
512
561
  {signupTab === 'cellphone' && useSignupByEmail && useSignupByCellphone ? (
513
562
  <OButton
514
563
  onClick={handleSubmit(onSubmit)}
@@ -1,5 +1,5 @@
1
1
  import React, { createRef, useEffect, useRef, useState } from 'react';
2
- import { View, Pressable, StyleSheet, Keyboard } from 'react-native';
2
+ import { View, Pressable, StyleSheet, Keyboard, Linking, Platform } from 'react-native';
3
3
  import { useForm, Controller } from 'react-hook-form';
4
4
  import Spinner from 'react-native-loading-spinner-overlay';
5
5
 
@@ -31,6 +31,7 @@ import NavBar from '../NavBar'
31
31
  import { VerifyPhone } from '../VerifyPhone';
32
32
 
33
33
  import { OText, OButton, OInput, OModal } from '../shared';
34
+ import CheckBox from '@react-native-community/checkbox';
34
35
  import { SignupParams } from '../../types';
35
36
  import { sortInputFields } from '../../utils';
36
37
  import { useTheme } from 'styled-components/native';
@@ -90,7 +91,11 @@ const SignupFormUI = (props: SignupParams) => {
90
91
  paddingBottom: 20 + bottom,
91
92
  borderTopWidth: 1,
92
93
  borderTopColor: theme.colors.secundary
93
- }
94
+ },
95
+ checkBoxStyle: {
96
+ width: 20,
97
+ height: 20,
98
+ }
94
99
  });
95
100
 
96
101
  const showInputPhoneNumber = validationFields?.fields?.checkout?.cellphone?.enabled ?? false
@@ -249,6 +254,16 @@ const SignupFormUI = (props: SignupParams) => {
249
254
  onChange(value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''))
250
255
  }
251
256
 
257
+ const handleOpenTermsUrl = async (url: any) => {
258
+ const supported = await Linking.canOpenURL(url);
259
+
260
+ if (supported) {
261
+ await Linking.openURL(url);
262
+ } else {
263
+ showToast(ToastType.Error, t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('URL', 'URL')))
264
+ }
265
+ }
266
+
252
267
  useEffect(() => {
253
268
  if (!formState.loading && formState.result?.error) {
254
269
  formState.result?.result && showToast(
@@ -394,6 +409,46 @@ const SignupFormUI = (props: SignupParams) => {
394
409
  </View>
395
410
  )}
396
411
 
412
+ {configs?.terms_and_conditions?.value === 'true' && (
413
+ <View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20 }}>
414
+ <Controller
415
+ control={control}
416
+ render={({ onChange, value }: any) => (
417
+ <CheckBox
418
+ value={value}
419
+ onValueChange={newValue => {
420
+ onChange(newValue)
421
+ }}
422
+ boxType={'square'}
423
+ tintColors={{
424
+ true: theme.colors.primary,
425
+ false: theme.colors.disabled
426
+ }}
427
+ tintColor={theme.colors.disabled}
428
+ onCheckColor={theme.colors.primary}
429
+ onTintColor={theme.colors.primary}
430
+ style={Platform.OS === 'ios' && style.checkBoxStyle}
431
+ />
432
+ )}
433
+ name='termsAccept'
434
+ rules={{
435
+ required: t('VALIDATION_ERROR_ACCEPTED', 'The _attribute_ must be accepted.').replace('_attribute_', t('TERMS_AND_CONDITIONS', 'Terms & Conditions'))
436
+ }}
437
+ defaultValue={false}
438
+ />
439
+ <OText style={{ ...theme.labels.normal, paddingHorizontal: 5 }}>{t('TERMS_AND_CONDITIONS_TEXT', 'I’m agree with')}</OText>
440
+ <OButton
441
+ imgRightSrc={null}
442
+ text={t('TERMS_AND_CONDITIONS', 'Terms & Conditions')}
443
+ bgColor='#FFF'
444
+ borderColor='#FFF'
445
+ style={{ paddingLeft: 0, paddingRight: 0, height: 30, shadowColor: '#FFF' }}
446
+ textStyle={{ color: theme.colors.primary, marginLeft: 0, marginRight: 0 }}
447
+ onClick={() => handleOpenTermsUrl(configs?.terms_and_conditions_url?.value)}
448
+ />
449
+ </View>
450
+ )}
451
+
397
452
  {signupTab !== 'cellphone' && (
398
453
  <View style={{ minHeight: 42, marginBottom: 16 }}>
399
454
  <Controller
@@ -6,9 +6,7 @@ import {
6
6
  useOrder,
7
7
  useSession,
8
8
  useConfig,
9
- useApi,
10
- useToast,
11
- ToastType
9
+ useApi
12
10
  } from 'ordering-components/native'
13
11
  import Carousel from 'react-native-snap-carousel';
14
12
  import Geocoder from 'react-native-geocoding';
@@ -28,18 +26,16 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
28
26
 
29
27
  const theme = useTheme();
30
28
  const [, t] = useLanguage();
31
- const [{user, auth, accessToken}] = useSession()
29
+ const [{user, accessToken}] = useSession()
32
30
  const [, {changeAddress}] = useOrder()
33
31
  const [orientationState] = useDeviceOrientation();
34
32
  const [configState] = useConfig()
35
33
  const [ordering] = useApi()
36
- const [, {showToast}] = useToast()
37
34
  const [addressState, setAddressState] = useState<any>({ loading: false, changes: {}, error: null, address: {} })
38
35
  const googleMapsApiKey = configState?.configs?.google_maps_api_key?.value
39
36
 
40
37
  const _categories: any = business?.original?.categories;
41
38
  let _promos: any = [];
42
-
43
39
  _categories?.forEach((categ: any) => {
44
40
  const _featuredProds = categ?.products?.filter(
45
41
  (prod: any) => prod.featured,
@@ -52,7 +48,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
52
48
 
53
49
  const handleCurrentUserLocation = async () => {
54
50
  let addressValue : any = []
55
- const data: any = { address: null, error: null }
51
+ let data: any = { address: null, error: null }
56
52
  const filterAddressInfo = [
57
53
  { tag: 'street_number', isShort: true },
58
54
  { tag: 'route', isShort: true },
@@ -60,13 +56,11 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
60
56
  { tag: 'administrative_area_level_1', isShort: false },
61
57
  { tag: 'country', isShort: false },
62
58
  ]
63
-
64
- try {
65
59
  Geocoder.init(googleMapsApiKey);
66
60
  Geocoder.from({
67
- latitude: business.location.lat,
68
- longitude: business.location.lng
69
- }).then((json : any) => {
61
+ latitude: business.location?.lat,
62
+ longitude: business.location?.lng
63
+ }).then( async (json : any) => {
70
64
  if(json.results && json.results?.length > 0){
71
65
  for (const component of json.results?.[0].address_components) {
72
66
  const addressType = component.types?.[0]
@@ -76,7 +70,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
76
70
  }
77
71
  }
78
72
  }
79
- data.address = {
73
+ data = {
80
74
  address: addressValue.join(', '),
81
75
  location: json.results[0].geometry.location,
82
76
  map_data: {
@@ -84,44 +78,38 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
84
78
  place_id: json.results?.[0].place_id
85
79
  }
86
80
  }
81
+ setAddressState({ ...addressState, loading: true })
82
+ try {
83
+ const { content } = await ordering
84
+ .users(user?.id)
85
+ .addresses()
86
+ .save(data.address, { accessToken })
87
+ setAddressState({
88
+ ...addressState,
89
+ loading: false,
90
+ error: content.error ? content.result : null,
91
+ })
92
+ if (!content.error && data) {
93
+ setAddressState({
94
+ ...addressState,
95
+ address: data
96
+ })
97
+ changeAddress(data)
98
+ }
99
+ } catch (err : any) {
100
+ setAddressState({
101
+ ...addressState,
102
+ loading: false,
103
+ error: [err.message],
104
+ address: {}
105
+ })
106
+ }
87
107
  }
88
108
  })
89
- } catch (err : any){
90
- showToast(ToastType.Error, err?.message)
91
- }
92
- setAddressState({ ...addressState, loading: true })
93
- try {
94
- const { content } = await ordering
95
- .users(user?.id)
96
- .addresses()
97
- .save(data.address, { accessToken })
98
- setAddressState({
99
- ...addressState,
100
- loading: false,
101
- error: content.error ? content.result : null,
102
- })
103
- if (!content.error) {
104
- setAddressState({
105
- ...addressState,
106
- address: content.result
107
- })
108
- changeAddress(content.result.id, {
109
- address: content.result,
110
- isEdit: false
111
- })
112
- }
113
- } catch (err : any) {
114
- setAddressState({
115
- ...addressState,
116
- loading: false,
117
- error: [err.message],
118
- address: {}
119
- })
120
- }
121
109
  }
122
110
 
123
111
  useEffect(() => {
124
- if(business?.location && auth && googleMapsApiKey){
112
+ if(business?.location?.lat && business?.location?.lng){
125
113
  handleCurrentUserLocation()
126
114
  }
127
115
  }, [business?.location, googleMapsApiKey])
@@ -212,7 +200,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
212
200
  );
213
201
 
214
202
  if (businessState?.error || addressState.error) {
215
- return <OText>error!</OText>;
203
+ return <OText>{t('ERROR', 'Error')}</OText>;
216
204
  }
217
205
 
218
206
  return (
@@ -122,7 +122,7 @@ const CartUI = (props: any) => {
122
122
  >
123
123
  <OText
124
124
  weight="500"
125
- size={21}
125
+ size={18}
126
126
  color={theme.colors.black}
127
127
  >
128
128
  {t('THIS_ORDER_IS_TO', 'This order is to')}
@@ -136,7 +136,7 @@ const CartUI = (props: any) => {
136
136
  bgColor="transparent"
137
137
  borderColor="transparent"
138
138
  style={{ paddingEnd: 0 }}
139
- textStyle={{ color: theme.colors.primary, marginEnd: 0 }}
139
+ textStyle={{ color: theme.colors.primary, marginEnd: 0, fontSize: 18 }}
140
140
  onClick={handleChangeOrderType}
141
141
  />
142
142
  </OrderTypeWrapper>
@@ -187,14 +187,14 @@ const TopBar = (props:any) => {
187
187
  <StyledTopBar>
188
188
  <View>
189
189
  <OText
190
- size={20}
190
+ size={24}
191
191
  weight="700"
192
192
  mBottom={4}
193
193
  >
194
194
  {t('YOUR_ORDER', 'your order')}
195
195
  </OText>
196
196
  <OText
197
- size={20}
197
+ size={18}
198
198
  weight="500"
199
199
  color={theme.colors.mediumGray}
200
200
  >
@@ -55,6 +55,7 @@ const CustomerName = (props: Props): React.ReactElement => {
55
55
  const submitButton = (<OButton
56
56
  text={t('PROCEED_TO_PAY', 'Proceed to Pay')}
57
57
  onClick={handleSubmit(onSubmit)}
58
+ textStyle={{color: theme.colors.primaryContrast, fontSize: 20}}
58
59
  parentStyle={{
59
60
  height: orientationState?.orientation === PORTRAIT
60
61
  ? 50 : 100
@@ -118,14 +119,13 @@ const CustomerName = (props: Props): React.ReactElement => {
118
119
  'Invalid name',
119
120
  ).replace('_attribute_', t('NAME', 'Name')),
120
121
  }
121
-
122
122
  }}
123
123
  defaultValue=""
124
124
  />
125
125
 
126
126
  {orientationState?.orientation === LANDSCAPE && submitButton}
127
127
  </Container>
128
-
128
+
129
129
  {(orientationState?.orientation === PORTRAIT) && (
130
130
  <OSActions>
131
131
  {submitButton}
@@ -18,6 +18,7 @@ import {
18
18
  OSTable,
19
19
  OSActions,
20
20
  OSInputWrapper,
21
+ SentReceipt
21
22
  } from './styles'
22
23
  import { OrderDetailsParams, Product } from '../../types'
23
24
  import { Container } from '../../layouts/Container';
@@ -29,7 +30,7 @@ import { verifyDecimals } from '../../../../../src/utils'
29
30
  import { LANDSCAPE, PORTRAIT, useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation'
30
31
  import { useTheme } from 'styled-components/native'
31
32
  import { _retrieveStoreData } from '../../../../../src/providers/StoreUtil';
32
-
33
+ import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'
33
34
  const _EMAIL = 'email';
34
35
  const _SMS = 'sms';
35
36
 
@@ -161,7 +162,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
161
162
  setCountReceipts(countReceipts - 1)
162
163
  }
163
164
 
164
- }catch (error) {
165
+ } catch (error : any) {
165
166
  showToast(ToastType.Error, error.message)
166
167
  }
167
168
  setIsLoading(false)
@@ -243,17 +244,19 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
243
244
  marginBottom: 10,
244
245
  }}
245
246
  >
246
-
247
- <OText>{t('SEND_RECEIPT', 'Send receipt')}</OText>
247
+ <SentReceipt>
248
+ <MaterialIcon name='check-circle' color={theme.colors.primary} size={28} />
249
+ <OText size={20} mLeft={10}>{t('SEND_RECEIPT', 'Send receipt')}</OText>
250
+ </SentReceipt>
251
+ <OText size={20}>
252
+ {countReceipts}/5 {t('RECIPTS_REMAINING', 'Recipts remaining')}
253
+ </OText>
248
254
 
249
255
  {/* <OptionSwitch
250
256
  options={optionsToSendReceipt}
251
257
  onChange={setOptionToSendReceipt}
252
258
  /> */}
253
259
  </OSTable>
254
- <OText size={14} style={{alignSelf: 'flex-end'}}>
255
- {countReceipts}/5 {t('RECIPTS_REMAINING', 'Recipts remaining')}
256
- </OText>
257
260
  <OSTable>
258
261
  {optionToSendReceipt?.value === _EMAIL && (
259
262
  <Controller
@@ -334,21 +337,21 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
334
337
  }}
335
338
  >
336
339
  <OSTable>
337
- <OText>
340
+ <View style={{flexDirection: 'row', bottom: 10}}>
338
341
  <OText
339
- size={orientationState?.dimensions?.width * 0.04}
342
+ size={orientationState?.dimensions?.width * 0.039}
340
343
  weight="700"
341
344
  >
342
345
  {t('ORDER_NUMBER', 'Order No.')} {' '}
343
346
  </OText>
344
347
  <OText
345
- size={orientationState?.dimensions?.width * 0.04}
348
+ size={orientationState?.dimensions?.width * 0.039}
346
349
  weight="700"
347
350
  color={theme.colors.primary}
348
351
  >
349
352
  {order?.id}
350
353
  </OText>
351
- </OText>
354
+ </View>
352
355
  </OSTable>
353
356
 
354
357
  {order?.products?.length && (
@@ -392,7 +395,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
392
395
  >
393
396
  {t('PROMO_CODE', 'Promo code')}
394
397
  {'\n'}
395
- <OText weight="400">
398
+ <OText weight="400" style={{fontSize: 14}}>
396
399
  {order?.offer_type === 1 ? `${verifyDecimals(order?.offer_rate, parseNumber)}%` : parsePrice(order?.summary?.discount || order?.discount)} {t('OFF', 'off')}
397
400
  </OText>
398
401
  </OText>
@@ -26,3 +26,7 @@ export const OSInputWrapper = styled.View`
26
26
  min-height: 150px;
27
27
  background-color: #FFF;
28
28
  `
29
+
30
+ export const SentReceipt = styled.View`
31
+ flex-direction: row;
32
+ `
@@ -5,6 +5,7 @@ import styled, { useTheme } from 'styled-components/native'
5
5
  const Wrapper = styled.ScrollView`
6
6
  background-color: ${(props: any) => props.theme.colors.whiteGray};
7
7
  flex-direction: row;
8
+ padding-left: 10px;
8
9
  `
9
10
  const SegItem = styled.View`
10
11
  padding: 24px 12px;
@@ -32,8 +33,7 @@ interface Props {
32
33
  }
33
34
 
34
35
  const OSegment = (props: Props) => {
35
-
36
- var [curIndex, onSelected] = React.useState(props.selectedIdx)
36
+ const [curIndex, onSelected] = React.useState(props.selectedIdx)
37
37
  const onSelectItem = (idx: number) => {
38
38
  onSelected(idx)
39
39
  props.onSelectItem(idx)
@@ -16,7 +16,7 @@ import {
16
16
  DivideView,
17
17
  MediaWrapper,
18
18
  } from './styles';
19
- import { StyleSheet, View } from 'react-native';
19
+ import { Platform, StyleSheet, View } from 'react-native';
20
20
  import { BusinessInformationParams } from '../../types';
21
21
  import { GoogleMap } from '../GoogleMap';
22
22
  import { WebView } from 'react-native-webview';
@@ -116,7 +116,7 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
116
116
  lineHeight={21}
117
117
  mBottom={16}
118
118
  size={14}
119
- weight={'600'}
119
+ weight={Platform.OS === 'android' ? 'bold' : '600'}
120
120
  style={{ flexBasis: '20%' }}>
121
121
  {daysOfWeek[i].toUpperCase()}
122
122
  </OText>
@@ -25,6 +25,7 @@ import {
25
25
  import { FloatingButton } from '../FloatingButton'
26
26
  import { ProductForm } from '../ProductForm'
27
27
  import { UpsellingProducts } from '../UpsellingProducts'
28
+
28
29
  const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
29
30
  const {
30
31
  navigation,
@@ -139,7 +140,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
139
140
  imgRightSrc={null}
140
141
  style={styles.btnBackArrow}
141
142
  onClick={() => navigation?.canGoBack() && navigation.goBack()}
142
- imgLeftStyle={{ tintColor: theme.colors.textNormal }}
143
+ imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
143
144
  />
144
145
  {/* <AddressInput
145
146
  onPress={() => auth
@@ -31,6 +31,7 @@ const CartUI = (props: any) => {
31
31
  removeProduct,
32
32
  handleCartOpen,
33
33
  setIsCartsLoading,
34
+ hideUpselling
34
35
  // isFromCart
35
36
  } = props
36
37
 
@@ -248,6 +249,7 @@ const CartUI = (props: any) => {
248
249
  canOpenUpselling={canOpenUpselling}
249
250
  setCanOpenUpselling={setCanOpenUpselling}
250
251
  handleCloseUpsellingPage={() => { }}
252
+ isFromCart
251
253
  />
252
254
  )}
253
255
  </CContainer>
@@ -34,6 +34,7 @@ export const CartContent = (props: any) => {
34
34
  onNavigationRedirect={props.onNavigationRedirect}
35
35
  isCartsLoading={isCartsLoading}
36
36
  setIsCartsLoading={setIsCartsLoading}
37
+ hideUpselling
37
38
  />
38
39
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40, marginTop: 20 }} />
39
40
  </>
@@ -36,7 +36,7 @@ const DriverTipsUI = (props: any) => {
36
36
 
37
37
  const style = StyleSheet.create({
38
38
  circle: {
39
- borderRadius: 20
39
+ borderRadius: 30
40
40
  },
41
41
  inputStyle: {
42
42
  flex: 1,
@@ -74,7 +74,7 @@ const DriverTipsUI = (props: any) => {
74
74
  style={style.circle}
75
75
  isActive={option === optionSelected}
76
76
  >
77
- <OText size={18} color={option === optionSelected ? '#FFF' : '#000'}>
77
+ <OText size={13} color={option === optionSelected ? '#FFF' : theme.colors.textSecondary}>
78
78
  {`${isFixedPrice ? parsePrice(option) : `${option}%`}`}
79
79
  </OText>
80
80
  </DTCard>
@@ -13,7 +13,7 @@ export const DTWrapperTips = styled.View`
13
13
  display: flex;
14
14
  flex-direction: row;
15
15
  width: 100%;
16
- justify-content: space-evenly;
16
+ justify-content: space-between;
17
17
  align-items: center;
18
18
  flex-wrap: wrap;
19
19
  `
@@ -22,11 +22,12 @@ export const DTCard = styled.View`
22
22
  display: flex;
23
23
  justify-content: center;
24
24
  align-items: center;
25
- padding: 10px;
26
- border: 1px solid ${(props: any) => props.theme.colors.primary};
25
+ border: 1px solid ${(props: any) => props.isActive ? props.theme.colors.primary : props.theme.colors.border};
27
26
  text-transform: capitalize;
28
- min-height: 60px;
29
- min-width: 60px;
27
+ min-height: 48px;
28
+ min-width: 48px;
29
+ max-width: 48px;
30
+ max-height: 48px;
30
31
  margin-right: 10px;
31
32
  margin-top: 10px;
32
33
 
@@ -4,7 +4,7 @@ import { useTheme } from 'styled-components/native';
4
4
  import { Platform, StyleSheet, View } from 'react-native'
5
5
 
6
6
  import RNPickerSelect from 'react-native-picker-select'
7
- import { Container } from './styles'
7
+ import { Container, DummyContainer } from './styles'
8
8
  import { LanguageSelectorParams } from '../../types'
9
9
  import { OIcon } from '../shared'
10
10
 
@@ -63,7 +63,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
63
63
 
64
64
  return (
65
65
  <Container>
66
- {languagesState?.languages && (
66
+ {languagesState?.languages ? (
67
67
  <>
68
68
  {iconColor && <OIcon src={theme.images.general.language} color={iconColor} style={{ marginEnd: 14 }} width={16} />}
69
69
  <RNPickerSelect
@@ -77,7 +77,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
77
77
  disabled={orderState.loading}
78
78
  />
79
79
  </>
80
- )}
80
+ ) : <DummyContainer />}
81
81
  </Container>
82
82
  )
83
83
  }
@@ -5,3 +5,6 @@ export const Container = styled.View`
5
5
  justify-content: flex-start;
6
6
  flex-direction: row;
7
7
  `
8
+ export const DummyContainer = styled.View`
9
+ height: 40px;
10
+ `
@@ -337,7 +337,7 @@ const LoginFormUI = (props: LoginParams) => {
337
337
  <OInput
338
338
  isSecured={!passwordSee ? true : false}
339
339
  placeholder={t('PASSWORD', 'Password')}
340
- style={loginStyle.inputStyle}
340
+ style={{...loginStyle.inputStyle, marginBottom: 14}}
341
341
  icon={theme.images.general.lock}
342
342
  iconCustomRight={
343
343
  !passwordSee ? (
@@ -373,6 +373,13 @@ const LoginFormUI = (props: LoginParams) => {
373
373
  }}
374
374
  defaultValue=""
375
375
  />
376
+ {onNavigationRedirect && forgotButtonText && (
377
+ <TouchableOpacity onPress={() => onNavigationRedirect('Forgot')}>
378
+ <OText size={14} mBottom={18}>
379
+ {forgotButtonText}
380
+ </OText>
381
+ </TouchableOpacity>
382
+ )}
376
383
  <OButton
377
384
  onClick={handleSubmit(onSubmit)}
378
385
  text={loginButtonText}
@@ -386,13 +393,6 @@ const LoginFormUI = (props: LoginParams) => {
386
393
  </FormInput>
387
394
  )}
388
395
 
389
- {onNavigationRedirect && forgotButtonText && (
390
- <TouchableOpacity onPress={() => onNavigationRedirect('Forgot')}>
391
- <OText size={16} mBottom={18}>
392
- {forgotButtonText}
393
- </OText>
394
- </TouchableOpacity>
395
- )}
396
396
 
397
397
  {useLoginByCellphone &&
398
398
  loginTab === 'cellphone' &&
@@ -36,9 +36,6 @@ const MessagesUI = (props: MessagesParams) => {
36
36
 
37
37
  const [formattedMessages, setFormattedMessages] = useState<Array<any>>([])
38
38
  const [isKeyboardShow, setIsKeyboardShow] = useState(false)
39
- const previousStatus = [1, 2, 5, 6, 10, 11, 12, 16, 17]
40
- const chatDisabled = previousStatus.includes(order?.status)
41
-
42
39
  const { height } = useWindowDimensions();
43
40
  const { top, bottom } = useSafeAreaInsets();
44
41
 
@@ -239,52 +236,36 @@ const MessagesUI = (props: MessagesParams) => {
239
236
  )
240
237
 
241
238
  const renderComposer = (props: typeof ComposerProps) => (
242
- chatDisabled ? (
243
- <View
244
- style={{
245
- width: '100%',
246
- flexDirection: 'column',
247
- alignItems: 'center'
248
- }}
249
- >
250
- <MaterialCommunityIcon
251
- name='close-octagon-outline'
252
- size={24}
253
- />
254
- <OText size={14}>{t('NOT_SEND_MESSAGES', 'You can\'t send messages because the order has ended')}</OText>
255
- </View>
256
- ) : (
257
- <View style={{
258
- flexDirection: 'row', width: '80%', alignItems: 'center', backgroundColor: theme.colors.backgroundGray100,
259
- borderRadius: 7.6,
260
- }}>
261
- <Composer
262
- {...props}
263
- textInputStyle={{
264
- height: 32,
265
- minHeight: 32,
266
- alignItems: 'center',
267
- justifyContent: 'center',
268
- paddingHorizontal: 12,
269
- borderColor: '#DBDCDB',
270
- color: '#010300',
271
- }}
272
- textInputProps={{
273
- value: message,
274
- onSubmitEditing: onSubmit,
275
- returnKeyType: message ? 'send' : 'done',
276
- blurOnSubmit: true,
277
- multiline: false,
278
- numberOfLines: 1,
279
- autoCorrect: false,
280
- autoCompleteType: 'off',
281
- enablesReturnKeyAutomatically: false
282
- }}
283
- placeholder={t('WRITE_MESSAGE', 'Write message...')}
284
- />
285
- <RenderActions {...props} />
286
- </View>
287
- )
239
+ <View style={{
240
+ flexDirection: 'row', width: '80%', alignItems: 'center', backgroundColor: theme.colors.backgroundGray100,
241
+ borderRadius: 7.6,
242
+ }}>
243
+ <Composer
244
+ {...props}
245
+ textInputStyle={{
246
+ height: 32,
247
+ minHeight: 32,
248
+ alignItems: 'center',
249
+ justifyContent: 'center',
250
+ paddingHorizontal: 12,
251
+ borderColor: '#DBDCDB',
252
+ color: '#010300',
253
+ }}
254
+ textInputProps={{
255
+ value: message,
256
+ onSubmitEditing: onSubmit,
257
+ returnKeyType: message ? 'send' : 'done',
258
+ blurOnSubmit: true,
259
+ multiline: false,
260
+ numberOfLines: 1,
261
+ autoCorrect: false,
262
+ autoCompleteType: 'off',
263
+ enablesReturnKeyAutomatically: false
264
+ }}
265
+ placeholder={t('WRITE_MESSAGE', 'Write message...')}
266
+ />
267
+ <RenderActions {...props} />
268
+ </View>
288
269
  )
289
270
 
290
271
  const renderSend = (props: any) => (
@@ -1,4 +1,4 @@
1
- import React, { useEffect } from 'react'
1
+ import React, { useEffect, useState } from 'react'
2
2
  import {
3
3
  OrderTypeControl,
4
4
  useLanguage,
@@ -26,6 +26,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
26
26
  const [orderState] = useOrder();
27
27
  const [, t] = useLanguage();
28
28
  const _orderTypes = orderTypes.filter((type: any) => configTypes?.includes(type.value));
29
+ const [isChanging, setChanging] = useState(false);
29
30
 
30
31
  const items = _orderTypes.map((type) => {
31
32
  return {
@@ -40,9 +41,14 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
40
41
  const handleChangeOrderTypeCallback = (orderType: number) => {
41
42
  if (!orderState.loading) {
42
43
  handleChangeOrderType(orderType)
44
+ setChanging(true);
43
45
  }
44
46
  }
45
47
 
48
+ useEffect(() => {
49
+ if (isChanging) goToBack();
50
+ }, [orderState?.options])
51
+
46
52
  return (
47
53
  <Wrapper>
48
54
  <NavBar
@@ -81,7 +81,7 @@ export const SearchBar = (props: any) => {
81
81
  icon={theme.images.general.search}
82
82
  iconStyle={{ width: 12 }}
83
83
  returnKeyType='done'
84
- inputStyle={inputStyle}
84
+ inputStyle={{padding: 0, paddingTop: Platform.OS == 'android' ? 2 : 0, ...inputStyle}}
85
85
  />
86
86
  {isCancelButtonShow && (
87
87
  <OButton
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect, useRef, useState } from 'react';
2
- import { View, Pressable, StyleSheet } from 'react-native';
2
+ import { View, Pressable, StyleSheet, Linking, Platform } from 'react-native';
3
3
  import { useForm, Controller } from 'react-hook-form';
4
4
  import Spinner from 'react-native-loading-spinner-overlay';
5
5
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
6
-
6
+ import CheckBox from '@react-native-community/checkbox';
7
7
  import { PhoneInputNumber } from '../PhoneInputNumber';
8
8
  import { FacebookLogin } from '../FacebookLogin';
9
9
 
@@ -90,6 +90,10 @@ const SignupFormUI = (props: SignupParams) => {
90
90
  flexGrow: 1,
91
91
  marginBottom: 7,
92
92
  },
93
+ checkBoxStyle: {
94
+ width: 25,
95
+ height: 25,
96
+ }
93
97
  });
94
98
 
95
99
  const showInputPhoneNumber =
@@ -272,6 +276,16 @@ const SignupFormUI = (props: SignupParams) => {
272
276
  onChange(value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''));
273
277
  };
274
278
 
279
+ const handleOpenTermsUrl = async (url: any) => {
280
+ const supported = await Linking.canOpenURL(url);
281
+
282
+ if (supported) {
283
+ await Linking.openURL(url);
284
+ } else {
285
+ showToast(ToastType.Error, t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('URL', 'URL')))
286
+ }
287
+ }
288
+
275
289
  useEffect(() => {
276
290
  if (!formState.loading && formState.result?.error) {
277
291
  formState.result?.result &&
@@ -453,6 +467,46 @@ const SignupFormUI = (props: SignupParams) => {
453
467
  </View>
454
468
  )}
455
469
 
470
+ {configs?.terms_and_conditions?.value === 'true' && (
471
+ <View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20 }}>
472
+ <Controller
473
+ control={control}
474
+ render={({ onChange, value }: any) => (
475
+ <CheckBox
476
+ value={value}
477
+ onValueChange={newValue => {
478
+ onChange(newValue)
479
+ }}
480
+ boxType={'square'}
481
+ tintColors={{
482
+ true: theme.colors.primary,
483
+ false: theme.colors.disabled
484
+ }}
485
+ tintColor={theme.colors.disabled}
486
+ onCheckColor={theme.colors.primary}
487
+ onTintColor={theme.colors.primary}
488
+ style={Platform.OS === 'ios' && style.checkBoxStyle}
489
+ />
490
+ )}
491
+ name='termsAccept'
492
+ rules={{
493
+ required: t('VALIDATION_ERROR_ACCEPTED', 'The _attribute_ must be accepted.').replace('_attribute_', t('TERMS_AND_CONDITIONS', 'Terms & Conditions'))
494
+ }}
495
+ defaultValue={false}
496
+ />
497
+ <OText style={{ fontSize: 14, paddingHorizontal: 5 }}>{t('TERMS_AND_CONDITIONS_TEXT', 'I’m agree with')}</OText>
498
+ <OButton
499
+ imgRightSrc={null}
500
+ text={t('TERMS_AND_CONDITIONS', 'Terms & Conditions')}
501
+ bgColor='#FFF'
502
+ borderColor='#FFF'
503
+ style={{ paddingLeft: 0, paddingRight: 0, height: 30, shadowColor: '#FFF' }}
504
+ textStyle={{ color: theme.colors.primary, marginLeft: 0, marginRight: 0 }}
505
+ onClick={() => handleOpenTermsUrl(configs?.terms_and_conditions_url?.value)}
506
+ />
507
+ </View>
508
+ )}
509
+
456
510
  {signupTab !== 'cellphone' && (
457
511
  <Controller
458
512
  control={control}
@@ -535,11 +589,25 @@ const SignupFormUI = (props: SignupParams) => {
535
589
  textStyle={{ color: 'white' }}
536
590
  imgRightSrc={null}
537
591
  isDisabled={formState.loading || validationFields.loading}
538
- style={{ borderRadius: 7.6, marginTop: 6 }}
592
+ style={{ borderRadius: 7.6, marginTop: 6,shadowOpacity: 0 }}
539
593
  />
540
594
  )}
541
595
  </FormInput>
542
596
 
597
+ {
598
+ onNavigationRedirect && loginButtonText && (
599
+ <View style={style.wrappText}>
600
+ <OText size={14} style={{ marginRight: 5 }}>
601
+ {t('MOBILE_FRONT_ALREADY_HAVE_AN_ACCOUNT', 'Already have an account?')}
602
+ </OText>
603
+ <Pressable onPress={() => onNavigationRedirect('Login')}>
604
+ <OText size={14} color={theme.colors.primary}>
605
+ {loginButtonText}
606
+ </OText>
607
+ </Pressable>
608
+ </View>
609
+ )
610
+ }
543
611
  <View
544
612
  style={{
545
613
  flexDirection: 'row',
@@ -579,20 +647,6 @@ const SignupFormUI = (props: SignupParams) => {
579
647
  </SocialButtons>
580
648
  </ButtonsWrapper>
581
649
 
582
- {/* {
583
- onNavigationRedirect && loginButtonText && (
584
- <View style={style.wrappText}>
585
- <OText size={18} style={{ marginRight: 5 }}>
586
- {t('MOBILE_FRONT_ALREADY_HAVE_AN_ACCOUNT', 'Already have an account?')}
587
- </OText>
588
- <Pressable onPress={() => onNavigationRedirect('Login')}>
589
- <OText size={18} color={theme.colors.primary}>
590
- {loginButtonText}
591
- </OText>
592
- </Pressable>
593
- </View>
594
- )
595
- } */}
596
650
 
597
651
  {/* {
598
652
  configs && Object.keys(configs).length > 0 && (
@@ -106,8 +106,7 @@ const StripeElementsFormUI = (props: any) => {
106
106
  !!card?.last4 &&
107
107
  !!card?.expiryMonth &&
108
108
  !!card?.expiryYear &&
109
- !!card?.brand &&
110
- !!card?.postalCode
109
+ !!card?.brand
111
110
  )
112
111
  }
113
112
  }, [card])
@@ -118,12 +117,13 @@ const StripeElementsFormUI = (props: any) => {
118
117
  <View style={{ flex: 1 }}>
119
118
  <StripeProvider publishableKey={publicKey}>
120
119
  <CardField
121
- postalCodeEnabled={true}
120
+ postalCodeEnabled={false}
122
121
  cardStyle={{
123
122
  backgroundColor: '#FFFFFF',
124
123
  textColor: '#000000',
124
+ fontSize: 17,
125
125
  styles: {
126
-
126
+
127
127
  }
128
128
  }}
129
129
  style={{
@@ -132,7 +132,7 @@ const StripeElementsFormUI = (props: any) => {
132
132
  marginVertical: 50,
133
133
  borderWidth: 1,
134
134
  borderColor: theme.colors.border,
135
- borderRadius: 7.6
135
+ borderRadius: 7.6,
136
136
  }}
137
137
  onCardChange={(cardDetails: any) => setCard(cardDetails)}
138
138
  />
@@ -1,7 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import Spinner from 'react-native-loading-spinner-overlay';
3
- import MaterialComIcon from 'react-native-vector-icons/MaterialCommunityIcons'
4
- import { Platform, SafeAreaView, StyleSheet, TouchableOpacity, View } from 'react-native'
2
+ import { Platform, StyleSheet, View } from 'react-native'
5
3
  import {
6
4
  UpsellingPage as UpsellingPageController,
7
5
  useUtils,
@@ -23,7 +21,6 @@ import {
23
21
  import { ProductForm } from '../ProductForm';
24
22
  import { OrderSummary } from '../OrderSummary';
25
23
  import { ScrollView } from 'react-native-gesture-handler';
26
- import NavBar from '../NavBar';
27
24
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
28
25
 
29
26
  const UpsellingProductsUI = (props: UpsellingProductsParams) => {
@@ -36,7 +33,8 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
36
33
  handleCloseUpsellingPage,
37
34
  openUpselling,
38
35
  canOpenUpselling,
39
- setCanOpenUpselling
36
+ setCanOpenUpselling,
37
+ isFromCart
40
38
  } = props
41
39
 
42
40
  const theme = useTheme();
@@ -76,7 +74,11 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
76
74
  useEffect(() => {
77
75
  if (!isCustomMode) {
78
76
  if (!upsellingProducts.loading) {
79
- setCanOpenUpselling && setCanOpenUpselling(true)
77
+ if (upsellingProducts?.products?.length && !isFromCart) {
78
+ setCanOpenUpselling && setCanOpenUpselling(true)
79
+ } else {
80
+ handleUpsellingPage && handleUpsellingPage()
81
+ }
80
82
  }
81
83
  // if ((!upsellingProducts?.products?.length && !upsellingProducts.loading && !canOpenUpselling && openUpselling) ||
82
84
  // (!upsellingProducts?.products?.length && !upsellingProducts.loading && openUpselling)) {
@@ -85,6 +87,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
85
87
  }
86
88
  }, [upsellingProducts.loading, upsellingProducts?.products.length])
87
89
 
90
+ useEffect(() => {
91
+ if (!cart?.validate && cart?.products?.length == 0) handleCloseUpsellingPage()
92
+ }, [cart])
93
+
88
94
  const handleFormProduct = (product: any) => {
89
95
  setActualProduct(product)
90
96
  setModalIsOpen(true)
@@ -149,6 +155,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
149
155
  title={''}
150
156
  open={openUpselling}
151
157
  onClose={() => handleUpsellingPage()}
158
+ isStatusBar
152
159
  >
153
160
  <TopBar style={{ paddingTop: Platform.OS == 'ios' ? 10 : 30 }}>
154
161
  <TopActions onPress={() => handleCloseUpsellingPage()}>
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, Text } from 'react-native'
2
+ import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, Text, Platform, StatusBar } from 'react-native'
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context'
4
4
  const deviceHeight = Dimensions.get('window').height
5
5
 
@@ -8,13 +8,15 @@ interface Props {
8
8
  title?: string;
9
9
  children?: any;
10
10
  onClose?: any;
11
+ isStatusBar?: boolean;
11
12
  }
12
13
  const OBottomPopup = (props: Props) => {
13
14
  const {
14
15
  open,
15
16
  title,
16
17
  onClose,
17
- children
18
+ children,
19
+ isStatusBar
18
20
  } = props
19
21
  const { top, bottom } = useSafeAreaInsets();
20
22
  return (
@@ -25,6 +27,7 @@ const OBottomPopup = (props: Props) => {
25
27
  onRequestClose={() => onClose()}
26
28
  presentationStyle={'fullScreen'}
27
29
  >
30
+ {isStatusBar && <StatusBar translucent={false} />}
28
31
  <View style={styles.container}>
29
32
  <TouchableWithoutFeedback
30
33
  style={styles.touchableOutsideStyle}
@@ -127,7 +127,7 @@ const styles = StyleSheet.create({
127
127
  backgroundColor: 'transparent',
128
128
  width: 35,
129
129
  height: 35,
130
- marginStart: -4,
130
+ marginStart: -9,
131
131
  marginTop: 12,
132
132
  alignItems: 'center',
133
133
  justifyContent: 'center',
@@ -387,6 +387,7 @@ export interface UpsellingProductsParams {
387
387
  setCanOpenUpselling?: (value: any) => void;
388
388
  cart?: any;
389
389
  handleCloseUpsellingPage: () => void;
390
+ isFromCart?: boolean;
390
391
  }
391
392
 
392
393
  export interface GoogleMapsParams {