ordering-ui-react-native 0.17.76 → 0.17.77-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 +8 -7
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessInformation/index.tsx +10 -9
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/OrderCreating/index.tsx +1 -21
- package/src/components/PaymentOptionsWebView/index.tsx +29 -8
- package/src/components/PhoneInputNumber/index.tsx +6 -2
- package/src/components/StripeMethodForm/index.tsx +136 -102
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +5 -0
- package/src/utils/index.tsx +5 -0
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +28 -25
- package/themes/business/src/components/BusinessController/index.tsx +0 -1
- package/themes/business/src/components/Chat/index.tsx +149 -118
- package/themes/business/src/components/DriverMap/index.tsx +17 -6
- package/themes/business/src/components/DriverSchedule/index.tsx +45 -8
- package/themes/business/src/components/GoogleMap/index.tsx +58 -57
- package/themes/business/src/components/LoginForm/Otp/index.tsx +31 -3
- package/themes/business/src/components/LoginForm/index.tsx +15 -22
- package/themes/business/src/components/MapView/index.tsx +10 -10
- package/themes/business/src/components/MessagesOption/index.tsx +20 -93
- package/themes/business/src/components/NewOrderNotification/index.tsx +128 -96
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +191 -6
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +102 -40
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +70 -67
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +195 -0
- package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
- package/themes/business/src/components/OrderMessage/index.tsx +19 -18
- package/themes/business/src/components/OrderSummary/index.tsx +114 -123
- package/themes/business/src/components/OrdersOption/index.tsx +20 -22
- package/themes/business/src/components/PreviousMessages/FooterMessageComponent.tsx +103 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +97 -55
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +17 -12
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +88 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +139 -174
- package/themes/business/src/components/ProductItemAccordion/index.tsx +27 -3
- package/themes/business/src/components/ReviewCustomer/index.tsx +18 -13
- package/themes/business/src/components/StoresList/index.tsx +3 -4
- package/themes/business/src/components/UserProfileForm/index.tsx +14 -15
- package/themes/business/src/components/shared/OLink.tsx +9 -2
- package/themes/business/src/components/shared/OModal.tsx +16 -9
- package/themes/business/src/components/shared/OText.tsx +6 -1
- package/themes/business/src/types/index.tsx +25 -10
- package/themes/business/src/utils/index.tsx +29 -2
- 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/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/Intro/index.tsx +16 -1
- package/themes/kiosk/src/components/LoginForm/index.tsx +7 -9
- 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/PhoneInputNumber/index.tsx +2 -2
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +1 -1
- package/themes/original/src/components/AddressDetails/index.tsx +19 -3
- package/themes/original/src/components/AddressForm/index.tsx +61 -39
- package/themes/original/src/components/AddressList/index.tsx +11 -6
- package/themes/original/src/components/AnalyticsSegment/index.tsx +193 -10
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +153 -96
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +10 -12
- package/themes/original/src/components/BusinessController/index.tsx +81 -68
- package/themes/original/src/components/BusinessController/styles.tsx +12 -5
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +21 -54
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +8 -0
- package/themes/original/src/components/BusinessInformation/index.tsx +140 -85
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +15 -20
- package/themes/original/src/components/BusinessListingSearch/index.tsx +348 -340
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +0 -18
- package/themes/original/src/components/BusinessPreorder/index.tsx +103 -19
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -2
- package/themes/original/src/components/BusinessProductsList/index.tsx +15 -7
- package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
- package/themes/original/src/components/BusinessProductsListing/UpsellingRedirect.tsx +1 -1
- package/themes/original/src/components/BusinessProductsListing/index.tsx +684 -559
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +1 -1
- package/themes/original/src/components/BusinessReviews/index.tsx +3 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +70 -39
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +0 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +76 -79
- package/themes/original/src/components/CartContent/index.tsx +112 -19
- package/themes/original/src/components/CartContent/styles.tsx +16 -6
- package/themes/original/src/components/Checkout/index.tsx +294 -56
- package/themes/original/src/components/CitiesControl/index.tsx +1 -1
- package/themes/original/src/components/CouponControl/index.tsx +10 -3
- package/themes/original/src/components/DriverTips/index.tsx +52 -34
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- package/themes/original/src/components/Favorite/index.tsx +2 -6
- package/themes/original/src/components/FavoriteList/index.tsx +1 -35
- package/themes/original/src/components/FloatingButton/index.tsx +10 -13
- package/themes/original/src/components/GPSButton/index.tsx +6 -4
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +7 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +2 -0
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +19 -6
- package/themes/original/src/components/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +60 -5
- package/themes/original/src/components/Help/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/styles.tsx +1 -0
- package/themes/original/src/components/Home/index.tsx +13 -4
- package/themes/original/src/components/LastOrder/index.tsx +1 -34
- package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -25
- package/themes/original/src/components/LoginForm/index.tsx +64 -34
- package/themes/original/src/components/LottieAnimation/index.tsx +88 -63
- package/themes/original/src/components/MessageListing/index.tsx +16 -42
- package/themes/original/src/components/Messages/index.tsx +14 -7
- package/themes/original/src/components/MomentOption/index.tsx +193 -90
- package/themes/original/src/components/MomentSelector/index.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +41 -54
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +162 -50
- package/themes/original/src/components/MultiCheckout/index.tsx +329 -100
- package/themes/original/src/components/MultiCheckout/styles.tsx +3 -1
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +37 -224
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +54 -21
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +37 -24
- package/themes/original/src/components/NavBar/index.tsx +20 -12
- package/themes/original/src/components/NotFoundSource/index.tsx +14 -10
- package/themes/original/src/components/Notifications/styles.tsx +1 -5
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +76 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +21 -5
- package/themes/original/src/components/OrderDetails/index.tsx +139 -306
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderItAgain/index.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +33 -57
- package/themes/original/src/components/OrderSummary/index.tsx +83 -57
- package/themes/original/src/components/OrderTypeSelector/index.tsx +2 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +14 -14
- package/themes/original/src/components/OrdersOption/index.tsx +61 -81
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +98 -38
- package/themes/original/src/components/PageBanner/styles.tsx +0 -10
- package/themes/original/src/components/PaymentOptionCard/index.tsx +180 -0
- 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 +95 -33
- package/themes/original/src/components/PhoneInputNumber/index.tsx +18 -4
- package/themes/original/src/components/ProductForm/index.tsx +103 -40
- package/themes/original/src/components/ProductForm/styles.tsx +3 -3
- package/themes/original/src/components/ProductItemAccordion/index.tsx +8 -6
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +50 -21
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
- package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -50
- package/themes/original/src/components/ProfessionalProfile/index.tsx +36 -7
- package/themes/original/src/components/Promotions/index.tsx +2 -2
- package/themes/original/src/components/Promotions/styles.tsx +3 -1
- package/themes/original/src/components/ReviewProducts/index.tsx +16 -7
- package/themes/original/src/components/ScheduleAccordion/index.tsx +3 -3
- package/themes/original/src/components/ServiceForm/index.tsx +63 -20
- package/themes/original/src/components/Sessions/index.tsx +11 -8
- package/themes/original/src/components/Sessions/styles.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +43 -27
- package/themes/original/src/components/SingleOrderCard/index.tsx +102 -63
- package/themes/original/src/components/SingleOrderCard/styles.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +72 -31
- package/themes/original/src/components/SingleProductCard/styles.tsx +20 -4
- package/themes/original/src/components/SingleProductReview/styles.tsx +1 -1
- package/themes/original/src/components/StripeCardsList/index.tsx +49 -5
- package/themes/original/src/components/StripeElementsForm/index.tsx +48 -34
- package/themes/original/src/components/StripeElementsForm/naked.tsx +12 -1
- package/themes/original/src/components/UpsellingProducts/index.tsx +238 -224
- package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
- package/themes/original/src/components/UserDetails/index.tsx +3 -1
- package/themes/original/src/components/UserFormDetails/index.tsx +78 -9
- package/themes/original/src/components/UserFormDetails/styles.tsx +1 -1
- package/themes/original/src/components/UserProfile/index.tsx +87 -76
- package/themes/original/src/components/UserProfileForm/index.tsx +10 -3
- package/themes/original/src/components/UserProfileForm/styles.tsx +1 -1
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
- package/themes/original/src/components/WalletTransactions/index.tsx +3 -3
- package/themes/original/src/components/Wallets/index.tsx +56 -33
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- package/themes/original/src/components/shared/OButton.tsx +6 -2
- package/themes/original/src/components/shared/OInput.tsx +6 -1
- package/themes/original/src/components/shared/OModal.tsx +3 -3
- package/themes/original/src/types/index.tsx +39 -10
- package/themes/original/src/utils/index.tsx +386 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/navigators/BottomNavigator.tsx +0 -117
- package/src/navigators/CheckoutNavigator.tsx +0 -66
- package/src/navigators/HomeNavigator.tsx +0 -202
- package/src/navigators/NavigationRef.tsx +0 -7
- package/src/navigators/RootNavigator.tsx +0 -269
- package/src/pages/Account.tsx +0 -34
- package/src/pages/AddressForm.tsx +0 -62
- package/src/pages/AddressList.tsx +0 -24
- package/src/pages/BusinessProductsList.tsx +0 -81
- package/src/pages/BusinessesListing.tsx +0 -43
- package/src/pages/CartList.tsx +0 -49
- package/src/pages/Checkout.tsx +0 -101
- package/src/pages/ForgotPassword.tsx +0 -24
- package/src/pages/Help.tsx +0 -23
- package/src/pages/HelpAccountAndPayment.tsx +0 -23
- package/src/pages/HelpGuide.tsx +0 -23
- package/src/pages/HelpOrder.tsx +0 -23
- package/src/pages/Home.tsx +0 -36
- package/src/pages/IntroductoryTutorial.tsx +0 -170
- package/src/pages/Login.tsx +0 -47
- package/src/pages/MomentOption.tsx +0 -30
- package/src/pages/MultiCheckout.tsx +0 -31
- package/src/pages/MultiOrdersDetails.tsx +0 -27
- package/src/pages/MyOrders.tsx +0 -40
- package/src/pages/NetworkError.tsx +0 -24
- package/src/pages/NotFound.tsx +0 -22
- package/src/pages/OrderDetails.tsx +0 -25
- package/src/pages/ProductDetails.tsx +0 -55
- package/src/pages/Profile.tsx +0 -36
- package/src/pages/ReviewDriver.tsx +0 -30
- package/src/pages/ReviewOrder.tsx +0 -32
- package/src/pages/ReviewProducts.tsx +0 -30
- package/src/pages/Sessions.tsx +0 -22
- package/src/pages/Signup.tsx +0 -53
- package/src/pages/SpinnerLoader.tsx +0 -10
- package/src/pages/Splash.tsx +0 -21
|
@@ -1,25 +1,70 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { useLanguage } from 'ordering-components/native';
|
|
3
|
+
import { useLanguage, useConfig, useUtils } from 'ordering-components/native';
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
|
-
import { CCContainer, CCNotCarts, CCList } from './styles';
|
|
5
|
+
import { CCContainer, CCNotCarts, CCList, CheckoutAction, ChCartsTotal } from './styles';
|
|
6
6
|
|
|
7
7
|
import { Cart } from '../Cart';
|
|
8
8
|
import { OButton, OText } from '../shared';
|
|
9
9
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
10
|
+
import { NotFoundSource } from '../NotFoundSource';
|
|
10
11
|
|
|
11
12
|
export const CartContent = (props: any) => {
|
|
12
13
|
const {
|
|
13
14
|
carts,
|
|
14
15
|
isOrderStateCarts,
|
|
15
|
-
onNavigationRedirect
|
|
16
|
+
onNavigationRedirect,
|
|
17
|
+
singleBusiness
|
|
16
18
|
} = props
|
|
17
19
|
|
|
18
20
|
const theme = useTheme();
|
|
19
21
|
const [, t] = useLanguage()
|
|
22
|
+
const [{ configs }] = useConfig()
|
|
23
|
+
const [{ parsePrice }] = useUtils();
|
|
20
24
|
const [isCartsLoading, setIsCartsLoading] = useState(false)
|
|
21
25
|
|
|
22
26
|
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
27
|
+
const isMultiCheckout = configs?.checkout_multi_business_enabled?.value === '1'
|
|
28
|
+
const cartsAvailable: any = Object.values(carts)?.filter((cart: any) => cart?.valid && cart?.status !== 2)
|
|
29
|
+
|
|
30
|
+
const totalCartsPrice = cartsAvailable?.length && cartsAvailable.reduce((total: any, cart: any) => { return total + cart?.total }, 0)
|
|
31
|
+
const totalCartsFee = cartsAvailable?.length && cartsAvailable
|
|
32
|
+
?.filter((cart: any) => cart?.status !== 1 && cart?.valid && cart?.products?.length)
|
|
33
|
+
?.reduce((total: any, cart: any) => { return total + (cart?.delivery_price_with_discount) }, 0)
|
|
34
|
+
|
|
35
|
+
const handleCheckoutRedirect = () => {
|
|
36
|
+
if (cartsAvailable.length === 1) {
|
|
37
|
+
onNavigationRedirect('CheckoutNavigator', {
|
|
38
|
+
screen: 'CheckoutPage',
|
|
39
|
+
cartUuid: cartsAvailable[0]?.uuid,
|
|
40
|
+
businessLogo: cartsAvailable[0]?.business?.logo,
|
|
41
|
+
businessName: cartsAvailable[0]?.business?.name,
|
|
42
|
+
cartTotal: cartsAvailable[0]?.total
|
|
43
|
+
})
|
|
44
|
+
} else {
|
|
45
|
+
const groupKeys: any = {}
|
|
46
|
+
cartsAvailable.forEach((_cart: any) => {
|
|
47
|
+
groupKeys[_cart?.group?.uuid]
|
|
48
|
+
? groupKeys[_cart?.group?.uuid] += 1
|
|
49
|
+
: groupKeys[_cart?.group?.uuid ?? 'null'] = 1
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
if (
|
|
53
|
+
(Object.keys(groupKeys).length === 1 && Object.keys(groupKeys)[0] === 'null') ||
|
|
54
|
+
Object.keys(groupKeys).length > 1
|
|
55
|
+
) {
|
|
56
|
+
onNavigationRedirect('CheckoutNavigator', {
|
|
57
|
+
screen: 'MultiCheckout',
|
|
58
|
+
checkCarts: true
|
|
59
|
+
})
|
|
60
|
+
} else {
|
|
61
|
+
onNavigationRedirect('CheckoutNavigator', {
|
|
62
|
+
screen: 'MultiCheckout',
|
|
63
|
+
cartUuid: cartsAvailable[0]?.group?.uuid
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
23
68
|
|
|
24
69
|
return (
|
|
25
70
|
<CCContainer
|
|
@@ -28,7 +73,7 @@ export const CartContent = (props: any) => {
|
|
|
28
73
|
{isOrderStateCarts && carts?.length > 0 && (
|
|
29
74
|
<>
|
|
30
75
|
{carts.map((cart: any, i: number) => (
|
|
31
|
-
<CCList key={i} style={{ overflow: 'visible' }}>
|
|
76
|
+
<CCList nestedScrollEnabled={true} key={i} style={{ overflow: 'visible' }}>
|
|
32
77
|
{cart.products.length > 0 && (
|
|
33
78
|
<>
|
|
34
79
|
<Cart
|
|
@@ -39,32 +84,80 @@ export const CartContent = (props: any) => {
|
|
|
39
84
|
onNavigationRedirect={props.onNavigationRedirect}
|
|
40
85
|
isCartsLoading={isCartsLoading}
|
|
41
86
|
setIsCartsLoading={setIsCartsLoading}
|
|
87
|
+
isMultiCheckout={isMultiCheckout}
|
|
42
88
|
hideUpselling
|
|
89
|
+
businessConfigs={cart?.business?.configs}
|
|
90
|
+
hideCouponInput={configs?.multi_business_checkout_coupon_input_style?.value === 'group'}
|
|
91
|
+
hideDeliveryFee={configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'}
|
|
92
|
+
hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
|
|
43
93
|
/>
|
|
44
94
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40, marginTop: 20 }} />
|
|
45
95
|
</>
|
|
46
96
|
)}
|
|
47
97
|
</CCList>
|
|
48
98
|
))}
|
|
99
|
+
{isMultiCheckout && (
|
|
100
|
+
<>
|
|
101
|
+
{!!cartsAvailable.length && (
|
|
102
|
+
<ChCartsTotal>
|
|
103
|
+
{!!totalCartsFee && configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1' && (
|
|
104
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
105
|
+
<OText size={14} lineHeight={24} color={theme.colors.textNormal} weight={'400'}>
|
|
106
|
+
{t('TOTAL_DELIVERY_FEE', 'Total delivery fee')}
|
|
107
|
+
</OText>
|
|
108
|
+
<OText size={14} lineHeight={24} color={theme.colors.textNormal} weight={'400'}>
|
|
109
|
+
{parsePrice(totalCartsFee)}
|
|
110
|
+
</OText>
|
|
111
|
+
</View>
|
|
112
|
+
)}
|
|
113
|
+
{cartsAvailable.reduce((sum: any, cart: any) => sum + cart?.driver_tip, 0) > 0 &&
|
|
114
|
+
configs?.multi_business_checkout_show_combined_driver_tip?.value === '1' && (
|
|
115
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
116
|
+
<OText size={14} lineHeight={24} color={theme.colors.textNormal} weight={'400'}>
|
|
117
|
+
{t('DRIVER_TIP', 'Driver tip')}
|
|
118
|
+
</OText>
|
|
119
|
+
<OText size={14} lineHeight={24} color={theme.colors.textNormal} weight={'400'}>
|
|
120
|
+
{parsePrice(cartsAvailable.reduce((sum: any, cart: any) => sum + cart?.driver_tip, 0))}
|
|
121
|
+
</OText>
|
|
122
|
+
</View>
|
|
123
|
+
)}
|
|
124
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
125
|
+
<OText size={16} lineHeight={24} color={theme.colors.textNormal} weight={'500'}>
|
|
126
|
+
{t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')}
|
|
127
|
+
</OText>
|
|
128
|
+
<OText size={16} lineHeight={24} color={theme.colors.textNormal} weight={'500'}>{parsePrice(totalCartsPrice)}</OText>
|
|
129
|
+
</View>
|
|
130
|
+
<View style={{ flexDirection: 'row', justifyContent: 'center', marginVertical: 20 }}>
|
|
131
|
+
<OText size={14} color={theme.colors.textNormal} weight={'300'} style={{ textAlign: 'center' }}>
|
|
132
|
+
{t('CART_GROUP_MESSAGE_ALERT', 'Discounts may be applied at the time of payment for this group.')}
|
|
133
|
+
</OText>
|
|
134
|
+
</View>
|
|
135
|
+
</ChCartsTotal>
|
|
136
|
+
)}
|
|
137
|
+
<CheckoutAction style={{ marginTop: 0 }}>
|
|
138
|
+
<OButton
|
|
139
|
+
text={t('CHECKOUT', 'Checkout')}
|
|
140
|
+
bgColor={!cartsAvailable.length ? theme.colors.secundary : theme.colors.primary}
|
|
141
|
+
isDisabled={!cartsAvailable.length}
|
|
142
|
+
borderColor={theme.colors.primary}
|
|
143
|
+
imgRightSrc={null}
|
|
144
|
+
textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
|
|
145
|
+
onClick={() => handleCheckoutRedirect()}
|
|
146
|
+
style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
|
|
147
|
+
/>
|
|
148
|
+
</CheckoutAction>
|
|
149
|
+
</>
|
|
150
|
+
)}
|
|
49
151
|
</>
|
|
50
152
|
)}
|
|
51
153
|
{(!carts || carts?.length === 0) && (
|
|
52
154
|
<CCNotCarts>
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
borderColor={theme.colors.primary}
|
|
60
|
-
textStyle={{
|
|
61
|
-
color: theme.colors.white,
|
|
62
|
-
fontSize: 14,
|
|
63
|
-
paddingRight: 0
|
|
64
|
-
}}
|
|
65
|
-
style={{ height: 35, marginVertical: 20, borderRadius: 8 }}
|
|
66
|
-
imgRightSrc={null}
|
|
67
|
-
onClick={() => onNavigationRedirect('BusinessList')}
|
|
155
|
+
<NotFoundSource
|
|
156
|
+
hideImage
|
|
157
|
+
btnStyle={{ borderRadius: 8 }}
|
|
158
|
+
content={t('CARTS_NOT_FOUND', 'You don\'t have carts available')}
|
|
159
|
+
btnTitle={t('START_SHOPPING', 'Start shopping')}
|
|
160
|
+
onClickButton={() => singleBusiness ? onNavigationRedirect('Business') : onNavigationRedirect('BusinessList')}
|
|
68
161
|
/>
|
|
69
162
|
</CCNotCarts>
|
|
70
163
|
)}
|
|
@@ -5,15 +5,25 @@ export const CCContainer = styled.View`
|
|
|
5
5
|
`
|
|
6
6
|
|
|
7
7
|
export const CCNotCarts = styled.View`
|
|
8
|
-
height: 300px;
|
|
9
|
-
display: flex;
|
|
10
8
|
flex-direction: column;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
width: 80%;
|
|
14
|
-
margin: auto;
|
|
9
|
+
align-items: center;
|
|
10
|
+
margin-top: 40px;
|
|
15
11
|
`
|
|
16
12
|
|
|
17
13
|
export const CCList = styled.ScrollView`
|
|
18
14
|
padding: 10px 0px;
|
|
19
15
|
`
|
|
16
|
+
|
|
17
|
+
export const CheckoutAction = styled.View`
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: center;
|
|
23
|
+
margin-top: 10px;
|
|
24
|
+
margin-bottom: 10px;
|
|
25
|
+
`
|
|
26
|
+
|
|
27
|
+
export const ChCartsTotal = styled.View`
|
|
28
|
+
margin-bottom: 16px;
|
|
29
|
+
`
|