ordering-ui-react-native 0.11.60 → 0.12.2

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 (27) hide show
  1. package/package.json +1 -1
  2. package/src/components/BusinessBasicInformation/index.tsx +6 -2
  3. package/src/components/SingleProductCard/index.tsx +14 -4
  4. package/src/config.json +1 -1
  5. package/themes/business/index.tsx +2 -1
  6. package/themes/business/src/components/MapView/index.tsx +52 -21
  7. package/themes/business/src/components/shared/OFab.tsx +8 -3
  8. package/themes/business/src/types/index.tsx +3 -1
  9. package/themes/kiosk/src/components/BusinessMenu/index.tsx +49 -5
  10. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +6 -2
  11. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +10 -1
  12. package/themes/kiosk/src/components/CartContent/index.tsx +7 -1
  13. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +11 -1
  14. package/themes/kiosk/src/components/CustomerName/index.tsx +91 -64
  15. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +13 -3
  16. package/themes/kiosk/src/types/index.d.ts +5 -0
  17. package/themes/single-business/index.tsx +108 -16
  18. package/themes/single-business/src/components/BusinessBasicInformation/index.tsx +13 -3
  19. package/themes/single-business/src/components/BusinessBasicInformation/styles.tsx +1 -1
  20. package/themes/single-business/src/components/BusinessInformation/index.tsx +59 -13
  21. package/themes/single-business/src/components/BusinessInformation/styles.tsx +2 -2
  22. package/themes/single-business/src/components/Checkout/index.tsx +5 -6
  23. package/themes/single-business/src/components/DriverTips/index.tsx +1 -0
  24. package/themes/single-business/src/components/DriverTips/styles.tsx +10 -9
  25. package/themes/single-business/src/components/PaymentOptions/index.tsx +16 -14
  26. package/themes/single-business/src/components/PaymentOptions/styles.tsx +4 -6
  27. package/themes/single-business/src/components/shared/index.tsx +10 -8
@@ -34,7 +34,7 @@ const CustomerName = (props: Props): React.ReactElement => {
34
34
  marginBottom: 20,
35
35
  borderWidth: 1,
36
36
  borderColor: theme.colors.disabled,
37
- height: 44
37
+ height: 50
38
38
  },
39
39
  });
40
40
 
@@ -67,72 +67,99 @@ const CustomerName = (props: Props): React.ReactElement => {
67
67
  }}
68
68
  />);
69
69
 
