ordering-ui-react-native 0.21.24 → 0.21.25-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 +6 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +3 -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 +1 -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 -115
- 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 +61 -54
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +58 -24
- 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 +36 -38
- 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 +105 -47
- 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/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 +3 -3
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +18 -10
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +47 -358
- 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 +35 -19
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +2 -2
- 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 +181 -67
- 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 +2 -1
- 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/MultiCartsPaymethodsAndWallets/index.tsx +1 -0
- 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 +706 -667
- 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/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 +68 -156
- 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 +105 -91
- 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 +74 -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 +123 -75
- 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/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +3 -4
- 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';
|
|
@@ -114,7 +114,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
114
114
|
},
|
|
115
115
|
searchIcon: {
|
|
116
116
|
borderWidth: 0,
|
|
117
|
-
padding:
|
|
117
|
+
padding: 10,
|
|
118
118
|
justifyContent: 'center',
|
|
119
119
|
shadowColor: theme.colors.clear,
|
|
120
120
|
},
|
|
@@ -148,7 +148,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
148
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) || []
|
|
149
149
|
const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
|
|
150
150
|
const isOpenFiltProducts = isOpenSearchBar && !!searchValue
|
|
151
|
-
const filtProductsHeight = Platform.OS === 'ios' ?
|
|
151
|
+
const filtProductsHeight = Platform.OS === 'ios' ? 65 : 30
|
|
152
152
|
const viewOrderButtonVisible = !loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0
|
|
153
153
|
|
|
154
154
|
const onRedirect = (route: string, params?: any) => {
|
|
@@ -190,12 +190,17 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
190
190
|
setOpenService(true)
|
|
191
191
|
return
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
+
}
|
|
199
204
|
}
|
|
200
205
|
events.emit('product_clicked', product)
|
|
201
206
|
}
|
|
@@ -376,6 +381,14 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
376
381
|
setViewedCategory(_viewedCategory)
|
|
377
382
|
events.emit('product_list_viewed', _viewedCategory)
|
|
378
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
|
+
}
|
|
379
392
|
}
|
|
380
393
|
}, [business?.lazy_load_products_recommended, selectedCategoryId, categorySelected?.id, viewedCategory])
|
|
381
394
|
|
|
@@ -490,8 +503,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
490
503
|
{business?.categories?.length > 0 && isOpenFiltProducts && (
|
|
491
504
|
<FiltProductsContainer
|
|
492
505
|
style={{
|
|
493
|
-
height: Dimensions.get('window').height - filtProductsHeight - keyboardHeight - (keyboardHeight > 0 && viewOrderButtonVisible ?
|
|
494
|
-
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,
|
|
495
508
|
}}
|
|
496
509
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
497
510
|
>
|
|
@@ -529,10 +542,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
529
542
|
</View>
|
|
530
543
|
</FiltProductsContainer>
|
|
531
544
|
)}
|
|
532
|
-
|
|
533
|
-
<BackgroundGray isIos={Platform.OS === 'ios'} />
|
|
534
|
-
)}
|
|
535
|
-
<IOScrollView
|
|
545
|
+
<ScrollView
|
|
536
546
|
stickyHeaderIndices={[business?.professionals?.length > 0 ? 4 : 3]}
|
|
537
547
|
style={{
|
|
538
548
|
...styles.mainContainer,
|
|
@@ -570,7 +580,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
570
580
|
/>
|
|
571
581
|
</ProfessionalFilterWrapper>
|
|
572
582
|
)}
|
|
573
|
-
|
|
583
|
+
{businessState?.business?.id && (
|
|
584
|
+
<PageBanner position='app_business_page' businessId={businessState?.business?.id} navigation={navigation} />
|
|
585
|
+
)}
|
|
574
586
|
<View
|
|
575
587
|
style={{
|
|
576
588
|
height: 8,
|
|
@@ -598,7 +610,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
598
610
|
<>
|
|
599
611
|
<WrapContent
|
|
600
612
|
onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
|
|
601
|
-
style={{ paddingHorizontal:
|
|
613
|
+
style={{ paddingHorizontal: 20 }}
|
|
602
614
|
>
|
|
603
615
|
<BusinessProductsList
|
|
604
616
|
categories={[
|
|
@@ -655,7 +667,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
655
667
|
</WrapContent>
|
|
656
668
|
</>
|
|
657
669
|
)}
|
|
658
|
-
|
|
670
|
+
{isOpenFiltProducts && (
|
|
671
|
+
<BackgroundGray isIos={Platform.OS === 'ios'} />
|
|
672
|
+
)}
|
|
673
|
+
</ScrollView>
|
|
659
674
|
{viewOrderButtonVisible && (
|
|
660
675
|
<View style={{ marginBottom: 0 }}>
|
|
661
676
|
<FloatingButton
|
|
@@ -712,7 +727,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
712
727
|
professionalList={business?.professionals}
|
|
713
728
|
professionalSelected={professionalSelected}
|
|
714
729
|
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
715
|
-
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
716
730
|
handleUpdateProfessionals={handleUpdateProfessionals}
|
|
717
731
|
onSave={() => setOpenService(false)}
|
|
718
732
|
onClose={() => setOpenService(false)}
|
|
@@ -726,6 +740,8 @@ export const BusinessProductsListing = (props: BusinessProductsListingParams) =>
|
|
|
726
740
|
const businessProductslistingProps = {
|
|
727
741
|
...props,
|
|
728
742
|
isForceSearch: Platform.OS === 'ios',
|
|
743
|
+
isApp: true,
|
|
744
|
+
isFetchAllProducts: true,
|
|
729
745
|
UIComponent: BusinessProductsListingUI
|
|
730
746
|
}
|
|
731
747
|
return (
|
|
@@ -50,7 +50,7 @@ export const BackgroundGray = styled.View`
|
|
|
50
50
|
`
|
|
51
51
|
|
|
52
52
|
export const ProfessionalFilterWrapper = styled.View`
|
|
53
|
-
padding-left:
|
|
53
|
+
padding-left: 20px;
|
|
54
54
|
margin-bottom: 35px;
|
|
55
55
|
`
|
|
56
56
|
|
|
@@ -63,6 +63,6 @@ export const NearBusiness = styled.View`
|
|
|
63
63
|
export const TopActions = styled.TouchableOpacity`
|
|
64
64
|
height: 60px;
|
|
65
65
|
justify-content: center;
|
|
66
|
-
padding-horizontal:
|
|
66
|
+
padding-horizontal: 20px;
|
|
67
67
|
width: 100px;
|
|
68
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
|
+
}
|