ordering-ui-react-native 0.15.71 → 0.15.72-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 (220) hide show
  1. package/package.json +7 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/index.tsx +61 -63
  4. package/src/components/ActiveOrders/styles.tsx +1 -1
  5. package/src/components/AddressForm/index.tsx +18 -2
  6. package/src/components/BusinessBasicInformation/index.tsx +11 -19
  7. package/src/components/BusinessController/index.tsx +16 -8
  8. package/src/components/BusinessInformation/index.tsx +14 -0
  9. package/src/components/BusinessTypeFilter/index.tsx +1 -2
  10. package/src/components/BusinessesListing/index.tsx +1 -1
  11. package/src/components/Checkout/index.tsx +25 -3
  12. package/src/components/DriverTips/index.tsx +11 -6
  13. package/src/components/LanguageSelector/index.tsx +6 -2
  14. package/src/components/LoginForm/index.tsx +120 -30
  15. package/src/components/LoginForm/styles.tsx +6 -0
  16. package/src/components/NotificationSetting/index.tsx +85 -0
  17. package/src/components/OrderDetails/index.tsx +7 -21
  18. package/src/components/PaymentOptions/index.tsx +335 -365
  19. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  20. package/src/components/ReviewDriver/index.tsx +1 -1
  21. package/src/components/ReviewOrder/index.tsx +2 -1
  22. package/src/components/ReviewProducts/index.tsx +11 -0
  23. package/src/components/SignupForm/index.tsx +145 -61
  24. package/src/components/SingleProductCard/index.tsx +16 -4
  25. package/src/components/SingleProductReview/index.tsx +1 -1
  26. package/src/components/StripeElementsForm/index.tsx +25 -16
  27. package/src/components/StripeMethodForm/index.tsx +22 -24
  28. package/src/components/UpsellingProducts/index.tsx +1 -1
  29. package/src/components/UserProfileForm/index.tsx +63 -6
  30. package/src/components/UserProfileForm/styles.tsx +8 -0
  31. package/src/components/VerifyPhone/styles.tsx +1 -2
  32. package/src/components/shared/OBottomPopup.tsx +6 -2
  33. package/src/components/shared/OModal.tsx +1 -1
  34. package/src/hooks/useCountdownTimer.tsx +26 -0
  35. package/src/index.tsx +2 -0
  36. package/src/navigators/CheckoutNavigator.tsx +6 -0
  37. package/src/navigators/HomeNavigator.tsx +12 -0
  38. package/src/pages/BusinessesListing.tsx +7 -6
  39. package/src/pages/MultiCheckout.tsx +31 -0
  40. package/src/pages/MultiOrdersDetails.tsx +27 -0
  41. package/src/pages/OrderDetails.tsx +1 -1
  42. package/src/pages/ReviewDriver.tsx +2 -2
  43. package/src/pages/ReviewOrder.tsx +2 -2
  44. package/src/pages/Sessions.tsx +22 -0
  45. package/src/theme.json +0 -1
  46. package/src/types/index.tsx +18 -11
  47. package/src/utils/index.tsx +68 -2
  48. package/themes/business/index.tsx +4 -0
  49. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
  50. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
  51. package/themes/business/src/components/Chat/index.tsx +51 -91
  52. package/themes/business/src/components/DriverMap/index.tsx +6 -5
  53. package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
  54. package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
  55. package/themes/business/src/components/LoginForm/index.tsx +89 -2
  56. package/themes/business/src/components/LoginForm/styles.tsx +6 -0
  57. package/themes/business/src/components/LogoutButton/index.tsx +1 -1
  58. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -13
  59. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  60. package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
  61. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +14 -7
  62. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
  63. package/themes/business/src/components/OrdersListManager/index.tsx +11 -4
  64. package/themes/business/src/components/OrdersOption/index.tsx +16 -4
  65. package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
  66. package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
  67. package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
  68. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  69. package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
  70. package/themes/business/src/components/shared/OModal.tsx +41 -38
  71. package/themes/business/src/types/index.tsx +14 -7
  72. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  73. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  74. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  75. package/themes/kiosk/src/components/BusinessMenu/index.tsx +39 -28
  76. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
  77. package/themes/kiosk/src/components/Cart/index.tsx +11 -12
  78. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
  79. package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
  80. package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
  81. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
  82. package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
  83. package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
  84. package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
  85. package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
  86. package/themes/kiosk/src/components/NavBar/index.tsx +29 -20
  87. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  88. package/themes/kiosk/src/components/OrderDetails/index.tsx +32 -27
  89. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
  90. package/themes/kiosk/src/components/PaymentOptions/index.tsx +56 -54
  91. package/themes/kiosk/src/components/ProductForm/index.tsx +7 -8
  92. package/themes/kiosk/src/components/ProductItemAccordion/index.tsx +2 -2
  93. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -1
  94. package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
  95. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
  96. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  97. package/themes/kiosk/src/types/index.d.ts +1 -0
  98. package/themes/original/index.tsx +24 -0
  99. package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
  100. package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
  101. package/themes/original/src/components/AddressForm/index.tsx +7 -6
  102. package/themes/original/src/components/AddressList/index.tsx +30 -18
  103. package/themes/original/src/components/AppleLogin/index.tsx +6 -8
  104. package/themes/original/src/components/BusinessBasicInformation/index.tsx +287 -150
  105. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  106. package/themes/original/src/components/BusinessController/index.tsx +201 -96
  107. package/themes/original/src/components/BusinessController/styles.tsx +5 -0
  108. package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
  109. package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
  110. package/themes/original/src/components/BusinessListingSearch/index.tsx +231 -63
  111. package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
  112. package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
  113. package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
  114. package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
  115. package/themes/original/src/components/BusinessProductsList/index.tsx +70 -52
  116. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  117. package/themes/original/src/components/BusinessProductsListing/index.tsx +339 -153
  118. package/themes/original/src/components/BusinessProductsListing/styles.tsx +33 -0
  119. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  120. package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -39
  121. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
  122. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +560 -0
  123. package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
  124. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +671 -0
  125. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
  126. package/themes/original/src/components/BusinessesListing/index.tsx +103 -458
  127. package/themes/original/src/components/Cart/index.tsx +93 -43
  128. package/themes/original/src/components/Cart/styles.tsx +4 -0
  129. package/themes/original/src/components/Checkout/index.tsx +90 -39
  130. package/themes/original/src/components/DriverTips/index.tsx +17 -12
  131. package/themes/original/src/components/Favorite/index.tsx +92 -0
  132. package/themes/original/src/components/Favorite/styles.tsx +22 -0
  133. package/themes/original/src/components/FavoriteList/index.tsx +298 -0
  134. package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
  135. package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
  136. package/themes/original/src/components/GPSButton/index.tsx +15 -8
  137. package/themes/original/src/components/GoogleMap/index.tsx +11 -11
  138. package/themes/original/src/components/Help/index.tsx +21 -4
  139. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
  140. package/themes/original/src/components/LastOrders/index.tsx +12 -1
  141. package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
  142. package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
  143. package/themes/original/src/components/LoginForm/index.tsx +332 -164
  144. package/themes/original/src/components/LoginForm/styles.tsx +1 -3
  145. package/themes/original/src/components/MessageListing/index.tsx +10 -1
  146. package/themes/original/src/components/Messages/index.tsx +1 -1
  147. package/themes/original/src/components/MomentSelector/index.tsx +197 -0
  148. package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
  149. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
  150. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
  151. package/themes/original/src/components/MultiCheckout/index.tsx +298 -0
  152. package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
  153. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
  154. package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
  155. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
  156. package/themes/original/src/components/MyOrders/index.tsx +120 -32
  157. package/themes/original/src/components/MyOrders/styles.tsx +8 -1
  158. package/themes/original/src/components/NavBar/index.tsx +4 -4
  159. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  160. package/themes/original/src/components/OrderDetails/index.tsx +148 -63
  161. package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
  162. package/themes/original/src/components/OrderItAgain/index.tsx +72 -0
  163. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  164. package/themes/original/src/components/OrderSummary/index.tsx +5 -5
  165. package/themes/original/src/components/OrderTypeSelector/index.tsx +79 -35
  166. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  167. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
  168. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
  169. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
  170. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
  171. package/themes/original/src/components/OrdersOption/index.tsx +137 -38
  172. package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
  173. package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
  174. package/themes/original/src/components/PaymentOptionWallet/index.tsx +17 -23
  175. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
  176. package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
  177. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  178. package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
  179. package/themes/original/src/components/ProductForm/index.tsx +719 -680
  180. package/themes/original/src/components/ProductForm/styles.tsx +9 -7
  181. package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
  182. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  183. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
  184. package/themes/original/src/components/ProfessionalFilter/index.tsx +128 -0
  185. package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
  186. package/themes/original/src/components/ProfessionalProfile/index.tsx +298 -0
  187. package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
  188. package/themes/original/src/components/Promotions/index.tsx +151 -133
  189. package/themes/original/src/components/Promotions/styles.tsx +2 -1
  190. package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
  191. package/themes/original/src/components/ReviewOrder/index.tsx +1 -1
  192. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  193. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  194. package/themes/original/src/components/SearchBar/index.tsx +13 -5
  195. package/themes/original/src/components/ServiceForm/index.tsx +579 -0
  196. package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
  197. package/themes/original/src/components/Sessions/index.tsx +160 -0
  198. package/themes/original/src/components/Sessions/styles.tsx +15 -0
  199. package/themes/original/src/components/SignupForm/index.tsx +237 -126
  200. package/themes/original/src/components/SingleOrderCard/index.tsx +316 -0
  201. package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
  202. package/themes/original/src/components/SingleProductCard/index.tsx +214 -90
  203. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
  204. package/themes/original/src/components/StripeElementsForm/index.tsx +25 -9
  205. package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
  206. package/themes/original/src/components/UpsellingProducts/index.tsx +86 -74
  207. package/themes/original/src/components/UserDetails/index.tsx +32 -18
  208. package/themes/original/src/components/UserFormDetails/index.tsx +102 -66
  209. package/themes/original/src/components/UserProfile/index.tsx +10 -1
  210. package/themes/original/src/components/UserProfileForm/index.tsx +32 -25
  211. package/themes/original/src/components/UserVerification/index.tsx +178 -192
  212. package/themes/original/src/components/Wallets/index.tsx +25 -12
  213. package/themes/original/src/components/shared/OBottomPopup.tsx +44 -13
  214. package/themes/original/src/components/shared/OButton.tsx +2 -0
  215. package/themes/original/src/components/shared/OInput.tsx +3 -2
  216. package/themes/original/src/components/shared/OModal.tsx +4 -2
  217. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  218. package/themes/original/src/types/index.tsx +203 -35
  219. package/themes/original/src/utils/index.tsx +94 -1
  220. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -8,7 +8,7 @@ import {
8
8
  useValidationFields,
9
9
  } from 'ordering-components/native';
