ordering-ui-react-native 0.17.99-release → 0.18.0-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +7 -6
- package/themes/original/src/components/AddressForm/index.tsx +2 -2
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +2 -2
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +4 -3
- package/themes/original/src/components/BusinessListingSearch/index.tsx +4 -5
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsListing/index.tsx +31 -12
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +2 -2
- package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +7 -7
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +1 -1
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/Favorite/index.tsx +3 -4
- package/themes/original/src/components/Favorite/styles.tsx +0 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +1 -1
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +1 -1
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCheckout/index.tsx +4 -4
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +5 -5
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +2 -4
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
- package/themes/original/src/components/OrderDetails/index.tsx +702 -663
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -7
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +1 -1
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +51 -146
- package/themes/original/src/components/ProductItemAccordion/index.tsx +5 -0
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +4 -4
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +1 -1
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/StripeElementsForm/index.tsx +1 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserFormDetails/index.tsx +16 -3
- package/themes/original/src/components/UserProfile/index.tsx +1 -1
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +1 -3
- package/themes/original/src/components/Wallets/styles.tsx +1 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +1 -1
package/package.json
CHANGED
|
@@ -111,6 +111,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
const containsOnlyNumbers = (str: string) => {
|
|
114
|
+
str = str?.replace('+', '');
|
|
114
115
|
return /^\d+$/.test(str);
|
|
115
116
|
}
|
|
116
117
|
|
|
@@ -183,7 +184,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
183
184
|
<OLink
|
|
184
185
|
PressStyle={styles.linkWithIcons}
|
|
185
186
|
url={`tel:${containsOnlyNumbers(order?.business?.cellphone) ? order?.business?.cellphone : 'invalid'}`}
|
|
186
|
-
shorcut={`${order?.business?.cellphone}`}
|
|
187
|
+
shorcut={`${(!!order?.business?.country_phone_code && !order?.business?.cellphone?.includes('+')) ? '+' + order?.business?.country_phone_code : ''}${order?.business?.cellphone}`}
|
|
187
188
|
TextStyle={styles.textLink}
|
|
188
189
|
/>
|
|
189
190
|
</View>
|
|
@@ -193,8 +194,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
193
194
|
<View style={styles.linkWithIcons}>
|
|
194
195
|
<OLink
|
|
195
196
|
PressStyle={styles.linkWithIcons}
|
|
196
|
-
url={`tel:${containsOnlyNumbers(order?.business?.
|
|
197
|
-
shorcut={order?.business?.phone}
|
|
197
|
+
url={`tel:${containsOnlyNumbers(order?.business?.phone) ? order?.business?.phone : 'invalid'}`}
|
|
198
|
+
shorcut={`${(!!order?.business?.country_phone_code && !order?.business?.phone?.includes('+')) ? '+' + order?.business?.country_phone_code : ''}${order?.business?.phone}`}
|
|
198
199
|
TextStyle={styles.textLink}
|
|
199
200
|
/>
|
|
200
201
|
</View>
|
|
@@ -325,7 +326,7 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
325
326
|
<OLink
|
|
326
327
|
PressStyle={styles.linkWithIcons}
|
|
327
328
|
url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${containsOnlyNumbers(order?.customer?.cellphone) ? order?.customer?.cellphone : 'invalid'}`}
|
|
328
|
-
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}
|
|
329
|
+
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}${order?.customer?.cellphone}`}
|
|
329
330
|
TextStyle={styles.textLink}
|
|
330
331
|
/>
|
|
331
332
|
</View>
|
|
@@ -335,8 +336,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
335
336
|
<View style={styles.linkWithIcons}>
|
|
336
337
|
<OLink
|
|
337
338
|
PressStyle={styles.linkWithIcons}
|
|
338
|
-
url={`tel:${containsOnlyNumbers(order?.customer?.phone) ? order?.customer?.phone : 'invalid'}`}
|
|
339
|
-
shorcut={order?.customer?.phone}
|
|
339
|
+
url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${containsOnlyNumbers(order?.customer?.phone) ? order?.customer?.phone : 'invalid'}`}
|
|
340
|
+
shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}${order?.customer?.phone}`}
|
|
340
341
|
TextStyle={styles.textLink}
|
|
341
342
|
/>
|
|
342
343
|
</View>
|
|
@@ -122,8 +122,8 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
122
122
|
width: 16
|
|
123
123
|
},
|
|
124
124
|
wrapperNavbar: Platform.OS === 'ios'
|
|
125
|
-
? { paddingVertical: 0, paddingLeft:
|
|
126
|
-
: { paddingVertical: 10, paddingLeft:
|
|
125
|
+
? { paddingVertical: 0, paddingLeft: 20, paddingRight: 20 }
|
|
126
|
+
: { paddingVertical: 10, paddingLeft: 20, paddingRight: 20 }
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
const [, t] = useLanguage();
|
|
@@ -2,7 +2,7 @@ import styled from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const AddressFormContainer = styled.View`
|
|
4
4
|
flex: 1;
|
|
5
|
-
padding: 0px
|
|
5
|
+
padding: 0px 20px 20px;
|
|
6
6
|
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
`
|
|
@@ -3,10 +3,10 @@ import styled from 'styled-components/native'
|
|
|
3
3
|
export const Container = styled.ScrollView`
|
|
4
4
|
position: relative;
|
|
5
5
|
flex: 1;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
paddingLeft: 20px;
|
|
7
|
+
paddingRight: 20px;
|
|
8
|
+
margin-bottom: 40px;
|
|
9
|
+
padding-top: 10px;
|
|
10
10
|
`
|
|
11
11
|
|
|
12
12
|
export const AddressItem = styled.TouchableOpacity`
|
|
@@ -72,7 +72,7 @@ export const BusinessBasicInformation = (
|
|
|
72
72
|
alignItems: 'flex-start'
|
|
73
73
|
},
|
|
74
74
|
businessInfo: {
|
|
75
|
-
paddingHorizontal:
|
|
75
|
+
paddingHorizontal: 20,
|
|
76
76
|
paddingTop: isChewLayout ? 0 : 56,
|
|
77
77
|
},
|
|
78
78
|
bullet: {
|
|
@@ -95,7 +95,7 @@ export const BusinessBasicInformation = (
|
|
|
95
95
|
width: '100%',
|
|
96
96
|
top: 0,
|
|
97
97
|
zIndex: 100,
|
|
98
|
-
left:
|
|
98
|
+
left: 20
|
|
99
99
|
},
|
|
100
100
|
socialIcon: {
|
|
101
101
|
borderRadius: 3,
|
|
@@ -11,7 +11,7 @@ export const BusinessHeader = styled.ImageBackground`
|
|
|
11
11
|
`;
|
|
12
12
|
export const BusinessLogo = styled.View`
|
|
13
13
|
position: absolute;
|
|
14
|
-
start:
|
|
14
|
+
start: 20px;
|
|
15
15
|
top: -36px;
|
|
16
16
|
z-index: 50;
|
|
17
17
|
box-shadow: 0 0 2px ${Platform.OS == 'android' ? '#000000DD' : '#0000001A'};
|
|
@@ -17,7 +17,7 @@ export const MediaWrapper = styled.ScrollView`
|
|
|
17
17
|
height: 127px;
|
|
18
18
|
`
|
|
19
19
|
export const InnerContent = styled.View`
|
|
20
|
-
padding: 20px
|
|
20
|
+
padding: 20px;
|
|
21
21
|
`
|
|
22
22
|
export const WrapScheduleBlock = styled.View`
|
|
23
23
|
margin: 20px 0;
|
|
@@ -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
|
+
`;
|
|
@@ -24,6 +24,8 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
24
24
|
checkoutButtonDisabled,
|
|
25
25
|
isMultiCheckout,
|
|
26
26
|
isFromUpselling,
|
|
27
|
+
changeActiveState,
|
|
28
|
+
isActive,
|
|
27
29
|
isGiftCart
|
|
28
30
|
} = props
|
|
29
31
|
|
|
@@ -39,14 +41,13 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
39
41
|
const isProducts = cart?.products?.length
|
|
40
42
|
const isBusinessChangeEnabled = configs?.cart_change_business_validation?.value === '1'
|
|
41
43
|
|
|
42
|
-
const [isActive, setActiveState] = useState(!!singleBusiness)
|
|
43
44
|
const [viewedCart, setViewedCart] = useState<any>(null)
|
|
44
45
|
|
|
45
46
|
useEffect(() => {
|
|
46
47
|
const cartsArray = Object.values(orderState?.carts)
|
|
47
48
|
const cartsLength = cartsArray.filter((cart: any) => cart.products.length > 0).length ?? 0
|
|
48
49
|
if (cartsLength === 1) {
|
|
49
|
-
|
|
50
|
+
changeActiveState(!isClosed, cart?.uuid)
|
|
50
51
|
}
|
|
51
52
|
}, [orderState?.carts, isClosed])
|
|
52
53
|
|
|
@@ -69,7 +70,7 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
69
70
|
<BIContainer isClosed={isClosed} isMultiCheckout={isMultiCheckout} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
|
|
70
71
|
<BIHeader
|
|
71
72
|
isClosed={isClosed}
|
|
72
|
-
onPress={() => !isClosed ?
|
|
73
|
+
onPress={() => !isClosed ? changeActiveState(!isClosed, cart?.uuid) : isClosed}
|
|
73
74
|
activeOpacity={1}
|
|
74
75
|
>
|
|
75
76
|
<BIInfo>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { useLanguage, BusinessSearchList, useOrder, useUtils, useEvent, showToast, ToastType } from 'ordering-components/native'
|
|
3
|
-
import { ScrollView, StyleSheet, TouchableOpacity, View, Dimensions } from 'react-native'
|
|
3
|
+
import { ScrollView, StyleSheet, TouchableOpacity, View, Dimensions, Platform } from 'react-native'
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
5
5
|
import { useTheme } from 'styled-components/native'
|
|
6
6
|
import { HeaderTitle, OButton, OModal, OText } from '../shared'
|
|
@@ -92,7 +92,7 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
92
92
|
},
|
|
93
93
|
filterContainer: {
|
|
94
94
|
maxHeight: screenHeight - 150,
|
|
95
|
-
paddingHorizontal:
|
|
95
|
+
paddingHorizontal: 20,
|
|
96
96
|
width: '100%'
|
|
97
97
|
},
|
|
98
98
|
searchInput: {
|
|
@@ -259,7 +259,6 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
259
259
|
display: 'flex',
|
|
260
260
|
flexDirection: 'row',
|
|
261
261
|
alignItems: 'center',
|
|
262
|
-
paddingHorizontal: hideBrowse && !isChewLayout ? 40 : 20,
|
|
263
262
|
}}>
|
|
264
263
|
{hideBrowse && !isChewLayout && (
|
|
265
264
|
<OButton
|
|
@@ -285,10 +284,10 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
285
284
|
/>
|
|
286
285
|
)}
|
|
287
286
|
<HeaderTitle ph={20} text={t('SEARCH', 'Search')} />
|
|
288
|
-
<AntDesignIcon name='filter' size={18} style={{ marginLeft: 'auto', marginTop: 55, paddingHorizontal: 20 }} onPress={() => handleOpenfilters()} />
|
|
287
|
+
<AntDesignIcon name='filter' size={18} style={{ marginLeft: 'auto', marginTop: Platform.OS === 'ios' ? 35 : 55, paddingHorizontal: 20 }} onPress={() => handleOpenfilters()} />
|
|
289
288
|
</View>
|
|
290
289
|
<BContainer
|
|
291
|
-
style={{ paddingHorizontal:
|
|
290
|
+
style={{ paddingHorizontal: 20 }}
|
|
292
291
|
>
|
|
293
292
|
<SearchWrapper>
|
|
294
293
|
<SearchBar
|
|
@@ -92,7 +92,7 @@ const BusinessProductsCategoriesUI = (props: any) => {
|
|
|
92
92
|
ref={tabsRef}
|
|
93
93
|
horizontal
|
|
94
94
|
style={{ ...styles.container, borderBottomWidth: loading ? 0 : 1 }}
|
|
95
|
-
contentContainerStyle={{ paddingHorizontal:
|
|
95
|
+
contentContainerStyle={{ paddingHorizontal: 20 }}
|
|
96
96
|
showsHorizontalScrollIndicator={false}
|
|
97
97
|
onScroll={(e: any) => setScrollOffsetX(e.nativeEvent.contentOffset.x)}
|
|
98
98
|
scrollEventThrottle={16}
|
|
@@ -45,6 +45,7 @@ import { ProfessionalFilter } from '../ProfessionalFilter';
|
|
|
45
45
|
import { ServiceForm } from '../ServiceForm';
|
|
46
46
|
import { BusinessesListing } from '../BusinessesListing/Layout/Original'
|
|
47
47
|
import { PageBanner } from '../PageBanner'
|
|
48
|
+
import { NavBack } from 'ordering-ui-react-native/src/components/OrderDetails/styles';
|
|
48
49
|
|
|
49
50
|
const PIXELS_TO_SCROLL = 2000
|
|
50
51
|
|
|
@@ -72,7 +73,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
72
73
|
handleUpdateProfessionals,
|
|
73
74
|
handleChangeProfessionalSelected,
|
|
74
75
|
onBusinessClick,
|
|
75
|
-
businessSingleId
|
|
76
|
+
businessSingleId,
|
|
77
|
+
productModal
|
|
76
78
|
} = props
|
|
77
79
|
|
|
78
80
|
const insets = useSafeAreaInsets()
|
|
@@ -112,7 +114,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
112
114
|
},
|
|
113
115
|
searchIcon: {
|
|
114
116
|
borderWidth: 0,
|
|
115
|
-
padding:
|
|
117
|
+
padding: 10,
|
|
116
118
|
justifyContent: 'center',
|
|
117
119
|
shadowColor: theme.colors.clear,
|
|
118
120
|
},
|
|
@@ -143,8 +145,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
143
145
|
|
|
144
146
|
const isCheckoutMultiBusinessEnabled: Boolean = configs?.checkout_multi_business_enabled?.value === '1'
|
|
145
147
|
const isQuickAddProduct = configs?.add_product_with_one_click?.value === '1'
|
|
148
|
+
const openCarts = (Object.values(orderState?.carts)?.filter((cart: any) => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && !cart?.wallets) || null) || []
|
|
146
149
|
const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
|
|
147
150
|
const isOpenFiltProducts = isOpenSearchBar && !!searchValue
|
|
151
|
+
const filtProductsHeight = Platform.OS === 'ios' ? 65 : 30
|
|
148
152
|
const viewOrderButtonVisible = !loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0
|
|
149
153
|
|
|
150
154
|
const onRedirect = (route: string, params?: any) => {
|
|
@@ -189,8 +193,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
189
193
|
onRedirect('ProductDetails', {
|
|
190
194
|
product: product,
|
|
191
195
|
businessSlug: business.slug,
|
|
192
|
-
businessId: business.id,
|
|
193
|
-
productAddedToCartLength
|
|
196
|
+
businessId: business.id || product?.category?.business_id,
|
|
197
|
+
productAddedToCartLength,
|
|
198
|
+
isRedirect: false
|
|
194
199
|
})
|
|
195
200
|
}
|
|
196
201
|
events.emit('product_clicked', product)
|
|
@@ -386,6 +391,19 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
386
391
|
}
|
|
387
392
|
}, [])
|
|
388
393
|
|
|
394
|
+
useEffect(() => {
|
|
395
|
+
if (!business && !loading && !error) {
|
|
396
|
+
showToast(ToastType.Error, t('BUSINESS_NOT_FOUND', 'Business not found'))
|
|
397
|
+
navigation.navigate('BusinessList')
|
|
398
|
+
}
|
|
399
|
+
}, [business, error, loading])
|
|
400
|
+
|
|
401
|
+
useEffect(() => {
|
|
402
|
+
if (productModal?.product && !productModal?.loading && !productModal?.error) {
|
|
403
|
+
onProductClick(props?.productModal?.product)
|
|
404
|
+
}
|
|
405
|
+
}, [productModal])
|
|
406
|
+
|
|
389
407
|
return (
|
|
390
408
|
<>
|
|
391
409
|
<View style={{ flex: 1, backgroundColor: backgroundColor }}>
|
|
@@ -473,8 +491,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
473
491
|
{business?.categories?.length > 0 && isOpenFiltProducts && (
|
|
474
492
|
<FiltProductsContainer
|
|
475
493
|
style={{
|
|
476
|
-
height: Dimensions.get('window').height -
|
|
477
|
-
top: Platform.OS === 'ios' ? searchBarHeight + insets.top : searchBarHeight
|
|
494
|
+
height: Dimensions.get('window').height - filtProductsHeight - keyboardHeight - (keyboardHeight > 0 && viewOrderButtonVisible ? 55 : 0),
|
|
495
|
+
top: Platform.OS === 'ios' ? (searchBarHeight - 10) + insets.top : searchBarHeight,
|
|
478
496
|
}}
|
|
479
497
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
480
498
|
>
|
|
@@ -512,9 +530,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
512
530
|
</View>
|
|
513
531
|
</FiltProductsContainer>
|
|
514
532
|
)}
|
|
515
|
-
{isOpenFiltProducts && (
|
|
516
|
-
<BackgroundGray isIos={Platform.OS === 'ios'} style={{ marginTop: insets.top + 60 }} />
|
|
517
|
-
)}
|
|
518
533
|
<IOScrollView
|
|
519
534
|
stickyHeaderIndices={[business?.professionals?.length > 0 ? 4 : 3]}
|
|
520
535
|
style={{
|
|
@@ -553,7 +568,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
553
568
|
/>
|
|
554
569
|
</ProfessionalFilterWrapper>
|
|
555
570
|
)}
|
|
556
|
-
|
|
571
|
+
{businessState?.business?.id && (
|
|
572
|
+
<PageBanner position='app_business_page' businessId={businessState?.business?.id} navigation={navigation} />
|
|
573
|
+
)}
|
|
557
574
|
<View
|
|
558
575
|
style={{
|
|
559
576
|
height: 8,
|
|
@@ -581,7 +598,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
581
598
|
<>
|
|
582
599
|
<WrapContent
|
|
583
600
|
onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
|
|
584
|
-
style={{ paddingHorizontal:
|
|
601
|
+
style={{ paddingHorizontal: 20 }}
|
|
585
602
|
>
|
|
586
603
|
<BusinessProductsList
|
|
587
604
|
categories={[
|
|
@@ -638,6 +655,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
638
655
|
</WrapContent>
|
|
639
656
|
</>
|
|
640
657
|
)}
|
|
658
|
+
{isOpenFiltProducts && (
|
|
659
|
+
<BackgroundGray isIos={Platform.OS === 'ios'} />
|
|
660
|
+
)}
|
|
641
661
|
</IOScrollView>
|
|
642
662
|
{viewOrderButtonVisible && (
|
|
643
663
|
<View style={{ marginBottom: 0 }}>
|
|
@@ -695,7 +715,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
695
715
|
professionalList={business?.professionals}
|
|
696
716
|
professionalSelected={professionalSelected}
|
|
697
717
|
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
698
|
-
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
699
718
|
handleUpdateProfessionals={handleUpdateProfessionals}
|
|
700
719
|
onSave={() => setOpenService(false)}
|
|
701
720
|
onClose={() => setOpenService(false)}
|
|
@@ -50,7 +50,7 @@ export const BackgroundGray = styled.View`
|
|
|
50
50
|
`
|
|
51
51
|
|
|
52
52
|
export const ProfessionalFilterWrapper = styled.View`
|
|
53
|
-
padding-left:
|
|
53
|
+
padding-left: 20px;
|
|
54
54
|
margin-bottom: 35px;
|
|
55
55
|
`
|
|
56
56
|
|
|
@@ -63,6 +63,6 @@ export const NearBusiness = styled.View`
|
|
|
63
63
|
export const TopActions = styled.TouchableOpacity`
|
|
64
64
|
height: 60px;
|
|
65
65
|
justify-content: center;
|
|
66
|
-
padding-horizontal:
|
|
66
|
+
padding-horizontal: 20px;
|
|
67
67
|
width: 100px;
|
|
68
68
|
`;
|
|
@@ -109,7 +109,7 @@ const BusinessReviewsUI = (props: BusinessReviewsParams) => {
|
|
|
109
109
|
return (
|
|
110
110
|
<BusinessReviewsContainer>
|
|
111
111
|
<BusinessReviewContent
|
|
112
|
-
contentContainerStyle={{ paddingHorizontal:
|
|
112
|
+
contentContainerStyle={{ paddingHorizontal: 20, paddingVertical: 27 }}>
|
|
113
113
|
{reviewsList.error ? (
|
|
114
114
|
<OText size={16}>{t('ERROR_UNKNOWN', 'An error has ocurred')}</OText>
|
|
115
115
|
) : (
|
|
@@ -415,7 +415,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
415
415
|
<ScrollView
|
|
416
416
|
showsHorizontalScrollIndicator={false}
|
|
417
417
|
nestedScrollEnabled
|
|
418
|
-
horizontal contentContainerStyle={{ paddingHorizontal:
|
|
418
|
+
horizontal contentContainerStyle={{ paddingHorizontal: 20 }}>
|
|
419
419
|
{featuredBusiness.map((bAry: any, idx) => (
|
|
420
420
|
<View key={'f-listing_' + idx}>
|
|
421
421
|
<BusinessFeaturedController
|
|
@@ -54,13 +54,13 @@ export const WrapMomentOption = styled.TouchableOpacity`
|
|
|
54
54
|
export const HeaderWrapper = styled.ImageBackground`
|
|
55
55
|
width: 100%;
|
|
56
56
|
height: 370px;
|
|
57
|
-
padding: 20px
|
|
57
|
+
padding: 20px;
|
|
58
58
|
background-color: transparent;
|
|
59
59
|
`;
|
|
60
60
|
|
|
61
61
|
export const ListWrapper = styled.View`
|
|
62
62
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
63
|
-
padding-horizontal:
|
|
63
|
+
padding-horizontal: 20px;
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
66
|
export const FeaturedWrapper = styled.View`
|
|
@@ -72,7 +72,7 @@ export const FeaturedWrapper = styled.View`
|
|
|
72
72
|
export const OrderProgressWrapper = styled.View`
|
|
73
73
|
margin-top: 37px;
|
|
74
74
|
margin-bottom: 20px;
|
|
75
|
-
padding-horizontal:
|
|
75
|
+
padding-horizontal: 20px;
|
|
76
76
|
`
|
|
77
77
|
|
|
78
78
|
export const FarAwayMessage = styled.View`
|
|
@@ -98,10 +98,10 @@ export const FilterWrapper = styled.View`
|
|
|
98
98
|
`
|
|
99
99
|
|
|
100
100
|
export const ServiceWrapper = styled.View`
|
|
101
|
-
padding-horizontal:
|
|
101
|
+
padding-horizontal: 20px;
|
|
102
102
|
`
|
|
103
103
|
|
|
104
104
|
export const PriceWrapper = styled.View`
|
|
105
|
-
padding-horizontal:
|
|
105
|
+
padding-horizontal: 20px;
|
|
106
106
|
margin-top: 30px;
|
|
107
107
|
`
|
|
@@ -11,7 +11,7 @@ export const FlatListBusinessListFooter = (props : any) => {
|
|
|
11
11
|
} = props
|
|
12
12
|
return (
|
|
13
13
|
<>
|
|
14
|
-
<ListWrapper style={{ paddingHorizontal:
|
|
14
|
+
<ListWrapper style={{ paddingHorizontal: 20 }}>
|
|
15
15
|
{(businessesList.loading || !businessesList?.fetched) && (
|
|
16
16
|
<>
|
|
17
17
|
{[
|
|
@@ -133,7 +133,7 @@ export const FlatListBusinessListHeader = (props: any) => {
|
|
|
133
133
|
backgroundColor: theme.colors.white,
|
|
134
134
|
borderColor: theme.colors.backgroundGray,
|
|
135
135
|
borderRadius: 8,
|
|
136
|
-
marginHorizontal:
|
|
136
|
+
marginHorizontal: 20,
|
|
137
137
|
minHeight: 45,
|
|
138
138
|
paddingVertical: 5,
|
|
139
139
|
paddingHorizontal: 20,
|
|
@@ -165,7 +165,7 @@ export const FlatListBusinessListHeader = (props: any) => {
|
|
|
165
165
|
)}
|
|
166
166
|
<View style={{
|
|
167
167
|
height: !isPreOrderSetting && isChewLayout ? 150 : isChewLayout ? 200 : isFarAway ? 150 : 100,
|
|
168
|
-
marginTop:
|
|
168
|
+
marginTop: 0,
|
|
169
169
|
backgroundColor: isChewLayout ? theme?.colors?.chew : theme.colors?.white
|
|
170
170
|
}}
|
|
171
171
|
>
|
|
@@ -276,7 +276,7 @@ export const FlatListBusinessListHeader = (props: any) => {
|
|
|
276
276
|
bgHeaderHeight={bgHeaderHeight}
|
|
277
277
|
>
|
|
278
278
|
{!auth && (
|
|
279
|
-
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart:
|
|
279
|
+
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 20, paddingVertical: 20 }}>
|
|
280
280
|
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
281
281
|
</TouchableOpacity>
|
|
282
282
|
)}
|
|
@@ -284,7 +284,7 @@ export const FlatListBusinessListHeader = (props: any) => {
|
|
|
284
284
|
) : (
|
|
285
285
|
<>
|
|
286
286
|
{!auth && (
|
|
287
|
-
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart:
|
|
287
|
+
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 20, paddingVertical: 20 }}>
|
|
288
288
|
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
289
289
|
</TouchableOpacity>
|
|
290
290
|
)}
|
|
@@ -324,12 +324,12 @@ export const FlatListBusinessListHeader = (props: any) => {
|
|
|
324
324
|
{
|
|
325
325
|
!businessId && !props.franchiseId && featuredBusiness && featuredBusiness.length > 0 && (
|
|
326
326
|
<FeaturedWrapper>
|
|
327
|
-
<OText size={16} style={{ marginLeft:
|
|
327
|
+
<OText size={16} style={{ marginLeft: 20 }} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('BUSINESS_FEATURE', 'Featured business')}</OText>
|
|
328
328
|
<ScrollView
|
|
329
329
|
showsHorizontalScrollIndicator={false}
|
|
330
330
|
nestedScrollEnabled
|
|
331
331
|
horizontal
|
|
332
|
-
contentContainerStyle={{ paddingHorizontal:
|
|
332
|
+
contentContainerStyle={{ paddingHorizontal: 20 }}
|
|
333
333
|
>
|
|
334
334
|
{featuredBusiness.map((bAry: any, idx: number) => (
|
|
335
335
|
<View key={'f-listing_' + idx}>
|
|
@@ -372,7 +372,7 @@ export const FlatListBusinessListHeader = (props: any) => {
|
|
|
372
372
|
<PageBanner position='app_business_listing' navigation={navigation} />
|
|
373
373
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
|
|
374
374
|
|
|
375
|
-
<ListWrapper style={{ paddingHorizontal:
|
|
375
|
+
<ListWrapper style={{ paddingHorizontal: 20 }}>
|
|
376
376
|
{!businessId && !isAllCategoriesHidden && (
|
|
377
377
|
<BusinessTypeFilter
|
|
378
378
|
images={props.images}
|
|
@@ -9,7 +9,7 @@ export const Container = styled.View`
|
|
|
9
9
|
`
|
|
10
10
|
|
|
11
11
|
export const ItemListing = styled.ScrollView`
|
|
12
|
-
padding: 0
|
|
12
|
+
padding: 0 20px;
|
|
13
13
|
margin: 0 0 140px;
|
|
14
14
|
`
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ export const TopHeader = styled.View`
|
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: space-between;
|
|
21
21
|
z-index: 1;
|
|
22
|
-
padding: 0
|
|
22
|
+
padding: 0 20px;
|
|
23
23
|
`
|
|
24
24
|
|
|
25
25
|
export const HeaderItem = styled.TouchableOpacity`
|
|
@@ -357,7 +357,7 @@ const CheckoutUI = (props: any) => {
|
|
|
357
357
|
|
|
358
358
|
useEffect(() => {
|
|
359
359
|
if (cart?.products?.length === 0) {
|
|
360
|
-
if (cart?.
|
|
360
|
+
if (cart?.business_id !== null) {
|
|
361
361
|
onNavigationRedirect('Business', { store: cart?.business?.slug, header: null, logo: null, fromMulti: props.fromMulti })
|
|
362
362
|
} else {
|
|
363
363
|
onNavigationRedirect('Wallets')
|
|
@@ -113,3 +113,20 @@ export const CartHeader = styled.View`
|
|
|
113
113
|
justify-content: space-between;
|
|
114
114
|
margin-bottom: 10px;
|
|
115
115
|
`
|
|
116
|
+
|
|
117
|
+
export const TopActions = styled.TouchableOpacity`
|
|
118
|
+
height: 60px;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
min-width: 30px;
|
|
121
|
+
padding-right: 15px;
|
|
122
|
+
`;
|
|
123
|
+
|
|
124
|
+
export const TopHeader = styled.View`
|
|
125
|
+
width: 100%;
|
|
126
|
+
flex-direction: row;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: space-between;
|
|
129
|
+
z-index: 1;
|
|
130
|
+
height: 60px;
|
|
131
|
+
min-height: 60px;
|
|
132
|
+
`
|
|
@@ -34,15 +34,14 @@ export const Favorite = (props: any) => {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
|
-
<Container
|
|
38
|
-
pdng={Platform.OS === 'ios' ? '10px' : '20px'}
|
|
39
|
-
>
|
|
37
|
+
<Container>
|
|
40
38
|
<NavBar
|
|
41
39
|
title={t('FAVORITE', 'Favorite')}
|
|
42
40
|
titleAlign={'center'}
|
|
43
41
|
onActionLeft={goToBack}
|
|
44
42
|
showCall={false}
|
|
45
|
-
paddingTop={10}
|
|
43
|
+
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
44
|
+
style={{ paddingVertical: 0 }}
|
|
46
45
|
btnStyle={{ paddingLeft: 0 }}
|
|
47
46
|
/>
|
|
48
47
|
<TabContainer>
|
|
@@ -61,7 +61,7 @@ export const GPSButton = (props: any) => {
|
|
|
61
61
|
if (trackingStatus === 'not-determined') {
|
|
62
62
|
trackingStatus = await requestTrackingPermission()
|
|
63
63
|
}
|
|
64
|
-
if (trackingStatus === 'authorized' || trackingStatus === 'unavailable') {
|
|
64
|
+
if ( trackingStatus === 'authorized' || trackingStatus === 'denied' || trackingStatus === 'unavailable') {
|
|
65
65
|
setLoading(true)
|
|
66
66
|
Geolocation.getCurrentPosition((pos) => {
|
|
67
67
|
geoCodePosition(pos.coords)
|