70
+ const skipButton = (
71
+ <View style={{flex:1, left: orientationState?.dimensions.width * 0.2,}}>
72
+ <OButton
73
+ text={t('SKIP', 'Skip')}
74
+ onClick={onProceedToPay}
75
+ textStyle={{color: theme.colors.primaryContrast, fontSize: 20}}
76
+ parentStyle={{
77
+ height: orientationState?.orientation === PORTRAIT
78
+ ? 50 : 100
79
+ }}
80
+ style={{
81
+ width: orientationState?.orientation === PORTRAIT
82
+ ? orientationState?.dimensions.width - 40
83
+ : orientationState?.dimensions.width * 0.1,
84
+ }}
85
+ />
86
+ </View>
87
+ );
88
+
70
89
  return (
71
90
  <>
72
- <Container>
73
- <NavBar
74
- title={t('YOUR_NAME', 'Your name')}
75
- onActionLeft={goToBack}
76
- btnStyle={{paddingLeft: 0}}
77
- />
78
-
79
- <View style={{ marginVertical: orientationState?.dimensions?.height * 0.03 }}>
80
- <OText
81
- size={orientationState?.dimensions?.width * 0.05}
82
- >
83
- {t('WHOM_MIGHT_THIS', 'Whom might this')} {'\n'}
84
- <OText
85
- size={orientationState?.dimensions?.width * 0.05}
86
- weight={'700'}
87
- >
88
- {`${t('ORDER_BE_FOR', 'order be for?')}`}
89
- </OText>
90
- </OText>
91
- </View>
92
-
93
- <Controller
94
- control={control}
95
- render={({ onChange, value }: any) => (
96
- <OInput
97
- placeholder={t('WRITE_YOUR_NAME', 'Write your name')}
98
- style={{
99
- ...styles.inputStyle,
100
- width: orientationState?.orientation === PORTRAIT
101
- ? orientationState?.dimensions.width - 40
102
- : orientationState?.dimensions.width * 0.5,
103
- }}
104
- value={value}
105
- autoCapitalize="words"
106
- autoCorrect={false}
107
- onChange={(val: any) => onChange(val)}
108
- />
109
- )}
110
- name="name"
111
- rules={{
112
- required: t(
113
- 'VALIDATION_ERROR_REQUIRED',
114
- 'The field Customer Name is required',
115
- ).replace('_attribute_', t('REQUEST_COLLECTION_CUSTOMER_NAME', 'Customer Name')),
116
- pattern: {
117
- value: /^[a-zA-Z áéíóúüñçÁÉÍÓÚÜÑÇ]+$/i,
118
- message: t(
119
- 'INVALID_ERROR',
120
- 'Invalid name',
121
- ).replace('_attribute_', t('NAME', 'Name')),
122
- }
123
- }}
124
- defaultValue=""
125
- />
126
-
127
- {orientationState?.orientation === LANDSCAPE && submitButton}
128
- </Container>
91
+ <Container>
92
+ <NavBar
93
+ title={t('YOUR_NAME', 'Your name')}
94
+ onActionLeft={goToBack}
95
+ btnStyle={{paddingLeft: 0}}
96
+ />
97
+ <View style={{
98
+ marginVertical: orientationState?.dimensions?.height * 0.08,
99
+ paddingLeft: orientationState?.dimensions?.width * 0.25
100
+ }}>
101
+ <OText
102
+ size={orientationState?.dimensions?.width * 0.05}
103
+ style={{bottom: 20}}
104
+ >
105
+ {t('WHATS_YOUR_NAME', "What's your name?")}
106
+ {/* <OText
107
+ size={orientationState?.dimensions?.width * 0.05}
108
+ weight={'700'}
109
+ >
110
+ {`${t('ORDER_BE_FOR', 'order be for?')}`}
111
+ </OText> */}
112
+ </OText>
113
+ <Controller
114
+ control={control}
115
+ render={({ onChange, value }: any) => (
116
+ <OInput
117
+ placeholder={t('WRITE_YOUR_NAME', 'Write your name')}
118
+ style={{
119
+ ...styles.inputStyle,
120
+ width: orientationState?.orientation === PORTRAIT
121
+ ? orientationState?.dimensions.width - 40
122
+ : orientationState?.dimensions.width * 0.5,
123
+ }}
124
+ value={value}
125
+ autoCapitalize="words"
126
+ autoCorrect={false}
127
+ onChange={(val: any) => onChange(val)}
128
+ onSubmitEditing={handleSubmit(onSubmit)}
129
+ />
130
+ )}
131
+ name="name"
132
+ rules={{
133
+ required: t(
134
+ 'VALIDATION_ERROR_REQUIRED',
135
+ 'The field Customer Name is required',
136
+ ).replace('_attribute_', t('REQUEST_COLLECTION_CUSTOMER_NAME', 'Customer Name')),
137
+ pattern: {
138
+ value: /^[a-zA-Z áéíóúüñçÁÉÍÓÚÜÑÇ]+$/i,
139
+ message: t(
140
+ 'INVALID_ERROR',
141
+ 'Invalid name',
142
+ ).replace('_attribute_', t('NAME', 'Name')),
143
+ }
144
+ }}
145
+ defaultValue=""
146
+ />
129
147
 
130
- {(orientationState?.orientation === PORTRAIT) && (
131
- <OSActions>
132
- {submitButton}
133
- </OSActions>
134
- )}
135
- </>
148
+ {orientationState?.orientation === LANDSCAPE && submitButton}
149
+ {orientationState?.orientation === LANDSCAPE && skipButton}
150
+ {(orientationState?.orientation === PORTRAIT) && (
151
+ <OSActions>
152
+ {submitButton}
153
+ </OSActions>
154
+ )}
155
+ {(orientationState?.orientation === PORTRAIT) && (
156
+ <OSActions>
157
+ {skipButton}
158
+ </OSActions>
159
+ )}
160
+ </View>
161
+ </Container>
162
+ </>
136
163
  );
137
164
  };
138
165
 
@@ -31,6 +31,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
31
31
  canOpenUpselling,
32
32
  setCanOpenUpselling,
33
33
  onClose,
34
+ resetInactivityTimeout,
34
35
  } = props
