ordering-ui-react-native 0.21.22 → 0.21.23-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.
Files changed (235) hide show
  1. package/package.json +7 -6
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessesListing/index.tsx +1 -1
  4. package/src/components/PaymentOptionsWebView/index.tsx +1 -0
  5. package/src/components/StripeMethodForm/index.tsx +4 -4
  6. package/src/components/VerifyPhone/styles.tsx +1 -2
  7. package/src/types/index.tsx +2 -1
  8. package/src/utils/index.tsx +2 -2
  9. package/themes/business/index.tsx +4 -0
  10. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
  11. package/themes/business/src/components/BusinessController/index.tsx +19 -17
  12. package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
  13. package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
  14. package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
  15. package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
  16. package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
  17. package/themes/business/src/components/Chat/index.tsx +23 -14
  18. package/themes/business/src/components/DriverMap/index.tsx +4 -3
  19. package/themes/business/src/components/FloatingButton/index.tsx +34 -31
  20. package/themes/business/src/components/Home/index.tsx +5 -1
  21. package/themes/business/src/components/LanguageSelector/index.tsx +1 -2
  22. package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
  23. package/themes/business/src/components/MapView/index.tsx +11 -7
  24. package/themes/business/src/components/MessagesOption/index.tsx +2 -1
  25. package/themes/business/src/components/NewOrderNotification/index.tsx +163 -113
  26. package/themes/business/src/components/OrderDetails/Business.tsx +50 -2
  27. package/themes/business/src/components/OrderDetails/Delivery.tsx +23 -11
  28. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +60 -53
  29. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +54 -23
  30. package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
  31. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
  32. package/themes/business/src/components/OrderSummary/index.tsx +240 -76
  33. package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
  34. package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
  35. package/themes/business/src/components/OrdersOption/index.tsx +125 -48
  36. package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
  37. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +33 -36
  38. package/themes/business/src/components/PreviousOrders/OrderList.tsx +18 -13
  39. package/themes/business/src/components/PreviousOrders/index.tsx +80 -66
  40. package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
  41. package/themes/business/src/components/PrinterSettings/index.tsx +279 -0
  42. package/themes/business/src/components/PrinterSettings/styles.tsx +17 -0
  43. package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
  44. package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
  45. package/themes/business/src/components/SearchBar/index.tsx +2 -1
  46. package/themes/business/src/components/Sessions/index.tsx +187 -0
  47. package/themes/business/src/components/Sessions/styles.tsx +20 -0
  48. package/themes/business/src/components/StoresList/index.tsx +5 -3
  49. package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
  50. package/themes/business/src/components/UserProfileForm/index.tsx +98 -44
  51. package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
  52. package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
  53. package/themes/business/src/components/shared/OInput.tsx +2 -0
  54. package/themes/business/src/hooks/useLocation.tsx +5 -4
  55. package/themes/business/src/types/index.tsx +15 -2
  56. package/themes/business/src/utils/index.tsx +5 -0
  57. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  58. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  59. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  60. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  61. package/themes/kiosk/src/components/LoginForm/index.tsx +7 -4
  62. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  63. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  64. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  65. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  66. package/themes/original/index.tsx +9 -4
  67. package/themes/original/src/components/AddressDetails/index.tsx +20 -10
  68. package/themes/original/src/components/AddressForm/index.tsx +10 -6
  69. package/themes/original/src/components/AddressForm/styles.tsx +1 -1
  70. package/themes/original/src/components/AddressList/styles.tsx +4 -4
  71. package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
  72. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  73. package/themes/original/src/components/BusinessBasicInformation/index.tsx +3 -3
  74. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
  75. package/themes/original/src/components/BusinessController/index.tsx +18 -10
  76. package/themes/original/src/components/BusinessController/styles.tsx +8 -7
  77. package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
  78. package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
  79. package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
  80. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
  81. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
  82. package/themes/original/src/components/BusinessListingSearch/index.tsx +47 -358
  83. package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
  84. package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
  85. package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
  86. package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
  87. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  88. package/themes/original/src/components/BusinessProductsListing/index.tsx +52 -19
  89. package/themes/original/src/components/BusinessProductsListing/styles.tsx +2 -2
  90. package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
  91. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  92. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
  93. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
  94. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
  95. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
  96. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +24 -404
  97. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
  98. package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
  99. package/themes/original/src/components/Cart/index.tsx +32 -9
  100. package/themes/original/src/components/CartContent/index.tsx +96 -58
  101. package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
  102. package/themes/original/src/components/Checkout/index.tsx +190 -66
  103. package/themes/original/src/components/Checkout/styles.tsx +17 -0
  104. package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
  105. package/themes/original/src/components/DatePicker/index.tsx +33 -0
  106. package/themes/original/src/components/DatePicker/styles.tsx +20 -0
  107. package/themes/original/src/components/Favorite/index.tsx +4 -9
  108. package/themes/original/src/components/Favorite/styles.tsx +0 -2
  109. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  110. package/themes/original/src/components/GPSButton/index.tsx +1 -1
  111. package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
  112. package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
  113. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
  114. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
  115. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
  116. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
  117. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
  118. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
  119. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
  120. package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
  121. package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
  122. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
  123. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
  124. package/themes/original/src/components/GoogleMap/index.tsx +6 -5
  125. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
  126. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
  127. package/themes/original/src/components/Home/index.tsx +2 -1
  128. package/themes/original/src/components/LastOrder/index.tsx +2 -1
  129. package/themes/original/src/components/LastOrders/index.tsx +2 -1
  130. package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -16
  131. package/themes/original/src/components/Messages/index.tsx +2 -1
  132. package/themes/original/src/components/Messages/styles.tsx +1 -1
  133. package/themes/original/src/components/MomentOption/index.tsx +4 -3
  134. package/themes/original/src/components/MultiCart/index.tsx +1 -1
  135. package/themes/original/src/components/MultiCheckout/index.tsx +208 -21
  136. package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
  137. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
  138. package/themes/original/src/components/MyOrders/index.tsx +24 -29
  139. package/themes/original/src/components/NavBar/index.tsx +3 -1
  140. package/themes/original/src/components/NetworkError/index.tsx +2 -3
  141. package/themes/original/src/components/NetworkError/styles.tsx +2 -2
  142. package/themes/original/src/components/Notifications/index.tsx +4 -8
  143. package/themes/original/src/components/Notifications/styles.tsx +0 -1
  144. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
  145. package/themes/original/src/components/OrderDetails/index.tsx +717 -669
  146. package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
  147. package/themes/original/src/components/OrderProgress/index.tsx +28 -6
  148. package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
  149. package/themes/original/src/components/OrderSummary/index.tsx +3 -1
  150. package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
  151. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
  152. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
  153. package/themes/original/src/components/OrdersOption/index.tsx +3 -5
  154. package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
  155. package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
  156. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
  157. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  158. package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
  159. package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
  160. package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
  161. package/themes/original/src/components/ProductForm/index.tsx +68 -156
  162. package/themes/original/src/components/ProductItemAccordion/index.tsx +54 -44
  163. package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
  164. package/themes/original/src/components/ProductOptionSubOption/index.tsx +105 -91
  165. package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
  166. package/themes/original/src/components/Promotions/index.tsx +4 -4
  167. package/themes/original/src/components/Promotions/styles.tsx +0 -2
  168. package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
  169. package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
  170. package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
  171. package/themes/original/src/components/ServiceForm/index.tsx +2 -2
  172. package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
  173. package/themes/original/src/components/SignupForm/index.tsx +60 -58
  174. package/themes/original/src/components/SingleOrderCard/index.tsx +3 -2
  175. package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
  176. package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
  177. package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
  178. package/themes/original/src/components/StripeElementsForm/index.tsx +72 -59
  179. package/themes/original/src/components/StripeElementsForm/naked.tsx +47 -0
  180. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
  181. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
  182. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
  183. package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
  184. package/themes/original/src/components/UserFormDetails/index.tsx +123 -75
  185. package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
  186. package/themes/original/src/components/UserProfile/index.tsx +3 -2
  187. package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
  188. package/themes/original/src/components/Wallets/index.tsx +3 -4
  189. package/themes/original/src/components/Wallets/styles.tsx +1 -1
  190. package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
  191. package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
  192. package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
  193. package/themes/original/src/components/shared/OButton.tsx +5 -5
  194. package/themes/original/src/components/shared/OInput.tsx +1 -4
  195. package/themes/original/src/components/shared/OModal.tsx +12 -14
  196. package/themes/original/src/layouts/Container.tsx +5 -3
  197. package/themes/original/src/types/index.tsx +1 -0
  198. package/themes/original/src/utils/index.tsx +125 -1
  199. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  200. package/src/navigators/BottomNavigator.tsx +0 -117
  201. package/src/navigators/CheckoutNavigator.tsx +0 -66
  202. package/src/navigators/HomeNavigator.tsx +0 -202
  203. package/src/navigators/NavigationRef.tsx +0 -7
  204. package/src/navigators/RootNavigator.tsx +0 -269
  205. package/src/pages/Account.tsx +0 -34
  206. package/src/pages/AddressForm.tsx +0 -62
  207. package/src/pages/AddressList.tsx +0 -24
  208. package/src/pages/BusinessProductsList.tsx +0 -81
  209. package/src/pages/BusinessesListing.tsx +0 -43
  210. package/src/pages/CartList.tsx +0 -49
  211. package/src/pages/Checkout.tsx +0 -101
  212. package/src/pages/ForgotPassword.tsx +0 -24
  213. package/src/pages/Help.tsx +0 -23
  214. package/src/pages/HelpAccountAndPayment.tsx +0 -23
  215. package/src/pages/HelpGuide.tsx +0 -23
  216. package/src/pages/HelpOrder.tsx +0 -23
  217. package/src/pages/Home.tsx +0 -36
  218. package/src/pages/IntroductoryTutorial.tsx +0 -170
  219. package/src/pages/Login.tsx +0 -47
  220. package/src/pages/MomentOption.tsx +0 -30
  221. package/src/pages/MultiCheckout.tsx +0 -31
  222. package/src/pages/MultiOrdersDetails.tsx +0 -27
  223. package/src/pages/MyOrders.tsx +0 -40
  224. package/src/pages/NetworkError.tsx +0 -24
  225. package/src/pages/NotFound.tsx +0 -22
  226. package/src/pages/OrderDetails.tsx +0 -25
  227. package/src/pages/ProductDetails.tsx +0 -55
  228. package/src/pages/Profile.tsx +0 -36
  229. package/src/pages/ReviewDriver.tsx +0 -30
  230. package/src/pages/ReviewOrder.tsx +0 -32
  231. package/src/pages/ReviewProducts.tsx +0 -30
  232. package/src/pages/Sessions.tsx +0 -22
  233. package/src/pages/Signup.tsx +0 -53
  234. package/src/pages/SpinnerLoader.tsx +0 -10
  235. 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: 15,
