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
|
@@ -104,6 +104,8 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
104
104
|
const isOtpEmail = loginTab === 'otp' && otpType === 'email'
|
|
105
105
|
const isOtpCellphone = loginTab === 'otp' && otpType === 'cellphone'
|
|
106
106
|
|
|
107
|
+
const [isCheckingCode, setCheckingCode] = useState(false)
|
|
108
|
+
|
|
107
109
|
const googleLoginEnabled = configs?.google_login_enabled?.value === '1' || !configs?.google_login_enabled?.enabled
|
|
108
110
|
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1' || !configs?.facebook_login_enabled?.enabled
|
|
109
111
|
const appleLoginEnabled = configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled
|
|
@@ -179,7 +181,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
179
181
|
vibrateApp()
|
|
180
182
|
return
|
|
181
183
|
}
|
|
182
|
-
if (
|
|
184
|
+
if (otpType === 'cellphone' && phoneInputData?.error && !phoneInputData?.phone?.cellphone) {
|
|
183
185
|
showToast(ToastType.Error, t('PHONE_NUMBER_REQUIRED', 'Phone number is required'));
|
|
184
186
|
return
|
|
185
187
|
}
|
|
@@ -268,6 +270,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
268
270
|
const handleLoginOtp = async (code: string) => {
|
|
269
271
|
if (!code) return
|
|
270
272
|
const logged = await handleButtonLoginClick({ code })
|
|
273
|
+
setCheckingCode(false)
|
|
271
274
|
if (logged) {
|
|
272
275
|
setWillVerifyOtpState(false)
|
|
273
276
|
} else {
|
|
@@ -854,6 +857,8 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
854
857
|
animationType='slide'
|
|
855
858
|
>
|
|
856
859
|
<Otp
|
|
860
|
+
isCheckingCode={isCheckingCode}
|
|
861
|
+
setCheckingCode={setCheckingCode}
|
|
857
862
|
willVerifyOtpState={willVerifyOtpState}
|
|
858
863
|
otpError={otpError}
|
|
859
864
|
setOtpError={setOtpError}
|
|
@@ -126,9 +126,13 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
126
126
|
const messageConsole = (message: any) => {
|
|
127
127
|
return message.change?.attribute !== 'driver_id'
|
|
128
128
|
?
|
|
129
|
-
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute)
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute)
|
|
130
|
+
? `${message.change.old === null ? '0' : message.change.old} ${t('TO', 'to')} ${message.change.new} ${t('MINUTES', 'Minutes')}`
|
|
131
|
+
: `${message.change?.attribute !== 'logistic_status'
|
|
132
|
+
? message.change.old !== null && t(ORDER_STATUS[parseInt(message.change.old, 10)])
|
|
133
|
+
: message.change.old !== null && getLogisticTag(message.change.old)} ${t('TO', 'to')} ${message.change?.attribute !== 'logistic_status'
|
|
134
|
+
? t(ORDER_STATUS[parseInt(message.change.new, 10)])
|
|
135
|
+
: getLogisticTag(message.change.new)}`
|
|
132
136
|
}`
|
|
133
137
|
: message.change.new
|
|
134
138
|
?
|
|
@@ -148,6 +152,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
148
152
|
}
|
|
149
153
|
const newMessage: any = [];
|
|
150
154
|
messages.messages.map((message: any) => {
|
|
155
|
+
if (message.change?.attribute === 'driver_group_id') return
|
|
151
156
|
if (business && message.type !== 0 && (messagesToShow?.messages?.length || message?.can_see?.includes('2'))) {
|
|
152
157
|
newMessage.push({
|
|
153
158
|
_id: message?.id,
|
|
@@ -456,7 +461,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
456
461
|
active={business}
|
|
457
462
|
>
|
|
458
463
|
<OIcon
|
|
459
|
-
url={order?.business?.logo
|
|
464
|
+
url={order?.business?.logo}
|
|
460
465
|
width={32}
|
|
461
466
|
height={32}
|
|
462
467
|
style={{ borderRadius: 32 }}
|
|
@@ -10,7 +10,7 @@ export const Header = styled.View`
|
|
|
10
10
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
11
11
|
box-shadow: 0 2px 2px #0000001A;
|
|
12
12
|
padding-bottom: 10px;
|
|
13
|
-
padding-horizontal:
|
|
13
|
+
padding-horizontal: 10px;
|
|
14
14
|
`
|
|
15
15
|
|
|
16
16
|
export const TitleHeader = styled.View``
|
|
@@ -155,7 +155,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
155
155
|
});
|
|
156
156
|
const { bottom } = useSafeAreaInsets();
|
|
157
157
|
|
|
158
|
-
const is12hours = configs?.
|
|
158
|
+
const is12hours = configs?.general_hour_format?.value?.includes('hh:mm')
|
|
159
159
|
|
|
160
160
|
const [selectedTime, setSelectedTime] = useState(null);
|
|
161
161
|
const [datesWhitelist, setDateWhitelist] = useState<any>([{ start: null, end: null }])
|
|
@@ -327,8 +327,8 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
327
327
|
<>
|
|
328
328
|
<Container
|
|
329
329
|
style={{
|
|
330
|
-
paddingLeft: !cateringPreorder || isPage ?
|
|
331
|
-
paddingRight: !cateringPreorder || isPage ?
|
|
330
|
+
paddingLeft: !cateringPreorder || isPage ? 20 : 0,
|
|
331
|
+
paddingRight: !cateringPreorder || isPage ? 20 : 0
|
|
332
332
|
}}
|
|
333
333
|
nestedScrollEnabled
|
|
334
334
|
>
|
|
@@ -467,7 +467,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
467
467
|
<Spinner visible={momentState.isLoading === 1} />
|
|
468
468
|
</Container>
|
|
469
469
|
{!isCart && !cateringPreorder && (
|
|
470
|
-
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal:
|
|
470
|
+
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal: 20, backgroundColor: 'white', width: '100%' }}>
|
|
471
471
|
<OButton onClick={() => handleChangeMoment()} isDisabled={!selectedTime} text={t('CONTINUE', 'Continue')} style={{ borderRadius: 7.6, height: 44, shadowOpacity: 0 }} textStyle={{ color: 'white', fontSize: 14 }} showNextIcon />
|
|
472
472
|
</View>
|
|
473
473
|
)}
|
|
@@ -30,7 +30,7 @@ const MomentSelectorUI = (props: any) => {
|
|
|
30
30
|
const [customizedDateList, setCustomizedDateList] = useState([])
|
|
31
31
|
const [customizedTimeList, setCustomizedTimeList] = useState([])
|
|
32
32
|
|
|
33
|
-
const is12hours = configs?.
|
|
33
|
+
const is12hours = configs?.general_hour_format?.value?.includes('hh:mm')
|
|
34
34
|
|
|
35
35
|
const styles = StyleSheet.create({
|
|
36
36
|
selectOption: {
|
|
@@ -11,7 +11,7 @@ export const MultiCartUI = () => {
|
|
|
11
11
|
const theme = useTheme();
|
|
12
12
|
return (
|
|
13
13
|
<Container noPadding>
|
|
14
|
-
<ChContainer style={{ paddingHorizontal:
|
|
14
|
+
<ChContainer style={{ paddingHorizontal: 20 }}>
|
|
15
15
|
<ChSection>
|
|
16
16
|
<ChUserDetails>
|
|
17
17
|
<Placeholder Animation={Fade}>
|
|
@@ -47,7 +47,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
47
47
|
const [, t] = useLanguage()
|
|
48
48
|
const [{ configs }] = useConfig()
|
|
49
49
|
const [{ parsePrice }] = useUtils()
|
|
50
|
-
|
|
50
|
+
const [, { showToast }] = useToast();
|
|
51
51
|
const { confirmApplePayPayment } = useApplePay()
|
|
52
52
|
|
|
53
53
|
const [addCardOpen, setAddCardOpen] = useState({ stripe: false, stripeConnect: false });
|
|
@@ -88,6 +88,8 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
88
88
|
return theme.images.general.stripesb
|
|
89
89
|
case 'global_apple_pay':
|
|
90
90
|
return theme.images.general.applePayMark
|
|
91
|
+
case 'global_google_pay':
|
|
92
|
+
return theme.images.general.googlePayMark
|
|
91
93
|
default:
|
|
92
94
|
return theme.images.general.creditCard
|
|
93
95
|
}
|
|
@@ -123,7 +125,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
123
125
|
const renderPaymethods = ({ item }: any) => {
|
|
124
126
|
return (
|
|
125
127
|
<>
|
|
126
|
-
{item?.gateway
|
|
128
|
+
{methodsPay.includes(item?.gateway) ? (
|
|
127
129
|
<TouchableOpacity
|
|
128
130
|
onPress={() => handleChangePaymethod({ ...item, paymethod: { gateway: item.gateway }, paymethod_id: item?.id })}
|
|
129
131
|
>
|
|
@@ -214,6 +216,13 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
214
216
|
publicKey={paymethodSelected?.data?.publishable}
|
|
215
217
|
payType={paymethodSelected?.paymethod?.name}
|
|
216
218
|
onSelectCard={handlePaymethodDataChange}
|
|
219
|
+
addCardOpen={addCardOpen}
|
|
220
|
+
setAddCardOpen={setAddCardOpen}
|
|
221
|
+
openCarts={openCarts}
|
|
222
|
+
toSave
|
|
223
|
+
handlePaymethodDataChange={handlePaymethodDataChange}
|
|
224
|
+
clientSecret={props.clientSecret}
|
|
225
|
+
onPaymentChange={handlePaymethodDataChange}
|
|
217
226
|
/>
|
|
218
227
|
</View>
|
|
219
228
|
)}
|
|
@@ -297,7 +306,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
297
306
|
</>
|
|
298
307
|
)}
|
|
299
308
|
|
|
300
|
-
<OModal
|
|
309
|
+
{/* <OModal
|
|
301
310
|
entireModal
|
|
302
311
|
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
303
312
|
open={addCardOpen.stripe}
|
|
@@ -320,7 +329,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
|
|
|
320
329
|
onCancel={() => setAddCardOpen({ ...addCardOpen, stripe: false })}
|
|
321
330
|
/>
|
|
322
331
|
</KeyboardAvoidingView>
|
|
323
|
-
</OModal>
|
|
332
|
+
</OModal> */}
|
|
324
333
|
</PMContainer>
|
|
325
334
|
)
|
|
326
335
|
}
|
|
@@ -10,11 +10,11 @@ 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 } from 'react-native'
|
|
14
14
|
import { useTheme } from 'styled-components/native';
|
|
15
15
|
import { Container } from '../../layouts/Container';
|
|
16
16
|
import NavBar from '../NavBar';
|
|
17
|
-
import { OText, OIcon, OModal } from '../shared';
|
|
17
|
+
import { OText, OIcon, OModal, OButton } from '../shared';
|
|
18
18
|
import { getTypesText } from '../../utils';
|
|
19
19
|
import { UserDetails } from '../UserDetails'
|
|
20
20
|
import { AddressDetails } from '../AddressDetails'
|
|
@@ -26,6 +26,8 @@ import { DriverTips } from '../DriverTips'
|
|
|
26
26
|
import { CouponControl } from '../CouponControl';
|
|
27
27
|
import { DriverTipsContainer } from '../Cart/styles'
|
|
28
28
|
import { OSTable, OSCoupon } from '../OrderSummary/styles';
|
|
29
|
+
import { SignupForm } from '../SignupForm'
|
|
30
|
+
import { LoginForm } from '../LoginForm'
|
|
29
31
|
|
|
30
32
|
import {
|
|
31
33
|
ChContainer,
|
|
@@ -64,16 +66,21 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
64
66
|
cartGroup,
|
|
65
67
|
walletState,
|
|
66
68
|
onNavigationRedirectReplace,
|
|
67
|
-
merchantId
|
|
69
|
+
merchantId,
|
|
70
|
+
cartsInvalid
|
|
68
71
|
} = props
|
|
69
72
|
|
|
70
73
|
const theme = useTheme();
|
|
71
74
|
const styles = StyleSheet.create({
|
|
72
75
|
pagePadding: {
|
|
73
|
-
paddingLeft:
|
|
74
|
-
paddingRight:
|
|
76
|
+
paddingLeft: 20,
|
|
77
|
+
paddingRight: 20
|
|
75
78
|
},
|
|
76
|
-
wrapperNavbar: { paddingHorizontal:
|
|
79
|
+
wrapperNavbar: { paddingHorizontal: 20 },
|
|
80
|
+
detailWrapper: {
|
|
81
|
+
paddingHorizontal: 20,
|
|
82
|
+
width: '100%'
|
|
83
|
+
},
|
|
77
84
|
})
|
|
78
85
|
|
|
79
86
|
const [, { showToast }] = useToast();
|
|
@@ -82,14 +89,14 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
82
89
|
const [{ parsePrice, parseDate }] = useUtils();
|
|
83
90
|
const [{ options, carts, loading }, { confirmCart }] = useOrder();
|
|
84
91
|
const [validationFields] = useValidationFields();
|
|
85
|
-
const [{ user }] = useSession()
|
|
92
|
+
const [{ user }, { login }] = useSession()
|
|
86
93
|
|
|
87
94
|
const configTypes = configs?.order_types_allowed?.value.split('|').map((value: any) => Number(value)) || []
|
|
88
95
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
89
96
|
const isMultiDriverTips = configs?.checkout_multi_business_enabled?.value === '1'
|
|
90
97
|
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
98
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
92
|
-
|
|
99
|
+
const cartsToShow = openCarts?.length > 0 ? openCarts : cartsInvalid
|
|
93
100
|
const walletName: any = {
|
|
94
101
|
cash: {
|
|
95
102
|
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
@@ -133,12 +140,17 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
133
140
|
const [phoneUpdate, setPhoneUpdate] = useState(false);
|
|
134
141
|
const [userErrors, setUserErrors] = useState<any>([]);
|
|
135
142
|
const [placeByMethodPay, setPlaceByMethodPay] = useState(false)
|
|
143
|
+
const [allowedGuest, setAllowedGuest] = useState(false)
|
|
144
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
145
|
+
const [requiredFields, setRequiredFields] = useState<any>([])
|
|
146
|
+
const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
|
|
147
|
+
const [openModal, setOpenModal] = useState({ login: false, signup: false, isGuest: false })
|
|
136
148
|
const [methodPaySupported, setMethodPaySupported] = useState({ enabled: false, message: null, loading: true })
|
|
137
149
|
const methodsPay = ['global_google_pay', 'global_apple_pay']
|
|
138
|
-
const isDisablePlaceOrderButton = cartGroup?.loading || (!(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) && cartGroup?.result?.balance > 0) ||
|
|
150
|
+
const isDisablePlaceOrderButton = cartGroup?.loading || placing || (!(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) && cartGroup?.result?.balance > 0) ||
|
|
139
151
|
(paymethodSelected?.paymethod?.gateway === 'stripe' && !paymethodSelected?.paymethod_data) ||
|
|
140
152
|
walletCarts.length > 0
|
|
141
|
-
|| (methodsPay.includes(paymethodSelected?.gateway) && (!methodPaySupported.enabled || methodPaySupported.loading))
|
|
153
|
+
|| (methodsPay.includes(paymethodSelected?.gateway) && (!methodPaySupported.enabled || methodPaySupported.loading)) || openCarts?.length === 0
|
|
142
154
|
|
|
143
155
|
const handleMomentClick = () => {
|
|
144
156
|
if (isPreOrder) {
|
|
@@ -150,11 +162,12 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
150
162
|
setUserErrors([])
|
|
151
163
|
const errors = []
|
|
152
164
|
const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes']
|
|
165
|
+
const _requiredFields: any = []
|
|
153
166
|
|
|
154
167
|
Object.values(validationFields?.fields?.checkout).map((field: any) => {
|
|
155
168
|
if (field?.required && !notFields.includes(field.code)) {
|
|
156
169
|
if (!user[field?.code]) {
|
|
157
|
-
|
|
170
|
+
_requiredFields.push(field?.code)
|
|
158
171
|
}
|
|
159
172
|
}
|
|
160
173
|
})
|
|
@@ -165,8 +178,9 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
165
178
|
validationFields?.fields?.checkout?.cellphone?.required) ||
|
|
166
179
|
configs?.verification_phone_required?.value === '1')
|
|
167
180
|
) {
|
|
168
|
-
|
|
181
|
+
_requiredFields.push('cellphone')
|
|
169
182
|
}
|
|
183
|
+
setRequiredFields(_requiredFields)
|
|
170
184
|
|
|
171
185
|
if (phoneUpdate) {
|
|
172
186
|
errors.push(t('NECESSARY_UPDATE_COUNTRY_PHONE_CODE', 'It is necessary to update your phone number'))
|
|
@@ -179,11 +193,20 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
179
193
|
setPhoneUpdate(val)
|
|
180
194
|
}
|
|
181
195
|
|
|
182
|
-
const handlePlaceOrder = (confirmPayment
|
|
183
|
-
if (
|
|
196
|
+
const handlePlaceOrder = (confirmPayment?: any) => {
|
|
197
|
+
if (stripePaymethods.includes(paymethodSelected?.gateway) && user?.guest_id) {
|
|
198
|
+
setOpenModal({ ...openModal, signup: true, isGuest: true })
|
|
199
|
+
return
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (!userErrors.length && (!requiredFields?.length || allowedGuest)) {
|
|
184
203
|
handleGroupPlaceOrder && handleGroupPlaceOrder(confirmPayment)
|
|
185
204
|
return
|
|
186
205
|
}
|
|
206
|
+
if (requiredFields?.length) {
|
|
207
|
+
setIsOpen(true)
|
|
208
|
+
return
|
|
209
|
+
}
|
|
187
210
|
let stringError = ''
|
|
188
211
|
Object.values(userErrors).map((item: any, i: number) => {
|
|
189
212
|
stringError += (i + 1) === userErrors.length ? `- ${item?.message || item}` : `- ${item?.message || item}\n`
|
|
@@ -192,6 +215,24 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
192
215
|
setIsUserDetailsEdit(true)
|
|
193
216
|
}
|
|
194
217
|
|
|
218
|
+
const handlePlaceOrderAsGuest = () => {
|
|
219
|
+
setIsOpen(false)
|
|
220
|
+
handleGroupPlaceOrder && handleGroupPlaceOrder()
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const handleSuccessSignup = (user: any) => {
|
|
224
|
+
login({
|
|
225
|
+
user,
|
|
226
|
+
token: user?.session?.access_token
|
|
227
|
+
})
|
|
228
|
+
openModal?.isGuest && handlePlaceOrderAsGuest()
|
|
229
|
+
setOpenModal({ ...openModal, signup: false, isGuest: false })
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const handleSuccessLogin = (user: any) => {
|
|
233
|
+
if (user) setOpenModal({ ...openModal, login: false })
|
|
234
|
+
}
|
|
235
|
+
|
|
195
236
|
useEffect(() => {
|
|
196
237
|
if (validationFields && validationFields?.fields?.checkout) {
|
|
197
238
|
checkValidationFields()
|
|
@@ -199,14 +240,14 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
199
240
|
}, [validationFields, user])
|
|
200
241
|
|
|
201
242
|
useEffect(() => {
|
|
202
|
-
if (
|
|
243
|
+
if (cartsToShow?.length === 1) {
|
|
203
244
|
onNavigationRedirectReplace('CheckoutPage', {
|
|
204
|
-
cartUuid:
|
|
245
|
+
cartUuid: cartsToShow[0]?.uuid,
|
|
205
246
|
fromMulti: true
|
|
206
247
|
})
|
|
207
248
|
return
|
|
208
249
|
}
|
|
209
|
-
}, [
|
|
250
|
+
}, [cartsToShow])
|
|
210
251
|
|
|
211
252
|
useEffect(() => {
|
|
212
253
|
if (walletState.error) {
|
|
@@ -221,14 +262,14 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
221
262
|
}, [cartUuid])
|
|
222
263
|
|
|
223
264
|
useEffect(() => {
|
|
224
|
-
if(paymethodSelected?.gateway === 'global_google_pay'){
|
|
265
|
+
if (paymethodSelected?.gateway === 'global_google_pay') {
|
|
225
266
|
setMethodPaySupported({
|
|
226
267
|
enabled: true,
|
|
227
268
|
loading: false,
|
|
228
269
|
message: null
|
|
229
270
|
})
|
|
230
271
|
}
|
|
231
|
-
|
|
272
|
+
}, [paymethodSelected])
|
|
232
273
|
|
|
233
274
|
return (
|
|
234
275
|
<>
|
|
@@ -284,15 +325,45 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
284
325
|
|
|
285
326
|
<ChSection>
|
|
286
327
|
<ChUserDetails>
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
328
|
+
{(user?.guest_id && !allowedGuest) ? (
|
|
329
|
+
<View>
|
|
330
|
+
<OText size={14} numberOfLines={1} ellipsizeMode='tail' color={theme.colors.textNormal}>
|
|
331
|
+
{t('CUSTOMER_DETAILS', 'Customer details')}
|
|
332
|
+
</OText>
|
|
333
|
+
<OButton
|
|
334
|
+
text={t('SIGN_UP', 'Sign up')}
|
|
335
|
+
textStyle={{ color: theme.colors.white }}
|
|
336
|
+
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
337
|
+
onClick={() => setOpenModal({ ...openModal, signup: true })}
|
|
338
|
+
/>
|
|
339
|
+
<OButton
|
|
340
|
+
text={t('LOGIN', 'Login')}
|
|
341
|
+
textStyle={{ color: theme.colors.primary }}
|
|
342
|
+
bgColor={theme.colors.white}
|
|
343
|
+
borderColor={theme.colors.primary}
|
|
344
|
+
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
345
|
+
onClick={() => setOpenModal({ ...openModal, login: true })}
|
|
346
|
+
/>
|
|
347
|
+
<OButton
|
|
348
|
+
text={t('CONTINUE_AS_GUEST', 'Continue as guest')}
|
|
349
|
+
textStyle={{ color: theme.colors.black }}
|
|
350
|
+
bgColor={theme.colors.white}
|
|
351
|
+
borderColor={theme.colors.black}
|
|
352
|
+
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
353
|
+
onClick={() => setAllowedGuest(true)}
|
|
354
|
+
/>
|
|
355
|
+
</View>
|
|
356
|
+
) : (
|
|
357
|
+
<UserDetails
|
|
358
|
+
isUserDetailsEdit={isUserDetailsEdit}
|
|
359
|
+
useValidationFields
|
|
360
|
+
useDefualtSessionManager
|
|
361
|
+
useSessionUser
|
|
362
|
+
isCheckout
|
|
363
|
+
phoneUpdate={phoneUpdate}
|
|
364
|
+
togglePhoneUpdate={togglePhoneUpdate}
|
|
365
|
+
/>
|
|
366
|
+
)}
|
|
296
367
|
</ChUserDetails>
|
|
297
368
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40 }} />
|
|
298
369
|
</ChSection>
|
|
@@ -309,27 +380,27 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
309
380
|
</ChAddress>
|
|
310
381
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
|
|
311
382
|
</ChSection>
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
383
|
+
{openCarts?.length > 0 && (
|
|
384
|
+
<ChSection>
|
|
385
|
+
<MultiCartsPaymethodsAndWallets
|
|
386
|
+
openCarts={openCarts}
|
|
387
|
+
paymethodSelected={paymethodSelected}
|
|
388
|
+
walletsPaymethod={cartGroup?.result?.wallets}
|
|
389
|
+
handleSelectPaymethod={handleSelectPaymethod}
|
|
390
|
+
handleSelectWallet={handleSelectWallet}
|
|
391
|
+
handlePaymethodDataChange={handlePaymethodDataChange}
|
|
392
|
+
cartUuid={cartUuid}
|
|
393
|
+
merchantId={merchantId}
|
|
394
|
+
setMethodPaySupported={setMethodPaySupported}
|
|
395
|
+
methodPaySupported={methodPaySupported}
|
|
396
|
+
placeByMethodPay={placeByMethodPay}
|
|
397
|
+
setPlaceByMethodPay={setPlaceByMethodPay}
|
|
398
|
+
cartTotal={totalCartsPrice}
|
|
399
|
+
handlePlaceOrder={handlePlaceOrder}
|
|
400
|
+
/>
|
|
401
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
|
|
402
|
+
</ChSection>
|
|
403
|
+
)}
|
|
333
404
|
{
|
|
334
405
|
isMultiDriverTips &&
|
|
335
406
|
options?.type === 1 &&
|
|
@@ -364,6 +435,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
364
435
|
validationFields?.fields?.checkout?.coupon?.enabled &&
|
|
365
436
|
openCarts.every((cart: any) => cart.business_id && cart.status !== 2) &&
|
|
366
437
|
configs?.multi_business_checkout_coupon_input_style?.value === 'group' &&
|
|
438
|
+
openCarts?.length > 0 &&
|
|
367
439
|
(
|
|
368
440
|
<ChSection>
|
|
369
441
|
<OText size={14} lineHeight={20} color={theme.colors.textNormal}>
|
|
@@ -390,7 +462,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
390
462
|
{t('MOBILE_FRONT_YOUR_ORDER', 'Your order')}
|
|
391
463
|
</OText>
|
|
392
464
|
</CartsHeader>
|
|
393
|
-
{
|
|
465
|
+
{cartsToShow.map((cart: any) => (
|
|
394
466
|
<React.Fragment key={cart.uuid}>
|
|
395
467
|
<Cart
|
|
396
468
|
cart={cart}
|
|
@@ -407,7 +479,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
407
479
|
)}
|
|
408
480
|
</React.Fragment>
|
|
409
481
|
))}
|
|
410
|
-
{!cartGroup?.loading && openCarts.length === 0 && (
|
|
482
|
+
{!cartGroup?.loading && openCarts.length === 0 && cartsInvalid?.length === 0 && (
|
|
411
483
|
<CCNotCarts>
|
|
412
484
|
<OText size={24} style={{ textAlign: 'center' }}>
|
|
413
485
|
{t('CARTS_NOT_FOUND', 'You don\'t have carts available')}
|
|
@@ -465,6 +537,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
465
537
|
</OText>
|
|
466
538
|
</View>
|
|
467
539
|
)}
|
|
540
|
+
|
|
468
541
|
<OText size={12} color={theme.colors.mediumGray} mRight={70} style={{ marginTop: 10 }}>
|
|
469
542
|
{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
543
|
</OText>
|
|
@@ -472,7 +545,67 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
472
545
|
)}
|
|
473
546
|
</ChCarts>
|
|
474
547
|
</ChSection>
|
|
548
|
+
{cartsToShow?.some((cart: any) => !cart?.valid_products && cart?.status !== 2) && (
|
|
549
|
+
<OText
|
|
550
|
+
color={theme.colors.error}
|
|
551
|
+
size={12}
|
|
552
|
+
>
|
|
553
|
+
{t('WARNING_INVALID_PRODUCTS_CHECKOUT', 'To continue with your checkout, please remove from your cart the products that are not available.')}
|
|
554
|
+
</OText>
|
|
555
|
+
)}
|
|
475
556
|
</ChContainer>
|
|
557
|
+
<OModal
|
|
558
|
+
open={openModal.signup}
|
|
559
|
+
onClose={() => setOpenModal({ ...openModal, signup: false, isGuest: false })}
|
|
560
|
+
>
|
|
561
|
+
<ScrollView style={{ paddingHorizontal: 20, width: '100%' }}>
|
|
562
|
+
<SignupForm
|
|
563
|
+
handleSuccessSignup={handleSuccessSignup}
|
|
564
|
+
isGuest
|
|
565
|
+
signupButtonText={t('SIGNUP', 'Signup')}
|
|
566
|
+
useSignupByEmail
|
|
567
|
+
useChekoutFileds
|
|
568
|
+
/>
|
|
569
|
+
</ScrollView>
|
|
570
|
+
</OModal>
|
|
571
|
+
<OModal
|
|
572
|
+
open={openModal.login}
|
|
573
|
+
onClose={() => setOpenModal({ ...openModal, login: false })}
|
|
574
|
+
>
|
|
575
|
+
<ScrollView style={{ paddingHorizontal: 20, width: '100%' }}>
|
|
576
|
+
<LoginForm
|
|
577
|
+
handleSuccessLogin={handleSuccessLogin}
|
|
578
|
+
isGuest
|
|
579
|
+
loginButtonText={t('LOGIN', 'Login')}
|
|
580
|
+
loginButtonBackground={theme.colors.primary}
|
|
581
|
+
/>
|
|
582
|
+
</ScrollView>
|
|
583
|
+
</OModal>
|
|
584
|
+
<OModal
|
|
585
|
+
open={isOpen}
|
|
586
|
+
onClose={() => setIsOpen(false)}
|
|
587
|
+
>
|
|
588
|
+
<View style={styles.detailWrapper}>
|
|
589
|
+
<UserDetails
|
|
590
|
+
isUserDetailsEdit
|
|
591
|
+
useValidationFields
|
|
592
|
+
useDefualtSessionManager
|
|
593
|
+
useSessionUser
|
|
594
|
+
isCheckout
|
|
595
|
+
isEdit
|
|
596
|
+
phoneUpdate={phoneUpdate}
|
|
597
|
+
togglePhoneUpdate={togglePhoneUpdate}
|
|
598
|
+
requiredFields={requiredFields}
|
|
599
|
+
hideUpdateButton
|
|
600
|
+
handlePlaceOrderAsGuest={handlePlaceOrderAsGuest}
|
|
601
|
+
onClose={() => {
|
|
602
|
+
setIsOpen(false)
|
|
603
|
+
handlePlaceOrder()
|
|
604
|
+
}}
|
|
605
|
+
setIsOpen={setIsOpen}
|
|
606
|
+
/>
|
|
607
|
+
</View>
|
|
608
|
+
</OModal>
|
|
476
609
|
</Container>
|
|
477
610
|
|
|
478
611
|
<FloatingButton
|
|
@@ -93,7 +93,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
|
|
|
93
93
|
}, [])
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<OrdersDetailsContainer keyboardShouldPersistTaps="handled" contentContainerStyle={{ paddingHorizontal:
|
|
96
|
+
<OrdersDetailsContainer keyboardShouldPersistTaps="handled" contentContainerStyle={{ paddingHorizontal: 20 }}>
|
|
97
97
|
<View style={{ flexDirection: 'row' }}>
|
|
98
98
|
<OButton
|
|
99
99
|
imgRightSrc={null}
|
|
@@ -87,7 +87,7 @@ export const MyOrders = (props: any) => {
|
|
|
87
87
|
display: 'flex',
|
|
88
88
|
flexDirection: 'row',
|
|
89
89
|
alignItems: 'center',
|
|
90
|
-
paddingHorizontal:
|
|
90
|
+
paddingHorizontal: 20,
|
|
91
91
|
},
|
|
92
92
|
...props.titleStyle
|
|
93
93
|
}}>
|
|
@@ -124,7 +124,7 @@ export const MyOrders = (props: any) => {
|
|
|
124
124
|
<ScrollView
|
|
125
125
|
horizontal
|
|
126
126
|
style={{ ...styles.container, borderBottomWidth: 1 }}
|
|
127
|
-
contentContainerStyle={{ paddingHorizontal: !!businessesSearchList ? 0 :
|
|
127
|
+
contentContainerStyle={{ paddingHorizontal: !!businessesSearchList ? 0 : 20 }}
|
|
128
128
|
showsHorizontalScrollIndicator={false}
|
|
129
129
|
scrollEventThrottle={16}
|
|
130
130
|
>
|
|
@@ -148,7 +148,7 @@ export const MyOrders = (props: any) => {
|
|
|
148
148
|
)}
|
|
149
149
|
{selectedOption === 'orders' && (
|
|
150
150
|
<>
|
|
151
|
-
<View style={{ paddingHorizontal:
|
|
151
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
152
152
|
<OrdersOption
|
|
153
153
|
{...props}
|
|
154
154
|
preOrders
|
|
@@ -158,7 +158,7 @@ export const MyOrders = (props: any) => {
|
|
|
158
158
|
refreshOrders={refreshOrders}
|
|
159
159
|
/>
|
|
160
160
|
</View>
|
|
161
|
-
<View style={{ paddingHorizontal:
|
|
161
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
162
162
|
<OrdersOption
|
|
163
163
|
{...props}
|
|
164
164
|
activeOrders
|
|
@@ -168,7 +168,7 @@ export const MyOrders = (props: any) => {
|
|
|
168
168
|
refreshOrders={refreshOrders}
|
|
169
169
|
/>
|
|
170
170
|
</View>
|
|
171
|
-
<View style={{ paddingHorizontal:
|
|
171
|
+
<View style={{ paddingHorizontal: 20 }}>
|
|
172
172
|
<OrdersOption
|
|
173
173
|
{...props}
|
|
174
174
|
ordersLength={ordersLength}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
import * as React from 'react'
|
|
2
5
|
import styled, { useTheme } from 'styled-components/native'
|
|
3
6
|
import { OButton, OIcon, OText } from '../shared'
|
|
@@ -92,7 +95,6 @@ const NavBar = (props: Props) => {
|
|
|
92
95
|
<TitleWrapper style={{ ...{ paddingHorizontal: props.isVertical ? 0 : 10 }, ...props.titleWrapStyle }}>
|
|
93
96
|
<OText
|
|
94
97
|
size={20}
|
|
95
|
-
lineHeight={36}
|
|
96
98
|
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
97
99
|
style={
|
|
98
100
|
{
|