35
36
  const [actualProduct, setActualProduct] = useState<any>(null)
36
37
  const [modalIsOpen, setModalIsOpen] = useState(false)
@@ -150,7 +151,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
150
151
  style={{ height: 40, width: '100%' }}
151
152
  bgColor="#EAF2FE"
152
153
  borderColor="#EAF2FE"
153
- onClick={() => handleFormProduct(product)}
154
+ onClick={() => {
155
+ resetInactivityTimeout()
156
+ handleFormProduct(product)
157
+ }}
154
158
  />
155
159
  </Item>
156
160
  )) : (
@@ -221,7 +225,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
221
225
  style={{ minHeight: 40, height: 'auto', width: '100%' }}
222
226
  bgColor="#EAF2FE"
223
227
  borderColor="#EAF2FE"
224
- onClick={() => handleFormProduct(product)}
228
+ onClick={() => {
229
+ resetInactivityTimeout()
230
+ handleFormProduct(product)
231
+ }}
225
232
  />
226
233
  </Item>
227
234
  )}
@@ -251,7 +258,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
251
258
  imgRightSrc=''
252
259
  text={t('I_AM_FINE_THANK_YOU', 'I’m fine, thank you')}
253
260
  style={styles.closeUpsellingButton}
254
- onClick={() => handleUpsellingPage()}
261
+ onClick={() => {
262
+ resetInactivityTimeout()
263
+ handleUpsellingPage()
264
+ }}
255
265
  />
256
266
  </CloseUpsellingLand>
257
267
  </View>
@@ -12,6 +12,9 @@ export interface BusinessProductsListingParams {
12
12
  errorQuantityProducts?: boolean;
13
13
  header?: any;
14
14
  logo?: any;
15
+ resetInactivityTimeout: any;
16
+ clearInactivityTimeout: any;
17
+ bottomSheetVisibility: any;
15
18
  }
16
19
 
