ordering-ui-react-native 0.16.67 → 0.16.68-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 +6 -5
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/BusinessInformation/index.tsx +19 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +10 -10
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +298 -345
- package/src/components/PaymentOptionsWebView/index.tsx +119 -120
- package/src/components/SingleProductReview/index.tsx +7 -4
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/components/shared/OToast.tsx +4 -4
- package/src/index.tsx +2 -0
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/utils/index.tsx +2 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +260 -238
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +31 -31
- package/themes/business/src/components/DriverMap/index.tsx +7 -5
- package/themes/business/src/components/LoginForm/index.tsx +111 -74
- package/themes/business/src/components/MapView/index.tsx +14 -3
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +31 -41
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +70 -43
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +3 -3
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +74 -76
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
- package/themes/business/src/components/PreviousOrders/index.tsx +440 -245
- package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +39 -15
- package/themes/business/src/components/shared/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/components/shared/OLink.tsx +33 -13
- package/themes/business/src/components/shared/OText.tsx +8 -2
- package/themes/business/src/types/index.tsx +22 -10
- package/themes/business/src/utils/index.tsx +10 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +8 -0
- package/themes/original/src/components/AddressDetails/index.tsx +10 -8
- package/themes/original/src/components/AddressForm/index.tsx +153 -137
- package/themes/original/src/components/AddressList/index.tsx +18 -18
- package/themes/original/src/components/AddressList/styles.tsx +4 -2
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +49 -33
- package/themes/original/src/components/BusinessController/index.tsx +101 -70
- package/themes/original/src/components/BusinessController/styles.tsx +14 -9
- package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +87 -142
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +54 -60
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +561 -477
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +13 -12
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +93 -98
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
- package/themes/original/src/components/BusinessesListing/index.tsx +13 -8
- package/themes/original/src/components/Cart/index.tsx +63 -38
- package/themes/original/src/components/CartContent/index.tsx +80 -18
- package/themes/original/src/components/CartContent/styles.tsx +11 -1
- package/themes/original/src/components/Checkout/index.tsx +110 -114
- package/themes/original/src/components/Checkout/styles.tsx +4 -3
- package/themes/original/src/components/CitiesControl/index.tsx +89 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
- package/themes/original/src/components/DriverTips/index.tsx +47 -37
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/Favorite/index.tsx +7 -4
- package/themes/original/src/components/Favorite/styles.tsx +1 -1
- package/themes/original/src/components/FavoriteList/index.tsx +69 -45
- package/themes/original/src/components/FloatingButton/index.tsx +1 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +20 -19
- package/themes/original/src/components/GPSButton/styles.ts +3 -3
- package/themes/original/src/components/GoogleMap/index.tsx +10 -1
- package/themes/original/src/components/Help/index.tsx +7 -7
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +14 -20
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +6 -0
- package/themes/original/src/components/HelpGuide/index.tsx +12 -11
- package/themes/original/src/components/HelpGuide/styles.tsx +5 -0
- package/themes/original/src/components/HelpOrder/index.tsx +12 -20
- package/themes/original/src/components/HelpOrder/styles.tsx +8 -1
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
- package/themes/original/src/components/LoginForm/index.tsx +98 -41
- package/themes/original/src/components/LottieAnimation/index.tsx +78 -0
- package/themes/original/src/components/MessageListing/index.tsx +7 -7
- package/themes/original/src/components/Messages/index.tsx +35 -20
- package/themes/original/src/components/MomentOption/index.tsx +17 -11
- package/themes/original/src/components/MultiCart/index.tsx +50 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
- package/themes/original/src/components/MultiCheckout/index.tsx +158 -77
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +60 -33
- package/themes/original/src/components/MyOrders/index.tsx +86 -20
- package/themes/original/src/components/NavBar/index.tsx +7 -6
- package/themes/original/src/components/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/Notifications/index.tsx +144 -0
- package/themes/original/src/components/Notifications/styles.tsx +20 -0
- package/themes/original/src/components/OrderDetails/index.tsx +114 -15
- package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +77 -66
- package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
- package/themes/original/src/components/OrderSummary/index.tsx +3 -36
- package/themes/original/src/components/OrderTypeSelector/index.tsx +13 -6
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +94 -98
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +97 -55
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
- package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
- package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +212 -253
- package/themes/original/src/components/ProductForm/styles.tsx +5 -8
- package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +17 -9
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
- package/themes/original/src/components/Promotions/index.tsx +234 -220
- package/themes/original/src/components/Promotions/styles.tsx +7 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
- package/themes/original/src/components/ReviewOrder/index.tsx +43 -11
- package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
- package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
- package/themes/original/src/components/ReviewTrigger/index.tsx +27 -9
- package/themes/original/src/components/ReviewTrigger/styles.tsx +8 -1
- package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
- package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
- package/themes/original/src/components/ServiceForm/index.tsx +328 -264
- package/themes/original/src/components/SignupForm/index.tsx +134 -89
- package/themes/original/src/components/SingleOrderCard/index.tsx +129 -54
- package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
- package/themes/original/src/components/SingleProductCard/index.tsx +101 -85
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -9
- package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeCardsList/index.tsx +1 -1
- package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +244 -215
- package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
- package/themes/original/src/components/UserDetails/index.tsx +5 -3
- package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
- package/themes/original/src/components/UserProfile/index.tsx +58 -35
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +19 -28
- package/themes/original/src/components/UserProfileForm/styles.tsx +7 -0
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +176 -164
- package/themes/original/src/components/Wallets/styles.tsx +12 -8
- package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
- package/themes/original/src/components/shared/OBottomPopup.tsx +6 -4
- package/themes/original/src/components/shared/OButton.tsx +9 -4
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +10 -1
- package/themes/original/src/layouts/Container.tsx +13 -9
- package/themes/original/src/types/index.tsx +55 -5
- package/themes/original/src/utils/index.tsx +103 -58
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { StyleSheet, View, TouchableOpacity, Linking, Pressable } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import FastImage from 'react-native-fast-image'
|
|
4
|
+
import { useUtils, useOrder, useLanguage } from 'ordering-components/native';
|
|
4
5
|
import { useTheme } from 'styled-components/native';
|
|
5
6
|
import { OIcon, OText, OModal } from '../shared';
|
|
6
7
|
import { BusinessBasicInformationParams } from '../../types';
|
|
@@ -38,7 +39,6 @@ export const BusinessBasicInformation = (
|
|
|
38
39
|
const { business, loading } = businessState;
|
|
39
40
|
|
|
40
41
|
const theme = useTheme();
|
|
41
|
-
const [orderingTheme] = useOrderingTheme()
|
|
42
42
|
const [orderState] = useOrder();
|
|
43
43
|
const [, t] = useLanguage();
|
|
44
44
|
const [{ parsePrice, parseDistance, optimizeImage }] = useUtils();
|
|
@@ -46,9 +46,9 @@ export const BusinessBasicInformation = (
|
|
|
46
46
|
const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
|
|
47
47
|
const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
|
|
48
48
|
const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
|
|
49
|
-
|
|
50
|
-
const showLogo = !
|
|
51
|
-
|
|
49
|
+
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
50
|
+
const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
|
|
51
|
+
|
|
52
52
|
const styles = StyleSheet.create({
|
|
53
53
|
businesInfoheaderStyle: {
|
|
54
54
|
height: 150,
|
|
@@ -56,12 +56,12 @@ export const BusinessBasicInformation = (
|
|
|
56
56
|
headerStyle: {
|
|
57
57
|
height: isChewLayout ? 170 : 260,
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
logoStyle: {
|
|
60
60
|
width: 72,
|
|
61
61
|
height: 72,
|
|
62
62
|
borderRadius: 7.6,
|
|
63
63
|
justifyContent: 'flex-start',
|
|
64
|
-
alignItems: 'flex-start'
|
|
64
|
+
alignItems: 'flex-start'
|
|
65
65
|
},
|
|
66
66
|
businessInfo: {
|
|
67
67
|
paddingHorizontal: 40,
|
|
@@ -104,7 +104,10 @@ export const BusinessBasicInformation = (
|
|
|
104
104
|
height: 12,
|
|
105
105
|
width: 12,
|
|
106
106
|
margin: 0,
|
|
107
|
-
padding: 0
|
|
107
|
+
padding: 0,
|
|
108
|
+
display: 'flex',
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
alignItems: 'center'
|
|
108
111
|
},
|
|
109
112
|
headerChewStyle: {
|
|
110
113
|
paddingHorizontal: 30,
|
|
@@ -222,7 +225,8 @@ export const BusinessBasicInformation = (
|
|
|
222
225
|
<View style={styles.tiktokIcon}>
|
|
223
226
|
<OIcon
|
|
224
227
|
src={theme.images.general.tiktok}
|
|
225
|
-
style={{ width:
|
|
228
|
+
style={{ width: 10, height: 12 }}
|
|
229
|
+
cover
|
|
226
230
|
/>
|
|
227
231
|
</View>
|
|
228
232
|
</Pressable>
|
|
@@ -247,7 +251,11 @@ export const BusinessBasicInformation = (
|
|
|
247
251
|
)}
|
|
248
252
|
{isChewLayout && (
|
|
249
253
|
<TouchableOpacity onPress={() => handleClickBusinessInformation()}>
|
|
250
|
-
<OText
|
|
254
|
+
<OText
|
|
255
|
+
color={theme.colors.primary}
|
|
256
|
+
style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
|
|
257
|
+
size={12}
|
|
258
|
+
>
|
|
251
259
|
{t('SEE_MORE_DESCRIPTION', 'See more')}
|
|
252
260
|
</OText>
|
|
253
261
|
</TouchableOpacity>
|
|
@@ -267,11 +275,11 @@ export const BusinessBasicInformation = (
|
|
|
267
275
|
? styles.businesInfoheaderStyle
|
|
268
276
|
: { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
|
|
269
277
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
header ||
|
|
273
|
-
|
|
274
|
-
}}
|
|
278
|
+
{...(!loading && {
|
|
279
|
+
source: (header || businessState?.business?.header) ? {
|
|
280
|
+
uri: header || optimizeImage(businessState?.business?.header, 'h_250,c_limit')
|
|
281
|
+
} : theme?.images?.dummies?.businessHeader
|
|
282
|
+
})}
|
|
275
283
|
imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
|
|
276
284
|
>
|
|
277
285
|
{!isBusinessInfoShow && !isChewLayout && (
|
|
@@ -279,7 +287,7 @@ export const BusinessBasicInformation = (
|
|
|
279
287
|
<OIcon src={theme.images.general.info} width={24} />
|
|
280
288
|
</WrapBusinessInfo>
|
|
281
289
|
)}
|
|
282
|
-
{isChewLayout && (
|
|
290
|
+
{isChewLayout && !loading && (
|
|
283
291
|
<View style={styles.headerChewStyle}>
|
|
284
292
|
<OText size={24} weight={'600'} mBottom={-5}>
|
|
285
293
|
{business?.name}
|
|
@@ -298,22 +306,22 @@ export const BusinessBasicInformation = (
|
|
|
298
306
|
<BusinessInfo style={styles.businessInfo}>
|
|
299
307
|
{showLogo && (
|
|
300
308
|
<BusinessLogo isChewLayout={isChewLayout}>
|
|
301
|
-
{
|
|
302
|
-
|
|
303
|
-
<
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
+
{!isBusinessInfoShow && (
|
|
310
|
+
logo || businessState?.business?.logo ?
|
|
311
|
+
<FastImage
|
|
312
|
+
style={styles.logoStyle}
|
|
313
|
+
source={{
|
|
314
|
+
uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit'),
|
|
315
|
+
priority: FastImage.priority.high,
|
|
316
|
+
cache: FastImage.cacheControl.web
|
|
317
|
+
}}
|
|
318
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
319
|
+
/>
|
|
320
|
+
:
|
|
309
321
|
<OIcon
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
|
|
313
|
-
}
|
|
314
|
-
style={styles.businessLogo}
|
|
322
|
+
src={theme?.images?.dummies?.businessLogo}
|
|
323
|
+
style={styles.logoStyle}
|
|
315
324
|
/>
|
|
316
|
-
)
|
|
317
325
|
)}
|
|
318
326
|
</BusinessLogo>
|
|
319
327
|
)}
|
|
@@ -412,15 +420,23 @@ export const BusinessBasicInformation = (
|
|
|
412
420
|
{isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
|
|
413
421
|
<>
|
|
414
422
|
<TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
|
|
415
|
-
<OText
|
|
416
|
-
{
|
|
423
|
+
<OText
|
|
424
|
+
color={theme.colors.primary}
|
|
425
|
+
style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
|
|
426
|
+
size={12}
|
|
427
|
+
>
|
|
428
|
+
{t('PREORDER', 'Preorder')}
|
|
417
429
|
</OText>
|
|
418
430
|
</TouchableOpacity>
|
|
419
431
|
<OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
|
|
420
432
|
</>
|
|
421
433
|
)}
|
|
422
434
|
<TouchableOpacity onPress={() => handleClickBusinessReviews()}>
|
|
423
|
-
<OText
|
|
435
|
+
<OText
|
|
436
|
+
color={theme.colors.primary}
|
|
437
|
+
style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
|
|
438
|
+
size={12}
|
|
439
|
+
>
|
|
424
440
|
{t('REVIEWS', 'Reviews')}
|
|
425
441
|
</OText>
|
|
426
442
|
</TouchableOpacity>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
3
3
|
import {
|
|
4
4
|
BusinessController as BusinessSingleCard,
|
|
@@ -11,27 +11,28 @@ import {
|
|
|
11
11
|
ToastType
|
|
12
12
|
} from 'ordering-components/native';
|
|
13
13
|
import { OIcon, OText } from '../shared';
|
|
14
|
-
import { StyleSheet,
|
|
14
|
+
import { Dimensions, StyleSheet, Vibration, View } from 'react-native';
|
|
15
15
|
import { InView } from 'react-native-intersection-observer'
|
|
16
16
|
import { BusinessControllerParams } from '../../types';
|
|
17
17
|
import { convertHoursToMinutes, shape } from '../../utils';
|
|
18
|
+
|
|
18
19
|
import {
|
|
19
|
-
Card,
|
|
20
20
|
BusinessHero,
|
|
21
21
|
BusinessContent,
|
|
22
|
-
BusinessCategory,
|
|
23
22
|
BusinessInfo,
|
|
24
23
|
Metadata,
|
|
25
24
|
BusinessState,
|
|
26
25
|
BusinessLogo,
|
|
27
26
|
Reviews,
|
|
28
27
|
RibbonBox,
|
|
29
|
-
ReviewAndFavorite
|
|
28
|
+
ReviewAndFavorite,
|
|
29
|
+
OfferBox
|
|
30
30
|
} from './styles';
|
|
31
31
|
import { useTheme } from 'styled-components/native';
|
|
32
32
|
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome5';
|
|
33
|
-
import IconAntDesign from 'react-native-vector-icons/AntDesign'
|
|
34
33
|
import FastImage from 'react-native-fast-image'
|
|
34
|
+
import { LottieAnimation } from '../LottieAnimation';
|
|
35
|
+
import { CardAnimation } from '../shared/CardAnimation';
|
|
35
36
|
|
|
36
37
|
export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
37
38
|
const {
|
|
@@ -40,6 +41,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
40
41
|
navigation,
|
|
41
42
|
isBusinessOpen,
|
|
42
43
|
style,
|
|
44
|
+
isCustomLayout,
|
|
43
45
|
businessHeader,
|
|
44
46
|
businessFeatured,
|
|
45
47
|
businessLogo,
|
|
@@ -49,19 +51,31 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
49
51
|
businessPickupTime,
|
|
50
52
|
businessDistance,
|
|
51
53
|
handleFavoriteBusiness,
|
|
52
|
-
enableIntersection
|
|
54
|
+
enableIntersection,
|
|
55
|
+
getBusinessOffer
|
|
53
56
|
} = props;
|
|
57
|
+
|
|
54
58
|
const [{ parsePrice, parseDistance, parseNumber, optimizeImage }] = useUtils();
|
|
55
59
|
const [, { showToast }] = useToast()
|
|
56
60
|
const [orderState] = useOrder();
|
|
57
|
-
const [
|
|
61
|
+
const [{ auth }] = useSession()
|
|
58
62
|
const [configState] = useConfig();
|
|
59
63
|
const [, t] = useLanguage();
|
|
60
64
|
const theme = useTheme()
|
|
65
|
+
const windowHeight = Dimensions.get('window').height
|
|
61
66
|
const [isIntersectionObserver, setIsIntersectionObserver] = useState(!enableIntersection)
|
|
62
|
-
|
|
67
|
+
|
|
68
|
+
const textSize = isCustomLayout ? 12 : 10
|
|
69
|
+
const cardHeight = windowHeight * 0.3
|
|
63
70
|
|
|
64
71
|
const styles = StyleSheet.create({
|
|
72
|
+
container: {
|
|
73
|
+
marginVertical: 20,
|
|
74
|
+
borderRadius: 7.6,
|
|
75
|
+
width: '100%',
|
|
76
|
+
position: 'relative',
|
|
77
|
+
height: cardHeight
|
|
78
|
+
},
|
|
65
79
|
headerStyle: {
|
|
66
80
|
borderTopLeftRadius: 7.6,
|
|
67
81
|
borderTopRightRadius: 7.6,
|
|
@@ -111,7 +125,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
111
125
|
flexDirection: 'row',
|
|
112
126
|
alignItems: 'center',
|
|
113
127
|
justifyContent: 'flex-start',
|
|
114
|
-
}
|
|
128
|
+
}
|
|
115
129
|
});
|
|
116
130
|
|
|
117
131
|
const types = ['food', 'laundry', 'alcohol', 'groceries'];
|
|
@@ -128,6 +142,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
128
142
|
};
|
|
129
143
|
|
|
130
144
|
const handleBusinessClick = (selectedBusiness: any) => {
|
|
145
|
+
Vibration.vibrate()
|
|
131
146
|
if (business?.open) handleClick && handleClick(selectedBusiness)
|
|
132
147
|
else {
|
|
133
148
|
if (configState?.configs?.preorder_status_enabled?.value === '1') {
|
|
@@ -146,27 +161,17 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
146
161
|
}
|
|
147
162
|
}
|
|
148
163
|
|
|
149
|
-
const fadeIn = () => {
|
|
150
|
-
Animated.timing(fadeAnim, {
|
|
151
|
-
toValue: 1,
|
|
152
|
-
duration: 500,
|
|
153
|
-
useNativeDriver: true
|
|
154
|
-
}).start();
|
|
155
|
-
};
|
|
156
|
-
|
|
157
164
|
const handleChangeInterSection = (inView: boolean) => {
|
|
158
165
|
setIsIntersectionObserver(inView)
|
|
159
|
-
fadeIn()
|
|
160
166
|
}
|
|
161
167
|
|
|
162
|
-
useEffect(() => {
|
|
163
|
-
if (!enableIntersection) fadeIn()
|
|
164
|
-
}, [enableIntersection])
|
|
165
|
-
|
|
166
168
|
return (
|
|
167
169
|
<InView style={{ minHeight: 200 }} triggerOnce={true} onChange={(inView: boolean) => handleChangeInterSection(inView)}>
|
|
168
170
|
{isIntersectionObserver ? (
|
|
169
|
-
<
|
|
171
|
+
<CardAnimation
|
|
172
|
+
style={[style, styles.container]}
|
|
173
|
+
onClick={() => handleBusinessClick(business)}
|
|
174
|
+
>
|
|
170
175
|
{business?.ribbon?.enabled && (
|
|
171
176
|
<RibbonBox
|
|
172
177
|
bgColor={business?.ribbon?.color}
|
|
@@ -186,27 +191,31 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
186
191
|
</RibbonBox>
|
|
187
192
|
)}
|
|
188
193
|
<BusinessHero>
|
|
189
|
-
<Animated.View
|
|
190
|
-
style={[
|
|
191
|
-
{
|
|
192
|
-
opacity: fadeAnim
|
|
193
|
-
}
|
|
194
|
-
]}
|
|
195
|
-
>
|
|
196
194
|
<FastImage
|
|
197
|
-
style={{ height: 120 }}
|
|
198
|
-
source={{
|
|
195
|
+
style={{ height: isCustomLayout ? cardHeight * 0.66 : 120 }}
|
|
196
|
+
source={(businessHeader || business?.header) ? {
|
|
199
197
|
uri: optimizeImage(businessHeader || business?.header, 'h_500,c_limit'),
|
|
200
198
|
priority: FastImage.priority.normal,
|
|
201
|
-
}}
|
|
199
|
+
} : theme.images.dummies.businessHeader}
|
|
202
200
|
resizeMode={FastImage.resizeMode.cover}
|
|
203
201
|
/>
|
|
204
|
-
</Animated.View>
|
|
205
202
|
{(businessFeatured ?? business?.featured) && (
|
|
206
203
|
<View style={styles.featured}>
|
|
207
204
|
<FontAwesomeIcon name="crown" size={26} color="gold" />
|
|
208
205
|
</View>
|
|
209
206
|
)}
|
|
207
|
+
{(!isCustomLayout) && (
|
|
208
|
+
getBusinessOffer((business?.offers)) &&
|
|
209
|
+
<OfferBox>
|
|
210
|
+
<OText
|
|
211
|
+
size={10}
|
|
212
|
+
weight={'400'}
|
|
213
|
+
numberOfLines={2}
|
|
214
|
+
ellipsizeMode='tail'
|
|
215
|
+
lineHeight={13}
|
|
216
|
+
>{getBusinessOffer((business?.offers)) || parsePrice(0)}</OText>
|
|
217
|
+
</OfferBox>
|
|
218
|
+
)}
|
|
210
219
|
<BusinessState>
|
|
211
220
|
{!isBusinessOpen && (configState?.configs?.preorder_status_enabled?.value === '1') && (
|
|
212
221
|
<View style={styles.businessStateView}>
|
|
@@ -221,49 +230,71 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
221
230
|
</BusinessState>
|
|
222
231
|
</BusinessHero>
|
|
223
232
|
<BusinessContent>
|
|
224
|
-
<BusinessInfo>
|
|
233
|
+
<BusinessInfo style={isCustomLayout && { position: 'absolute', bottom: 85, left: 15 }}>
|
|
225
234
|
<BusinessLogo style={styles.businessLogo}>
|
|
226
235
|
<FastImage
|
|
227
236
|
style={{ width: 56, height: 56 }}
|
|
228
|
-
source={{
|
|
237
|
+
source={(businessLogo || business?.logo) ? {
|
|
229
238
|
uri: optimizeImage(businessLogo || business?.logo, 'h_150,c_limit'),
|
|
230
239
|
priority: FastImage.priority.normal,
|
|
231
|
-
}}
|
|
240
|
+
} : theme.images.dummies.businessLogo}
|
|
232
241
|
resizeMode={FastImage.resizeMode.cover}
|
|
233
242
|
/>
|
|
234
243
|
</BusinessLogo>
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
<
|
|
239
|
-
|
|
240
|
-
{
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
244
|
+
{!isCustomLayout && (
|
|
245
|
+
<ReviewAndFavorite>
|
|
246
|
+
{(businessReviews?.reviews?.total > 0 ?? business?.reviews?.total > 0) && (
|
|
247
|
+
<Reviews>
|
|
248
|
+
<OIcon src={theme.images.general.star} width={12} style={styles.starIcon} />
|
|
249
|
+
<OText size={10} style={{ lineHeight: 15 }}>
|
|
250
|
+
{parseNumber(businessReviews?.reviews?.total ?? business?.reviews?.total, { separator: '.' })}
|
|
251
|
+
</OText>
|
|
252
|
+
</Reviews>
|
|
253
|
+
)}
|
|
254
|
+
<LottieAnimation
|
|
255
|
+
type='favorite'
|
|
256
|
+
onClick={handleChangeFavorite}
|
|
257
|
+
initialValue={business?.favorite ? 0.75 : 0}
|
|
258
|
+
toValue={business?.favorite ? 0 : 0.75}
|
|
259
|
+
disableAnimation={!auth}
|
|
260
|
+
iconProps={{ color: theme.colors.danger5, size: 18 }}
|
|
261
|
+
isActive={business?.favorite}
|
|
251
262
|
/>
|
|
252
|
-
</
|
|
253
|
-
|
|
263
|
+
</ReviewAndFavorite>
|
|
264
|
+
)}
|
|
254
265
|
</BusinessInfo>
|
|
255
|
-
<
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
266
|
+
<View style={isCustomLayout && { width: '100%', flexDirection: 'row', justifyContent: 'space-between', marginTop: 5 }}>
|
|
267
|
+
<OText
|
|
268
|
+
size={textSize + 2}
|
|
269
|
+
style={{ lineHeight: 18, marginBottom: 6 }}
|
|
270
|
+
weight={'500'}>
|
|
271
|
+
{business?.name}
|
|
272
|
+
</OText>
|
|
273
|
+
{isCustomLayout && (
|
|
274
|
+
<ReviewAndFavorite>
|
|
275
|
+
{(businessReviews?.reviews?.total > 0 ?? business?.reviews?.total > 0) && (
|
|
276
|
+
<Reviews>
|
|
277
|
+
<OIcon src={theme.images.general.star} width={12} style={styles.starIcon} />
|
|
278
|
+
<OText size={10} style={{ lineHeight: 15 }}>
|
|
279
|
+
{parseNumber(businessReviews?.reviews?.total ?? business?.reviews?.total, { separator: '.' })}
|
|
280
|
+
</OText>
|
|
281
|
+
</Reviews>
|
|
282
|
+
)}
|
|
283
|
+
<LottieAnimation
|
|
284
|
+
type='favorite'
|
|
285
|
+
onClick={handleChangeFavorite}
|
|
286
|
+
initialValue={business?.favorite ? 0.75 : 0}
|
|
287
|
+
toValue={business?.favorite ? 0 : 0.75}
|
|
288
|
+
disableAnimation={!auth}
|
|
289
|
+
iconProps={{ color: theme.colors.danger5, size: 18 }}
|
|
290
|
+
isActive={business?.favorite}
|
|
291
|
+
/>
|
|
292
|
+
</ReviewAndFavorite>
|
|
293
|
+
)}
|
|
294
|
+
</View>
|
|
295
|
+
<OText size={textSize} style={{ lineHeight: 15, marginBottom: 3 }} numberOfLines={isCustomLayout ? 1 : 2}>
|
|
262
296
|
{business?.address}
|
|
263
297
|
</OText>
|
|
264
|
-
{/* <BusinessCategory>
|
|
265
|
-
<OText>{getBusinessType()}</OText>
|
|
266
|
-
</BusinessCategory> */}
|
|
267
298
|
<Metadata>
|
|
268
299
|
{!isBusinessOpen ? (
|
|
269
300
|
<View style={styles.closed}>
|
|
@@ -274,21 +305,21 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
274
305
|
) : (
|
|
275
306
|
<View style={styles.bullet}>
|
|
276
307
|
{orderState?.options?.type === 1 && (
|
|
277
|
-
<OText size={
|
|
308
|
+
<OText size={textSize} color={theme.colors.textSecondary}>
|
|
278
309
|
{`${t('DELIVERY_FEE', 'Delivery fee')} ${parsePrice(businessDeliveryPrice ?? business?.delivery_price) + ' \u2022 '}`}
|
|
279
310
|
</OText>
|
|
280
311
|
)}
|
|
281
|
-
<OText size={
|
|
312
|
+
<OText size={textSize} color={theme.colors.textSecondary}>{`${convertHoursToMinutes(
|
|
282
313
|
orderState?.options?.type === 1
|
|
283
314
|
? (businessDeliveryTime ?? business?.delivery_time)
|
|
284
315
|
: (businessPickupTime ?? business?.pickup_time),
|
|
285
316
|
)} \u2022 `}</OText>
|
|
286
|
-
<OText size={
|
|
317
|
+
<OText size={textSize} color={theme.colors.textSecondary}>{parseDistance(businessDistance ?? business?.distance)}</OText>
|
|
287
318
|
</View>
|
|
288
319
|
)}
|
|
289
320
|
</Metadata>
|
|
290
321
|
</BusinessContent>
|
|
291
|
-
</
|
|
322
|
+
</CardAnimation>
|
|
292
323
|
) : (
|
|
293
324
|
<Placeholder
|
|
294
325
|
Animation={Fade}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components/native';
|
|
2
2
|
|
|
3
|
-
export const Card = styled.TouchableOpacity`
|
|
4
|
-
margin-vertical: 20px;
|
|
5
|
-
border-radius: 7.6px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
position: relative;
|
|
8
|
-
`
|
|
9
|
-
|
|
10
3
|
export const BusinessHero = styled.View`
|
|
11
4
|
position: relative;
|
|
12
5
|
border-top-right-radius: 7.6px;
|
|
@@ -16,7 +9,7 @@ export const BusinessHero = styled.View`
|
|
|
16
9
|
|
|
17
10
|
export const BusinessContent = styled.View`
|
|
18
11
|
padding-horizontal: 18px;
|
|
19
|
-
padding-bottom:
|
|
12
|
+
padding-bottom: 10px;
|
|
20
13
|
border-bottom-left-radius: 7.6px;
|
|
21
14
|
border-bottom-right-radius: 7.6px;
|
|
22
15
|
border-width: 1px;
|
|
@@ -46,7 +39,7 @@ export const BusinessState = styled.View`
|
|
|
46
39
|
`
|
|
47
40
|
|
|
48
41
|
export const BusinessLogo = styled.View`
|
|
49
|
-
|
|
42
|
+
|
|
50
43
|
`
|
|
51
44
|
|
|
52
45
|
export const ReviewAndFavorite = styled.View`
|
|
@@ -80,3 +73,15 @@ export const RibbonBox = styled.View`
|
|
|
80
73
|
border-radius: 50px;
|
|
81
74
|
`}
|
|
82
75
|
`
|
|
76
|
+
|
|
77
|
+
export const OfferBox = styled.View`
|
|
78
|
+
position: absolute;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
top: 20px;
|
|
81
|
+
right: 10px;
|
|
82
|
+
border-radius: 50px;
|
|
83
|
+
color: ${(props: any) => props.theme.colors.textThird};
|
|
84
|
+
background: ${(props: any) => props.theme.colors.inputBorderColor};
|
|
85
|
+
padding: 3px 8px;
|
|
86
|
+
max-width: 180px;
|
|
87
|
+
`
|
|
@@ -16,26 +16,19 @@ import {
|
|
|
16
16
|
DivideView,
|
|
17
17
|
MediaWrapper,
|
|
18
18
|
} from './styles';
|
|
19
|
-
import {
|
|
19
|
+
import { 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';
|
|
23
23
|
import { formatUrlVideo } from '../../utils'
|
|
24
|
+
import { ScheduleAccordion } from '../ScheduleAccordion';
|
|
24
25
|
const BusinessInformationUI = (props: BusinessInformationParams) => {
|
|
25
26
|
const { businessState, businessSchedule, businessLocation } = props;
|
|
26
27
|
|
|
27
28
|
const theme = useTheme();
|
|
28
29
|
const [, t] = useLanguage();
|
|
29
30
|
const [{ optimizeImage }] = useUtils();
|
|
30
|
-
|
|
31
|
-
t('SUNDAY_ABBREVIATION', 'Sun'),
|
|
32
|
-
t('MONDAY_ABBREVIATION', 'Mon'),
|
|
33
|
-
t('TUESDAY_ABBREVIATION', 'Tues'),
|
|
34
|
-
t('WEDNESDAY_ABBREVIATION', 'Wed'),
|
|
35
|
-
t('THURSDAY_ABBREVIATION', 'Thur'),
|
|
36
|
-
t('FRIDAY_ABBREVIATION', 'Fri'),
|
|
37
|
-
t('SATURDAY_ABBREVIATION', 'Sat'),
|
|
38
|
-
];
|
|
31
|
+
|
|
39
32
|
const scheduleFormatted = ({
|
|
40
33
|
hour,
|
|
41
34
|
minute,
|
|
@@ -112,25 +105,11 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
|
|
|
112
105
|
<WrapScheduleBlock>
|
|
113
106
|
{businessSchedule.map((schedule: any, i: number) => (
|
|
114
107
|
<ScheduleBlock key={i}>
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
style={{ flexBasis: '20%' }}>
|
|
121
|
-
{daysOfWeek[i].toUpperCase()}
|
|
122
|
-
</OText>
|
|
123
|
-
{schedule.enabled ? (
|
|
124
|
-
<OText mBottom={16}>
|
|
125
|
-
{scheduleFormatted(schedule.lapses[0].open) +
|
|
126
|
-
' - ' +
|
|
127
|
-
scheduleFormatted(schedule.lapses[0].close)}
|
|
128
|
-
</OText>
|
|
129
|
-
) : (
|
|
130
|
-
<OText color={theme.colors.red} mBottom={16}>
|
|
131
|
-
{t('CLOSED', 'Closed')}
|
|
132
|
-
</OText>
|
|
133
|
-
)}
|
|
108
|
+
<ScheduleAccordion
|
|
109
|
+
weekIndex={i}
|
|
110
|
+
scheduleFormatted={scheduleFormatted}
|
|
111
|
+
schedule={schedule}
|
|
112
|
+
/>
|
|
134
113
|
</ScheduleBlock>
|
|
135
114
|
))}
|
|
136
115
|
</WrapScheduleBlock>
|
|
@@ -152,10 +131,10 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
|
|
|
152
131
|
style={{ width: 210, height: 127, borderRadius: 7.6 }}
|
|
153
132
|
javaScriptEnabled={true}
|
|
154
133
|
domStorageEnabled={true}
|
|
155
|
-
source={{
|
|
134
|
+
source={{
|
|
156
135
|
html: `
|
|
157
136
|
<iframe width='80%' height='80%' src="${formatUrlVideo(v.video)}" frameBorder='0' allow='autoplay; encrypted-media' allowFullScreen />
|
|
158
|
-
`,
|
|
137
|
+
`,
|
|
159
138
|
}}
|
|
160
139
|
mediaPlaybackRequiresUserAction={true}
|
|
161
140
|
/>
|
|
@@ -41,10 +41,16 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
41
41
|
useEffect(() => {
|
|
42
42
|
const cartsArray = Object.values(orderState?.carts)
|
|
43
43
|
const cartsLength = cartsArray.filter((cart: any) => cart.products.length > 0).length ?? 0
|
|
44
|
-
if (
|
|
45
|
-
setActiveState(
|
|
44
|
+
if (cartsLength === 1) {
|
|
45
|
+
setActiveState(!isClosed)
|
|
46
46
|
}
|
|
47
|
-
}, [orderState?.carts])
|
|
47
|
+
}, [orderState?.carts, isClosed])
|
|
48
|
+
|
|
49
|
+
const subtotalWithTaxes = cart?.taxes?.reduce((acc: any, item: any) => {
|
|
50
|
+
if (item?.type === 1)
|
|
51
|
+
return acc = acc + item?.summary?.tax
|
|
52
|
+
return acc = acc
|
|
53
|
+
}, cart?.subtotal)
|
|
48
54
|
|
|
49
55
|
return (
|
|
50
56
|
<BIContainer isClosed={isClosed} isMultiCheckout={isMultiCheckout} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
|
|
@@ -102,7 +108,7 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
102
108
|
<OText
|
|
103
109
|
size={12}
|
|
104
110
|
lineHeight={18}
|
|
105
|
-
color={theme.colors.
|
|
111
|
+
color={theme.colors.primary}
|
|
106
112
|
style={{ textDecorationLine: 'underline' }}
|
|
107
113
|
>
|
|
108
114
|
{t('CHANGE_STORE', 'Change store')}
|
|
@@ -149,9 +155,9 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
149
155
|
<OButton
|
|
150
156
|
onClick={handleClickCheckout}
|
|
151
157
|
textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
|
|
152
|
-
style={{ width:
|
|
158
|
+
style={{ width: 180, flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
|
|
153
159
|
text={t('CHECKOUT', 'Checkout')}
|
|
154
|
-
bgColor={(
|
|
160
|
+
bgColor={(subtotalWithTaxes < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
|
|
155
161
|
borderColor={theme.colors.primary}
|
|
156
162
|
isDisabled={checkoutButtonDisabled}
|
|
157
163
|
/>
|