117
+ padding: 10,
116
118
  justifyContent: 'center',
117
119
  shadowColor: theme.colors.clear,
118
120
  },
@@ -143,8 +145,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
143
145
 
144
146
  const isCheckoutMultiBusinessEnabled: Boolean = configs?.checkout_multi_business_enabled?.value === '1'
145
147
  const isQuickAddProduct = configs?.add_product_with_one_click?.value === '1'
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) || []
146
149
  const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
147
150
  const isOpenFiltProducts = isOpenSearchBar && !!searchValue
151
+ const filtProductsHeight = Platform.OS === 'ios' ? 65 : 30
148
152
  const viewOrderButtonVisible = !loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0
149
153
 
150
154
  const onRedirect = (route: string, params?: any) => {
@@ -186,12 +190,17 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
186
190
  setOpenService(true)
187
191
  return
188
192
  }
189
- onRedirect('ProductDetails', {
190
- product: product,
191
- businessSlug: business.slug,
192
- businessId: business.id,
193
- productAddedToCartLength
194
- })
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
+ }
195
204
  }
196
205
  events.emit('product_clicked', product)
197
206
  }
@@ -372,6 +381,14 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
372
381
  setViewedCategory(_viewedCategory)
373
382
  events.emit('product_list_viewed', _viewedCategory)
