ordering-ui-external 2.0.1 → 2.0.3

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 (40) hide show
  1. package/_bundles/{0.ordering-ui.32113e17b220a7b5ae09.js → 0.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  2. package/_bundles/{1.ordering-ui.32113e17b220a7b5ae09.js → 1.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  3. package/_bundles/{2.ordering-ui.32113e17b220a7b5ae09.js → 2.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  4. package/_bundles/{4.ordering-ui.32113e17b220a7b5ae09.js → 4.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  5. package/_bundles/{5.ordering-ui.32113e17b220a7b5ae09.js → 5.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  6. package/_bundles/{6.ordering-ui.32113e17b220a7b5ae09.js → 6.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  7. package/_bundles/{7.ordering-ui.32113e17b220a7b5ae09.js → 7.ordering-ui.a228aa8797d9d0fc5a6c.js} +1 -1
  8. package/_bundles/{7.ordering-ui.32113e17b220a7b5ae09.js.LICENSE.txt → 7.ordering-ui.a228aa8797d9d0fc5a6c.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.32113e17b220a7b5ae09.js → 8.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  10. package/_bundles/{9.ordering-ui.32113e17b220a7b5ae09.js → 9.ordering-ui.a228aa8797d9d0fc5a6c.js} +0 -0
  11. package/_bundles/ordering-ui.a228aa8797d9d0fc5a6c.js +2 -0
  12. package/_bundles/{ordering-ui.32113e17b220a7b5ae09.js.LICENSE.txt → ordering-ui.a228aa8797d9d0fc5a6c.js.LICENSE.txt} +0 -0
  13. package/_modules/themes/callcenterOriginal/index.js +7 -0
  14. package/_modules/themes/callcenterOriginal/src/components/Cart/index.js +46 -32
  15. package/_modules/themes/callcenterOriginal/src/components/Cart/styles.js +1 -1
  16. package/_modules/themes/callcenterOriginal/src/components/CartContent/index.js +53 -21
  17. package/_modules/themes/callcenterOriginal/src/components/CartContent/styles.js +6 -4
  18. package/_modules/themes/callcenterOriginal/src/components/CartPopover/index.js +5 -19
  19. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +3 -21
  20. package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +2 -2
  21. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -0
  22. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +13 -8
  23. package/_modules/themes/five/src/components/Cart/index.js +1 -1
  24. package/_modules/themes/five/src/components/MultiCheckout/index.js +3 -8
  25. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  26. package/package.json +2 -2
  27. package/src/themes/callcenterOriginal/index.js +2 -0
  28. package/src/themes/callcenterOriginal/src/components/Cart/index.js +321 -307
  29. package/src/themes/callcenterOriginal/src/components/Cart/styles.js +1 -1
  30. package/src/themes/callcenterOriginal/src/components/CartContent/index.js +69 -50
  31. package/src/themes/callcenterOriginal/src/components/CartContent/styles.js +6 -0
  32. package/src/themes/callcenterOriginal/src/components/CartPopover/index.js +20 -32
  33. package/src/themes/callcenterOriginal/src/components/Header/index.js +276 -292
  34. package/src/themes/callcenterOriginal/src/components/Header/styles.js +19 -1
  35. package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -0
  36. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +5 -1
  37. package/src/themes/five/src/components/Cart/index.js +1 -1
  38. package/src/themes/five/src/components/MultiCheckout/index.js +2 -7
  39. package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  40. package/_bundles/ordering-ui.32113e17b220a7b5ae09.js +0 -2
@@ -35,7 +35,6 @@ import { SearchBar } from '../../../SearchBar'
35
35
 
36
36
  import { BusinessTypeFilter } from '../../../BusinessTypeFilter'
37
37
  import { BusinessController } from '../../../BusinessController'
38
- import { OrdersOption } from '../../../OrdersOption'
39
38
  import { BusinessesMap } from '../../../../../../../components/BusinessesMap'
40
39
 
41
40
  import { HighestRated } from '../../../HighestRated'
@@ -328,6 +327,11 @@ const BusinessesListingUI = (props) => {
328
327
  {isCustomLayout && (
329
328
  <FiMap onClick={toggleMap} />
330
329
  )}
330
+ {!hideCities && citiesState?.cities?.length > 0 && (
331
+ <Button color='primary' onClick={handleOpenCities}>
332
+ {citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)?.name || t('SELECT_A_CITY', 'Select a city')}
333
+ </Button>
334
+ )}
331
335
  </WrapperSearch>
332
336
  </SearchContainer>
333
337
  )}
@@ -508,7 +508,7 @@ const CartUI = (props) => {
508
508
  <TextArea
509
509
  defaultValue={cart?.comment}
510
510
  placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
511
- onChange={(e) => handleChangeComment(e.target.value)}
511
+ onChange={(e) => handleChangeComment(e.target.value, user?.id)}
512
512
  />
513
513
  {commentState?.loading && (
514
514
  <Spinner>
@@ -1,6 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
2
  import { useHistory } from 'react-router-dom'
3
- import { useTheme } from 'styled-components'
4
3
  import {
5
4
  useLanguage,
6
5
  useUtils,
@@ -9,7 +8,6 @@ import {
9
8
  useSession,
10
9
  useValidationFields,
11
10
  useOrder,
12
- useOrderingTheme,
13
11
  MultiCheckout as MultiCheckoutController
14
12
  } from 'ordering-components-external'
15
13
 
@@ -67,12 +65,10 @@ const MultiCheckoutUI = (props) => {
67
65
  handleSearchRedirect
68
66
  } = props
69
67
 
70
- const theme = useTheme()
71
68
  const [, t] = useLanguage()
72
69
  const [{ configs }] = useConfig()
73
70
  const [{ parsePrice }] = useUtils()
74
71
  const [customerState] = useCustomer()
75
- const [orderingTheme] = useOrderingTheme()
76
72
  const [validationFields] = useValidationFields()
77
73
  const [{ user }] = useSession()
78
74
  const [orderState] = useOrder()
@@ -83,8 +79,7 @@ const MultiCheckoutUI = (props) => {
83
79
  const [alertState, setAlertState] = useState({ open: false, content: [] })
84
80
  const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || (paymethodSelected?.paymethod?.gateway === 'stripe' && !paymethodSelected?.paymethod_data)
85
81
  const walletCarts = (Object.values(orderState?.carts)?.filter(cart => 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) || []
86
- const isMultiDriverTips = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew' ||
87
- theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
82
+ const isMultiDriverTips = configs?.checkout_multi_business_enabled?.value === '1'
88
83
  const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
89
84
  ? JSON.parse(configs?.driver_tip_options?.value) || []
90
85
  : configs?.driver_tip_options?.value || []
@@ -251,7 +246,7 @@ const MultiCheckoutUI = (props) => {
251
246
  <Cart
252
247
  isCartPending={cart?.status === 2}
253
248
  cart={cart}
254
- isMultiCheckout={isMultiDriverTips}
249
+ isMultiCheckout
255
250
  isProducts={cart?.products?.length || 0}
256
251
  hideDeliveryFee={configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'}
257
252
  hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
@@ -146,7 +146,7 @@ export const RenderProductsLayout = (props) => {
146
146
  <>
147
147
  {!isLoading && business?.id && (
148
148
  <WrappLayout isCartOnProductsList={isCartOnProductsList}>
149
- {!hideBusinessNearCity && !useKioskApp && (
149
+ {((!hideBusinessNearCity && !useKioskApp) || props.forceShowNearBusiness) && (
150
150
  <NearBusiness>
151
151
  <BusinessesListing
152
152
  logosLayout