10
10
  import { useTheme } from 'styled-components/native';
11
- import { CContainer, CheckoutAction, Divider } from './styles';
11
+ import { CContainer, CheckoutAction, Divider, DriverTipsContainer } from './styles';
12
12
 
13
13
  import { OSBill, OSTable, OSCoupon, OSTotal, OSRow } from '../OrderSummary/styles';
14
14
 
@@ -25,6 +25,7 @@ import { TaxInformation } from '../TaxInformation';
25
25
  import { CartStoresListing } from '../CartStoresListing';
26
26
  import { OAlert } from '../../../../../src/components/shared'
27
27
  import { PlaceSpot } from '../PlaceSpot'
28
+ import { DriverTips } from '../DriverTips'
28
29
 
29
30
  const CartUI = (props: any) => {
30
31
  const {
@@ -39,7 +40,8 @@ const CartUI = (props: any) => {
39
40
  handleChangeComment,
40
41
  commentState,
41
42
  onNavigationRedirect,
42
- handleRemoveOfferClick
43
+ handleRemoveOfferClick,
44
+ isMultiCheckout
43
45
  } = props
44
46
 
45
47
  const theme = useTheme();
@@ -59,10 +61,15 @@ const CartUI = (props: any) => {
59
61
 
60
62
  const isCartPending = cart?.status === 2
61
63
  const isCouponEnabled = validationFields?.fields?.checkout?.coupon?.enabled
64
+ const isCheckoutMultiBusinessEnabled: Boolean = configs?.checkout_multi_business_enabled?.value === '1'
62
65
 
63
66
  const business: any = (orderState?.carts && Object.values(orderState.carts).find((_cart: any) => _cart?.uuid === props.cartuuid)) ?? {}
64
67
  const businessId = business?.business_id ?? null
65
- const placeSpotTypes = [3, 4]
68
+ const placeSpotTypes = [4]
69
+
70
+ const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
71
+ ? JSON.parse(configs?.driver_tip_options?.value) || []
72
+ : configs?.driver_tip_options?.value || []
66
73
 
67
74
  const momentFormatted = !orderState?.option?.moment
68
75
  ? t('RIGHT_NOW', 'Right Now')
@@ -96,17 +103,23 @@ const CartUI = (props: any) => {
96
103
  const handleUpsellingPage = () => {
97
104
  setOpenUpselling(false)
98
105
  setCanOpenUpselling(false)
99
- props.onNavigationRedirect('CheckoutNavigator', {
100
- screen: 'CheckoutPage',
101
- cartUuid: cart?.uuid,
102
- businessLogo: cart?.business?.logo,
103
- businessName: cart?.business?.name,
104
- cartTotal: cart?.total
105
- })
106
+ if (isCheckoutMultiBusinessEnabled) {
107
+ props.onNavigationRedirect('CheckoutNavigator', {
108
+ screen: 'MultiCheckout'
109
+ })
110
+ } else {
111
+ props.onNavigationRedirect('CheckoutNavigator', {
112
+ screen: 'CheckoutPage',
113
+ cartUuid: cart?.uuid,
114
+ businessLogo: cart?.business?.logo,
115
+ businessName: cart?.business?.name,
116
+ cartTotal: cart?.total
117
+ })
118
+ }
106
119
  }
107
120
 
108
121
  const getIncludedTaxes = () => {
109
- if (cart?.taxes === null) {
122
+ if (cart?.taxes === null || !cart?.taxes) {
110
123
  return cart.business.tax_type === 1 ? cart?.tax : 0
111
124
  } else {
112
125
  return cart?.taxes.reduce((taxIncluded: number, tax: any) => {
@@ -162,13 +175,14 @@ const CartUI = (props: any) => {
162
175
  handleClearProducts={handleClearProducts}
163
176
  handleCartOpen={handleCartOpen}
164
177
  onNavigationRedirect={props.onNavigationRedirect}
165
- handleChangeStore={props.isFranchiseApp ? () => setOpenChangeStore(true) : null}
178
+ handleChangeStore={() => setOpenChangeStore(true)}
166
179
  handleClickCheckout={() => setOpenUpselling(true)}
167
180
  checkoutButtonDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
181
+ isMultiCheckout={isMultiCheckout}
168
182
  >
169
- {cart?.products?.length > 0 && cart?.products.map((product: any) => (
183
+ {cart?.products?.length > 0 && cart?.products.map((product: any, i: number) => (
170
184
  <ProductItemAccordion
171
- key={product.code}
185
+ key={`${product.code}_${i}`}
172
186
  isCartPending={isCartPending}
173
187
  isCartProduct
174
188
  product={product}
@@ -202,8 +216,8 @@ const CartUI = (props: any) => {
202
216
  </OSTable>
203
217
  )}
204
218
  {
205
- cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 1)?.map((offer: any) => (
206
- <OSTable key={offer.id}>
219
+ cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 1)?.map((offer: any, i: number) => (
220
+ <OSTable key={`${offer.id}_${i}`}>
207
221
  <OSRow>
208
222
  <OText size={12} lineHeight={18}>{offer.name}</OText>
209
223
  {offer.rate_type === 1 && (
@@ -234,8 +248,8 @@ const CartUI = (props: any) => {
234
248
  </OSTable>
235
249
  )}
236
250
  {
237
- cart.taxes?.length > 0 && cart.taxes.filter((tax: any) => tax.type === 2 && tax?.rate !== 0).map((tax: any) => (
238
- <OSTable key={tax.id}>
251
+ cart.taxes?.length > 0 && cart.taxes.filter((tax: any) => tax.type === 2 && tax?.rate !== 0).map((tax: any, i: number) => (
252
+ <OSTable key={`${tax.id}_${i}`}>
239
253
  <OSRow>
240
254
  <OText size={12} lineHeight={18} numberOfLines={1} >
241
255
  {tax.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
@@ -250,8 +264,8 @@ const CartUI = (props: any) => {
250
264
  ))
251
265
  }
252
266
  {
253
- cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any) => (
254
- <OSTable key={fee?.id}>
267
+ cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any, i: number) => (
268
+ <OSTable key={`${fee.id}_${i}`}>
255
269
  <OSRow>
256
270
  <OText size={12} lineHeight={18} numberOfLines={1}>
257
271
  {fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
@@ -293,8 +307,8 @@ const CartUI = (props: any) => {
293
307
  </OSTable>
294
308
  )}
295
309
  {
296
- cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 2)?.map((offer: any) => (
297
- <OSTable key={offer.id}>
310
+ cart?.offers?.length > 0 && cart?.offers?.filter((offer: any) => offer?.target === 2)?.map((offer: any, i: number) => (
311
+ <OSTable key={`${offer.id}_${i}`}>
298
312
  <OSRow>
299
313
  <OText size={12} lineHeight={18}>{offer.name}</OText>
300
314
  {offer.rate_type === 1 && (
@@ -346,13 +360,39 @@ const CartUI = (props: any) => {
346
360
  </OSTable>
347
361
  )}
348
362
 
363
+ {isMultiCheckout &&
364
+ cart &&
365
+ cart?.valid &&
366
+ orderState?.options?.type === 1 &&
367
+ cart?.status !== 2 &&
368
+ validationFields?.fields?.checkout?.driver_tip?.enabled &&
369
+ driverTipsOptions && driverTipsOptions?.length > 0 &&
370
+ (
371
+ <DriverTipsContainer>
372
+ <OText size={14} lineHeight={20} color={theme.colors.textNormal}>
373
+ {t('DRIVER_TIPS', 'Driver Tips')}
374
+ </OText>
375
+ <DriverTips
376
+ uuid={cart?.uuid}
377
+ businessId={cart?.business_id}
378
+ driverTipsOptions={driverTipsOptions}
379
+ isFixedPrice={parseInt(configs?.driver_tip_type?.value, 10) === 1 || !!parseInt(configs?.driver_tip_use_custom?.value, 10)}
380
+ isDriverTipUseCustom={!!parseInt(configs?.driver_tip_use_custom?.value, 10)}
381
+ driverTip={parseInt(configs?.driver_tip_type?.value, 10) === 1 || !!parseInt(configs?.driver_tip_use_custom?.value, 10)
382
+ ? cart?.driver_tip
383
+ : cart?.driver_tip_rate}
384
+ useOrderContext
385
+ />
386
+ </DriverTipsContainer>
387
+ )}
388
+
349
389
  <OSTotal>
350
390
  <OSTable style={{ marginTop: 15 }}>
351
391
  <OText size={14} lineHeight={21} weight={'600'}>
352
392
  {t('TOTAL', 'Total')}
353
393
  </OText>
354
394
  <OText size={14} lineHeight={21} weight={'600'}>
355
- {parsePrice(cart?.total >= 0 ? cart?.total : 0)}
395
+ {parsePrice(cart?.balance >= 0 ? cart?.balance : 0)}
356
396
  </OText>
357
397
  </OSTable>
358
398
  </OSTotal>
@@ -409,30 +449,40 @@ const CartUI = (props: any) => {
409
449
  )}
410
450
  </OSBill>
411
451
  )}
412
- {cart?.valid_products && (
413
- <CheckoutAction>
414
- <OButton
415
- text={(cart?.subtotal >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
416
- !openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')
417
- ) : !cart?.valid_address ? (
418
- `${t('OUT_OF_COVERAGE', 'Out of Coverage')}`
419
- ) : (
420
- `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
421
- )}
422
- bgColor={(cart?.subtotal < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
423
- isDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
424
- borderColor={theme.colors.primary}
425
- imgRightSrc={null}
426
- textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
427
- onClick={() => setOpenUpselling(true)}
428
- style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
429
- />
430
- </CheckoutAction>
452
+ {!isMultiCheckout && (
453
+ <>
454
+ {cart?.valid_products ? (
455
+ <CheckoutAction>
456
+ <OButton
457
+ text={(cart?.subtotal >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
458
+ !openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')
459
+ ) : !cart?.valid_address ? (
460
+ `${t('OUT_OF_COVERAGE', 'Out of Coverage')}`
461
+ ) : (
462
+ `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
463
+ )}
464
+ bgColor={(cart?.subtotal < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
465
+ isDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
466
+ borderColor={theme.colors.primary}
467
+ imgRightSrc={null}
468
+ textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
469
+ onClick={() => setOpenUpselling(true)}
470
+ style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
471
+ />
472
+ </CheckoutAction>
473
+ ) : (
474
+ <View style={{ alignItems: 'center', width: '100%' }}>
475
+ <OText size={12} color={theme.colors.red} style={{ textAlign: 'center', marginTop: 5 }}>
476
+ {t('WARNING_INVALID_PRODUCTS_CHECKOUT', 'To continue with your checkout, please remove from your cart the products that are not available.')}
477
+ </OText>
478
+ </View>
479
+ )}
480
+ </>
431
481
  )}
432
482
  </BusinessItemAccordion>
433
483
 
434
484
  <OModal
435
- open={openChangeStore && props.isFranchiseApp}
485
+ open={openChangeStore}
436
486
  entireModal
437
487
  customClose
438
488
  onClose={() => setOpenChangeStore(false)}
@@ -33,3 +33,7 @@ export const Divider = styled.View`
33
33
  margin-top: 5px;
34
34
  margin-bottom: 10px;
35
35
  `
36
+
37
+ export const DriverTipsContainer = styled.View`
38
+ padding: 5px 0;
39
+ `
@@ -113,7 +113,14 @@ const CheckoutUI = (props: any) => {
113
113
  right: Platform.OS === 'ios' ? 5 : (I18nManager.isRTL ? 30 : 0),
114
114
  position: 'absolute',
115
115
  fontSize: 20
116
- }
116
+ },
117
+ detailWrapper: {
118
+ paddingHorizontal: 40,
119
+ width: '100%'
120
+ },
121
+ wrapperNavbar: Platform.OS === 'ios'
122
+ ? { paddingVertical: 0, paddingHorizontal: 40 }
123
+ : { paddingVertical: 20, paddingHorizontal: 40 }
117
124
  })
118
125
 
119
126
  const [, { showToast }] = useToast();
@@ -133,11 +140,23 @@ const CheckoutUI = (props: any) => {
133
140
  const [isDeliveryOptionModalVisible, setIsDeliveryOptionModalVisible] = useState(false)
134
141
  const [showGateway, setShowGateway] = useState<any>({ closedByUsed: false, open: false });
135
142
  const [webviewPaymethod, setWebviewPaymethod] = useState<any>(null)
136
-
137
- const placeSpotTypes = [3, 4]
138
- const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
143
+ const [isOpen, setIsOpen] = useState(false)
144
+ const [requiredFields, setRequiredFields] = useState<any>([])
145
+
146
+ const placeSpotTypes = [4]
147
+ const businessConfigs = businessDetails?.business?.configs ?? []
148
+ const isWalletCashEnabled = businessConfigs.find((config: any) => config.key === 'wallet_cash_enabled')?.value === '1'
149
+ const isWalletCreditPointsEnabled = businessConfigs.find((config: any) => config.key === 'wallet_credit_point_enabled')?.value === '1'
150
+ const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletCreditPointsEnabled)
151
+ const isBusinessChangeEnabled = configs?.cart_change_business_validation?.value === '1'
152
+
139
153
  const isPreOrder = configs?.preorder_status_enabled?.value === '1'
140
- const isDisabledButtonPlace = loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash || cart?.subtotal < cart?.minimum || (placeSpotTypes.includes(options?.type) && !cart?.place)
154
+ const isDisabledButtonPlace = loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash ||
155
+ cart?.subtotal < cart?.minimum || (placeSpotTypes.includes(options?.type) && !cart?.place) ||
156
+ (options.type === 1 &&
157
+ validationFields?.fields?.checkout?.driver_tip?.enabled &&
158
+ validationFields?.fields?.checkout?.driver_tip?.required &&
159
+ (Number(cart?.driver_tip) <= 0))
141
160
 
142
161
  const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
143
162
  ? JSON.parse(configs?.driver_tip_options?.value) || []
@@ -159,9 +178,13 @@ const CheckoutUI = (props: any) => {
159
178
  }
160
179
  }
161
180
 
162
- const handlePlaceOrder = () => {
163
- if (!userErrors.length) {
164
- handlerClickPlaceOrder && handlerClickPlaceOrder()
181
+ const handlePlaceOrder = (confirmPayment: any) => {
182
+ if (!userErrors.length && !requiredFields?.length) {
183
+ handlerClickPlaceOrder && handlerClickPlaceOrder(null, null, confirmPayment)
184
+ return
185
+ }
186
+ if (requiredFields?.length) {
187
+ setIsOpen(true)
165
188
  return
166
189
  }
167
190
  let stringError = ''
@@ -191,11 +214,12 @@ const CheckoutUI = (props: any) => {
191
214
  setUserErrors([])
192
215
  const errors = []
193
216
  const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes']
217
+ const _requiredFields: any = []
194
218
 
195
219
  Object.values(validationFields?.fields?.checkout).map((field: any) => {
196
- if (field?.required && !notFields.includes(field.code)) {
220
+ if (field?.required && !notFields.includes(field.code) && field?.enabled) {
197
221
  if (!user[field?.code]) {
198
- errors.push(t(`VALIDATION_ERROR_${field.code.toUpperCase()}_REQUIRED`, `The field ${field?.name} is required`))
222
+ _requiredFields.push(field?.code)
199
223
  }
200
224
  }
201
225
  })
@@ -206,8 +230,9 @@ const CheckoutUI = (props: any) => {
206
230
  validationFields?.fields?.checkout?.cellphone?.required) ||
207
231
  configs?.verification_phone_required?.value === '1')
208
232
  ) {
209
- errors.push(t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Phone number is required'))
233
+ _requiredFields.push('cellphone')
210
234
  }
235
+ setRequiredFields(_requiredFields)
211
236
 
212
237
  if (phoneUpdate) {
213
238
  errors.push(t('NECESSARY_UPDATE_COUNTRY_PHONE_CODE', 'It is necessary to update your phone number'))
@@ -239,7 +264,7 @@ const CheckoutUI = (props: any) => {
239
264
 
240
265
  useEffect(() => {
241
266
  if (cart?.products?.length === 0) {
242
- navigation?.canGoBack() && navigation.goBack();
267
+ onNavigationRedirect('Business', { store: cart?.business?.slug, header: null, logo: null })
243
268
  }
244
269
  }, [cart?.products])
245
270
 
@@ -250,13 +275,18 @@ const CheckoutUI = (props: any) => {
250
275
  return (
251
276
  <>
252
277
  <Container noPadding>
253
- <NavBar
254
- isVertical
255
- onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
256
- title={t('CHECKOUT', 'Checkout')}
257
- titleStyle={{ marginLeft: 0, marginRight: 0, paddingLeft: 40 }}
258
- btnStyle={{ marginLeft: 40, padding: 40 }}
259
- />
278
+ <View style={styles.wrapperNavbar}>
279
+ <NavBar
280
+ title={t('CHECKOUT', 'Checkout')}
281
+ titleAlign={'center'}
282
+ onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
283
+ showCall={false}
284
+ btnStyle={{ paddingLeft: 0 }}
285
+ style={{ marginTop: Platform.OS === 'ios' ? 0 : 30 }}
286
+ titleWrapStyle={{ paddingHorizontal: 0 }}
287
+ titleStyle={{ marginRight: 0, marginLeft: 0 }}
288
+ />
289
+ </View>
260
290
  <ChContainer style={styles.pagePadding}>
261
291
  <ChSection style={{ paddingTop: 0 }}>
262
292
  <ChHeader>
@@ -597,7 +627,7 @@ const CheckoutUI = (props: any) => {
597
627
  </OText>
598
628
  </TouchableOpacity>
599
629
  </CartHeader>
600
- {props.isFranchiseApp && (
630
+ {isBusinessChangeEnabled && (
601
631
  <TouchableOpacity
602
632
  onPress={() => setOpenChangeStore(true)}
603
633
  style={{ alignSelf: 'flex-start' }}
@@ -616,6 +646,7 @@ const CheckoutUI = (props: any) => {
616
646
  cart={cart}
617
647
  isCartPending={cart?.status === 2}
618
648
  onNavigationRedirect={onNavigationRedirect}
649
+ placeSpotTypes={placeSpotTypes}
619
650
  />
620
651
  </>
621
652
  )}
@@ -625,7 +656,7 @@ const CheckoutUI = (props: any) => {
625
656
 
626
657
  {!cartState.loading && cart && (
627
658
  <View>
628
- <ChErrors style={{ marginBottom: 0 }}>
659
+ <ChErrors style={{ marginBottom: 10 }}>
629
660
  {!cart?.valid_address && cart?.status !== 2 && (
630
661
  <OText
631
662
  color={theme.colors.error}
@@ -649,7 +680,7 @@ const CheckoutUI = (props: any) => {
649
680
  color={theme.colors.error}
650
681
  size={12}
651
682
  >
652
- {t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')}
683
+ {t('WARNING_INVALID_PRODUCTS_CHECKOUT', 'To continue with your checkout, please remove from your cart the products that are not available.')}
653
684
  </OText>
654
685
  )}
655
686
  {placeSpotTypes.includes(options?.type) && !cart?.place && (
@@ -660,11 +691,22 @@ const CheckoutUI = (props: any) => {
660
691
  {t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')}
661
692
  </OText>
662
693
  )}
694
+ {options.type === 1 &&
695
+ validationFields?.fields?.checkout?.driver_tip?.enabled &&
696
+ validationFields?.fields?.checkout?.driver_tip?.required &&
697
+ (Number(cart?.driver_tip) <= 0) && (
698
+ <OText
699
+ color={theme.colors.error}
700
+ size={12}
701
+ >
702
+ {t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.')}
703
+ </OText>
704
+ )}
663
705
  </ChErrors>
664
706
  </View>
665
707
  )}
666
708
  <OModal
667
- open={openChangeStore && props.isFranchiseApp}
709
+ open={openChangeStore}
668
710
  entireModal
669
711
  customClose
670
712
  onClose={() => setOpenChangeStore(false)}
@@ -674,11 +716,33 @@ const CheckoutUI = (props: any) => {
674
716
  onClose={() => setOpenChangeStore(false)}
675
717
  />
676
718
  </OModal>
719
+ <OModal
720
+ open={isOpen}
721
+ onClose={() => setIsOpen(false)}
722
+ >
723
+ <View style={styles.detailWrapper}>
724
+ <UserDetails
725
+ isUserDetailsEdit
726
+ cartStatus={cart?.status}
727
+ businessId={cart?.business_id}
728
+ useValidationFields
729
+ useDefualtSessionManager
730
+ useSessionUser
731
+ isCheckout
732
+ isEdit
733
+ phoneUpdate={phoneUpdate}
734
+ togglePhoneUpdate={togglePhoneUpdate}
735
+ requiredFields={requiredFields}
736
+ hideUpdateButton
737
+ onClose={() => setIsOpen(false)}
738
+ />
739
+ </View>
740
+ </OModal>
677
741
  </ChContainer>
678
742
  </Container>
679
743
  {!cartState.loading && cart && cart?.status !== 2 && (
680
744
  <FloatingButton
681
- handleClick={() => handlePlaceOrder()}
745
+ handleClick={() => handlePlaceOrder(null)}
682
746
  isSecondaryBtn={isDisabledButtonPlace}
683
747
  disabled={isDisabledButtonPlace}
684
748
  btnText={cart?.subtotal >= cart?.minimum
@@ -692,7 +756,7 @@ const CheckoutUI = (props: any) => {
692
756
  : (`${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`)
693
757
  }
694
758
  btnRightValueShow
695
- btnRightValue={parsePrice(cart?.total)}
759
+ btnRightValue={parsePrice(cart?.balance)}
696
760
  iosBottom={30}
697
761
  />
698
762
  )}
@@ -708,19 +772,6 @@ const CheckoutUI = (props: any) => {
708
772
  setShowGateway={setShowGateway}
709
773
  />
710
774
  )}
711
- {webviewPaymethod?.gateway === 'square' && showGateway.open && (
712
- <PaymentOptionsWebView
713
- onNavigationRedirect={onNavigationRedirect}
714
- uri={`https://test-square-f50f7.web.app`}
715
- user={user}
716
- token={token}
717
- cart={cart}
718
- currency={currency}
719
- webviewPaymethod={webviewPaymethod}
720
- setShowGateway={setShowGateway}
721
- locationId={'L1NGAY5M6KJRX'}
722
- />
723
- )}
724
775
  </>
725
776
  )
726
777
  }
@@ -873,7 +924,7 @@ export const Checkout = (props: any) => {
873
924
  ...props,
874
925
  UIComponent: CheckoutUI,
875
926
  cartState,
876
- [props.isFranchiseApp ? 'uuid' : 'businessId']: props.isFranchiseApp ? cartUuid : cartState.cart?.business_id
927
+ uuid: cartUuid
877
928
  }
878
929
 
879
930
  return (
@@ -48,22 +48,28 @@ const DriverTipsUI = (props: any) => {
48
48
  }
49
49
  })
50
50
 
51
- const [value, setvalue] = useState(0);
51
+ const [value, setvalue] = useState('');
52
52
 
53
53
  const placeholderCurrency = (configs?.currency_position?.value || 'left') === 'left'
54
54
  ? `${configs?.format_number_currency?.value}0`
55
55
  : `0${configs?.format_number_currency?.value}`
56
56
 
57
57
  const handleChangeDriverTip = (val: any) => {
58
- let tip = parseFloat(val)
59
- tip = isNaN(tip) ? 0 : tip
60
- setvalue(tip)
58
+ const tip = Number(val)
59
+ if ((isNaN(tip) || tip < 0)) {
60
+ setvalue(value)
61
+ return
62
+ }
63
+ setvalue(val)
61
64
  }
62
-
65
+
63
66
  return (
64
67
  <DTContainer>
68
+ <DTLabel>
69
+ {t('CUSTOM_DRIVER_TIP_MESSAGE', '100% of these tips go directly to your driver')}
70
+ </DTLabel>
65
71
  <DTWrapperTips>
66
- {driverTipsOptions.map((option: any, i: number) => (
72
+ {!isDriverTipUseCustom && driverTipsOptions.map((option: any, i: number) => (
67
73
  <TouchableOpacity
68
74
  key={i}
69
75
  onPress={() => handlerChangeOption(option)}
@@ -79,7 +85,7 @@ const DriverTipsUI = (props: any) => {
79
85
  </TouchableOpacity>
80
86
  ))}
81
87
  </DTWrapperTips>
82
- {!driverTipsOptions.includes(driverTip) && driverTip > 0 && (
88
+ {(!isDriverTipUseCustom && !driverTipsOptions.includes(driverTip) && driverTip > 0) && (
83
89
  <OText
84
90
  color={theme.colors.error}
85
91
  size={16}
@@ -90,13 +96,12 @@ const DriverTipsUI = (props: any) => {
90
96
  )}
91
97
  {isDriverTipUseCustom && (
92
98
  <DTForm>
93
- <DTLabel>
94
- {t('CUSTOM_DRIVER_TIP_MESSAGE', '100% of these tips go directly to your driver')}
95
- </DTLabel>
96
99
  <DTWrapperInput>
97
100
  <OInput
98
101
  placeholder={placeholderCurrency}
99
102
  style={style.inputStyle}
103
+ value={value}
104
+ type={'numeric'}
100
105
  onChange={handleChangeDriverTip}
101
106
  autoCapitalize='none'
102
107
  autoCorrect={false}
@@ -108,10 +113,10 @@ const DriverTipsUI = (props: any) => {
108
113
  textStyle={{ color: 'white', fontSize: 14 }}
109
114
  imgRightSrc={null}
110
115
  style={{ borderRadius: 5, height: 44 }}
111
- isDisabled={!(value > 0 && value !== driverTip) || !value}
116
+ isDisabled={parseFloat(value || '0') < 0 || parseFloat(value || '0') === driverTip || value === ''}
112
117
  onClick={() => {
113
118
  handlerChangeOption(value)
114
- setvalue(0)
119
+ setvalue('')
115
120
  }}
116
121
  />
117
122
  </DTWrapperInput>
@@ -0,0 +1,92 @@
1
+ import React, { useState } from 'react'
2
+ import { useLanguage, useOrder } from 'ordering-components/native'
3
+ import { useTheme } from 'styled-components/native'
4
+ import { FavoriteList } from '../FavoriteList'
5
+ import NavBar from '../NavBar'
6
+ import { OText } from '../shared'
7
+
8
+ import {
9
+ TabContainer,
10
+ Tab,
11
+ Container
12
+ } from './styles'
13
+
14
+ export const Favorite = (props: any) => {
15
+ const {
16
+ navigation
17
+ } = props
18
+ const [, t] = useLanguage()
19
+ const theme = useTheme()
20
+ const [orderState] = useOrder()
21
+ const [tabSelected, setTabSelected] = useState('businesses')
22
+
23
+ const tabList = [
24
+ { key: 'businesses', name: t('BUSINESSES', 'Businesses') },
25
+ { key: 'products', name: t('PRODUCTS', 'Products') },
26
+ { key: 'orders', name: t('ORDERS', 'Orders') }
27
+ ]
28
+
29
+ const goToBack = () => navigation?.canGoBack() && navigation.goBack()
30
+
31
+ const onRedirect = (route: string, params?: any) => {
32
+ navigation.navigate(route, params)
33
+ }
34
+
35
+ return (
36
+ <Container>
37
+ <NavBar
38
+ title={t('FAVORITE', 'Favorite')}
39
+ titleAlign={'center'}
40
+ onActionLeft={goToBack}
41
+ showCall={false}
42
+ paddingTop={10}
43
+ btnStyle={{ paddingLeft: 0 }}
44
+ />
45
+ <TabContainer>
46
+ {tabList.map((menu, i) => (
47
+ <Tab
48
+ key={i}
49
+ active={menu.key === tabSelected}
50
+ onPress={() => setTabSelected(menu.key)}
51
+ >
52
+ <OText
53
+ color={menu.key === tabSelected ? theme.colors.textNormal : theme.colors.disabled}
54
+ size={14}
55
+ weight={menu.key === tabSelected ? '500' : '400'}
56
+ style={{ marginBottom: 12 }}
57
+ >
58
+ {menu.name}
59
+ </OText>
60
+ </Tab>
61
+ ))}
62
+ </TabContainer>
63
+ {tabSelected === 'businesses' && (
64
+ <FavoriteList
65
+ navigation={navigation}
66
+ onNavigationRedirect={onRedirect}
67
+ isBusiness
68
+ favoriteURL='favorite_businesses'
69
+ originalURL='business'
70
+ location={`${orderState.options?.address?.location?.lat},${orderState.options?.address?.location?.lng}`}
71
+ propsToFetch={['id', 'name', 'header', 'logo', 'location', 'address', 'ribbon', 'timezone', 'schedule', 'open', 'delivery_price', 'distance', 'delivery_time', 'pickup_time', 'reviews', 'featured', 'offers', 'food', 'laundry', 'alcohol', 'groceries', 'slug']}
72
+ />
73
+ )}
74
+ {tabSelected === 'products' && (
75
+ <FavoriteList
76
+ favoriteURL='favorite_products'
77
+ originalURL='products'
78
+ onNavigationRedirect={onRedirect}
79
+ isProduct
80
+ />
81
+ )}
82
+ {tabSelected === 'orders' && (
83
+ <FavoriteList
84
+ onNavigationRedirect={onRedirect}
85
+ favoriteURL='favorite_orders'
86
+ originalURL='orders'
87
+ isOrder
88
+ />
89
+ )}
90
+ </Container>
91
+ )
92
+ }