374
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
+ }
375
392
  }
376
393
  }, [business?.lazy_load_products_recommended, selectedCategoryId, categorySelected?.id, viewedCategory])
377
394
 
@@ -386,6 +403,19 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
386
403
  }
387
404
  }, [])
388
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
+
389
419
  return (
390
420
  <>
391
421
  <View style={{ flex: 1, backgroundColor: backgroundColor }}>
@@ -473,8 +503,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
473
503
  {business?.categories?.length > 0 && isOpenFiltProducts && (
474
504
  <FiltProductsContainer
475
505
  style={{
476
- height: Dimensions.get('window').height - (keyboardHeight + (Platform.OS === 'ios' ? 100 : 80)),
477
- top: Platform.OS === 'ios' ? searchBarHeight + 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,
478
508
  }}
479
509
  contentContainerStyle={{ flexGrow: 1 }}
480
510
  >
@@ -512,10 +542,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
512
542
  </View>
513
543
  </FiltProductsContainer>
514
544
  )}
515
- {isOpenFiltProducts && (
516
- <BackgroundGray isIos={Platform.OS === 'ios'} style={{ marginTop: insets.top + 60 }} />
517
- )}
518
- <IOScrollView
545
+ <ScrollView
519
546
  stickyHeaderIndices={[business?.professionals?.length > 0 ? 4 : 3]}
520
547
  style={{
521
548
  ...styles.mainContainer,
@@ -553,7 +580,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
553
580
  />
554
581
  </ProfessionalFilterWrapper>
555
582
  )}
556
- <PageBanner position='app_business_page' navigation={navigation} />
583
+ {businessState?.business?.id && (
584
+ <PageBanner position='app_business_page' businessId={businessState?.business?.id} navigation={navigation} />
585
+ )}
557
586
  <View
558
587
  style={{
559
588
  height: 8,
@@ -581,7 +610,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
581
610
  <>
582
611
  <WrapContent
583
612
  onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
584
- style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
613
+ style={{ paddingHorizontal: 20 }}
585
614
  >
586
615
  <BusinessProductsList
587
616
  categories={[
@@ -638,7 +667,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
638
667
  </WrapContent>
639
668
  </>
640
669
  )}
641
- </IOScrollView>
670
+ {isOpenFiltProducts && (
671
+ <BackgroundGray isIos={Platform.OS === 'ios'} />
672
+ )}
673
+ </ScrollView>
642
674
  {viewOrderButtonVisible && (
643
675
  <View style={{ marginBottom: 0 }}>
644
676
  <FloatingButton
@@ -695,7 +727,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
695
727
  professionalList={business?.professionals}
696
728
  professionalSelected={professionalSelected}
697
729
  handleChangeProfessional={handleChangeProfessionalSelected}
698
- handleChangeProfessional={handleChangeProfessionalSelected}
699
730
  handleUpdateProfessionals={handleUpdateProfessionals}
700
731
  onSave={() => setOpenService(false)}
701
732
  onClose={() => setOpenService(false)}
@@ -709,6 +740,8 @@ export const BusinessProductsListing = (props: BusinessProductsListingParams) =>
709
740
  const businessProductslistingProps = {
710
741
  ...props,
711
742
  isForceSearch: Platform.OS === 'ios',
743
+ isApp: true,
744
+ isFetchAllProducts: true,
712
745
  UIComponent: BusinessProductsListingUI
713
746
  }
714
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: 40px;
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: 30px;
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: 40, paddingVertical: 27 }}>
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: 40 }}>
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 40px;
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: 40px;
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: 40px;
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: 40px;
101
+ padding-horizontal: 20px;
102
102
  `
103
103
 
104
104
  export const PriceWrapper = styled.View`
105
- padding-horizontal: 40px;
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
+ }