17
20
  export interface OrderDetailsParams {
@@ -49,6 +52,7 @@ export interface UpsellingProductsParams {
49
52
  canOpenUpselling?: boolean;
50
53
  setCanOpenUpselling?: (value: any) => void;
51
54
  onClose?: () => void;
55
+ resetInactivityTimeout: any;
52
56
  }
53
57
 
54
58
  export interface LanguageSelectorParams {
@@ -464,4 +468,5 @@ export interface Cart {
464
468
  service_fee_with_discount: number;
465
469
  delivery_price_with_discount: number;
466
470
  total: number;
471
+ clearInactivityTimeout: any;
467
472
  }
@@ -1,31 +1,76 @@
1
- import { AddressForm } from './src/components/AddressForm';
2
- import { AddressDetails } from './src/components/AddressDetails';
3
- import { Home } from './src/components/Home';
4
- import { LoginForm } from './src/components/LoginForm';
5
- import { SignupForm } from './src/components/SignupForm';
6
1
  import { ActiveOrders } from './src/components/ActiveOrders';
2
+ import { AddressDetails } from './src/components/AddressDetails';
3
+ import { AddressForm } from './src/components/AddressForm';
7
4
  import { AddressList } from './src/components/AddressList';
8
5
  import { AppleLogin } from './src/components/AppleLogin';
6
+ import BottomWrapper from './src/components/BottomWrapper';
7
+ import { BusinessBasicInformation } from './src/components/BusinessBasicInformation';
8
+ import { BusinessController } from './src/components/BusinessController';
9
9
  import { BusinessesListing } from './src/components/BusinessesListing';
10
+ import { BusinessFeaturedController } from './src/components/BusinessFeaturedController';
11
+ import { BusinessInformation } from './src/components/BusinessInformation';
12
+ import { BusinessItemAccordion } from './src/components/BusinessItemAccordion';
13
+ import { BusinessProductsCategories } from './src/components/BusinessProductsCategories';
14
+ import { BusinessProductsList } from './src/components/BusinessProductsList';
10
15
  import { BusinessProductsListing } from './src/components/BusinessProductsListing';
16
+ import { BusinessReviews } from './src/components/BusinessReviews';
17
+ import { BusinessTypeFilter } from './src/components/BusinessTypeFilter';
18
+ import { Cart } from './src/components/Cart';
11
19
  import { CartContent } from './src/components/CartContent';
12
20
  import { Checkout } from './src/components/Checkout';
21
+ import { CouponControl } from './src/components/CouponControl';
22
+ import { DriverTips } from './src/components/DriverTips';
23
+ import { FacebookLogin } from './src/components/FacebookLogin';
24
+ import { FloatingButton } from './src/components/FloatingButton';
13
25
  import { ForgotPasswordForm } from './src/components/ForgotPasswordForm';
26
+ import { GoogleLogin } from './src/components/GoogleLogin';
27
+ import { GoogleMap } from './src/components/GoogleMap';
28
+ import { GPSButton } from './src/components/GPSButton';
29
+ import { Help } from './src/components/Help';
30
+ import { HelpAccountAndPayment } from './src/components/HelpAccountAndPayment';
31
+ import { HelpGuide } from './src/components/HelpGuide';
32
+ import { HelpOrder } from './src/components/HelpOrder';
33
+ import { Home } from './src/components/Home';
34
+ import { LanguageSelector } from './src/components/LanguageSelector';
35
+ import { LastOrder } from './src/components/LastOrder';
36
+ import { LastOrders } from './src/components/LastOrders';
37
+ import { LoginForm } from './src/components/LoginForm';
38
+ import { LogoutButton } from './src/components/LogoutButton';
39
+ import { Messages } from './src/components/Messages';
14
40
  import { MomentOption } from './src/components/MomentOption';
15
- import { OrdersOption } from './src/components/OrdersOption';
41
+ import NavBar from './src/components/NavBar';
42
+ import { NotFoundSource } from './src/components/NotFoundSource';
43
+ import Notifications from './src/components/Notifications';
16
44
  import { OrderDetails } from './src/components/OrderDetails';
17
- import { UserProfileForm } from './src/components/UserProfileForm';
45
+ import { OrdersOption } from './src/components/OrdersOption';
46
+ import { OrderSummary } from './src/components/OrderSummary';
47
+ import { OrderTypeSelector } from './src/components/OrderTypeSelector';
48
+ import { PaymentOptionCash } from './src/components/PaymentOptionCash';
49
+ import { PaymentOptions } from './src/components/PaymentOptions';
50
+ import { PaymentOptionStripe } from './src/components/PaymentOptionStripe';
51
+ import { PhoneInputNumber } from './src/components/PhoneInputNumber';
52
+ import { PreviousOrders } from './src/components/PreviousOrders';
53
+ import { ProductForm } from './src/components/ProductForm';
54
+ import { ProductIngredient } from './src/components/ProductIngredient';
55
+ import { ProductItemAccordion } from './src/components/ProductItemAccordion';
56
+ import { ProductOption } from './src/components/ProductOption';
57
+ import { ProductOptionSubOption } from './src/components/ProductOptionSubOption';
18
58
  import { ReviewOrder } from './src/components/ReviewOrder';
59
+ import { SearchBar } from './src/components/SearchBar';
60
+ import { SignupForm } from './src/components/SignupForm';
61
+ import { SingleProductCard } from './src/components/SingleProductCard';
62
+ import { StripeCardForm } from './src/components/StripeCardForm';
63
+ import { StripeCardsList } from './src/components/StripeCardsList';
64
+ import { StripeElementsForm } from './src/components/StripeElementsForm';
65
+ import { StripeRedirectForm } from './src/components/StripeRedirectForm';
66
+ import TagSelector from './src/components/TagSelector';
67
+ import { UpsellingProducts } from './src/components/UpsellingProducts';
68
+ import { UserDetails } from './src/components/UserDetails';
69
+ import { UserFormDetailsUI } from './src/components/UserFormDetails';
19
70
  import { UserProfile } from './src/components/UserProfile';
20
- import { NotFoundSource } from './src/components/NotFoundSource';
21
- import { Help } from './src/components/Help';
22
- import { HelpOrder } from './src/components/HelpOrder';
23
- import { HelpGuide } from './src/components/HelpGuide';
24
- import { HelpAccountAndPayment } from './src/components/HelpAccountAndPayment';
25
- import { OrderTypeSelector } from './src/components/OrderTypeSelector';
26
- import Notifications from './src/components/Notifications';
71
+ import { UserProfileForm } from './src/components/UserProfileForm';
72
+ import { VerifyPhone } from './src/components/VerifyPhone';
27
73
 
28
- import { Toast } from './src/components/shared/OToast';
29
74
  import {
30
75
  OText,
31
76
  OButton,
@@ -40,6 +85,7 @@ import {
40
85
  OAlert,
41
86
  OModal,
42
87
  OBottomPopup,
88
+ Toast
43
89
  } from './src/components/shared';
44
90
 
45
91
  import { Container } from './src/layouts/Container';
@@ -78,6 +124,52 @@ export {
78
124
  HelpAccountAndPayment,
79
125
  OrderTypeSelector,
80
126
  Notifications,
127
+ BottomWrapper,
128
+ BusinessBasicInformation,
129
+ BusinessController,
130
+ BusinessFeaturedController,
131
+ BusinessInformation,
132
+ BusinessItemAccordion,
133
+ BusinessProductsCategories,
134
+ BusinessProductsList,
135
+ BusinessReviews,
136
+ BusinessTypeFilter,
137
+ Cart,
138
+ CouponControl,
139
+ DriverTips,
140
+ FacebookLogin,
141
+ FloatingButton,
142
+ GoogleLogin,
143
+ GoogleMap,
144
+ GPSButton,
145
+ LanguageSelector,
146
+ LastOrder,
147
+ LastOrders,
148
+ LogoutButton,
149
+ Messages,
150
+ NavBar,
151
+ OrderSummary,
152
+ PaymentOptionCash,
153
+ PaymentOptions,
154
+ PaymentOptionStripe,
155
+ PhoneInputNumber,
156
+ PreviousOrders,
157
+ ProductForm,
158
+ ProductIngredient,
159
+ ProductItemAccordion,
160
+ ProductOption,
161
+ ProductOptionSubOption,
162
+ SearchBar,
163
+ SingleProductCard,
164
+ StripeCardForm,
165
+ StripeCardsList,
166
+ StripeElementsForm,
167
+ StripeRedirectForm,
168
+ TagSelector,
169
+ UpsellingProducts,
170
+ UserDetails,
171
+ UserFormDetailsUI,
172
+ VerifyPhone,
81
173
 
82
174
  // OComponents
83
175
  Toast,
@@ -104,4 +196,4 @@ export {
104
196
  _setStoreData,
105
197
  _removeStoreData,
106
198
  _clearStoreData
107
- }
199
+ }
@@ -55,6 +55,11 @@ export const BusinessBasicInformation = (
55
55
  return _types.join(', ');
56
56
  };
57
57
 
58
+ const onNavigationRedirect = (page: string, params: any) => {
59
+ if (!page) return
60
+ navigation.navigate(page, params);
61
+ }
62
+
58
63
  return (
59
64
  <BusinessContainer>
60
65
  <BusinessHeader
@@ -150,7 +155,12 @@ export const BusinessBasicInformation = (
150
155
  {business?.name}
151
156
  </OText>
152
157
  {!isBusinessInfoShow && (
153
- <WrapBusinessInfo onPress={() => setOpenBusinessInformation(true)}>
158
+ <WrapBusinessInfo
159
+ onPress={() => onNavigationRedirect(
160
+ 'BusinessInformation',
161
+ { businessState, business }
162
+ )}
163
+ >
154
164
  <OIcon src={theme.images.general.info} width={16} color={theme.colors.textSecondary} />
155
165
  </WrapBusinessInfo>
156
166
  )}
@@ -227,7 +237,7 @@ export const BusinessBasicInformation = (
227
237
  )}
228
238
  </WrapReviews>
229
239
  </BusinessInfo>
230
- <OModal
240
+ {/* <OModal
231
241
  titleSectionStyle={styles.modalTitleSectionStyle}
232
242
  open={openBusinessInformation}
233
243
  onClose={() => setOpenBusinessInformation(false)}
@@ -236,7 +246,7 @@ export const BusinessBasicInformation = (
236
246
  businessState={businessState}
237
247
  business={business}
238
248
  />
239
- </OModal>
249
+ </OModal> */}
240
250
  <OModal
241
251
  entireModal
242
252
  titleSectionStyle={styles.modalTitleSectionStyle}
@@ -62,4 +62,4 @@ export const DropOptionButton = styled.TouchableOpacity`
62
62
  padding-horizontal: 8px;
63
63
  flex-direction: row;
64
64
  margin-end: 12px;
65
- `
65
+ `
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import {
3
3
  BusinessInformation as BusinessInformationController,
4
4
  useLanguage, useUtils
5
5
  } from 'ordering-components/native';
6
6
  import { useTheme } from 'styled-components/native';
7
- import { OIcon, OText } from '../shared';
7
+ import { SliderBox } from 'react-native-image-slider-box';
8
+ import { OIcon, OText, OModal } from '../shared';
8
9
  import {
9
10
  BusinessInformationContainer,
10
11
  WrapMainContent,
@@ -16,17 +17,21 @@ import {
16
17
  DivideView,
17
18
  MediaWrapper,
18
19
  } from './styles';
19
- import { Platform, StyleSheet, View } from 'react-native';
20
+ import { Platform, StyleSheet, TouchableOpacity, View } from 'react-native';
20
21
  import { BusinessInformationParams } from '../../types';
21
22
  import { GoogleMap } from '../GoogleMap';
22
23
  import { WebView } from 'react-native-webview';
24
+ import NavBar from '../../../../../src/components/NavBar'
23
25
 
24
26
  const BusinessInformationUI = (props: BusinessInformationParams) => {
25
- const { businessState, businessSchedule, businessLocation } = props;
27
+ const { businessState, business, businessSchedule, businessLocation } = props;
26
28
 
27
29
  const theme = useTheme();
28
30
  const [, t] = useLanguage();
29
31
  const [{ optimizeImage }] = useUtils();
32
+
33
+ const [openImages, setOpenImages] = useState(false)
34
+
30
35
  const daysOfWeek = [
31
36
  t('SUNDAY_ABBREVIATION', 'Sun'),
32
37
  t('MONDAY_ABBREVIATION', 'Mon'),
@@ -69,7 +74,7 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
69
74
  return vAry;
70
75
  };
71
76
  const bImages: any = () => {
72
- const len = businessState?.business?.gallery?.length | 0;
77
+ const len = businessState?.business?.gallery?.length ?? 0;
73
78
  if (len == 0) return [];
74
79
  const iAry = businessState?.business?.gallery.filter(
75
80
  ({ type, video }: any) => type == 1 && video == null,
@@ -79,6 +84,10 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
79
84
 
80
85
  return (
81
86
  <BusinessInformationContainer>
87
+ <NavBar
88
+ style={{ paddingBottom: 0 }}
89
+ onActionLeft={() => props.navigation?.canGoBack() && props.navigation.goBack()}
90
+ />
82
91
  <WrapMainContent contentContainerStyle={{}}>
83
92
  <InnerContent>
84
93
  <OText size={24} weight={Platform.OS === 'ios' ? '600' : 'bold'}>
@@ -89,7 +98,7 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
89
98
  {t('BUSINESS_LOCATION', 'Business Location')}
90
99
  </OText>
91
100
  </GrayBackground>
92
- {businessLocation.location && (
101
+ {!!businessLocation.location && (
93
102
  <WrapBusinessMap style={styles.wrapMapStyle}>
94
103
  <GoogleMap
95
104
  readOnly
@@ -107,7 +116,7 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
107
116
  {t('OPENING_TIME', 'Opening Time')}
108
117
  </OText>
109
118
  </GrayBackground>
110
- {businessSchedule && businessSchedule?.length > 0 && (
119
+ {!!businessSchedule && businessSchedule?.length > 0 && (
111
120
  <WrapScheduleBlock>
112
121
  {businessSchedule.map((schedule: any, i: number) => (
113
122
  <ScheduleBlock key={i}>
@@ -164,19 +173,41 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
164
173
  {t('IMAGES', 'Images')}
165
174
  </OText>
166
175
  </GrayBackground>
176
+
167
177
  <MediaWrapper horizontal>
168
- {bImages().map((i: any) => (
169
- i.file != null &&
170
- <View key={i.id} style={{ width: 210, height: 127, borderRadius: 7.6, marginEnd: 20, overflow: 'hidden' }}>
171
- <OIcon cover url={optimizeImage(i?.file, 'h_150,c_limit')} width={210} height={127} />
172
- </View>
173
- ))}
178
+ {bImages().map((i: any) => ( i.file != null && (
179
+ <View key={i.id} style={{ width: 210, height: 127, borderRadius: 7.6, marginEnd: 20, overflow: 'hidden' }}>
180
+ <TouchableOpacity onPress={() => setOpenImages(true)}>
181
+ <OIcon cover url={optimizeImage(i?.file, 'h_150,c_limit')} width={210} height={127} />
182
+ </TouchableOpacity>
183
+ </View>
184
+ )))}
174
185
  </MediaWrapper>
175
186
  </>
176
187
  )}
177
188
  </>
178
189
  </InnerContent>
179
190
  </WrapMainContent>
191
+ <OModal
192
+ titleSectionStyle={styles.modalTitleSectionStyle}
193
+ open={openImages}
194
+ onClose={() => setOpenImages(false)}
195
+ isNotDecoration
196
+ >
197
+ <View style={{ height: '100%', flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>
198
+ <View style={{ marginTop: 20, height: 200}}>
199
+ <SliderBox
200
+ // circleLoop
201
+ sliderBoxHeight={200}
202
+ images={bImages().map((image: any) => optimizeImage(image?.file, 'h_300,c_limit'))}
203
+ dotColor={theme.colors.primary}
204
+ inactiveDotColor={theme.colors.backgroundGray}
205
+ dotStyle={styles.dotStyle}
206
+ activeOpacity={1}
207
+ />
208
+ </View>
209
+ </View>
210
+ </OModal>
180
211
  </BusinessInformationContainer>
181
212
  );
182
213
  };
@@ -187,6 +218,21 @@ const styles = StyleSheet.create({
187
218
  marginTop: 15,
188
219
  marginBottom: 10,
189
220
  },
221
+ dotStyle: {
222
+ width: 15,
223
+ height: 15,
224
+ borderRadius: 15,
225
+ marginHorizontal: 10,
226
+ padding: 0,
227
+ margin: 0
228
+ },
229
+ modalTitleSectionStyle: {
230
+ position: 'absolute',
231
+ width: '100%',
232
+ top: 0,
233
+ zIndex: 100,
234
+ left: 40
235
+ },
190
236
  });
191
237
 
192
238
  export const BusinessInformation = (props: BusinessInformationParams) => {
@@ -8,7 +8,7 @@ export const GrayBackground = styled.View`
8
8
  margin-top: 27px;
9
9
  `
10
10
  export const WrapMainContent = styled.ScrollView`
11
- margin-top: 40px;
11
+ /* margin-top: 40px; */
12
12
  `
13
13
  export const MediaWrapper = styled.ScrollView`
14
14
  margin-top: 16px;
@@ -36,4 +36,4 @@ export const DivideView = styled.View`
36
36
  height: 8px;
37
37
  background-color: ${(props: any) => props.theme.colors.backgroundGray100};
38
38
  margin-horizontal: -40px;
39
- `;
39
+ `;
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
3
  import { initStripe, useConfirmPayment } from '@stripe/stripe-react-native';
4
-
4
+ import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
5
5
  import {
6
6
  Checkout as CheckoutController,
7
7
  useOrder,
@@ -22,6 +22,10 @@ import { PaymentOptions } from '../PaymentOptions';
22
22
  import { DriverTips } from '../DriverTips';
23
23
  import { NotFoundSource } from '../NotFoundSource';
24
24
  import { UserDetails } from '../UserDetails';
25
+ import { FloatingButton } from '../FloatingButton';
26
+ import { Container } from '../../layouts/Container';
27
+ import NavBar from '../NavBar';
28
+ import { OrderSummary } from '../OrderSummary';
25
29
 
26
30
  import {
27
31
  ChContainer,
@@ -36,12 +40,7 @@ import {
36
40
  ChUserDetails,
37
41
  ChCart
38
42
  } from './styles';
39
- import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
40
43
 
41
- import { FloatingButton } from '../FloatingButton';
42
- import { Container } from '../../layouts/Container';
43
- import NavBar from '../NavBar';
44
- import { OrderSummary } from '../OrderSummary';
45
44
  import { getTypesText } from '../../utils';
46
45
 
47
46
  const mapConfigs = {
@@ -84,6 +84,7 @@ const DriverTipsUI = (props: any) => {
84
84
  <TouchableOpacity
85
85
  key={i}
86
86
  onPress={() => handleChangeOpt(option)}
87
+ disabled={loading}
87
88
  >
88
89
  <DTCard
89
90
  style={style.circle}