ordering-ui-react-native 0.18.55 → 0.18.56-crash-driver-1
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 -4
- package/src/components/BusinessInformation/index.tsx +10 -9
- package/src/components/PaymentOptionsWebView/index.tsx +30 -8
- package/src/components/PhoneInputNumber/index.tsx +6 -2
- package/src/components/StripeMethodForm/index.tsx +60 -55
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +3 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +6 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +15 -8
- 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 +48 -19
- package/themes/business/src/components/DriverMap/index.tsx +36 -23
- package/themes/business/src/components/DriverSchedule/index.tsx +45 -8
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/GoogleMap/index.tsx +15 -8
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -2
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/LoginForm/index.tsx +2 -2
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +28 -17
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +162 -106
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +53 -3
- package/themes/business/src/components/OrderDetails/Delivery.tsx +209 -13
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +107 -75
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +79 -41
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +7 -2
- package/themes/business/src/components/OrderMessage/index.tsx +1 -1
- package/themes/business/src/components/OrderSummary/index.tsx +245 -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/PhoneInputNumber/index.tsx +8 -5
- 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 +43 -41
- 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 +195 -221
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +363 -0
- package/themes/business/src/components/PrinterEdition/styles.tsx +61 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +267 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +30 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
- 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 +4 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +103 -53
- 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/business/src/utils/index.tsx +5 -0
- package/themes/kiosk/src/components/Checkout/index.tsx +5 -3
- package/themes/kiosk/src/components/CustomerName/index.tsx +1 -1
- package/themes/kiosk/src/components/Intro/index.tsx +16 -1
- package/themes/kiosk/src/components/LoginForm/index.tsx +131 -101
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +57 -121
- package/themes/original/index.tsx +11 -3
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +41 -20
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +22 -11
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +10 -7
- package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +8 -11
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +40 -43
- package/themes/original/src/components/BusinessController/styles.tsx +12 -12
- package/themes/original/src/components/BusinessInformation/index.tsx +45 -17
- 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 +57 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +9 -7
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsList/index.tsx +5 -4
- package/themes/original/src/components/BusinessProductsListing/index.tsx +67 -28
- 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 +30 -404
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +2 -2
- package/themes/original/src/components/Cart/index.tsx +51 -40
- package/themes/original/src/components/CartContent/index.tsx +98 -54
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +308 -75
- 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 +33 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/DriverTips/index.tsx +6 -3
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- package/themes/original/src/components/Favorite/index.tsx +8 -4
- 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/ForgotPasswordForm/index.tsx +5 -0
- package/themes/original/src/components/GPSButton/index.tsx +7 -5
- 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 +84 -8
- 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/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +52 -5
- package/themes/original/src/components/Help/index.tsx +7 -0
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +5 -0
- package/themes/original/src/components/HelpGuide/index.tsx +5 -0
- package/themes/original/src/components/HelpOrder/index.tsx +5 -0
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +3 -2
- 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 +79 -25
- package/themes/original/src/components/LoginForm/index.tsx +38 -14
- package/themes/original/src/components/MessageListing/index.tsx +6 -0
- package/themes/original/src/components/Messages/index.tsx +9 -3
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +20 -5
- 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 +48 -15
- package/themes/original/src/components/MultiCheckout/index.tsx +295 -56
- package/themes/original/src/components/MultiCheckout/styles.tsx +20 -1
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +21 -16
- package/themes/original/src/components/MyOrders/index.tsx +37 -39
- package/themes/original/src/components/NavBar/index.tsx +15 -14
- 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 +9 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +21 -6
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +14 -5
- package/themes/original/src/components/OrderDetails/index.tsx +718 -667
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -7
- package/themes/original/src/components/OrderProgress/index.tsx +50 -14
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +26 -34
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -0
- 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 +14 -6
- 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 +182 -0
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptions/index.tsx +118 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
- package/themes/original/src/components/PreviousOrders/index.tsx +2 -0
- package/themes/original/src/components/ProductForm/ActionButton.tsx +122 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +193 -267
- package/themes/original/src/components/ProductForm/styles.tsx +1 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +55 -42
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- 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 +13 -11
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +5 -0
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +5 -0
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/index.tsx +5 -0
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ScheduleAccordion/index.tsx +3 -3
- 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/Sessions/index.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +76 -60
- package/themes/original/src/components/SingleOrderCard/index.tsx +6 -5
- package/themes/original/src/components/SingleProductCard/index.tsx +5 -4
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -5
- package/themes/original/src/components/StripeCardsList/index.tsx +26 -8
- package/themes/original/src/components/StripeElementsForm/index.tsx +80 -62
- package/themes/original/src/components/StripeElementsForm/naked.tsx +59 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +91 -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 +128 -79
- package/themes/original/src/components/UserFormDetails/styles.tsx +8 -1
- package/themes/original/src/components/UserProfile/index.tsx +5 -4
- package/themes/original/src/components/UserProfileForm/index.tsx +35 -36
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +35 -49
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- 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 +7 -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 +13 -2
- package/themes/original/src/utils/index.tsx +124 -22
- 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,5 +1,5 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import { View, Animated, StyleSheet,
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { View, Animated, StyleSheet, TouchableOpacity } from 'react-native'
|
|
3
3
|
import { useUtils, useLanguage, useOrder } from 'ordering-components/native'
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
5
|
import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
@@ -39,29 +39,43 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
39
39
|
} = props
|
|
40
40
|
|
|
41
41
|
const theme = useTheme();
|
|
42
|
+
const hideProductImage = isFromCheckout
|
|
43
|
+
? theme?.checkout?.components?.cart?.components?.product?.components?.image?.hidden
|
|
44
|
+
: theme?.confirmation?.components?.cart?.components?.products?.components?.photo?.hidden
|
|
42
45
|
|
|
46
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
47
|
+
const hideProductCommentHide = isFromCheckout && theme?.checkout?.components?.cart?.components?.product?.components?.comments?.hidden
|
|
43
48
|
|
|
44
49
|
const pickerStyle = StyleSheet.create({
|
|
45
50
|
inputAndroid: {
|
|
46
|
-
width:
|
|
51
|
+
width: 45,
|
|
47
52
|
textAlign: 'center',
|
|
48
53
|
overflow: 'visible',
|
|
49
54
|
fontSize: 12,
|
|
50
|
-
height:
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
height: 30,
|
|
56
|
+
color: theme.colors.textNormal,
|
|
57
|
+
backgroundColor: theme.colors.backgroundGray100,
|
|
58
|
+
paddingVertical: 8,
|
|
59
|
+
paddingRight: 10,
|
|
60
|
+
paddingLeft: 0,
|
|
61
|
+
borderRadius: 7.6,
|
|
53
62
|
},
|
|
54
63
|
inputIOS: {
|
|
55
|
-
width:
|
|
64
|
+
width: 45,
|
|
56
65
|
textAlign: 'center',
|
|
57
66
|
overflow: 'visible',
|
|
58
67
|
fontSize: 12,
|
|
68
|
+
backgroundColor: theme.colors.backgroundGray100,
|
|
69
|
+
paddingVertical: 8,
|
|
70
|
+
paddingRight: 15,
|
|
71
|
+
paddingLeft: 0,
|
|
72
|
+
borderRadius: 7.6,
|
|
59
73
|
},
|
|
60
74
|
icon: {
|
|
61
75
|
position: 'absolute',
|
|
62
76
|
zIndex: 1,
|
|
63
|
-
top:
|
|
64
|
-
end:
|
|
77
|
+
top: 0,
|
|
78
|
+
end: 8,
|
|
65
79
|
},
|
|
66
80
|
placeholder: {
|
|
67
81
|
color: theme.colors.secundaryContrast
|
|
@@ -75,8 +89,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
75
89
|
|
|
76
90
|
const [isActive, setActiveState] = useState(false)
|
|
77
91
|
const [isServiceOpen, setIsServiceOpen] = useState(false)
|
|
78
|
-
|
|
79
|
-
// const [setRotate, setRotateState] = useState({ angle: new Animated.Value(0) })
|
|
92
|
+
const [productQuantityState, setProductQuantityState] = useState<any>(product.quantity.toString())
|
|
80
93
|
|
|
81
94
|
const productInfo = () => {
|
|
82
95
|
if (isCartProduct) {
|
|
@@ -104,22 +117,9 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
104
117
|
setIsServiceOpen(true)
|
|
105
118
|
}
|
|
106
119
|
|
|
107
|
-
/* const toggleAccordion = () => {
|
|
108
|
-
if ((!product?.valid_menu && isCartProduct)) return
|
|
109
|
-
if (isActive) {
|
|
110
|
-
Animated.timing(setHeight.height, {
|
|
111
|
-
toValue: 100,
|
|
112
|
-
duration: 500,
|
|
113
|
-
easing: Easing.linear,
|
|
114
|
-
useNativeDriver: false,
|
|
115
|
-
}).start()
|
|
116
|
-
} else {
|
|
117
|
-
setHeightState({height: new Animated.Value(0)})
|
|
118
|
-
}
|
|
119
|
-
}*/
|
|
120
|
-
|
|
121
120
|
const handleChangeQuantity = (value: string) => {
|
|
122
121
|
if (!orderState.loading) {
|
|
122
|
+
setProductQuantityState(value)
|
|
123
123
|
if (parseInt(value) === 0) {
|
|
124
124
|
onDeleteProduct && onDeleteProduct(product)
|
|
125
125
|
} else {
|
|
@@ -133,10 +133,6 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
133
133
|
return `${quantity} x ${name} ${pos} +${price}`
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/*useEffect(() => {
|
|
137
|
-
toggleAccordion()
|
|
138
|
-
}, [isActive])*/
|
|
139
|
-
|
|
140
136
|
const productOptions = getProductMax && [...Array(getProductMax(product) + 1),].map((_: any, opt: number) => {
|
|
141
137
|
return {
|
|
142
138
|
label: opt === 0 ? t('REMOVE', 'Remove') : opt.toString(),
|
|
@@ -144,19 +140,27 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
144
140
|
}
|
|
145
141
|
})
|
|
146
142
|
|
|
143
|
+
useEffect(() => {
|
|
144
|
+
if (product.quantity.toString() === productQuantityState || productQuantityState) {
|
|
145
|
+
setProductQuantityState(null)
|
|
146
|
+
}
|
|
147
|
+
}, [product.quantity])
|
|
148
|
+
|
|
147
149
|
return (
|
|
148
150
|
<>
|
|
149
151
|
<AccordionSection>
|
|
150
152
|
<Accordion
|
|
151
|
-
isValid={product?.valid ?? true}
|
|
152
|
-
onPress={() => (!product?.valid_menu && isCartProduct)
|
|
153
|
-
? {}
|
|
154
|
-
: setActiveState(!isActive)}
|
|
155
153
|
activeOpacity={1}
|
|
154
|
+
isValid={product?.valid ?? true}
|
|
155
|
+
onPress={
|
|
156
|
+
(!product?.valid_menu && isCartProduct) ||
|
|
157
|
+
!(productInfo().ingredients.length > 0 || productInfo().options.length > 0 || !!product.comment)
|
|
158
|
+
? null : () => setActiveState(!isActive)
|
|
159
|
+
}
|
|
156
160
|
>
|
|
157
161
|
<View style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
|
|
158
162
|
<ContentInfo>
|
|
159
|
-
{(product?.images || theme?.images?.dummies?.product) && (
|
|
163
|
+
{(product?.images || (!hideProductDummyLogo && theme?.images?.dummies?.product)) && !hideProductImage && (
|
|
160
164
|
<ProductImage>
|
|
161
165
|
{isFromCheckout ? (
|
|
162
166
|
product?.images ? (
|
|
@@ -209,11 +213,20 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
209
213
|
<RNPickerSelect
|
|
210
214
|
items={productOptions}
|
|
211
215
|
onValueChange={handleChangeQuantity}
|
|
212
|
-
value={product.quantity.toString()}
|
|
216
|
+
value={productQuantityState ?? product.quantity.toString()}
|
|
213
217
|
style={pickerStyle}
|
|
214
218
|
useNativeAndroidPickerStyle={false}
|
|
215
219
|
placeholder={{}}
|
|
216
|
-
|
|
220
|
+
touchableWrapperProps={{ style: { width: 45 } }}
|
|
221
|
+
Icon={() => (
|
|
222
|
+
<View style={pickerStyle.icon}>
|
|
223
|
+
<OIcon
|
|
224
|
+
src={theme.images.general.arrow_down}
|
|
225
|
+
color={theme.colors.textNormal}
|
|
226
|
+
width={8}
|
|
227
|
+
/>
|
|
228
|
+
</View>
|
|
229
|
+
)}
|
|
217
230
|
disabled={orderState.loading}
|
|
218
231
|
/>
|
|
219
232
|
</ProductInfo>
|
|
@@ -274,21 +287,21 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
274
287
|
)}
|
|
275
288
|
</Accordion>
|
|
276
289
|
|
|
277
|
-
<View style={{ display: isActive ? 'flex' : 'none', paddingStart: 40 }}>
|
|
290
|
+
<View style={{ display: isActive ? 'flex' : 'none', paddingStart: isFromCheckout ? 100 : 40, marginTop: isFromCheckout ? -80 : -30 }}>
|
|
278
291
|
<Animated.View>
|
|
279
292
|
<AccordionContent>
|
|
280
293
|
{productInfo().ingredients.length > 0 && productInfo().ingredients.some((ingredient: any) => !ingredient.selected) && (
|
|
281
294
|
<ProductOptionsList>
|
|
282
295
|
<OText size={10} color={theme.colors.textSecondary}>{t('INGREDIENTS', 'Ingredients')}</OText>
|
|
283
|
-
{productInfo().ingredients.map((ingredient: any) => !ingredient.selected && (
|
|
284
|
-
<OText size={10} color={theme.colors.textThird} key={ingredient.id} style={{ marginLeft: 10 }}>{t('NO', 'No')} {ingredient.name}</OText>
|
|
296
|
+
{productInfo().ingredients.map((ingredient: any, i) => !ingredient.selected && (
|
|
297
|
+
<OText size={10} color={theme.colors.textThird} key={ingredient.id + i} style={{ marginLeft: 10 }}>{t('NO', 'No')} {ingredient.name}</OText>
|
|
285
298
|
))}
|
|
286
299
|
</ProductOptionsList>
|
|
287
300
|
)}
|
|
288
301
|
{productInfo().options.length > 0 && (
|
|
289
302
|
<ProductOptionsList>
|
|
290
|
-
{productInfo().options.
|
|
291
|
-
<ProductOption key={option.id
|
|
303
|
+
{productInfo().options.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => (
|
|
304
|
+
<ProductOption key={option.id}>
|
|
292
305
|
<OText size={10} color={theme.colors.textSecondary}>{option.name}</OText>
|
|
293
306
|
{option.suboptions.map((suboption: any) => (
|
|
294
307
|
<ProductSubOption key={suboption.id}>
|
|
@@ -306,7 +319,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
306
319
|
))}
|
|
307
320
|
</ProductOptionsList>
|
|
308
321
|
)}
|
|
309
|
-
{!!product.comment && (
|
|
322
|
+
{!!product.comment && !hideProductCommentHide && (
|
|
310
323
|
<ProductComment>
|
|
311
324
|
<OText size={10} color={theme.colors.textSecondary}>{t('SPECIAL_COMMENT', 'Special Comment')}</OText>
|
|
312
325
|
<OText size={10} color={theme.colors.textThird}>{product.comment}</OText>
|
|
@@ -17,9 +17,6 @@ export const Accordion = styled.TouchableOpacity`
|
|
|
17
17
|
|
|
18
18
|
export const ProductInfo = styled.View`
|
|
19
19
|
margin-horizontal: 7px;
|
|
20
|
-
background-color: ${(props: any) => props.theme.colors.backgroundGray100};
|
|
21
|
-
padding: 4px 12px 4px 0px;
|
|
22
|
-
border-radius: 7.6px;
|
|
23
20
|
`
|
|
24
21
|
|
|
25
22
|
export const ProductQuantity = styled.View`
|
|
@@ -54,4 +51,6 @@ export const ProductSubOption = styled.View`
|
|
|
54
51
|
margin-left: 0px;
|
|
55
52
|
`
|
|
56
53
|
|
|
57
|
-
export const ProductComment = styled.View
|
|
54
|
+
export const ProductComment = styled.View`
|
|
55
|
+
margin-left: 20px;
|
|
56
|
+
`
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { useTheme } from 'styled-components/native';
|
|
8
8
|
import { StyleSheet, View } from 'react-native'
|
|
9
9
|
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
10
|
+
import FastImage from 'react-native-fast-image';
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
Container,
|
|
@@ -14,9 +15,12 @@ import {
|
|
|
14
15
|
QuantityControl,
|
|
15
16
|
Checkbox,
|
|
16
17
|
PositionControl,
|
|
17
|
-
Circle
|
|
18
|
+
Circle,
|
|
19
|
+
Logo
|
|
18
20
|
} from './styles'
|
|
19
21
|
import { OIcon, OText } from '../shared'
|
|
22
|
+
import { InView } from 'react-native-intersection-observer'
|
|
23
|
+
import { Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
20
24
|
|
|
21
25
|
export const ProductOptionSubOptionUI = (props: any) => {
|
|
22
26
|
const {
|
|
@@ -29,7 +33,9 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
29
33
|
toggleSelect,
|
|
30
34
|
changePosition,
|
|
31
35
|
disabled,
|
|
32
|
-
setIsScrollAvailable
|
|
36
|
+
setIsScrollAvailable,
|
|
37
|
+
image,
|
|
38
|
+
enableIntersection
|
|
33
39
|
} = props
|
|
34
40
|
|
|
35
41
|
const disableIncrement = option?.limit_suboptions_by_max ? balance === option?.max || state.quantity === suboption?.max : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
@@ -37,12 +43,25 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
37
43
|
|
|
38
44
|
const theme = useTheme();
|
|
39
45
|
const [, t] = useLanguage()
|
|
40
|
-
const [{ parsePrice }] = useUtils()
|
|
46
|
+
const [{ parsePrice, optimizeImage }] = useUtils()
|
|
41
47
|
const [showMessage, setShowMessage] = useState(false)
|
|
42
48
|
const [isDirty, setIsDirty] = useState(false)
|
|
49
|
+
const [isIntersectionObserver, setIsIntersectionObserver] = useState(!enableIntersection)
|
|
43
50
|
|
|
44
51
|
const iconsSize = 20
|
|
45
52
|
|
|
53
|
+
const styles = StyleSheet.create({
|
|
54
|
+
icon: {
|
|
55
|
+
borderRadius: 7.6,
|
|
56
|
+
width: 60,
|
|
57
|
+
height: 60
|
|
58
|
+
},
|
|
59
|
+
logo: {
|
|
60
|
+
borderRadius: 10,
|
|
61
|
+
marginLeft: 3,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
46
65
|
const handleSuboptionClick = () => {
|
|
47
66
|
toggleSelect()
|
|
48
67
|
setIsDirty(true)
|
|
@@ -52,6 +71,10 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
52
71
|
}
|
|
53
72
|
}
|
|
54
73
|
|
|
74
|
+
const handleChangeInterSection = (inView: boolean) => {
|
|
75
|
+
setIsIntersectionObserver(inView)
|
|
76
|
+
}
|
|
77
|
+
|
|
55
78
|
useEffect(() => {
|
|
56
79
|
if (balance === option?.max && state?.selected && isDirty) {
|
|
57
80
|
setIsDirty(false)
|
|
@@ -66,92 +89,110 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
66
89
|
}, [balance])
|
|
67
90
|
|
|
68
91
|
return (
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
{(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
state?.selected ? (
|
|
80
|
-
<OIcon src={theme.images.general.radio_act} color={theme.colors.primary} width={16} />
|
|
92
|
+
<InView onChange={(inView: boolean) => handleChangeInterSection(inView)} triggerOnce={true}>
|
|
93
|
+
{isIntersectionObserver ? (
|
|
94
|
+
<Container onPress={!((option?.with_half_option || option?.allow_suboption_quantity) && state?.selected) ? () => handleSuboptionClick() : null}>
|
|
95
|
+
<IconControl disabled={disabled} onPress={() => handleSuboptionClick()}>
|
|
96
|
+
{((option?.min === 0 && option?.max === 1) || option?.max > 1) ? (
|
|
97
|
+
state?.selected ? (
|
|
98
|
+
<OIcon src={theme.images.general.check_act} color={theme.colors.primary} width={16} />
|
|
99
|
+
) : (
|
|
100
|
+
<OIcon src={theme.images.general.check_nor} color={theme.colors.disabled} width={16} />
|
|
101
|
+
)
|
|
81
102
|
) : (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/>
|
|
98
|
-
</Checkbox>
|
|
99
|
-
<OText size={12} mLeft={5} mRight={5}>
|
|
100
|
-
{state.quantity}
|
|
101
|
-
</OText>
|
|
102
|
-
<Checkbox disabled={disabled || disableIncrement} onPress={increment}>
|
|
103
|
-
<IconAntDesign
|
|
104
|
-
name='pluscircleo'
|
|
105
|
-
size={iconsSize}
|
|
106
|
-
color={disableIncrement || disabled ? theme.colors.disabled : theme.colors.primary}
|
|
103
|
+
state?.selected ? (
|
|
104
|
+
<OIcon src={theme.images.general.radio_act} color={theme.colors.primary} width={16} />
|
|
105
|
+
) : (
|
|
106
|
+
<OIcon src={theme.images.general.radio_nor} color={theme.colors.disabled} width={16} />
|
|
107
|
+
)
|
|
108
|
+
)}
|
|
109
|
+
{image && (
|
|
110
|
+
<Logo style={styles.logo}>
|
|
111
|
+
<FastImage
|
|
112
|
+
style={styles.icon}
|
|
113
|
+
source={{
|
|
114
|
+
uri: optimizeImage(image, 'h_100,c_limit'),
|
|
115
|
+
priority: FastImage.priority.normal,
|
|
116
|
+
}}
|
|
117
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
107
118
|
/>
|
|
108
|
-
</
|
|
109
|
-
|
|
119
|
+
</Logo>
|
|
120
|
+
)}
|
|
121
|
+
<OText size={12} lineHeight={18} color={theme.colors.textSecondary} mLeft={5} style={{ flex: 1 }}>
|
|
122
|
+
{suboption?.name}
|
|
123
|
+
</OText>
|
|
124
|
+
</IconControl>
|
|
125
|
+
{option?.allow_suboption_quantity && state?.selected && (
|
|
126
|
+
<QuantityControl>
|
|
127
|
+
<>
|
|
128
|
+
<Checkbox disabled={disabled || state.quantity === 0} onPress={decrement}>
|
|
129
|
+
<IconAntDesign
|
|
130
|
+
name='minuscircleo'
|
|
131
|
+
size={iconsSize}
|
|
132
|
+
color={state.quantity === 0 || disabled ? theme.colors.disabled : theme.colors.primary}
|
|
133
|
+
/>
|
|
134
|
+
</Checkbox>
|
|
135
|
+
<OText size={12}>
|
|
136
|
+
{state.quantity}
|
|
137
|
+
</OText>
|
|
138
|
+
<Checkbox disabled={disabled || disableIncrement} onPress={increment}>
|
|
139
|
+
<IconAntDesign
|
|
140
|
+
name='pluscircleo'
|
|
141
|
+
size={iconsSize}
|
|
142
|
+
color={disableIncrement || disabled ? theme.colors.disabled : theme.colors.primary}
|
|
143
|
+
/>
|
|
144
|
+
</Checkbox>
|
|
145
|
+
</>
|
|
146
|
+
</QuantityControl>
|
|
110
147
|
)}
|
|
111
|
-
</QuantityControl>
|
|
112
|
-
<PositionControl>
|
|
113
148
|
{option?.with_half_option && state?.selected && (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
<PositionControl>
|
|
150
|
+
<>
|
|
151
|
+
<Circle disabled={disabled} onPress={() => changePosition('left')}>
|
|
152
|
+
<OIcon
|
|
153
|
+
src={theme.images.general.half_l}
|
|
154
|
+
color={state.selected && state.position === 'left' ? theme.colors.primary : '#cbcbcb'}
|
|
155
|
+
width={20}
|
|
156
|
+
height={20}
|
|
157
|
+
style={styles.inverse}
|
|
158
|
+
/>
|
|
159
|
+
</Circle>
|
|
160
|
+
<Circle disabled={disabled} onPress={() => changePosition('whole')}>
|
|
161
|
+
<OIcon
|
|
162
|
+
src={theme.images.general.half_f}
|
|
163
|
+
color={state.selected && state.position === 'whole' ? theme.colors.primary : '#cbcbcb'}
|
|
164
|
+
width={20}
|
|
165
|
+
height={20}
|
|
166
|
+
/>
|
|
167
|
+
</Circle>
|
|
168
|
+
<Circle disabled={disabled} onPress={() => changePosition('right')}>
|
|
169
|
+
<OIcon
|
|
170
|
+
src={theme.images.general.half_r}
|
|
171
|
+
color={state.selected && state.position === 'right' ? theme.colors.primary : '#cbcbcb'}
|
|
172
|
+
width={20}
|
|
173
|
+
height={20}
|
|
174
|
+
/>
|
|
175
|
+
</Circle>
|
|
176
|
+
</>
|
|
177
|
+
</PositionControl>
|
|
178
|
+
)}
|
|
179
|
+
{price > 0 && (
|
|
180
|
+
<OText size={12} lineHeight={18} color={theme.colors.textSecondary} style={{ width: 70, maxWidth: 70 }}>
|
|
181
|
+
+ {parsePrice(price)}
|
|
182
|
+
</OText>
|
|
141
183
|
)}
|
|
142
|
-
</
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</Container>
|
|
184
|
+
</Container>
|
|
185
|
+
) : (
|
|
186
|
+
<Placeholder>
|
|
187
|
+
<PlaceholderLine height={25} />
|
|
188
|
+
</Placeholder>
|
|
189
|
+
)}
|
|
149
190
|
{showMessage && (
|
|
150
191
|
<OText size={10} mLeft={4} mRight={4} style={{ flex: 1, textAlign: 'center' }} color={theme.colors.primary}>
|
|
151
192
|
{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}
|
|
152
193
|
</OText>
|
|
153
194
|
)}
|
|
154
|
-
</
|
|
195
|
+
</InView>
|
|
155
196
|
)
|
|
156
197
|
}
|
|
157
198
|
|
|
@@ -9,30 +9,31 @@ export const Container = styled.TouchableOpacity`
|
|
|
9
9
|
|
|
10
10
|
export const IconControl = styled.TouchableOpacity`
|
|
11
11
|
flex-direction: row;
|
|
12
|
-
padding: 10px;
|
|
13
|
-
width:
|
|
12
|
+
padding: 10px 0 10px 10px;
|
|
13
|
+
width: 50%;
|
|
14
14
|
align-items: center;
|
|
15
15
|
`
|
|
16
16
|
|
|
17
17
|
export const QuantityControl = styled.View`
|
|
18
18
|
flex-direction: row;
|
|
19
19
|
align-items: center;
|
|
20
|
-
justify-content:
|
|
21
|
-
|
|
22
|
-
flex: 1;
|
|
23
|
-
width: 60px;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
width: 62px;
|
|
24
22
|
`
|
|
25
23
|
|
|
26
24
|
export const PositionControl = styled.View`
|
|
27
25
|
flex-direction: row;
|
|
28
26
|
align-items: center;
|
|
29
|
-
margin-right: 5px;
|
|
30
|
-
flex: 1;
|
|
31
27
|
`
|
|
32
28
|
|
|
33
29
|
export const Checkbox = styled.TouchableOpacity`
|
|
34
30
|
`
|
|
35
31
|
|
|
36
32
|
export const Circle = styled.TouchableOpacity`
|
|
37
|
-
margin: 0
|
|
33
|
+
margin: 0 1.5px;
|
|
38
34
|
`
|
|
35
|
+
|
|
36
|
+
export const Logo = styled.View`
|
|
37
|
+
height: 65px;
|
|
38
|
+
width: 65px;
|
|
39
|
+
`;
|
|
@@ -12,7 +12,7 @@ export const ProfessionalPhoto = styled.ImageBackground`
|
|
|
12
12
|
|
|
13
13
|
export const InfoWrapper = styled.View`
|
|
14
14
|
margin-vertical: 30px;
|
|
15
|
-
padding-horizontal:
|
|
15
|
+
padding-horizontal: 20px;
|
|
16
16
|
`
|
|
17
17
|
|
|
18
18
|
export const Divider = styled.View`
|
|
@@ -22,7 +22,7 @@ export const Divider = styled.View`
|
|
|
22
22
|
`
|
|
23
23
|
|
|
24
24
|
export const ScheduleWrapper = styled.View`
|
|
25
|
-
padding-horizontal:
|
|
25
|
+
padding-horizontal: 20px;
|
|
26
26
|
margin-top: 30px;
|
|
27
27
|
`
|
|
28
28
|
|
|
@@ -43,4 +43,4 @@ export const CalendarWrapper = styled.View`
|
|
|
43
43
|
border-color: ${(props: any) => props.theme.colors.backgroundGray200};
|
|
44
44
|
border-radius: 7.6px;
|
|
45
45
|
padding: 15px;
|
|
46
|
-
`
|
|
46
|
+
`
|
|
@@ -19,7 +19,7 @@ import { useTheme } from 'styled-components/native';
|
|
|
19
19
|
import { OButton, OIcon, OModal, OText } from '../shared'
|
|
20
20
|
import { Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
21
21
|
import { NotFoundSource } from '../NotFoundSource'
|
|
22
|
-
import { View, StyleSheet, ScrollView, RefreshControl } from 'react-native'
|
|
22
|
+
import { View, StyleSheet, ScrollView, RefreshControl, Platform } from 'react-native'
|
|
23
23
|
import { PromotionParams } from '../../types'
|
|
24
24
|
import { Container } from '../../layouts/Container'
|
|
25
25
|
|
|
@@ -98,8 +98,6 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
98
98
|
|
|
99
99
|
return (
|
|
100
100
|
<Container
|
|
101
|
-
noPadding
|
|
102
|
-
pt={20}
|
|
103
101
|
refreshControl={
|
|
104
102
|
<RefreshControl
|
|
105
103
|
refreshing={refreshing}
|
|
@@ -112,7 +110,14 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
112
110
|
titleAlign={'center'}
|
|
113
111
|
onActionLeft={() => navigation.goBack()}
|
|
114
112
|
showCall={false}
|
|
115
|
-
|
|
113
|
+
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
114
|
+
style={{ paddingVertical: 0 }}
|
|
115
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
116
|
+
buttonProps={{
|
|
117
|
+
bgColor: theme.colors.white,
|
|
118
|
+
borderColor: theme.colors.white,
|
|
119
|
+
textStyle: { color: theme.colors.btnFont }
|
|
120
|
+
}}
|
|
116
121
|
/>
|
|
117
122
|
<PromotionsContainer>
|
|
118
123
|
<SearchBarContainer>
|
|
@@ -182,7 +187,7 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
182
187
|
title={``}
|
|
183
188
|
onClose={() => setOpenModal(false)}
|
|
184
189
|
>
|
|
185
|
-
<
|
|
190
|
+
<ScrollView style={{ padding: 20 }}>
|
|
186
191
|
<OText style={{ alignSelf: 'center', fontWeight: '700' }} mBottom={20}>
|
|
187
192
|
{offerSelected?.name} / {t('VALUE_OF_OFFER', 'Value of offer')}: {offerSelected?.rate_type === 1 ? `${offerSelected?.rate}%` : `${parsePrice(offerSelected?.rate)}`}
|
|
188
193
|
</OText>
|
|
@@ -210,10 +215,7 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
210
215
|
<OText style={{ marginTop: 10, marginBottom: 10 }}>
|
|
211
216
|
{t('AVAILABLE_BUSINESSES_FOR_OFFER', 'Available businesses for this offer')}:
|
|
212
217
|
</OText>
|
|
213
|
-
<
|
|
214
|
-
showsVerticalScrollIndicator={false}
|
|
215
|
-
style={{ height: '68%' }}
|
|
216
|
-
>
|
|
218
|
+
<View style={{ marginBottom: 70 }}>
|
|
217
219
|
{offerSelected?.businesses?.map((business: any) => {
|
|
218
220
|
return (
|
|
219
221
|
<SingleBusinessOffer key={business.id}>
|
|
@@ -244,8 +246,8 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
244
246
|
</SingleBusinessOffer>
|
|
245
247
|
)
|
|
246
248
|
})}
|
|
247
|
-
</
|
|
248
|
-
</
|
|
249
|
+
</View>
|
|
250
|
+
</ScrollView>
|
|
249
251
|
</OModal>
|
|
250
252
|
</PromotionsContainer>
|
|
251
253
|
</Container>
|
|
@@ -192,6 +192,11 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
|
|
|
192
192
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
193
193
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
194
194
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
195
|
+
buttonProps={{
|
|
196
|
+
bgColor: theme.colors.white,
|
|
197
|
+
borderColor: theme.colors.white,
|
|
198
|
+
textStyle: { color: theme.colors.btnFont }
|
|
199
|
+
}}
|
|
195
200
|
/>
|
|
196
201
|
<DriverPhotoContainer>
|
|
197
202
|
<View
|
|
@@ -215,6 +215,11 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
|
|
|
215
215
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
216
216
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
217
217
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
218
|
+
buttonProps={{
|
|
219
|
+
bgColor: theme.colors.white,
|
|
220
|
+
borderColor: theme.colors.white,
|
|
221
|
+
textStyle: { color: theme.colors.btnFont }
|
|
222
|
+
}}
|
|
218
223
|
/>
|
|
219
224
|
<BusinessLogo isMulti={order?.business?.length > 1}>
|
|
220
225
|
{typeof order?.logo === 'string' || !order?.logo ? (
|
|
@@ -73,6 +73,11 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
|
|
|
73
73
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
74
74
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
75
75
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
76
|
+
buttonProps={{
|
|
77
|
+
bgColor: theme.colors.white,
|
|
78
|
+
borderColor: theme.colors.white,
|
|
79
|
+
textStyle: { color: theme.colors.btnFont }
|
|
80
|
+
}}
|
|
76
81
|
/>
|
|
77
82
|
{order?.products && order.products.length > 0 && order?.products.map(productsOrder => (
|
|
78
83
|
productsOrder?.length ? productsOrder?.map((product: any, i: any) => !product?.deleted ?
|