ordering-ui-react-native 0.19.2-testing → 0.19.3-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/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +3 -2
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +2 -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/MapView/index.tsx +11 -7
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +121 -103
- package/themes/business/src/components/OrderDetails/Delivery.tsx +19 -10
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +88 -51
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +26 -6
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
- package/themes/business/src/components/OrderSummary/index.tsx +27 -13
- 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 +83 -37
- 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 +24 -31
- 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/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserProfileForm/index.tsx +27 -10
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/types/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/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 +7 -3
- 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 +3 -3
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +9 -6
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/index.tsx +35 -3
- 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 +3 -4
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +43 -19
- 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 -402
- 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 +27 -8
- package/themes/original/src/components/CartContent/index.tsx +61 -39
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +199 -55
- 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/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/GoogleMap/index.tsx +50 -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 +4 -4
- package/themes/original/src/components/MomentSelector/index.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +13 -4
- package/themes/original/src/components/MultiCheckout/index.tsx +184 -51
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +5 -5
- package/themes/original/src/components/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 +7 -7
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +5 -3
- 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 +4 -3
- 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/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +41 -32
- 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 +81 -167
- package/themes/original/src/components/ProductForm/styles.tsx +1 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +5 -0
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +120 -79
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- 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 +4 -3
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +53 -7
- package/themes/original/src/components/StripeElementsForm/index.tsx +1 -1
- package/themes/original/src/components/StripeElementsForm/naked.tsx +12 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserFormDetails/index.tsx +53 -7
- package/themes/original/src/components/UserProfile/index.tsx +1 -1
- 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/shared/HeaderTitle.tsx +1 -1
- 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 +10 -2
- 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
|
@@ -5,12 +5,11 @@ export const OrderDetailsContainer = styled.ScrollView`
|
|
|
5
5
|
`
|
|
6
6
|
|
|
7
7
|
export const NavBack = styled.TouchableOpacity`
|
|
8
|
-
|
|
9
8
|
`
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
export const Header = styled.View`
|
|
13
|
-
padding: 10px
|
|
12
|
+
padding: 10px 20px;
|
|
14
13
|
flex: 1;
|
|
15
14
|
`
|
|
16
15
|
|
|
@@ -24,7 +23,7 @@ export const OrderContent = styled.View`
|
|
|
24
23
|
export const OrderBusiness = styled.View`
|
|
25
24
|
position: relative;
|
|
26
25
|
padding-vertical: 10px;
|
|
27
|
-
padding-horizontal:
|
|
26
|
+
padding-horizontal: 20px;
|
|
28
27
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
29
28
|
align-items: flex-start;
|
|
30
29
|
`
|
|
@@ -64,7 +63,7 @@ export const SectionTitle = styled.View`
|
|
|
64
63
|
`
|
|
65
64
|
|
|
66
65
|
export const OrderCustomer = styled.View`
|
|
67
|
-
padding: 20px
|
|
66
|
+
padding: 20px 20px 10px;
|
|
68
67
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
69
68
|
`
|
|
70
69
|
|
|
@@ -86,7 +85,7 @@ export const InfoBlock = styled.View`
|
|
|
86
85
|
export const HeaderInfo = styled.View`
|
|
87
86
|
flex: 1;
|
|
88
87
|
background-color: ${(props: any) => props.theme.colors.backgroundGray100};
|
|
89
|
-
padding: 20px
|
|
88
|
+
padding: 20px 20px;
|
|
90
89
|
`
|
|
91
90
|
|
|
92
91
|
export const OrderProducts = styled(OrderCustomer)``
|
|
@@ -100,7 +99,7 @@ export const Table = styled.View`
|
|
|
100
99
|
`
|
|
101
100
|
|
|
102
101
|
export const OrderBill = styled.View`
|
|
103
|
-
padding-horizontal:
|
|
102
|
+
padding-horizontal: 20px;
|
|
104
103
|
padding-vertical: 10px;
|
|
105
104
|
flex: 1;
|
|
106
105
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
@@ -130,7 +129,7 @@ export const OrderAction = styled.View`
|
|
|
130
129
|
`
|
|
131
130
|
|
|
132
131
|
export const PlaceSpotWrapper = styled.View`
|
|
133
|
-
padding-horizontal:
|
|
132
|
+
padding-horizontal: 20px;
|
|
134
133
|
`
|
|
135
134
|
|
|
136
135
|
export const ProfessionalPhoto = styled.ImageBackground`
|
|
@@ -141,4 +140,21 @@ export const ProfessionalPhoto = styled.ImageBackground`
|
|
|
141
140
|
width: 80px;
|
|
142
141
|
resize-mode: cover;
|
|
143
142
|
margin-right: 10px;
|
|
144
|
-
`;
|
|
143
|
+
`;
|
|
144
|
+
|
|
145
|
+
export const TopActions = styled.TouchableOpacity`
|
|
146
|
+
height: 60px;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
min-width: 30px;
|
|
149
|
+
padding-right: 15px;
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
export const TopHeader = styled.View`
|
|
153
|
+
width: 100%;
|
|
154
|
+
flex-direction: row;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
z-index: 1;
|
|
158
|
+
height: 60px;
|
|
159
|
+
min-height: 60px;
|
|
160
|
+
`
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
OrderInfoWrapper,
|
|
23
23
|
OrderProgressWrapper
|
|
24
24
|
} from './styles'
|
|
25
|
-
import { getOrderStatus } from '../../utils'
|
|
25
|
+
import { getOrderStatuPickUp, getOrderStatus } from '../../utils'
|
|
26
26
|
|
|
27
27
|
const OrderProgressUI = (props: any) => {
|
|
28
28
|
const {
|
|
@@ -110,6 +110,8 @@ const OrderProgressUI = (props: any) => {
|
|
|
110
110
|
setInitialLoaded(true)
|
|
111
111
|
}, [orderList.loading, initialLoaded])
|
|
112
112
|
|
|
113
|
+
const progressBarObjt = lastOrder?.delivery_type && lastOrder?.delivery_type === 2 ? getOrderStatuPickUp : getOrderStatus
|
|
114
|
+
|
|
113
115
|
return (
|
|
114
116
|
<>
|
|
115
117
|
{(orderList?.loading && !initialLoaded) && (
|
|
@@ -147,9 +149,6 @@ const OrderProgressUI = (props: any) => {
|
|
|
147
149
|
marginBottom: 3
|
|
148
150
|
}}
|
|
149
151
|
>{statusToShow.includes(lastOrder?.status) ? t('ORDER_IN_PROGRESS', 'Order in progress') : t('ORDER', 'Order')}</OText>
|
|
150
|
-
{statusToShow.includes(lastOrder?.status) && (
|
|
151
|
-
<OText size={11} numberOfLines={1} ellipsizeMode='tail'>{t('RESTAURANT_PREPARING_YOUR_ORDER', 'The restaurant is preparing your order')}</OText>
|
|
152
|
-
)}
|
|
153
152
|
<TouchableOpacity onPress={() => handleGoToOrder('MyOrders')}>
|
|
154
153
|
<View style={styles.navigationButton}>
|
|
155
154
|
<OText size={11} color={theme.colors.primary}>{t('GO_TO_MY_ORDERS', 'Go to my orders')}</OText>
|
|
@@ -165,10 +164,10 @@ const OrderProgressUI = (props: any) => {
|
|
|
165
164
|
</OrderInfoWrapper>
|
|
166
165
|
<View style={{ flex: 1 }}>
|
|
167
166
|
<ProgressContentWrapper>
|
|
168
|
-
<ProgressBar style={{ width:
|
|
167
|
+
<ProgressBar style={{ width: progressBarObjt(lastOrder.status)?.percentage ? `${(progressBarObjt(lastOrder.status) as any).percentage * 100}%` : '0%' }} />
|
|
169
168
|
</ProgressContentWrapper>
|
|
170
169
|
<ProgressTextWrapper>
|
|
171
|
-
<OText size={12} style={{ width: '50%' }}>{
|
|
170
|
+
<OText size={12} style={{ width: '50%' }}>{progressBarObjt(lastOrder.status)?.value}</OText>
|
|
172
171
|
<TimeWrapper>
|
|
173
172
|
<OText size={11}>{lastOrder?.delivery_type === 1 ? t('ESTIMATED_DELIVERY', 'Estimated delivery') : t('ESTIMATED_TIME', 'Estimated time')}</OText>
|
|
174
173
|
<OText size={11}>
|
|
@@ -209,7 +208,8 @@ export const OrderProgress = (props: any) => {
|
|
|
209
208
|
initialPage: 1,
|
|
210
209
|
pageSize: 10,
|
|
211
210
|
controlType: 'infinity'
|
|
212
|
-
}
|
|
211
|
+
},
|
|
212
|
+
noGiftCardOrders: true
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
return <OrderList {...orderProgressProps} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
2
|
import { ActivityIndicator, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
Cart,
|
|
@@ -56,6 +56,7 @@ const OrderSummaryUI = (props: any) => {
|
|
|
56
56
|
const [orderState] = useOrder();
|
|
57
57
|
const [{ parsePrice, parseNumber }] = useUtils();
|
|
58
58
|
const [validationFields] = useValidationFields();
|
|
59
|
+
const commentRef = useRef()
|
|
59
60
|
const [openTaxModal, setOpenTaxModal] = useState<any>({ open: false, data: null, type: '' })
|
|
60
61
|
const isCouponEnabled = validationFields?.fields?.checkout?.coupon?.enabled;
|
|
61
62
|
const hideCartComments = !validationFields?.fields?.checkout?.comments?.enabled
|
|
@@ -209,8 +210,8 @@ const OrderSummaryUI = (props: any) => {
|
|
|
209
210
|
))
|
|
210
211
|
}
|
|
211
212
|
{
|
|
212
|
-
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any) => (
|
|
213
|
-
<OSTable key={fee?.id}>
|
|
213
|
+
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any, i: number) => (
|
|
214
|
+
<OSTable key={fee?.id + i}>
|
|
214
215
|
<OSRow>
|
|
215
216
|
<OText size={12} numberOfLines={1}>
|
|
216
217
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
|
|
@@ -341,6 +342,7 @@ const OrderSummaryUI = (props: any) => {
|
|
|
341
342
|
marginTop: 10,
|
|
342
343
|
borderRadius: 8
|
|
343
344
|
}}
|
|
345
|
+
forwardRef={commentRef}
|
|
344
346
|
multiline
|
|
345
347
|
/>
|
|
346
348
|
{commentState?.loading && (
|
|
@@ -31,14 +31,12 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
31
31
|
const [orderState] = useOrder();
|
|
32
32
|
const [, t] = useLanguage();
|
|
33
33
|
const _orderTypes = orderTypes.filter((type: any) => configTypes?.includes(type.value));
|
|
34
|
-
|
|
35
|
-
const orderTypeDescription = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.description
|
|
36
|
-
const orderTypeCallAction = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.call_to_action
|
|
34
|
+
|
|
37
35
|
const items = _orderTypes.map((type) => {
|
|
38
36
|
return {
|
|
39
37
|
value: type.value,
|
|
40
|
-
label:
|
|
41
|
-
description:
|
|
38
|
+
label: t(type.content, type.content),
|
|
39
|
+
description: t(type.description, 'Lorem ipsum dolor sit amet, consectetur.')
|
|
42
40
|
}
|
|
43
41
|
})
|
|
44
42
|
|
|
@@ -102,6 +100,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
102
100
|
style={{ paddingBottom: 0 }}
|
|
103
101
|
title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
|
|
104
102
|
titleAlign={'center'}
|
|
103
|
+
titleStyle={{ fontSize: 14 }}
|
|
105
104
|
noMargin
|
|
106
105
|
/>
|
|
107
106
|
{
|
|
@@ -115,7 +114,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
115
114
|
<OText size={12} lineHeight={18} color={theme.colors.white} weight={Platform.OS === 'android' ? 'bold' : '600'}>{item?.label}</OText>
|
|
116
115
|
<OText size={10} lineHeight={15} color={theme.colors.white}>{item?.description}</OText>
|
|
117
116
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
118
|
-
<OText size={10} lineHeight={15} color={theme.colors.white}>{
|
|
117
|
+
<OText size={10} lineHeight={15} color={theme.colors.white}>{t('START_MY_ORDER', 'Start my order')}</OText>
|
|
119
118
|
<AntDesignIcon name='arrowleft' size={26} color={theme.colors.white} style={{ transform: [{ rotate: '180deg' }], marginStart: 4 }} />
|
|
120
119
|
</View>
|
|
121
120
|
</MaskCont>
|
|
@@ -2,5 +2,5 @@ import styled, { css } from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const ListWrapper = styled.View`
|
|
4
4
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
5
|
-
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '
|
|
5
|
+
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '20px'};
|
|
6
6
|
`;
|
|
@@ -2,5 +2,5 @@ import styled from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const ListWrapper = styled.View`
|
|
4
4
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
5
|
-
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '
|
|
5
|
+
padding-horizontal: ${(props : any) => props.isBusinessesSearchList ? '0' : '20px'};
|
|
6
6
|
`;
|
|
@@ -51,7 +51,8 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
51
51
|
businesses,
|
|
52
52
|
businessPaginationProps,
|
|
53
53
|
handleUpdateProducts,
|
|
54
|
-
handleUpdateBusinesses
|
|
54
|
+
handleUpdateBusinesses,
|
|
55
|
+
businessId
|
|
55
56
|
} = props
|
|
56
57
|
|
|
57
58
|
const theme = useTheme();
|
|
@@ -207,7 +208,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
207
208
|
btnStyle={{ borderRadius: 8 }}
|
|
208
209
|
content={t('YOU_DONT_HAVE_ORDERS', 'You don\'t have any orders')}
|
|
209
210
|
btnTitle={t('ORDER_NOW', 'Order now')}
|
|
210
|
-
onClickButton={() => onNavigationRedirect && onNavigationRedirect('BusinessList')}
|
|
211
|
+
onClickButton={() => onNavigationRedirect && (businessId ? onNavigationRedirect('Business') : onNavigationRedirect('BusinessList'))}
|
|
211
212
|
/>
|
|
212
213
|
</NoOrdersWrapper>
|
|
213
214
|
)}
|
|
@@ -308,7 +309,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
308
309
|
/>
|
|
309
310
|
)
|
|
310
311
|
)}
|
|
311
|
-
{loading && !hideOrders && (
|
|
312
|
+
{loading && !hideOrders && !preOrders && (
|
|
312
313
|
<>
|
|
313
314
|
{!activeOrders ? (
|
|
314
315
|
<Placeholder style={{ marginTop: 30 }} Animation={Fade}>
|
|
@@ -3,7 +3,7 @@ import styled, { css } from 'styled-components/native'
|
|
|
3
3
|
export const OptionTitle = styled.View`
|
|
4
4
|
margin-top: 24px;
|
|
5
5
|
${(props : any) => props.titleContent && css`
|
|
6
|
-
margin-left: ${() => props.isBusinessesSearchList ? '0' : '
|
|
6
|
+
margin-left: ${() => props.isBusinessesSearchList ? '0' : '20px'};
|
|
7
7
|
`}
|
|
8
8
|
`
|
|
9
9
|
|
|
@@ -77,6 +77,7 @@ const PageBannerUI = (props: any) => {
|
|
|
77
77
|
const renderItem = ({ item, index }) => {
|
|
78
78
|
return (
|
|
79
79
|
<TouchableOpacity
|
|
80
|
+
activeOpacity={1}
|
|
80
81
|
onPress={() => handleGoToPage(item)}
|
|
81
82
|
>
|
|
82
83
|
<View style={styles.sliderWrapper}>
|
|
@@ -128,6 +129,7 @@ const PageBannerUI = (props: any) => {
|
|
|
128
129
|
{pageBannerState.banner?.items.length > 1 && (
|
|
129
130
|
<>
|
|
130
131
|
<TouchableOpacity
|
|
132
|
+
activeOpacity={1}
|
|
131
133
|
style={[styles.swiperButton, { left: 25 }]}
|
|
132
134
|
onPress={() => carouselRef.current.snapToPrev()}
|
|
133
135
|
>
|
|
@@ -138,6 +140,7 @@ const PageBannerUI = (props: any) => {
|
|
|
138
140
|
/>
|
|
139
141
|
</TouchableOpacity>
|
|
140
142
|
<TouchableOpacity
|
|
143
|
+
activeOpacity={1}
|
|
141
144
|
style={[styles.swiperButton, { right: 25 }]}
|
|
142
145
|
onPress={() => carouselRef.current.snapToNext()}
|
|
143
146
|
>
|
|
@@ -45,7 +45,7 @@ const PaymentOptionWalletUI = (props: any) => {
|
|
|
45
45
|
new Array(walletsState.result?.length).fill(false)
|
|
46
46
|
);
|
|
47
47
|
|
|
48
|
-
const creditBalance: any = (wallet: any) => ` = ${parsePrice(wallet.balance / wallet.redemption_rate
|
|
48
|
+
const creditBalance: any = (wallet: any) => ` = ${parsePrice(wallet.balance / wallet.redemption_rate)}`
|
|
49
49
|
|
|
50
50
|
const walletName: any = {
|
|
51
51
|
cash: {
|
|
@@ -87,65 +87,65 @@ const PaymentOptionWalletUI = (props: any) => {
|
|
|
87
87
|
{!walletsState.loading &&
|
|
88
88
|
!walletsState.error &&
|
|
89
89
|
walletsState.result?.length > 0 &&
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</View>
|
|
90
|
+
(
|
|
91
|
+
<>
|
|
92
|
+
{walletsState.result?.map((wallet: any, idx: any) => wallet.valid && wallet.balance >= 0 && walletName[wallet.type]?.isActive && (
|
|
93
|
+
<Container
|
|
94
|
+
key={wallet.id}
|
|
95
|
+
isBottomBorder={idx === walletsState.result?.filter((wallet: any) => wallet.valid)?.length - 1}
|
|
96
|
+
onPress={() => handleOnChange(idx, wallet)}
|
|
97
|
+
disabled={(cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0}
|
|
98
|
+
>
|
|
99
|
+
<SectionLeft>
|
|
100
|
+
{checkedState[idx] ? (
|
|
101
|
+
<MaterialCommunityIcons
|
|
102
|
+
name="checkbox-marked"
|
|
103
|
+
size={25}
|
|
104
|
+
color={theme.colors.primary}
|
|
105
|
+
/>
|
|
106
|
+
) : (
|
|
107
|
+
<MaterialCommunityIcons
|
|
108
|
+
name="checkbox-blank-outline"
|
|
109
|
+
size={25}
|
|
110
|
+
color={theme.colors.disabled}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
113
|
+
<View style={{ alignItems: 'baseline', marginLeft: 5 }}>
|
|
114
|
+
<View>
|
|
115
|
+
<OText
|
|
116
|
+
style={((cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0) ?{
|
|
117
|
+
color: theme.colors.disabled
|
|
118
|
+
} : {}}
|
|
119
|
+
>
|
|
120
|
+
{walletName[wallet.type]?.name}
|
|
121
|
+
</OText>
|
|
123
122
|
</View>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
</View>
|
|
124
|
+
</SectionLeft>
|
|
125
|
+
|
|
126
|
+
<View style={{maxWidth: '35%', alignItems: 'flex-end' }}>
|
|
127
|
+
{wallet.type === 'cash' && (
|
|
128
|
+
<OText>
|
|
129
|
+
{parsePrice(wallet?.balance)}
|
|
130
|
+
</OText>
|
|
131
|
+
)}
|
|
132
|
+
{wallet.type === 'credit_point' && (
|
|
133
|
+
<OText>
|
|
134
|
+
<OText color={theme.colors.primary} weight='bold'>
|
|
135
|
+
{`${wallet?.balance} ${t('POINTS', 'Points')}`}
|
|
130
136
|
</OText>
|
|
131
|
-
)}
|
|
132
|
-
{wallet.type === 'credit_point' && (
|
|
133
137
|
<OText>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<OText>
|
|
138
|
-
{wallet?.balance > 0
|
|
139
|
-
? creditBalance(wallet)
|
|
140
|
-
: null}
|
|
141
|
-
</OText>
|
|
138
|
+
{wallet?.balance > 0
|
|
139
|
+
? creditBalance(wallet)
|
|
140
|
+
: null}
|
|
142
141
|
</OText>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
</
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
</OText>
|
|
143
|
+
)}
|
|
144
|
+
</View>
|
|
145
|
+
</Container>
|
|
146
|
+
))}
|
|
147
|
+
</>
|
|
148
|
+
)}
|
|
149
149
|
|
|
150
150
|
{walletsState?.loading && (
|
|
151
151
|
<View>
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
useLanguage,
|
|
12
12
|
ToastType,
|
|
13
13
|
useToast,
|
|
14
|
+
useSession
|
|
14
15
|
} from 'ordering-components/native';
|
|
15
16
|
import { useTheme } from 'styled-components/native';
|
|
16
17
|
import { PaymentOptionCash } from '../PaymentOptionCash';
|
|
@@ -69,11 +70,16 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
69
70
|
methodPaySupported,
|
|
70
71
|
setPlaceByMethodPay,
|
|
71
72
|
setCardList,
|
|
72
|
-
onPaymentChange
|
|
73
|
+
onPaymentChange,
|
|
74
|
+
requiredFields,
|
|
75
|
+
openUserModal,
|
|
76
|
+
paymethodClicked,
|
|
77
|
+
setPaymethodClicked
|
|
73
78
|
} = props
|
|
74
79
|
|
|
75
80
|
const theme = useTheme();
|
|
76
81
|
const [, { showToast }] = useToast();
|
|
82
|
+
const [{ user }] = useSession()
|
|
77
83
|
const { confirmApplePayPayment } = useApplePay()
|
|
78
84
|
|
|
79
85
|
const getPayIcon = (method: string) => {
|
|
@@ -94,6 +100,8 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
94
100
|
return theme.images.general.stripesb
|
|
95
101
|
case 'apple_pay':
|
|
96
102
|
return theme.images.general.applePayMark
|
|
103
|
+
case 'google_pay':
|
|
104
|
+
return theme.images.general.googlePayMark
|
|
97
105
|
default:
|
|
98
106
|
return theme.images.general.creditCard
|
|
99
107
|
}
|
|
@@ -111,8 +119,18 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
111
119
|
// { name: t('SELECT_A_PAYMENT_METHOD', 'Select a payment method'), value: '-1' },
|
|
112
120
|
// ]
|
|
113
121
|
|
|
122
|
+
const paymethodsFieldRequired = ['paypal', 'apple_pay', 'global_apple_pay']
|
|
123
|
+
|
|
114
124
|
const handlePaymentMethodClick = (paymethod: any) => {
|
|
115
|
-
if (cart?.balance > 0) {
|
|
125
|
+
if (cart?.balance > 0 || !!user?.guest_id) {
|
|
126
|
+
if (paymethodsFieldRequired.includes(paymethod?.gateway) && requiredFields.length > 0) {
|
|
127
|
+
openUserModal && openUserModal(true)
|
|
128
|
+
setPaymethodClicked({
|
|
129
|
+
confirmed: false,
|
|
130
|
+
paymethod
|
|
131
|
+
})
|
|
132
|
+
return
|
|
133
|
+
}
|
|
116
134
|
const isPopupMethod = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect', 'paypal'].includes(paymethod?.gateway)
|
|
117
135
|
if (webViewPaymentGateway.includes(paymethod?.gateway)) {
|
|
118
136
|
handlePaymentMethodClickCustom(paymethod)
|
|
@@ -158,10 +176,17 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
158
176
|
}
|
|
159
177
|
}, [paymethodData, paymethodSelected])
|
|
160
178
|
|
|
179
|
+
useEffect(() => {
|
|
180
|
+
if (paymethodClicked?.confirmed) {
|
|
181
|
+
handlePaymentMethodClickCustom(paymethodClicked?.paymethod)
|
|
182
|
+
}
|
|
183
|
+
}, [paymethodClicked?.confirmed])
|
|
184
|
+
|
|
185
|
+
|
|
161
186
|
const renderPaymethods = ({ item }: any) => {
|
|
162
187
|
return (
|
|
163
188
|
<>
|
|
164
|
-
{item?.gateway
|
|
189
|
+
{methodsPay.includes(item?.gateway) ? (
|
|
165
190
|
<TouchableOpacity
|
|
166
191
|
onPress={() => handlePaymentMethodClick(item)}
|
|
167
192
|
>
|
|
@@ -192,7 +217,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
192
217
|
style={{ margin: 0, marginTop: 4 }}
|
|
193
218
|
color={paymethodSelected?.id === item.id ? theme.colors.white : '#000'}
|
|
194
219
|
>
|
|
195
|
-
{t(item
|
|
220
|
+
{t(item?.gateway?.toUpperCase(), item.name)}
|
|
196
221
|
</OText>
|
|
197
222
|
</PMItem>
|
|
198
223
|
</TouchableOpacity>
|
|
@@ -262,7 +287,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
262
287
|
/>
|
|
263
288
|
)}
|
|
264
289
|
|
|
265
|
-
{stripeOptions.includes(paymethodSelected?.gateway) &&
|
|
290
|
+
{/* {stripeOptions.includes(paymethodSelected?.gateway) &&
|
|
266
291
|
(paymethodData?.brand || paymethodData?.card?.brand) &&
|
|
267
292
|
(paymethodData?.last4 || paymethodData?.card?.last4) &&
|
|
268
293
|
(
|
|
@@ -291,10 +316,10 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
291
316
|
</View>
|
|
292
317
|
</PMCardItemContent>
|
|
293
318
|
</PMCardSelected>
|
|
294
|
-
)}
|
|
319
|
+
)} */}
|
|
295
320
|
|
|
296
321
|
{/* Stripe */}
|
|
297
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe' &&
|
|
322
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe' && (
|
|
298
323
|
<View>
|
|
299
324
|
<OButton
|
|
300
325
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -312,8 +337,15 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
312
337
|
payType={paymethodsList?.name}
|
|
313
338
|
onSelectCard={handlePaymethodDataChange}
|
|
314
339
|
onNavigationRedirect={onNavigationRedirect}
|
|
340
|
+
paymethodCardId={paymethodData?.id}
|
|
315
341
|
onCancel={() => handlePaymethodClick(null)}
|
|
316
|
-
setAddCardOpen={
|
|
342
|
+
setAddCardOpen={setAddCardOpen}
|
|
343
|
+
addCardOpen={addCardOpen}
|
|
344
|
+
isOpenMethod={isOpenMethod}
|
|
345
|
+
handlePaymethodDataChange={handlePaymethodDataChange}
|
|
346
|
+
clientSecret={props.clientSecret}
|
|
347
|
+
businessId={props.businessId}
|
|
348
|
+
onPaymentChange={onPaymentChange}
|
|
317
349
|
/>
|
|
318
350
|
</View>
|
|
319
351
|
)}
|
|
@@ -353,29 +385,6 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
353
385
|
/>
|
|
354
386
|
)}
|
|
355
387
|
|
|
356
|
-
<OModal
|
|
357
|
-
entireModal
|
|
358
|
-
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
359
|
-
open={addCardOpen.stripe}
|
|
360
|
-
onClose={() => setAddCardOpen({ ...addCardOpen, stripe: false })}
|
|
361
|
-
style={{ backgroundColor: 'red' }}
|
|
362
|
-
>
|
|
363
|
-
<KeyboardAvoidingView
|
|
364
|
-
behavior={Platform.OS == 'ios' ? 'padding' : 'height'}
|
|
365
|
-
keyboardVerticalOffset={Platform.OS == 'ios' ? 0 : 0}
|
|
366
|
-
enabled={Platform.OS === 'ios' ? true : false}
|
|
367
|
-
>
|
|
368
|
-
<StripeElementsForm
|
|
369
|
-
toSave
|
|
370
|
-
businessId={props.businessId}
|
|
371
|
-
publicKey={isOpenMethod?.paymethod?.credentials?.publishable}
|
|
372
|
-
requirements={props.clientSecret}
|
|
373
|
-
onSelectCard={handlePaymethodDataChange}
|
|
374
|
-
onCancel={() => setAddCardOpen({ ...addCardOpen, stripe: false })}
|
|
375
|
-
/>
|
|
376
|
-
</KeyboardAvoidingView>
|
|
377
|
-
</OModal>
|
|
378
|
-
|
|
379
388
|
{/* Stripe direct */}
|
|
380
389
|
<OModal
|
|
381
390
|
entireModal
|
|
@@ -424,7 +433,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
424
433
|
/>
|
|
425
434
|
</View>
|
|
426
435
|
)}
|
|
427
|
-
|
|
436
|
+
{/** Stripe connect add cards */}
|
|
428
437
|
<OModal
|
|
429
438
|
entireModal
|
|
430
439
|
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
@@ -24,7 +24,8 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
|
|
|
24
24
|
noDropIcon,
|
|
25
25
|
isDisabled,
|
|
26
26
|
isStartValidation,
|
|
27
|
-
changeCountry
|
|
27
|
+
changeCountry,
|
|
28
|
+
updateStateWithSubmit
|
|
28
29
|
} = props
|
|
29
30
|
|
|
30
31
|
const theme = useTheme();
|
|
@@ -95,6 +96,19 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
|
|
|
95
96
|
}
|
|
96
97
|
}, [userphoneNumber])
|
|
97
98
|
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
if (defaultValue && updateStateWithSubmit) {
|
|
101
|
+
phoneInput.current?.setState({
|
|
102
|
+
number: defaultValue,
|
|
103
|
+
countryCode: defaultCode ?
|
|
104
|
+
!isNaN(defaultCode)
|
|
105
|
+
? transformCountryCode(defaultCode)
|
|
106
|
+
: findExitingCode(defaultCode)
|
|
107
|
+
: findExitingCode(configs?.default_country_code?.value?.toUpperCase())
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
}, [defaultValue])
|
|
111
|
+
|
|
98
112
|
return (
|
|
99
113
|
<Wrapper onPress={() => forwardRef?.current?.focus?.()}>
|
|
100
114
|
{(isStartValidation && userphoneNumber === '') && (
|