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.
Files changed (239) 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 +4 -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/index.tsx +4 -7
  71. package/themes/original/src/components/AddressList/styles.tsx +4 -4
  72. package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
  73. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  74. package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
  75. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
  76. package/themes/original/src/components/BusinessController/index.tsx +20 -12
  77. package/themes/original/src/components/BusinessController/styles.tsx +8 -7
  78. package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
  79. package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
  80. package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
  81. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
  82. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
  83. package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
  84. package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
  85. package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
  86. package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
  87. package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
  88. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  89. package/themes/original/src/components/BusinessProductsListing/index.tsx +51 -20
  90. package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
  91. package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
  92. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  93. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
  94. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
  95. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
  96. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
  97. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +24 -404
  98. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
  99. package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
  100. package/themes/original/src/components/Cart/index.tsx +32 -9
  101. package/themes/original/src/components/CartContent/index.tsx +96 -58
  102. package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
  103. package/themes/original/src/components/Checkout/index.tsx +190 -66
  104. package/themes/original/src/components/Checkout/styles.tsx +17 -0
  105. package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
  106. package/themes/original/src/components/DatePicker/index.tsx +33 -0
  107. package/themes/original/src/components/DatePicker/styles.tsx +20 -0
  108. package/themes/original/src/components/Favorite/index.tsx +4 -9
  109. package/themes/original/src/components/Favorite/styles.tsx +0 -2
  110. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  111. package/themes/original/src/components/GPSButton/index.tsx +1 -1
  112. package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
  113. package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
  114. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
  115. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
  116. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
  117. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
  118. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
  119. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
  120. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
  121. package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
  122. package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
  123. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
  124. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
  125. package/themes/original/src/components/GoogleMap/index.tsx +6 -5
  126. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
  127. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
  128. package/themes/original/src/components/Home/index.tsx +2 -1
  129. package/themes/original/src/components/LastOrder/index.tsx +2 -1
  130. package/themes/original/src/components/LastOrders/index.tsx +2 -1
  131. package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -16
  132. package/themes/original/src/components/Messages/index.tsx +9 -4
  133. package/themes/original/src/components/Messages/styles.tsx +1 -1
  134. package/themes/original/src/components/MomentOption/index.tsx +4 -3
  135. package/themes/original/src/components/MultiCart/index.tsx +1 -1
  136. package/themes/original/src/components/MultiCheckout/index.tsx +208 -21
  137. package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
  138. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
  139. package/themes/original/src/components/MyOrders/index.tsx +24 -29
  140. package/themes/original/src/components/NavBar/index.tsx +3 -1
  141. package/themes/original/src/components/NetworkError/index.tsx +2 -3
  142. package/themes/original/src/components/NetworkError/styles.tsx +2 -2
  143. package/themes/original/src/components/Notifications/index.tsx +4 -8
  144. package/themes/original/src/components/Notifications/styles.tsx +0 -1
  145. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
  146. package/themes/original/src/components/OrderDetails/index.tsx +716 -668
  147. package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
  148. package/themes/original/src/components/OrderProgress/index.tsx +28 -6
  149. package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
  150. package/themes/original/src/components/OrderSummary/index.tsx +3 -1
  151. package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
  152. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
  153. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
  154. package/themes/original/src/components/OrdersOption/index.tsx +3 -5
  155. package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
  156. package/themes/original/src/components/PageBanner/index.tsx +3 -0
  157. package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
  158. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
  159. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  160. package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
  161. package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
  162. package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
  163. package/themes/original/src/components/ProductForm/index.tsx +74 -165
  164. package/themes/original/src/components/ProductItemAccordion/index.tsx +54 -44
  165. package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
  166. package/themes/original/src/components/ProductOptionSubOption/index.tsx +123 -82
  167. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -1
  168. package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
  169. package/themes/original/src/components/Promotions/index.tsx +4 -4
  170. package/themes/original/src/components/Promotions/styles.tsx +0 -2
  171. package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
  172. package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
  173. package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
  174. package/themes/original/src/components/ServiceForm/index.tsx +2 -2
  175. package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
  176. package/themes/original/src/components/SignupForm/index.tsx +60 -58
  177. package/themes/original/src/components/SingleOrderCard/index.tsx +3 -2
  178. package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
  179. package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
  180. package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
  181. package/themes/original/src/components/StripeElementsForm/index.tsx +72 -59
  182. package/themes/original/src/components/StripeElementsForm/naked.tsx +47 -0
  183. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
  184. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
  185. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
  186. package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
  187. package/themes/original/src/components/UserFormDetails/index.tsx +125 -77
  188. package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
  189. package/themes/original/src/components/UserProfile/index.tsx +3 -2
  190. package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
  191. package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
  192. package/themes/original/src/components/Wallets/index.tsx +8 -9
  193. package/themes/original/src/components/Wallets/styles.tsx +1 -1
  194. package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
  195. package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
  196. package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
  197. package/themes/original/src/components/shared/OButton.tsx +5 -5
  198. package/themes/original/src/components/shared/OInput.tsx +1 -4
  199. package/themes/original/src/components/shared/OModal.tsx +12 -14
  200. package/themes/original/src/layouts/Container.tsx +5 -3
  201. package/themes/original/src/types/index.tsx +1 -0
  202. package/themes/original/src/utils/index.tsx +125 -1
  203. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  204. package/src/navigators/BottomNavigator.tsx +0 -117
  205. package/src/navigators/CheckoutNavigator.tsx +0 -66
  206. package/src/navigators/HomeNavigator.tsx +0 -202
  207. package/src/navigators/NavigationRef.tsx +0 -7
  208. package/src/navigators/RootNavigator.tsx +0 -269
  209. package/src/pages/Account.tsx +0 -34
  210. package/src/pages/AddressForm.tsx +0 -62
  211. package/src/pages/AddressList.tsx +0 -24
  212. package/src/pages/BusinessProductsList.tsx +0 -81
  213. package/src/pages/BusinessesListing.tsx +0 -43
  214. package/src/pages/CartList.tsx +0 -49
  215. package/src/pages/Checkout.tsx +0 -101
  216. package/src/pages/ForgotPassword.tsx +0 -24
  217. package/src/pages/Help.tsx +0 -23
  218. package/src/pages/HelpAccountAndPayment.tsx +0 -23
  219. package/src/pages/HelpGuide.tsx +0 -23
  220. package/src/pages/HelpOrder.tsx +0 -23
  221. package/src/pages/Home.tsx +0 -36
  222. package/src/pages/IntroductoryTutorial.tsx +0 -170
  223. package/src/pages/Login.tsx +0 -47
  224. package/src/pages/MomentOption.tsx +0 -30
  225. package/src/pages/MultiCheckout.tsx +0 -31
  226. package/src/pages/MultiOrdersDetails.tsx +0 -27
  227. package/src/pages/MyOrders.tsx +0 -40
  228. package/src/pages/NetworkError.tsx +0 -24
  229. package/src/pages/NotFound.tsx +0 -22
  230. package/src/pages/OrderDetails.tsx +0 -25
  231. package/src/pages/ProductDetails.tsx +0 -55
  232. package/src/pages/Profile.tsx +0 -36
  233. package/src/pages/ReviewDriver.tsx +0 -30
  234. package/src/pages/ReviewOrder.tsx +0 -32
  235. package/src/pages/ReviewProducts.tsx +0 -30
  236. package/src/pages/Sessions.tsx +0 -22
  237. package/src/pages/Signup.tsx +0 -53
  238. package/src/pages/SpinnerLoader.tsx +0 -10
  239. 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
  },
@@ -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' ? 165 : 100
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
- onRedirect('ProductDetails', {
192
- product: product,
193
- businessSlug: business.slug,
194
- businessId: business.id,
195
- productAddedToCartLength
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 ? 55 : 0),
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
- {isOpenFiltProducts && (
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
- <PageBanner position='app_business_page' navigation={navigation} />
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: isChewLayout ? 20 : 40 }}
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
- </IOScrollView>
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: ${(props: any) => props.isIos ? '80%' : '100%'};
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: 40px;
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: 30px;
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: 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
+ }