ordering-ui-react-native 0.21.21 → 0.21.22-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 +7 -6
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +4 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +2 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
- package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
- package/themes/business/src/components/Chat/index.tsx +23 -14
- package/themes/business/src/components/DriverMap/index.tsx +4 -3
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/LanguageSelector/index.tsx +4 -2
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/MapView/index.tsx +11 -7
- package/themes/business/src/components/MessagesOption/index.tsx +2 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +163 -113
- package/themes/business/src/components/OrderDetails/Business.tsx +50 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +23 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +60 -53
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +54 -23
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
- package/themes/business/src/components/OrderSummary/index.tsx +240 -76
- 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/PreviousOrders/OrderItem.tsx +33 -36
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +18 -13
- package/themes/business/src/components/PreviousOrders/index.tsx +80 -66
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +279 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +17 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/Sessions/index.tsx +187 -0
- package/themes/business/src/components/Sessions/styles.tsx +20 -0
- package/themes/business/src/components/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +98 -44
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +15 -2
- package/themes/business/src/utils/index.tsx +5 -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 +7 -4
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +9 -4
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +10 -6
- 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/AnalyticsSegment/index.tsx +6 -6
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +20 -12
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +51 -20
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
- package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +24 -404
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +32 -9
- package/themes/original/src/components/CartContent/index.tsx +96 -58
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +190 -66
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/DatePicker/index.tsx +33 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/Favorite/index.tsx +4 -9
- package/themes/original/src/components/Favorite/styles.tsx +0 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +1 -1
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
- package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
- package/themes/original/src/components/GoogleMap/index.tsx +6 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +2 -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 +4 -16
- 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 -3
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCheckout/index.tsx +208 -21
- package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
- package/themes/original/src/components/MyOrders/index.tsx +24 -29
- package/themes/original/src/components/NavBar/index.tsx +3 -1
- package/themes/original/src/components/NetworkError/index.tsx +2 -3
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +4 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
- package/themes/original/src/components/OrderDetails/index.tsx +716 -668
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +28 -6
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +3 -1
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +3 -5
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +3 -0
- package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
- package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +74 -165
- package/themes/original/src/components/ProductItemAccordion/index.tsx +54 -44
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +123 -82
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -1
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +4 -4
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/SignupForm/index.tsx +60 -58
- package/themes/original/src/components/SingleOrderCard/index.tsx +3 -2
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
- package/themes/original/src/components/StripeElementsForm/index.tsx +72 -59
- package/themes/original/src/components/StripeElementsForm/naked.tsx +47 -0
- 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 +125 -77
- package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
- package/themes/original/src/components/UserProfile/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +8 -9
- package/themes/original/src/components/Wallets/styles.tsx +1 -1
- package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
- package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -5
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +1 -0
- package/themes/original/src/utils/index.tsx +125 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/navigators/BottomNavigator.tsx +0 -117
- package/src/navigators/CheckoutNavigator.tsx +0 -66
- package/src/navigators/HomeNavigator.tsx +0 -202
- package/src/navigators/NavigationRef.tsx +0 -7
- package/src/navigators/RootNavigator.tsx +0 -269
- package/src/pages/Account.tsx +0 -34
- package/src/pages/AddressForm.tsx +0 -62
- package/src/pages/AddressList.tsx +0 -24
- package/src/pages/BusinessProductsList.tsx +0 -81
- package/src/pages/BusinessesListing.tsx +0 -43
- package/src/pages/CartList.tsx +0 -49
- package/src/pages/Checkout.tsx +0 -101
- package/src/pages/ForgotPassword.tsx +0 -24
- package/src/pages/Help.tsx +0 -23
- package/src/pages/HelpAccountAndPayment.tsx +0 -23
- package/src/pages/HelpGuide.tsx +0 -23
- package/src/pages/HelpOrder.tsx +0 -23
- package/src/pages/Home.tsx +0 -36
- package/src/pages/IntroductoryTutorial.tsx +0 -170
- package/src/pages/Login.tsx +0 -47
- package/src/pages/MomentOption.tsx +0 -30
- package/src/pages/MultiCheckout.tsx +0 -31
- package/src/pages/MultiOrdersDetails.tsx +0 -27
- package/src/pages/MyOrders.tsx +0 -40
- package/src/pages/NetworkError.tsx +0 -24
- package/src/pages/NotFound.tsx +0 -22
- package/src/pages/OrderDetails.tsx +0 -25
- package/src/pages/ProductDetails.tsx +0 -55
- package/src/pages/Profile.tsx +0 -36
- package/src/pages/ReviewDriver.tsx +0 -30
- package/src/pages/ReviewOrder.tsx +0 -32
- package/src/pages/ReviewProducts.tsx +0 -30
- package/src/pages/Sessions.tsx +0 -22
- package/src/pages/Signup.tsx +0 -53
- package/src/pages/SpinnerLoader.tsx +0 -10
- package/src/pages/Splash.tsx +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
|
-
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView, Keyboard, KeyboardEvent, BackHandler } from 'react-native'
|
|
2
|
+
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView, Keyboard, KeyboardEvent, BackHandler, ScrollView } from 'react-native'
|
|
3
3
|
import { IOScrollView } from 'react-native-intersection-observer'
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
5
5
|
import { useTheme } from 'styled-components/native';
|
|
@@ -45,6 +45,7 @@ import { ProfessionalFilter } from '../ProfessionalFilter';
|
|
|
45
45
|
import { ServiceForm } from '../ServiceForm';
|
|
46
46
|
import { BusinessesListing } from '../BusinessesListing/Layout/Original'
|
|
47
47
|
import { PageBanner } from '../PageBanner'
|
|
48
|
+
import { NavBack } from 'ordering-ui-react-native/src/components/OrderDetails/styles';
|
|
48
49
|
|
|
49
50
|
const PIXELS_TO_SCROLL = 2000
|
|
50
51
|
|
|
@@ -72,7 +73,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
72
73
|
handleUpdateProfessionals,
|
|
73
74
|
handleChangeProfessionalSelected,
|
|
74
75
|
onBusinessClick,
|
|
75
|
-
businessSingleId
|
|
76
|
+
businessSingleId,
|
|
77
|
+
productModal
|
|
76
78
|
} = props
|
|
77
79
|
|
|
78
80
|
const insets = useSafeAreaInsets()
|
|
@@ -112,7 +114,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
112
114
|
},
|
|
113
115
|
searchIcon: {
|
|
114
116
|
borderWidth: 0,
|
|
115
|
-
padding:
|
|
117
|
+
padding: 10,
|
|
116
118
|
justifyContent: 'center',
|
|
117
119
|
shadowColor: theme.colors.clear,
|
|
118
120
|
},
|
|
@@ -146,7 +148,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
146
148
|
const openCarts = (Object.values(orderState?.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) || []
|
|
147
149
|
const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
|
|
148
150
|
const isOpenFiltProducts = isOpenSearchBar && !!searchValue
|
|
149
|
-
const filtProductsHeight = Platform.OS === 'ios' ?
|
|
151
|
+
const filtProductsHeight = Platform.OS === 'ios' ? 65 : 30
|
|
150
152
|
const viewOrderButtonVisible = !loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0
|
|
151
153
|
|
|
152
154
|
const onRedirect = (route: string, params?: any) => {
|
|
@@ -188,12 +190,17 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
188
190
|
setOpenService(true)
|
|
189
191
|
return
|
|
190
192
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
if (product?.enabled) {
|
|
194
|
+
onRedirect('ProductDetails', {
|
|
195
|
+
product: product,
|
|
196
|
+
businessSlug: business.slug,
|
|
197
|
+
businessId: business.id || product?.category?.business_id,
|
|
198
|
+
productAddedToCartLength,
|
|
199
|
+
isRedirect: false
|
|
200
|
+
})
|
|
201
|
+
} else {
|
|
202
|
+
showToast(ToastType.Error, t('PRODUCT_NOT_FOUND', 'Product not found'))
|
|
203
|
+
}
|
|
197
204
|
}
|
|
198
205
|
events.emit('product_clicked', product)
|
|
199
206
|
}
|
|
@@ -374,6 +381,14 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
374
381
|
setViewedCategory(_viewedCategory)
|
|
375
382
|
events.emit('product_list_viewed', _viewedCategory)
|
|
376
383
|
}
|
|
384
|
+
} else {
|
|
385
|
+
if (business.categories) {
|
|
386
|
+
const categoryAll: any = {}
|
|
387
|
+
categoryAll.business_id = business.id
|
|
388
|
+
categoryAll.id = null
|
|
389
|
+
categoryAll.name = 'All'
|
|
390
|
+
events.emit('product_list_viewed', categoryAll)
|
|
391
|
+
}
|
|
377
392
|
}
|
|
378
393
|
}, [business?.lazy_load_products_recommended, selectedCategoryId, categorySelected?.id, viewedCategory])
|
|
379
394
|
|
|
@@ -388,6 +403,19 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
388
403
|
}
|
|
389
404
|
}, [])
|
|
390
405
|
|
|
406
|
+
useEffect(() => {
|
|
407
|
+
if (!business && !loading && !error) {
|
|
408
|
+
showToast(ToastType.Error, t('BUSINESS_NOT_FOUND', 'Business not found'))
|
|
409
|
+
navigation.navigate('BusinessList')
|
|
410
|
+
}
|
|
411
|
+
}, [business, error, loading])
|
|
412
|
+
|
|
413
|
+
useEffect(() => {
|
|
414
|
+
if (productModal?.product && !productModal?.loading && !productModal?.error) {
|
|
415
|
+
onProductClick(props?.productModal?.product)
|
|
416
|
+
}
|
|
417
|
+
}, [productModal])
|
|
418
|
+
|
|
391
419
|
return (
|
|
392
420
|
<>
|
|
393
421
|
<View style={{ flex: 1, backgroundColor: backgroundColor }}>
|
|
@@ -475,8 +503,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
475
503
|
{business?.categories?.length > 0 && isOpenFiltProducts && (
|
|
476
504
|
<FiltProductsContainer
|
|
477
505
|
style={{
|
|
478
|
-
height: Dimensions.get('window').height - filtProductsHeight - keyboardHeight - (keyboardHeight > 0 && viewOrderButtonVisible ?
|
|
479
|
-
top: Platform.OS === 'ios' ? (searchBarHeight - 10) + insets.top : searchBarHeight,
|
|
506
|
+
height: Dimensions.get('window').height - filtProductsHeight - keyboardHeight - (keyboardHeight > 0 && viewOrderButtonVisible ? 10 : 0),
|
|
507
|
+
top: Platform.OS === 'ios' ? viewOrderButtonVisible ? (searchBarHeight - 10) + insets.top + 10 : (searchBarHeight - 10) + insets.top : searchBarHeight,
|
|
480
508
|
}}
|
|
481
509
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
482
510
|
>
|
|
@@ -514,10 +542,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
514
542
|
</View>
|
|
515
543
|
</FiltProductsContainer>
|
|
516
544
|
)}
|
|
517
|
-
|
|
518
|
-
<BackgroundGray isIos={Platform.OS === 'ios'} />
|
|
519
|
-
)}
|
|
520
|
-
<IOScrollView
|
|
545
|
+
<ScrollView
|
|
521
546
|
stickyHeaderIndices={[business?.professionals?.length > 0 ? 4 : 3]}
|
|
522
547
|
style={{
|
|
523
548
|
...styles.mainContainer,
|
|
@@ -555,7 +580,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
555
580
|
/>
|
|
556
581
|
</ProfessionalFilterWrapper>
|
|
557
582
|
)}
|
|
558
|
-
|
|
583
|
+
{businessState?.business?.id && (
|
|
584
|
+
<PageBanner position='app_business_page' businessId={businessState?.business?.id} navigation={navigation} />
|
|
585
|
+
)}
|
|
559
586
|
<View
|
|
560
587
|
style={{
|
|
561
588
|
height: 8,
|
|
@@ -583,7 +610,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
583
610
|
<>
|
|
584
611
|
<WrapContent
|
|
585
612
|
onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
|
|
586
|
-
style={{ paddingHorizontal:
|
|
613
|
+
style={{ paddingHorizontal: 20 }}
|
|
587
614
|
>
|
|
588
615
|
<BusinessProductsList
|
|
589
616
|
categories={[
|
|
@@ -640,7 +667,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
640
667
|
</WrapContent>
|
|
641
668
|
</>
|
|
642
669
|
)}
|
|
643
|
-
|
|
670
|
+
{isOpenFiltProducts && (
|
|
671
|
+
<BackgroundGray isIos={Platform.OS === 'ios'} />
|
|
672
|
+
)}
|
|
673
|
+
</ScrollView>
|
|
644
674
|
{viewOrderButtonVisible && (
|
|
645
675
|
<View style={{ marginBottom: 0 }}>
|
|
646
676
|
<FloatingButton
|
|
@@ -697,7 +727,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
697
727
|
professionalList={business?.professionals}
|
|
698
728
|
professionalSelected={professionalSelected}
|
|
699
729
|
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
700
|
-
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
701
730
|
handleUpdateProfessionals={handleUpdateProfessionals}
|
|
702
731
|
onSave={() => setOpenService(false)}
|
|
703
732
|
onClose={() => setOpenService(false)}
|
|
@@ -711,6 +740,8 @@ export const BusinessProductsListing = (props: BusinessProductsListingParams) =>
|
|
|
711
740
|
const businessProductslistingProps = {
|
|
712
741
|
...props,
|
|
713
742
|
isForceSearch: Platform.OS === 'ios',
|
|
743
|
+
isApp: true,
|
|
744
|
+
isFetchAllProducts: true,
|
|
714
745
|
UIComponent: BusinessProductsListingUI
|
|
715
746
|
}
|
|
716
747
|
return (
|
|
@@ -42,16 +42,15 @@ export const FiltProductsContainer = styled.ScrollView`
|
|
|
42
42
|
|
|
43
43
|
export const BackgroundGray = styled.View`
|
|
44
44
|
flex: 1;
|
|
45
|
-
height:
|
|
45
|
+
height: 100%;
|
|
46
46
|
background-color: rgba(0,0,0,0.5);
|
|
47
47
|
position: absolute;
|
|
48
|
-
margin-top: 100px;
|
|
49
48
|
z-index: 10000;
|
|
50
49
|
width: 100%;
|
|
51
50
|
`
|
|
52
51
|
|
|
53
52
|
export const ProfessionalFilterWrapper = styled.View`
|
|
54
|
-
padding-left:
|
|
53
|
+
padding-left: 20px;
|
|
55
54
|
margin-bottom: 35px;
|
|
56
55
|
`
|
|
57
56
|
|
|
@@ -64,6 +63,6 @@ export const NearBusiness = styled.View`
|
|
|
64
63
|
export const TopActions = styled.TouchableOpacity`
|
|
65
64
|
height: 60px;
|
|
66
65
|
justify-content: center;
|
|
67
|
-
padding-horizontal:
|
|
66
|
+
padding-horizontal: 20px;
|
|
68
67
|
width: 100px;
|
|
69
68
|
`;
|
|
@@ -109,7 +109,7 @@ const BusinessReviewsUI = (props: BusinessReviewsParams) => {
|
|
|
109
109
|
return (
|
|
110
110
|
<BusinessReviewsContainer>
|
|
111
111
|
<BusinessReviewContent
|
|
112
|
-
contentContainerStyle={{ paddingHorizontal:
|
|
112
|
+
contentContainerStyle={{ paddingHorizontal: 20, paddingVertical: 27 }}>
|
|
113
113
|
{reviewsList.error ? (
|
|
114
114
|
<OText size={16}>{t('ERROR_UNKNOWN', 'An error has ocurred')}</OText>
|
|
115
115
|
) : (
|
|
@@ -415,7 +415,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
415
415
|
<ScrollView
|
|
416
416
|
showsHorizontalScrollIndicator={false}
|
|
417
417
|
nestedScrollEnabled
|
|
418
|
-
horizontal contentContainerStyle={{ paddingHorizontal:
|
|
418
|
+
horizontal contentContainerStyle={{ paddingHorizontal: 20 }}>
|
|
419
419
|
{featuredBusiness.map((bAry: any, idx) => (
|
|
420
420
|
<View key={'f-listing_' + idx}>
|
|
421
421
|
<BusinessFeaturedController
|
|
@@ -54,13 +54,13 @@ export const WrapMomentOption = styled.TouchableOpacity`
|
|
|
54
54
|
export const HeaderWrapper = styled.ImageBackground`
|
|
55
55
|
width: 100%;
|
|
56
56
|
height: 370px;
|
|
57
|
-
padding: 20px
|
|
57
|
+
padding: 20px;
|
|
58
58
|
background-color: transparent;
|
|
59
59
|
`;
|
|
60
60
|
|
|
61
61
|
export const ListWrapper = styled.View`
|
|
62
62
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
63
|
-
padding-horizontal:
|
|
63
|
+
padding-horizontal: 20px;
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
66
|
export const FeaturedWrapper = styled.View`
|
|
@@ -72,7 +72,7 @@ export const FeaturedWrapper = styled.View`
|
|
|
72
72
|
export const OrderProgressWrapper = styled.View`
|
|
73
73
|
margin-top: 37px;
|
|
74
74
|
margin-bottom: 20px;
|
|
75
|
-
padding-horizontal:
|
|
75
|
+
padding-horizontal: 20px;
|
|
76
76
|
`
|
|
77
77
|
|
|
78
78
|
export const FarAwayMessage = styled.View`
|
|
@@ -98,10 +98,10 @@ export const FilterWrapper = styled.View`
|
|
|
98
98
|
`
|
|
99
99
|
|
|
100
100
|
export const ServiceWrapper = styled.View`
|
|
101
|
-
padding-horizontal:
|
|
101
|
+
padding-horizontal: 20px;
|
|
102
102
|
`
|
|
103
103
|
|
|
104
104
|
export const PriceWrapper = styled.View`
|
|
105
|
-
padding-horizontal:
|
|
105
|
+
padding-horizontal: 20px;
|
|
106
106
|
margin-top: 30px;
|
|
107
107
|
`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { ListWrapper } from './styles'
|
|
3
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
4
|
+
import { View } from 'react-native'
|
|
5
|
+
|
|
6
|
+
export const FlatListBusinessListFooter = (props : any) => {
|
|
7
|
+
const {
|
|
8
|
+
businessesList,
|
|
9
|
+
paginationProps,
|
|
10
|
+
isChewLayout
|
|
11
|
+
} = props
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<ListWrapper style={{ paddingHorizontal: 20 }}>
|
|
15
|
+
{(businessesList.loading || !businessesList?.fetched) && (
|
|
16
|
+
<>
|
|
17
|
+
{[
|
|
18
|
+
...Array(
|
|
19
|
+
paginationProps.nextPageItems
|
|
20
|
+
? paginationProps.nextPageItems
|
|
21
|
+
: 8,
|
|
22
|
+
).keys(),
|
|
23
|
+
].map((item, i) => (
|
|
24
|
+
<Placeholder
|
|
25
|
+
Animation={Fade}
|
|
26
|
+
key={i}
|
|
27
|
+
style={{ marginBottom: 20 }}>
|
|
28
|
+
<View style={{ width: '100%' }}>
|
|
29
|
+
<PlaceholderLine
|
|
30
|
+
height={200}
|
|
31
|
+
style={{ marginBottom: 20, borderRadius: 25 }}
|
|
32
|
+
/>
|
|
33
|
+
<View style={{ paddingHorizontal: 10 }}>
|
|
34
|
+
<View
|
|
35
|
+
style={{
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
justifyContent: 'space-between',
|
|
38
|
+
}}>
|
|
39
|
+
<PlaceholderLine
|
|
40
|
+
height={25}
|
|
41
|
+
width={40}
|
|
42
|
+
style={{ marginBottom: 10 }}
|
|
43
|
+
/>
|
|
44
|
+
<PlaceholderLine
|
|
45
|
+
height={25}
|
|
46
|
+
width={20}
|
|
47
|
+
style={{ marginBottom: 10 }}
|
|
48
|
+
/>
|
|
49
|
+
</View>
|
|
50
|
+
<PlaceholderLine
|
|
51
|
+
height={20}
|
|
52
|
+
width={30}
|
|
53
|
+
style={{ marginBottom: 10 }}
|
|
54
|
+
/>
|
|
55
|
+
<PlaceholderLine
|
|
56
|
+
height={20}
|
|
57
|
+
width={80}
|
|
58
|
+
style={{ marginBottom: 10 }}
|
|
59
|
+
/>
|
|
60
|
+
</View>
|
|
61
|
+
</View>
|
|
62
|
+
</Placeholder>
|
|
63
|
+
))}
|
|
64
|
+
</>
|
|
65
|
+
)}
|
|
66
|
+
</ListWrapper>
|
|
67
|
+
</>
|
|
68
|
+
)
|
|
69
|
+
}
|