ordering-ui-react-native 0.21.6 → 0.21.7-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/BusinessInformation/index.tsx +10 -9
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +4 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +2 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
- package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
- package/themes/business/src/components/Chat/index.tsx +41 -13
- package/themes/business/src/components/DriverMap/index.tsx +4 -2
- package/themes/business/src/components/DriverSchedule/index.tsx +5 -5
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/MapView/index.tsx +11 -7
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +161 -106
- package/themes/business/src/components/OrderDetails/Business.tsx +47 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +21 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +56 -50
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +54 -23
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
- package/themes/business/src/components/OrderSummary/index.tsx +244 -82
- package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
- package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +125 -48
- 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 +27 -35
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +93 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +192 -220
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +279 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +17 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/Sessions/index.tsx +187 -0
- package/themes/business/src/components/Sessions/styles.tsx +20 -0
- package/themes/business/src/components/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserProfileForm/index.tsx +98 -44
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +21 -1
- 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/LoginForm/index.tsx +124 -96
- 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/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +9 -4
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- 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/index.tsx +4 -7
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +18 -10
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +43 -20
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
- 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 +69 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +29 -403
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +32 -9
- package/themes/original/src/components/CartContent/index.tsx +96 -58
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +190 -66
- 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/DatePicker/index.tsx +17 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/Favorite/index.tsx +4 -9
- 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/GiftCardOrdersList/index.tsx +64 -0
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
- package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
- package/themes/original/src/components/GoogleMap/index.tsx +6 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- 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/LastOrder/index.tsx +2 -1
- package/themes/original/src/components/LastOrders/index.tsx +2 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +53 -47
- package/themes/original/src/components/LoginForm/index.tsx +6 -1
- package/themes/original/src/components/Messages/index.tsx +9 -4
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +3 -3
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCheckout/index.tsx +251 -53
- package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
- package/themes/original/src/components/MyOrders/index.tsx +24 -29
- package/themes/original/src/components/NavBar/index.tsx +3 -1
- package/themes/original/src/components/NetworkError/index.tsx +2 -3
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +4 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +7 -3
- package/themes/original/src/components/OrderDetails/index.tsx +716 -667
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +28 -9
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +3 -1
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
- 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 +3 -5
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +3 -0
- package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
- package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +75 -166
- package/themes/original/src/components/ProductItemAccordion/index.tsx +13 -9
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -1
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +123 -82
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -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 +2 -2
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/SingleOrderCard/index.tsx +5 -4
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
- package/themes/original/src/components/StripeElementsForm/index.tsx +9 -4
- 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 +53 -7
- package/themes/original/src/components/UserProfile/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +8 -9
- package/themes/original/src/components/Wallets/styles.tsx +1 -1
- package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
- package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -5
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +6 -1
- package/themes/original/src/utils/index.tsx +124 -0
- 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,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react'
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react'
|
|
2
2
|
import {
|
|
3
3
|
useLanguage,
|
|
4
4
|
useConfig,
|
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
ToastType,
|
|
11
11
|
MultiCheckout as MultiCheckoutController
|
|
12
12
|
} from 'ordering-components/native'
|
|
13
|
-
import { View, StyleSheet, Platform } from 'react-native'
|
|
13
|
+
import { View, StyleSheet, Platform, ScrollView, SafeAreaView } from 'react-native'
|
|
14
14
|
import { useTheme } from 'styled-components/native';
|
|
15
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
15
16
|
import { Container } from '../../layouts/Container';
|
|
16
17
|
import NavBar from '../NavBar';
|
|
17
|
-
import { OText, OIcon, OModal } from '../shared';
|
|
18
|
+
import { OText, OIcon, OModal, OButton } from '../shared';
|
|
18
19
|
import { getTypesText } from '../../utils';
|
|
19
20
|
import { UserDetails } from '../UserDetails'
|
|
20
21
|
import { AddressDetails } from '../AddressDetails'
|
|
@@ -26,8 +27,12 @@ import { DriverTips } from '../DriverTips'
|
|
|
26
27
|
import { CouponControl } from '../CouponControl';
|
|
27
28
|
import { DriverTipsContainer } from '../Cart/styles'
|
|
28
29
|
import { OSTable, OSCoupon } from '../OrderSummary/styles';
|
|
30
|
+
import { SignupForm } from '../SignupForm'
|
|
31
|
+
import { LoginForm } from '../LoginForm'
|
|
29
32
|
|
|
30
33
|
import {
|
|
34
|
+
TopHeader,
|
|
35
|
+
TopActions,
|
|
31
36
|
ChContainer,
|
|
32
37
|
ChSection,
|
|
33
38
|
ChHeader,
|
|
@@ -64,16 +69,25 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
64
69
|
cartGroup,
|
|
65
70
|
walletState,
|
|
66
71
|
onNavigationRedirectReplace,
|
|
67
|
-
merchantId
|
|
72
|
+
merchantId,
|
|
73
|
+
cartsInvalid
|
|
68
74
|
} = props
|
|
69
75
|
|
|
70
76
|
const theme = useTheme();
|
|
71
77
|
const styles = StyleSheet.create({
|
|
72
78
|
pagePadding: {
|
|
73
|
-
paddingLeft:
|
|
74
|
-
paddingRight:
|
|
79
|
+
paddingLeft: 20,
|
|
80
|
+
paddingRight: 20
|
|
81
|
+
},
|
|
82
|
+
wrapperNavbar: {
|
|
83
|
+
paddingHorizontal: 20,
|
|
84
|
+
backgroundColor: theme?.colors?.white,
|
|
85
|
+
borderWidth: 0
|
|
86
|
+
},
|
|
87
|
+
detailWrapper: {
|
|
88
|
+
paddingHorizontal: 20,
|
|
89
|
+
width: '100%'
|
|
75
90
|
},
|
|
76
|
-
wrapperNavbar: { paddingHorizontal: 40 }
|
|
77
91
|
})
|
|
78
92
|
|
|
79
93
|
const [, { showToast }] = useToast();
|
|
@@ -82,14 +96,14 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
82
96
|
const [{ parsePrice, parseDate }] = useUtils();
|
|
83
97
|
const [{ options, carts, loading }, { confirmCart }] = useOrder();
|
|
84
98
|
const [validationFields] = useValidationFields();
|
|
85
|
-
const [{ user }] = useSession()
|
|
99
|
+
const [{ user }, { login }] = useSession()
|
|
86
100
|
|
|
87
101
|
const configTypes = configs?.order_types_allowed?.value.split('|').map((value: any) => Number(value)) || []
|
|
88
102
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
89
103
|
const isMultiDriverTips = configs?.checkout_multi_business_enabled?.value === '1'
|
|
90
104
|
const walletCarts = (Object.values(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) || []
|
|
91
105
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
92
|
-
|
|
106
|
+
const cartsToShow = openCarts?.length > 0 ? openCarts : cartsInvalid
|
|
93
107
|
const walletName: any = {
|
|
94
108
|
cash: {
|
|
95
109
|
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
@@ -129,16 +143,23 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
129
143
|
?.reduce((sum: any, cart: any) => sum + clearAmount((cart?.subtotal + getIncludedTaxes(cart)) * accumulationRateBusiness(cart?.business_id)), 0)
|
|
130
144
|
?.toFixed(configs.format_number_decimal_length?.value ?? 2)
|
|
131
145
|
|
|
146
|
+
const [showTitle, setShowTitle] = useState(false)
|
|
132
147
|
const [isUserDetailsEdit, setIsUserDetailsEdit] = useState(false);
|
|
133
148
|
const [phoneUpdate, setPhoneUpdate] = useState(false);
|
|
134
149
|
const [userErrors, setUserErrors] = useState<any>([]);
|
|
150
|
+
const [cartsOpened, setCartsOpened] = useState([])
|
|
135
151
|
const [placeByMethodPay, setPlaceByMethodPay] = useState(false)
|
|
152
|
+
const [allowedGuest, setAllowedGuest] = useState(false)
|
|
153
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
154
|
+
const [requiredFields, setRequiredFields] = useState<any>([])
|
|
155
|
+
const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
|
|
156
|
+
const [openModal, setOpenModal] = useState({ login: false, signup: false, isGuest: false })
|
|
136
157
|
const [methodPaySupported, setMethodPaySupported] = useState({ enabled: false, message: null, loading: true })
|
|
137
158
|
const methodsPay = ['global_google_pay', 'global_apple_pay']
|
|
138
|
-
const isDisablePlaceOrderButton = cartGroup?.loading || (!(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) && cartGroup?.result?.balance > 0) ||
|
|
159
|
+
const isDisablePlaceOrderButton = cartGroup?.loading || placing || (!(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) && cartGroup?.result?.balance > 0) ||
|
|
139
160
|
(paymethodSelected?.paymethod?.gateway === 'stripe' && !paymethodSelected?.paymethod_data) ||
|
|
140
161
|
walletCarts.length > 0
|
|
141
|
-
|| (methodsPay.includes(paymethodSelected?.gateway) && (!methodPaySupported.enabled || methodPaySupported.loading))
|
|
162
|
+
|| (methodsPay.includes(paymethodSelected?.gateway) && (!methodPaySupported.enabled || methodPaySupported.loading)) || openCarts?.length === 0
|
|
142
163
|
|
|
143
164
|
const handleMomentClick = () => {
|
|
144
165
|
if (isPreOrder) {
|
|
@@ -150,11 +171,12 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
150
171
|
setUserErrors([])
|
|
151
172
|
const errors = []
|
|
152
173
|
const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes']
|
|
174
|
+
const _requiredFields: any = []
|
|
153
175
|
|
|
154
176
|
Object.values(validationFields?.fields?.checkout).map((field: any) => {
|
|
155
177
|
if (field?.required && !notFields.includes(field.code)) {
|
|
156
178
|
if (!user[field?.code]) {
|
|
157
|
-
|
|
179
|
+
_requiredFields.push(field?.code)
|
|
158
180
|
}
|
|
159
181
|
}
|
|
160
182
|
})
|
|
@@ -165,8 +187,9 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
165
187
|
validationFields?.fields?.checkout?.cellphone?.required) ||
|
|
166
188
|
configs?.verification_phone_required?.value === '1')
|
|
167
189
|
) {
|
|
168
|
-
|
|
190
|
+
_requiredFields.push('cellphone')
|
|
169
191
|
}
|
|
192
|
+
setRequiredFields(_requiredFields)
|
|
170
193
|
|
|
171
194
|
if (phoneUpdate) {
|
|
172
195
|
errors.push(t('NECESSARY_UPDATE_COUNTRY_PHONE_CODE', 'It is necessary to update your phone number'))
|
|
@@ -179,11 +202,20 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
179
202
|
setPhoneUpdate(val)
|
|
180
203
|
}
|
|
181
204
|
|
|
182
|
-
const handlePlaceOrder = (confirmPayment
|
|
183
|
-
if (
|
|
205
|
+
const handlePlaceOrder = (confirmPayment?: any) => {
|
|
206
|
+
if (stripePaymethods.includes(paymethodSelected?.gateway) && user?.guest_id) {
|
|
207
|
+
setOpenModal({ ...openModal, signup: true, isGuest: true })
|
|
208
|
+
return
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (!userErrors.length && (!requiredFields?.length || allowedGuest)) {
|
|
184
212
|
handleGroupPlaceOrder && handleGroupPlaceOrder(confirmPayment)
|
|
185
213
|
return
|
|
186
214
|
}
|
|
215
|
+
if (requiredFields?.length) {
|
|
216
|
+
setIsOpen(true)
|
|
217
|
+
return
|
|
218
|
+
}
|
|
187
219
|
let stringError = ''
|
|
188
220
|
Object.values(userErrors).map((item: any, i: number) => {
|
|
189
221
|
stringError += (i + 1) === userErrors.length ? `- ${item?.message || item}` : `- ${item?.message || item}\n`
|
|
@@ -192,6 +224,36 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
192
224
|
setIsUserDetailsEdit(true)
|
|
193
225
|
}
|
|
194
226
|
|
|
227
|
+
const handlePlaceOrderAsGuest = () => {
|
|
228
|
+
setIsOpen(false)
|
|
229
|
+
handleGroupPlaceOrder && handleGroupPlaceOrder()
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const handleSuccessSignup = (user: any) => {
|
|
233
|
+
login({
|
|
234
|
+
user,
|
|
235
|
+
token: user?.session?.access_token
|
|
236
|
+
})
|
|
237
|
+
openModal?.isGuest && handlePlaceOrderAsGuest()
|
|
238
|
+
setOpenModal({ ...openModal, signup: false, isGuest: false })
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const handleSuccessLogin = (user: any) => {
|
|
242
|
+
if (user) setOpenModal({ ...openModal, login: false })
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const handleScroll = ({ nativeEvent: { contentOffset } }: any) => {
|
|
246
|
+
setShowTitle(contentOffset.y > 30)
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const handleGoBack = () => {
|
|
250
|
+
if (navigation?.canGoBack()) {
|
|
251
|
+
navigation.goBack()
|
|
252
|
+
} else {
|
|
253
|
+
navigation.navigate('BottomTab', { screen: 'Cart' })
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
195
257
|
useEffect(() => {
|
|
196
258
|
if (validationFields && validationFields?.fields?.checkout) {
|
|
197
259
|
checkValidationFields()
|
|
@@ -199,14 +261,14 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
199
261
|
}, [validationFields, user])
|
|
200
262
|
|
|
201
263
|
useEffect(() => {
|
|
202
|
-
if (
|
|
264
|
+
if (cartsToShow?.length === 1) {
|
|
203
265
|
onNavigationRedirectReplace('CheckoutPage', {
|
|
204
|
-
cartUuid:
|
|
266
|
+
cartUuid: cartsToShow[0]?.uuid,
|
|
205
267
|
fromMulti: true
|
|
206
268
|
})
|
|
207
269
|
return
|
|
208
270
|
}
|
|
209
|
-
}, [
|
|
271
|
+
}, [cartsToShow])
|
|
210
272
|
|
|
211
273
|
useEffect(() => {
|
|
212
274
|
if (walletState.error) {
|
|
@@ -221,26 +283,67 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
221
283
|
}, [cartUuid])
|
|
222
284
|
|
|
223
285
|
useEffect(() => {
|
|
224
|
-
if(paymethodSelected?.gateway === 'global_google_pay'){
|
|
286
|
+
if (paymethodSelected?.gateway === 'global_google_pay') {
|
|
225
287
|
setMethodPaySupported({
|
|
226
288
|
enabled: true,
|
|
227
289
|
loading: false,
|
|
228
290
|
message: null
|
|
229
291
|
})
|
|
230
292
|
}
|
|
231
|
-
|
|
293
|
+
}, [paymethodSelected])
|
|
294
|
+
|
|
295
|
+
const changeActiveState = useCallback((isClosed: boolean, uuid: string) => {
|
|
296
|
+
const isActive = cartsOpened?.includes?.(uuid)
|
|
297
|
+
if (isActive || !isClosed) {
|
|
298
|
+
setCartsOpened(cartsOpened?.filter?.((_uuid) => _uuid !== uuid))
|
|
299
|
+
} else {
|
|
300
|
+
setCartsOpened([
|
|
301
|
+
...cartsOpened,
|
|
302
|
+
uuid
|
|
303
|
+
])
|
|
304
|
+
}
|
|
305
|
+
}, [cartsOpened])
|
|
232
306
|
|
|
233
307
|
return (
|
|
234
308
|
<>
|
|
235
|
-
<
|
|
309
|
+
<SafeAreaView style={{ backgroundColor: theme.colors.backgroundPage }}>
|
|
310
|
+
<View style={styles.wrapperNavbar}>
|
|
311
|
+
<TopHeader>
|
|
312
|
+
<>
|
|
313
|
+
<TopActions onPress={() => handleGoBack()}>
|
|
314
|
+
<IconAntDesign
|
|
315
|
+
name='arrowleft'
|
|
316
|
+
size={26}
|
|
317
|
+
/>
|
|
318
|
+
</TopActions>
|
|
319
|
+
{showTitle && (
|
|
320
|
+
<OText
|
|
321
|
+
size={16}
|
|
322
|
+
style={{ flex: 1, textAlign: 'center', right: 15 }}
|
|
323
|
+
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
324
|
+
numberOfLines={2}
|
|
325
|
+
ellipsizeMode='tail'
|
|
326
|
+
>
|
|
327
|
+
{t('CHECKOUT', 'Checkout')}
|
|
328
|
+
</OText>
|
|
329
|
+
)}
|
|
330
|
+
</>
|
|
331
|
+
</TopHeader>
|
|
332
|
+
</View>
|
|
333
|
+
</SafeAreaView>
|
|
334
|
+
<Container pt={0} noPadding onScroll={handleScroll} showsVerticalScrollIndicator={false}>
|
|
236
335
|
<View style={styles.wrapperNavbar}>
|
|
237
336
|
<NavBar
|
|
337
|
+
hideArrowLeft
|
|
238
338
|
title={t('CHECKOUT', 'Checkout')}
|
|
239
339
|
titleAlign={'center'}
|
|
240
340
|
onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
|
|
241
341
|
showCall={false}
|
|
242
342
|
paddingTop={Platform.OS === 'ios' ? 0 : 4}
|
|
243
343
|
btnStyle={{ paddingLeft: 0 }}
|
|
344
|
+
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
345
|
+
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
346
|
+
style={{ marginTop: 20 }}
|
|
244
347
|
/>
|
|
245
348
|
</View>
|
|
246
349
|
<ChContainer style={styles.pagePadding}>
|
|
@@ -284,15 +387,45 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
284
387
|
|
|
285
388
|
<ChSection>
|
|
286
389
|
<ChUserDetails>
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
390
|
+
{(user?.guest_id && !allowedGuest) ? (
|
|
391
|
+
<View>
|
|
392
|
+
<OText size={14} numberOfLines={1} ellipsizeMode='tail' color={theme.colors.textNormal}>
|
|
393
|
+
{t('CUSTOMER_DETAILS', 'Customer details')}
|
|
394
|
+
</OText>
|
|
395
|
+
<OButton
|
|
396
|
+
text={t('SIGN_UP', 'Sign up')}
|
|
397
|
+
textStyle={{ color: theme.colors.white }}
|
|
398
|
+
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
399
|
+
onClick={() => setOpenModal({ ...openModal, signup: true })}
|
|
400
|
+
/>
|
|
401
|
+
<OButton
|
|
402
|
+
text={t('LOGIN', 'Login')}
|
|
403
|
+
textStyle={{ color: theme.colors.primary }}
|
|
404
|
+
bgColor={theme.colors.white}
|
|
405
|
+
borderColor={theme.colors.primary}
|
|
406
|
+
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
407
|
+
onClick={() => setOpenModal({ ...openModal, login: true })}
|
|
408
|
+
/>
|
|
409
|
+
<OButton
|
|
410
|
+
text={t('CONTINUE_AS_GUEST', 'Continue as guest')}
|
|
411
|
+
textStyle={{ color: theme.colors.black }}
|
|
412
|
+
bgColor={theme.colors.white}
|
|
413
|
+
borderColor={theme.colors.black}
|
|
414
|
+
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
415
|
+
onClick={() => setAllowedGuest(true)}
|
|
416
|
+
/>
|
|
417
|
+
</View>
|
|
418
|
+
) : (
|
|
419
|
+
<UserDetails
|
|
420
|
+
isUserDetailsEdit={isUserDetailsEdit}
|
|
421
|
+
useValidationFields
|
|
422
|
+
useDefualtSessionManager
|
|
423
|
+
useSessionUser
|
|
424
|
+
isCheckout
|
|
425
|
+
phoneUpdate={phoneUpdate}
|
|
426
|
+
togglePhoneUpdate={togglePhoneUpdate}
|
|
427
|
+
/>
|
|
428
|
+
)}
|
|
296
429
|
</ChUserDetails>
|
|
297
430
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40 }} />
|
|
298
431
|
</ChSection>
|
|
@@ -309,27 +442,27 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
309
442
|
</ChAddress>
|
|
310
443
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
|
|
311
444
|
</ChSection>
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
445
|
+
{openCarts?.length > 0 && (
|
|
446
|
+
<ChSection>
|
|
447
|
+
<MultiCartsPaymethodsAndWallets
|
|
448
|
+
openCarts={openCarts}
|
|
449
|
+
paymethodSelected={paymethodSelected}
|
|
450
|
+
walletsPaymethod={cartGroup?.result?.wallets}
|
|
451
|
+
handleSelectPaymethod={handleSelectPaymethod}
|
|
452
|
+
handleSelectWallet={handleSelectWallet}
|
|
453
|
+
handlePaymethodDataChange={handlePaymethodDataChange}
|
|
454
|
+
cartUuid={cartUuid}
|
|
455
|
+
merchantId={merchantId}
|
|
456
|
+
setMethodPaySupported={setMethodPaySupported}
|
|
457
|
+
methodPaySupported={methodPaySupported}
|
|
458
|
+
placeByMethodPay={placeByMethodPay}
|
|
459
|
+
setPlaceByMethodPay={setPlaceByMethodPay}
|
|
460
|
+
cartTotal={totalCartsPrice}
|
|
461
|
+
handlePlaceOrder={handlePlaceOrder}
|
|
462
|
+
/>
|
|
463
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
|
|
464
|
+
</ChSection>
|
|
465
|
+
)}
|
|
333
466
|
{
|
|
334
467
|
isMultiDriverTips &&
|
|
335
468
|
options?.type === 1 &&
|
|
@@ -364,6 +497,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
364
497
|
validationFields?.fields?.checkout?.coupon?.enabled &&
|
|
365
498
|
openCarts.every((cart: any) => cart.business_id && cart.status !== 2) &&
|
|
366
499
|
configs?.multi_business_checkout_coupon_input_style?.value === 'group' &&
|
|
500
|
+
openCarts?.length > 0 &&
|
|
367
501
|
(
|
|
368
502
|
<ChSection>
|
|
369
503
|
<OText size={14} lineHeight={20} color={theme.colors.textNormal}>
|
|
@@ -390,7 +524,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
390
524
|
{t('MOBILE_FRONT_YOUR_ORDER', 'Your order')}
|
|
391
525
|
</OText>
|
|
392
526
|
</CartsHeader>
|
|
393
|
-
{
|
|
527
|
+
{cartsToShow.map((cart: any) => (
|
|
394
528
|
<React.Fragment key={cart.uuid}>
|
|
395
529
|
<Cart
|
|
396
530
|
cart={cart}
|
|
@@ -401,13 +535,16 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
401
535
|
hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
|
|
402
536
|
onNavigationRedirect={(route: string, params: any) => props.navigation.navigate(route, params)}
|
|
403
537
|
businessConfigs={cart?.business?.configs}
|
|
538
|
+
cartsOpened={cartsOpened}
|
|
539
|
+
changeActiveState={changeActiveState}
|
|
540
|
+
isActive={cartsOpened?.includes?.(cart?.uuid)}
|
|
404
541
|
/>
|
|
405
542
|
{openCarts.length > 1 && (
|
|
406
543
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
|
|
407
544
|
)}
|
|
408
545
|
</React.Fragment>
|
|
409
546
|
))}
|
|
410
|
-
{!cartGroup?.loading && openCarts.length === 0 && (
|
|
547
|
+
{!cartGroup?.loading && openCarts.length === 0 && cartsInvalid?.length === 0 && (
|
|
411
548
|
<CCNotCarts>
|
|
412
549
|
<OText size={24} style={{ textAlign: 'center' }}>
|
|
413
550
|
{t('CARTS_NOT_FOUND', 'You don\'t have carts available')}
|
|
@@ -465,6 +602,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
465
602
|
</OText>
|
|
466
603
|
</View>
|
|
467
604
|
)}
|
|
605
|
+
|
|
468
606
|
<OText size={12} color={theme.colors.mediumGray} mRight={70} style={{ marginTop: 10 }}>
|
|
469
607
|
{t('MULTI_CHECKOUT_DESCRIPTION', 'You will receive a receipt for each business. The payment is not combined between multiple stores. Each payment is processed by the store')}
|
|
470
608
|
</OText>
|
|
@@ -472,7 +610,67 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
472
610
|
)}
|
|
473
611
|
</ChCarts>
|
|
474
612
|
</ChSection>
|
|
613
|
+
{cartsToShow?.some((cart: any) => !cart?.valid_products && cart?.status !== 2) && (
|
|
614
|
+
<OText
|
|
615
|
+
color={theme.colors.error}
|
|
616
|
+
size={12}
|
|
617
|
+
>
|
|
618
|
+
{t('WARNING_INVALID_PRODUCTS_CHECKOUT', 'To continue with your checkout, please remove from your cart the products that are not available.')}
|
|
619
|
+
</OText>
|
|
620
|
+
)}
|
|
475
621
|
</ChContainer>
|
|
622
|
+
<OModal
|
|
623
|
+
open={openModal.signup}
|
|
624
|
+
onClose={() => setOpenModal({ ...openModal, signup: false, isGuest: false })}
|
|
625
|
+
>
|
|
626
|
+
<ScrollView style={{ paddingHorizontal: 20, width: '100%' }}>
|
|
627
|
+
<SignupForm
|
|
628
|
+
handleSuccessSignup={handleSuccessSignup}
|
|
629
|
+
isGuest
|
|
630
|
+
signupButtonText={t('SIGNUP', 'Signup')}
|
|
631
|
+
useSignupByEmail
|
|
632
|
+
useChekoutFileds
|
|
633
|
+
/>
|
|
634
|
+
</ScrollView>
|
|
635
|
+
</OModal>
|
|
636
|
+
<OModal
|
|
637
|
+
open={openModal.login}
|
|
638
|
+
onClose={() => setOpenModal({ ...openModal, login: false })}
|
|
639
|
+
>
|
|
640
|
+
<ScrollView style={{ paddingHorizontal: 20, width: '100%' }}>
|
|
641
|
+
<LoginForm
|
|
642
|
+
handleSuccessLogin={handleSuccessLogin}
|
|
643
|
+
isGuest
|
|
644
|
+
loginButtonText={t('LOGIN', 'Login')}
|
|
645
|
+
loginButtonBackground={theme.colors.primary}
|
|
646
|
+
/>
|
|
647
|
+
</ScrollView>
|
|
648
|
+
</OModal>
|
|
649
|
+
<OModal
|
|
650
|
+
open={isOpen}
|
|
651
|
+
onClose={() => setIsOpen(false)}
|
|
652
|
+
>
|
|
653
|
+
<View style={styles.detailWrapper}>
|
|
654
|
+
<UserDetails
|
|
655
|
+
isUserDetailsEdit
|
|
656
|
+
useValidationFields
|
|
657
|
+
useDefualtSessionManager
|
|
658
|
+
useSessionUser
|
|
659
|
+
isCheckout
|
|
660
|
+
isEdit
|
|
661
|
+
phoneUpdate={phoneUpdate}
|
|
662
|
+
togglePhoneUpdate={togglePhoneUpdate}
|
|
663
|
+
requiredFields={requiredFields}
|
|
664
|
+
hideUpdateButton
|
|
665
|
+
handlePlaceOrderAsGuest={handlePlaceOrderAsGuest}
|
|
666
|
+
onClose={() => {
|
|
667
|
+
setIsOpen(false)
|
|
668
|
+
handlePlaceOrder()
|
|
669
|
+
}}
|
|
670
|
+
setIsOpen={setIsOpen}
|
|
671
|
+
/>
|
|
672
|
+
</View>
|
|
673
|
+
</OModal>
|
|
476
674
|
</Container>
|
|
477
675
|
|
|
478
676
|
<FloatingButton
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import styled from 'styled-components/native'
|
|
2
2
|
|
|
3
|
+
export const TopActions = styled.TouchableOpacity`
|
|
4
|
+
height: 60px;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
min-width: 30px;
|
|
7
|
+
padding-right: 15px;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export const TopHeader = styled.View`
|
|
11
|
+
width: 100%;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
height: 60px;
|
|
17
|
+
min-height: 60px;
|
|
18
|
+
`
|
|
19
|
+
|
|
3
20
|
export const ChContainer = styled.View`
|
|
4
21
|
margin-bottom: 60px;
|
|
5
22
|
`
|
|
@@ -53,6 +53,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
53
53
|
const [{ configs }] = useConfig()
|
|
54
54
|
|
|
55
55
|
const isTaxIncludedOnPrice = orders.every((_order: any) => _order.taxes?.length ? _order.taxes?.every((_tax: any) => _tax.type === 1) : true)
|
|
56
|
+
const deliveryType = orders.find((order: any) => order.delivery_type)?.delivery_type
|
|
56
57
|
const progressBarStyle = configs.multi_business_checkout_progress_bar_style?.value
|
|
57
58
|
const showBarInOrder = ['group', 'both']
|
|
58
59
|
const showBarInIndividual = ['individual', 'both']
|
|
@@ -71,7 +72,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
71
72
|
navigation?.canGoBack() && navigation.goBack();
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
|
-
navigation.navigate('
|
|
75
|
+
navigation.navigate('BottomTab');
|
|
75
76
|
return true
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -93,7 +94,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
93
94
|
}, [])
|
|
94
95
|
|
|
95
96
|
return (
|
|
96
|
-
<OrdersDetailsContainer keyboardShouldPersistTaps="handled" contentContainerStyle={{ paddingHorizontal:
|
|
97
|
+
<OrdersDetailsContainer keyboardShouldPersistTaps="handled" contentContainerStyle={{ paddingHorizontal: 20 }}>
|
|
97
98
|
<View style={{ flexDirection: 'row' }}>
|
|
98
99
|
<OButton
|
|
99
100
|
imgRightSrc={null}
|
|
@@ -171,19 +172,23 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
171
172
|
))}
|
|
172
173
|
</Section>
|
|
173
174
|
<Divider />
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
175
|
+
{deliveryType === 1 && (
|
|
176
|
+
<>
|
|
177
|
+
<Section>
|
|
178
|
+
<OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal} mBottom={20}>
|
|
179
|
+
{t('DELIVERYA_V21', 'Delivery address')}
|
|
180
|
+
</OText>
|
|
181
|
+
{loading ? (
|
|
182
|
+
<PlaceholderLine height={18} noMargin style={{ borderRadius: 2 }} />
|
|
183
|
+
) : (
|
|
184
|
+
<OText size={12} lineHeight={18} color={theme.colors.textNormal} mBottom={2}>
|
|
185
|
+
{customer?.address}
|
|
186
|
+
</OText>
|
|
187
|
+
)}
|
|
188
|
+
</Section>
|
|
189
|
+
<Divider />
|
|
190
|
+
</>
|
|
191
|
+
)}
|
|
187
192
|
{loading ? (
|
|
188
193
|
<Placeholder Animation={Fade}>
|
|
189
194
|
<PlaceholderLine
|