ordering-ui-external 4.0.7 → 5.0.0

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 (85) hide show
  1. package/_bundles/{0.ordering-ui.b594c1b9cf54956bec90.js → 0.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  2. package/_bundles/{1.ordering-ui.b594c1b9cf54956bec90.js → 1.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  3. package/_bundles/{2.ordering-ui.b594c1b9cf54956bec90.js → 2.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  4. package/_bundles/{4.ordering-ui.b594c1b9cf54956bec90.js → 4.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  5. package/_bundles/{5.ordering-ui.b594c1b9cf54956bec90.js → 5.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  6. package/_bundles/{6.ordering-ui.b594c1b9cf54956bec90.js → 6.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  7. package/_bundles/{7.ordering-ui.b594c1b9cf54956bec90.js → 7.ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
  8. package/_bundles/{8.ordering-ui.b594c1b9cf54956bec90.js → 8.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  9. package/_bundles/{9.ordering-ui.b594c1b9cf54956bec90.js → 9.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
  10. package/_bundles/{ordering-ui.b594c1b9cf54956bec90.js → ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
  11. package/_modules/components/BusinessBasicInformation/index.js +4 -4
  12. package/_modules/components/BusinessBasicInformation/styles.js +4 -1
  13. package/_modules/components/UserProfileForm/styles.js +1 -1
  14. package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +4 -5
  15. package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +2 -6
  16. package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
  17. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +23 -43
  18. package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +14 -12
  19. package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/index.js +16 -1
  20. package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +11 -3
  21. package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
  22. package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +2 -2
  23. package/_modules/themes/five/src/components/BusinessInformation/index.js +1 -1
  24. package/_modules/themes/five/src/components/BusinessInformation/styles.js +9 -5
  25. package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +1 -1
  26. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
  27. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +8 -4
  28. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +18 -14
  29. package/_modules/themes/five/src/components/Checkout/index.js +6 -6
  30. package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +5 -2
  31. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +44 -39
  32. package/_modules/themes/five/src/components/OrderContextUI/index.js +61 -7
  33. package/_modules/themes/five/src/components/OrderContextUI/styles.js +1 -1
  34. package/_modules/themes/five/src/components/PageBanner/index.js +3 -3
  35. package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +1 -1
  36. package/_modules/themes/five/src/components/ProductForm/index.js +20 -18
  37. package/_modules/themes/five/src/components/ProductShare/index.js +1 -1
  38. package/_modules/themes/five/src/components/ProductShare/styles.js +2 -2
  39. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +5 -3
  40. package/_modules/themes/five/src/components/ResetPassword/index.js +6 -7
  41. package/_modules/themes/five/src/components/ScheduleAccordion/styles.js +1 -1
  42. package/_modules/themes/five/src/components/SingleOrderCard/index.js +4 -2
  43. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +18 -15
  44. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
  45. package/_modules/themes/five/src/components/TaxInformation/styles.js +1 -1
  46. package/package.json +2 -2
  47. package/src/components/BusinessBasicInformation/index.js +7 -10
  48. package/src/components/BusinessBasicInformation/styles.js +13 -0
  49. package/src/components/UserProfileForm/styles.js +0 -1
  50. package/src/themes/callcenterOriginal/src/components/AddressList/index.js +2 -2
  51. package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -5
  52. package/src/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
  53. package/src/themes/callcenterOriginal/src/components/Header/index.js +2 -40
  54. package/src/themes/callcenterOriginal/src/components/Header/styles.js +6 -3
  55. package/src/themes/callcenterOriginal/src/components/SidebarMenu/index.js +19 -1
  56. package/src/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +27 -0
  57. package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
  58. package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +5 -1
  59. package/src/themes/five/src/components/BusinessInformation/index.js +2 -0
  60. package/src/themes/five/src/components/BusinessInformation/styles.js +10 -1
  61. package/src/themes/five/src/components/BusinessItemAccordion/styles.js +3 -0
  62. package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -2
  63. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +5 -1
  64. package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -1
  65. package/src/themes/five/src/components/Checkout/index.js +2 -1
  66. package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +16 -10
  67. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +16 -1
  68. package/src/themes/five/src/components/OrderContextUI/index.js +47 -3
  69. package/src/themes/five/src/components/OrderContextUI/styles.js +3 -0
  70. package/src/themes/five/src/components/PageBanner/index.js +3 -3
  71. package/src/themes/five/src/components/PhoneAutocomplete/styles.js +4 -0
  72. package/src/themes/five/src/components/ProductForm/index.js +28 -24
  73. package/src/themes/five/src/components/ProductShare/index.js +1 -1
  74. package/src/themes/five/src/components/ProductShare/styles.js +1 -3
  75. package/src/themes/five/src/components/RenderProductsLayout/index.js +8 -4
  76. package/src/themes/five/src/components/ResetPassword/index.js +1 -1
  77. package/src/themes/five/src/components/ScheduleAccordion/styles.js +4 -0
  78. package/src/themes/five/src/components/SidebarMenu/index.js +3 -2
  79. package/src/themes/five/src/components/SingleOrderCard/index.js +4 -4
  80. package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
  81. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
  82. package/src/themes/five/src/components/TaxInformation/styles.js +3 -0
  83. package/template/pages/BusinessProductsList/index.js +1 -0
  84. /package/_bundles/{7.ordering-ui.b594c1b9cf54956bec90.js.LICENSE.txt → 7.ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
  85. /package/_bundles/{ordering-ui.b594c1b9cf54956bec90.js.LICENSE.txt → ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
@@ -19,6 +19,7 @@ import { Modal } from '../Modal'
19
19
  import { SignUpForm } from '../SignUpForm'
20
20
  import { LoginForm } from '../LoginForm'
21
21
  import { ForgotPasswordForm } from '../ForgotPasswordForm'
22
+ import { X as CloseIcon } from 'react-bootstrap-icons'
22
23
 
23
24
  import {
24
25
  Container,
@@ -30,7 +31,8 @@ import {
30
31
  MenuLinkIcon,
31
32
  MenuLinkText,
32
33
  TextInfo,
33
- MenuLinkSeparator
34
+ MenuLinkSeparator,
35
+ MobileMessage
34
36
  } from './styles'
35
37
 
36
38
  export const SidebarMenu = (props) => {
@@ -44,6 +46,7 @@ export const SidebarMenu = (props) => {
44
46
  const [isMenuOpen, setIsMenuOpen] = useState(false)
45
47
  const [modalIsOpen, setModalIsOpen] = useState(false)
46
48
  const [modalPageToShow, setModalPageToShow] = useState(null)
49
+ const [showMessage, setShowMessage] = useState(false)
47
50
 
48
51
  const isHome = window.location.pathname === '/' || window.location.pathname === '/home'
49
52
 
@@ -100,6 +103,13 @@ export const SidebarMenu = (props) => {
100
103
  }
101
104
  }, [width])
102
105
 
106
+ useEffect(() => {
107
+ if(!isCustomerMode) return
108
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
109
+ setShowMessage(true)
110
+ }
111
+ }, [])
112
+
103
113
  return (
104
114
  <>
105
115
  {props.beforeElements?.map((BeforeElement, i) => (
@@ -108,6 +118,14 @@ export const SidebarMenu = (props) => {
108
118
  </React.Fragment>))}
109
119
  {props.beforeComponents?.map((BeforeComponent, i) => (
110
120
  <BeforeComponent key={i} {...props} />))}
121
+ {showMessage && (
122
+ <MobileMessage>
123
+ <div>
124
+ <CloseIcon onClick={() => setShowMessage(false)} />
125
+ {t('FOR_THE_BEST_EXPERIENCE_WHILE_SETTING_UP', 'For the best experience while setting up your project, we recommend using a computer.')}
126
+ </div>
127
+ </MobileMessage>
128
+ )}
111
129
  <Container auth={auth}>
112
130
  <IconContent
113
131
  isHome={isHome}
@@ -226,3 +226,30 @@ export const MenuLinkSeparator = styled.div`
226
226
  }
227
227
  }
228
228
  `
229
+
230
+ export const MobileMessage = styled.div`
231
+ position: fixed;
232
+ top: 100px;
233
+ left: calc(50% - 130px);
234
+ z-index: 999;
235
+ background: ${props => props.theme.colors.primaryContrast};
236
+ border: 1px solid ${props => props.theme.colors.primary};
237
+ box-sizing: border-box;
238
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
239
+ border-radius: 7.6px;
240
+ width: 260px;
241
+ color: ${props => props.theme.colors.black};
242
+ > div {
243
+ padding: 15px 15px 10px 15px;
244
+ font-size: 12px;
245
+ line-height: 18px;
246
+ position: relative;
247
+ > svg {
248
+ position: absolute;
249
+ top: 3px;
250
+ right: 3px;
251
+ cursor: pointer;
252
+ font-size: 21px;
253
+ }
254
+ }
255
+ `
@@ -116,7 +116,7 @@ const UserDetailsUI = (props) => {
116
116
  <CountryFlag>
117
117
  {
118
118
  userData?.country_phone_code && (
119
- <PhoneInput onChange={() => {}} defaultCountry={parsePhoneNumber(`+${(userData?.country_phone_code?.replace('+', ''))} ${userData?.cellphone}`)?.country} />
119
+ <PhoneInput onChange={() => { }} defaultCountry={parsePhoneNumber(`+${(userData?.country_phone_code?.replace('+', ''))} ${userData?.cellphone.replace(`+${userData?.country_phone_code}`, '')}`)?.country} />
120
120
  )
121
121
  }
122
122
  </CountryFlag>
@@ -89,7 +89,7 @@ export const TitleContainer = styled.div`
89
89
  font-size: 24px;
90
90
  }
91
91
  ${({ isAddressFormOpen }) => isAddressFormOpen && css`
92
- h1{
92
+ h1{
93
93
  width: 75%;
94
94
  }
95
95
  `}
@@ -112,4 +112,8 @@ export const PhoneContainer = styled.div`
112
112
  display: flex;
113
113
  align-items: center;
114
114
  height: 30px;
115
+
116
+ p {
117
+ margin: 0;
118
+ }
115
119
  `
@@ -22,6 +22,7 @@ import {
22
22
  ImageContainer,
23
23
  BusinessTitle,
24
24
  BusinessAddress,
25
+ BusinessAddressNotes,
25
26
  Divider
26
27
  } from './styles'
27
28
  import MdClose from '@meronex/icons/md/MdClose'
@@ -112,6 +113,7 @@ export const BusinessInformationUI = (props) => {
112
113
  {
113
114
  !hideAddress && business?.address && <BusinessAddress>{business?.address}</BusinessAddress>
114
115
  }
116
+ {business?.address_notes && <BusinessAddressNotes>{business?.address_notes}</BusinessAddressNotes>}
115
117
  <Divider />
116
118
  </>
117
119
  )
@@ -163,6 +163,10 @@ export const DeliveryInfo = styled.div`
163
163
  justify-content: flex-start;
164
164
  margin-top: 10px;
165
165
 
166
+ h5 {
167
+ font-size: 16px;
168
+ }
169
+
166
170
  div {
167
171
  width: 100%;
168
172
  &:last-child {
@@ -276,7 +280,12 @@ export const BusinessTitle = styled.h2`
276
280
  export const BusinessAddress = styled.p`
277
281
  font-size: 14px;
278
282
  color: ${props => props.theme.colors.darkTextColor};
279
- margin-bottom: 25px;
283
+ margin: 15px 0;
284
+ `
285
+ export const BusinessAddressNotes = styled.p`
286
+ font-size: 14px;
287
+ color: ${props => props.theme.colors.darkTextColor};
288
+ margin: 15px 0 25px 0;
280
289
  `
281
290
 
282
291
  export const Divider = styled.div`
@@ -220,6 +220,9 @@ export const PriceContainer = styled.div`
220
220
  display: flex;
221
221
  justify-content: space-between;
222
222
  align-items: center;
223
+ h4 {
224
+ font-size: 16px;
225
+ }
223
226
  button{
224
227
  padding: 10px 30px;
225
228
  min-width: 150px;
@@ -125,8 +125,7 @@ const BusinessProductsCategoriesUI = (props) => {
125
125
  }
126
126
 
127
127
  useEffect(() => {
128
- if (typeof useKioskApp === 'undefined') return
129
- const styleSheet = document.getElementById('styles').sheet
128
+ const styleSheet = document.getElementById('styles')?.sheet
130
129
 
131
130
  if (Object.values(styleSheet.cssRules)?.length) {
132
131
  styleSheet?.deleteRule(0)
@@ -38,7 +38,8 @@ const BusinessProductsListUI = (props) => {
38
38
  categoriesState,
39
39
  onClickCategory,
40
40
  currentCart,
41
- handleUpdateProducts
41
+ handleUpdateProducts,
42
+ isCustomerMode
42
43
  } = props
43
44
 
44
45
  const [, t] = useLanguage()
@@ -92,6 +93,7 @@ const BusinessProductsListUI = (props) => {
92
93
  isCartOnProductsList={isCartOnProductsList}
93
94
  handleUpdateProducts={handleUpdateProducts}
94
95
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
96
+ isCustomerMode={isCustomerMode}
95
97
  />
96
98
  ))
97
99
  }
@@ -129,6 +131,7 @@ const BusinessProductsListUI = (props) => {
129
131
  handleUpdateProducts={handleUpdateProducts}
130
132
  isCartOnProductsList={isCartOnProductsList}
131
133
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
134
+ isCustomerMode={isCustomerMode}
132
135
  />
133
136
  ))}
134
137
  {!business?.food && !categoryState?.loading && featProducts?.length > 9 && (
@@ -216,6 +219,7 @@ const BusinessProductsListUI = (props) => {
216
219
  handleUpdateProducts={handleUpdateProducts}
217
220
  isCartOnProductsList={isCartOnProductsList}
218
221
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
222
+ isCustomerMode={isCustomerMode}
219
223
  />
220
224
  ))
221
225
  }
@@ -84,6 +84,7 @@ const BusinessProductsListingUI = (props) => {
84
84
  handleChangePriceFilterValues,
85
85
  priceFilterValues,
86
86
  handleUpdateProfessionals,
87
+ isCustomerMode,
87
88
  isCustomLayout
88
89
  } = props
89
90
 
@@ -132,9 +133,10 @@ const BusinessProductsListingUI = (props) => {
132
133
  setProductIdToLoading(product.id)
133
134
  const isProductAddedToCart = currentCart?.products?.find(Cproduct => Cproduct.id === product.id)
134
135
  const productQuantity = isProductAddedToCart?.quantity
136
+ const minimumPerOrder = product?.minimum_per_order || 1
135
137
  const addCurrentProduct = {
136
138
  ...product,
137
- quantity: 1
139
+ quantity: minimumPerOrder
138
140
  }
139
141
  const updateCurrentProduct = {
140
142
  id: product.id,
@@ -381,6 +383,7 @@ const BusinessProductsListingUI = (props) => {
381
383
  handleChangePriceFilterValues={handleChangePriceFilterValues}
382
384
  productToIdLoading={productToIdLoading}
383
385
  handleUpdateProfessionals={handleUpdateProfessionals}
386
+ isCustomerMode={isCustomerMode}
384
387
  />
385
388
 
386
389
  {
@@ -529,6 +532,7 @@ const BusinessProductsListingUI = (props) => {
529
532
  productId={curProduct?.id}
530
533
  handleUpdateProducts={handleUpdateProducts}
531
534
  onSave={handlerProductAction}
535
+ isCustomerMode={isCustomerMode}
532
536
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === (productModal.product || curProduct)?.id ? Cproduct?.quantity : 0) }, 0) || 0}
533
537
  />
534
538
  )}
@@ -219,7 +219,7 @@ const CheckoutUI = (props) => {
219
219
  const checkValidationFields = () => {
220
220
  setUserErrors([])
221
221
  const errors = []
222
- const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes']
222
+ const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes', 'comments']
223
223
  const userSelected = isCustomerMode ? customerState.user : user
224
224
  const _requiredFields = []
225
225
 
@@ -423,6 +423,7 @@ const CheckoutUI = (props) => {
423
423
  <p>{businessDetails?.business?.name}</p>
424
424
  <p>{businessDetails?.business?.email}</p>
425
425
  <p>{businessDetails?.business?.cellphone}</p>
426
+ {businessDetails?.business?.address_notes && <p>{businessDetails?.business?.address_notes}</p>}
426
427
  </div>
427
428
  </div>
428
429
  )}
@@ -1,12 +1,14 @@
1
1
  import React from 'react'
2
2
  import {
3
3
  CardWrapper,
4
- CardsContainer
4
+ CardsContainer,
5
+ CardsContainerWrapper
5
6
  } from './styles'
6
7
  import { OrdersContainer } from '../OrdersOption/styles'
7
8
 
8
9
  import { SingleOrderCard } from '../SingleOrderCard'
9
10
  import { Pagination } from '../Pagination'
11
+ import { AutoScroll } from '../AutoScroll'
10
12
 
11
13
  export const HorizontalOrdersLayout = (props) => {
12
14
  const {
@@ -38,15 +40,19 @@ export const HorizontalOrdersLayout = (props) => {
38
40
  isBusinessesPage={isBusinessesPage}
39
41
  >
40
42
  <CardWrapper>
41
- <CardsContainer>
42
- {orders.length > 0 && ordersToShow.map((order, i) => (
43
- <SingleOrderCard
44
- {...props}
45
- key={order.id || order.id?.[0] || i}
46
- order={order}
47
- />
48
- ))}
49
- </CardsContainer>
43
+ <CardsContainerWrapper>
44
+ <CardsContainer>
45
+ <AutoScroll scrollId='orderScroll'>
46
+ {orders.length > 0 && ordersToShow.map((order, i) => (
47
+ <SingleOrderCard
48
+ {...props}
49
+ key={order.id || order.id?.[0] || i}
50
+ order={order}
51
+ />
52
+ ))}
53
+ </AutoScroll>
54
+ </CardsContainer>
55
+ </CardsContainerWrapper>
50
56
  {orders.length > 0 && ordersToShow.length > 0 && (
51
57
  <Pagination
52
58
  currentPage={pagination.currentPage}
@@ -21,7 +21,22 @@ export const CardWrapper = styled.div`
21
21
  `
22
22
  export const CardsContainer = styled.div`
23
23
  display: flex;
24
- overflow-x: auto;
24
+ `
25
+
26
+ export const CardsContainerWrapper = styled.div`
27
+ margin-bottom: 10px;
28
+ display: flex;
29
+ overflow: auto hidden;
30
+ ::-webkit-scrollbar {
31
+ width: 6px;
32
+ height: 6px;
33
+ }
34
+ ${({ isLoading }) => isLoading && css`
35
+ ::-webkit-scrollbar {
36
+ width: 0px;
37
+ height: 0px;
38
+ }
39
+ `}
25
40
  `
26
41
 
27
42
  export const Price = styled.div`
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import { useLanguage, useOrder, useConfig, useSession } from 'ordering-components-external'
2
+ import { useLanguage, useOrder, useConfig, useSession, useBusiness } from 'ordering-components-external'
3
3
  import { MomentPopover } from '../../../../pwa/src/components/MomentPopover'
4
4
  import { OrderTypeSelectorHeader } from '../../../../../components/OrderTypeSelectorHeader'
5
5
  import FaMapMarkerAlt from '@meronex/icons/fa/FaMapMarkerAlt'
@@ -14,24 +14,38 @@ import {
14
14
  ItemInline
15
15
  } from './styles'
16
16
  import { useWindowSize } from '../../../../../hooks/useWindowSize'
17
+ import { MomentContent } from '../MomentContent'
18
+ import { OrderTypeSelectorContent } from '../OrderTypeSelectorContent'
19
+ import { getCateringValues } from '../../../../../utils'
20
+ import { useLocation } from 'react-router-dom'
17
21
 
18
22
  export const OrderContextUI = (props) => {
19
23
  const { isCheckOut, setMapErrors, isCustomerMode, isBusinessList } = props
20
24
 
25
+ const { pathname } = useLocation()
21
26
  const [, t] = useLanguage()
22
27
  const [orderState] = useOrder()
23
28
  const [configState] = useConfig()
24
29
  const [{ auth }] = useSession()
30
+ const [{ business }] = useBusiness()
25
31
 
26
32
  const [openPopover, setOpenPopover] = useState({})
27
33
  const [modals, setModals] = useState({ listOpen: false, formOpen: false, citiesOpen: false })
28
34
  const [alertState, setAlertState] = useState({ open: false, content: [] })
35
+ const [modalSelected, setModalSelected] = useState(null)
36
+ const [modalIsOpen, setModalIsOpen] = useState(false)
29
37
  const windowSize = useWindowSize()
30
38
  const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
31
39
 
32
40
  const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
33
41
  const isPreOrderSetting = configState?.configs?.preorder_status_enabled?.value === '1'
42
+ const cateringTypeString = orderState?.options?.type === 7
43
+ ? 'catering_delivery'
44
+ : orderState?.options?.type === 8
45
+ ? 'catering_pickup'
46
+ : null
34
47
 
48
+ const cateringValues = getCateringValues(cateringTypeString, pathname.includes('store') && Object?.keys(business || {})?.length > 0 ? business?.configs : configState?.configs)
35
49
  const handleTogglePopover = (type) => {
36
50
  setOpenPopover({
37
51
  ...openPopover,
@@ -67,6 +81,11 @@ export const OrderContextUI = (props) => {
67
81
  }
68
82
  }
69
83
 
84
+ const openModal = (opt) => {
85
+ setModalSelected(opt)
86
+ setModalIsOpen(true)
87
+ }
88
+
70
89
  useEffect(() => {
71
90
  const handleCloseallPopovers = () => handleClosePopover('moment')
72
91
  window.addEventListener('scroll', handleCloseallPopovers)
@@ -84,13 +103,14 @@ export const OrderContextUI = (props) => {
84
103
  <span>{orderState.options?.address?.address || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?')}</span>
85
104
  </AddressMenu>
86
105
  <FeatureItems>
87
- <ItemInline>
106
+ <ItemInline onClick={() => openModal('delivery')}>
88
107
  <OrderTypeSelectorHeader configTypes={configTypes} autoCloseWhenScroll={windowSize.width < 576} />
89
108
  </ItemInline>
90
109
  {isPreOrderSetting && (
91
- <ItemInline>
110
+ <ItemInline onClick={() => openModal('moment')}>
92
111
  <MomentPopover
93
112
  open={openPopover.moment}
113
+ onCustomClick={() => openModal('moment')}
94
114
  onClick={() => handleTogglePopover('moment')}
95
115
  onClose={() => handleClosePopover('moment')}
96
116
  isBanner
@@ -99,6 +119,30 @@ export const OrderContextUI = (props) => {
99
119
  )}
100
120
  </FeatureItems>
101
121
  </Container>
122
+ {modalIsOpen && (
123
+ <Modal
124
+ open={modalIsOpen}
125
+ onClose={() => setModalIsOpen(false)}
126
+ width={orderState?.options?.user_id ? '70%' : '50%'}
127
+ >
128
+ {modalSelected === 'moment' && (
129
+ <MomentContent
130
+ onClose={() => setModalIsOpen(false)}
131
+ cateringPreorder={!!cateringTypeString}
132
+ isHeader
133
+ business={pathname.includes('store') && business}
134
+ {...cateringValues}
135
+ />
136
+ )}
137
+ {modalSelected === 'delivery' && (
138
+ <OrderTypeSelectorContent
139
+ onClose={() => setModalIsOpen(false)}
140
+ configTypes={!configState?.loading && configTypes?.length > 0 ? configTypes : null}
141
+ defaultValue={!(!configState?.loading && configTypes?.length > 0) && 1}
142
+ />
143
+ )}
144
+ </Modal>
145
+ )}
102
146
  <Modal
103
147
  title={t('ADDRESS_FORM', 'Address Form')}
104
148
  open={modals.formOpen}
@@ -50,6 +50,9 @@ export const FeatureItems = styled.div`
50
50
  `
51
51
 
52
52
  export const ItemInline = styled.div`
53
+ > * {
54
+ pointer-events: none;
55
+ }
53
56
  > span #select-input {
54
57
  background-color: ${props => props.theme.colors.grayDividerColor} !important;
55
58
  border: none;
@@ -120,15 +120,15 @@ const PageBannerUI = (props) => {
120
120
  <Swiper
121
121
  navigation
122
122
  spaceBetween={0}
123
+ shortSwipes={false}
123
124
  loop={pageBannerState.banner?.items.length > 1}
124
125
  >
125
126
  {pageBannerState.banner?.items.map((img, i) => (
126
127
  <SwiperSlide
127
128
  key={i}
129
+ onClick={() => handleGoToPage(img?.action)}
128
130
  >
129
- <ImageWrapper
130
- onClick={() => handleGoToPage(img?.action)}
131
- >
131
+ <ImageWrapper>
132
132
  <img src={img.url} className='banner-img' alt='' />
133
133
  </ImageWrapper>
134
134
  </SwiperSlide>
@@ -133,6 +133,10 @@ export const WrappBtn = styled.div`
133
133
 
134
134
  button {
135
135
  min-width: 130px;
136
+ max-width: 400px;
137
+ overflow: hidden;
138
+ text-overflow: ellipsis;
139
+ white-space: nowrap;
136
140
  }
137
141
  `
138
142
 
@@ -294,22 +294,24 @@ const ProductOptionsUI = (props) => {
294
294
  })
295
295
  menuList.length && menuList.forEach(menu => {
296
296
  const elementTop = scrollElement.scrollTop
297
- const topPos = document.getElementById(menu).offsetTop
298
- if (Math.abs(elementTop - topPos) < extraHeight) {
299
- setTabValue(menu)
300
- const elementLeft = document.getElementById(`menu_${menu}`).offsetLeft
301
- const scrollLeft = document.getElementById('all').scrollLeft
302
- if (elementLeft < scrollLeft) {
303
- document.getElementById('all').scrollTo({
304
- left: elementLeft,
305
- behavior: 'smooth'
306
- })
307
- }
308
- if (elementLeft < scrollLeft + scrollElement.clientWidth) {
309
- document.getElementById('all').scrollTo({
310
- left: elementLeft - scrollElement.clientWidth / 2,
311
- behavior: 'smooth'
312
- })
297
+ if (document.getElementById(menu)) {
298
+ const topPos = document.getElementById(menu).offsetTop
299
+ if (Math.abs(elementTop - topPos) < extraHeight) {
300
+ setTabValue(menu)
301
+ const elementLeft = document.getElementById(`menu_${menu}`).offsetLeft
302
+ const scrollLeft = document.getElementById('all').scrollLeft
303
+ if (elementLeft < scrollLeft) {
304
+ document.getElementById('all').scrollTo({
305
+ left: elementLeft,
306
+ behavior: 'smooth'
307
+ })
308
+ }
309
+ if (elementLeft < scrollLeft + scrollElement.clientWidth) {
310
+ document.getElementById('all').scrollTo({
311
+ left: elementLeft - scrollElement.clientWidth / 2,
312
+ behavior: 'smooth'
313
+ })
314
+ }
313
315
  }
314
316
  }
315
317
  })
@@ -550,14 +552,16 @@ const ProductOptionsUI = (props) => {
550
552
  </ProductDescription>
551
553
  )}
552
554
  </ProductFormTitle>
553
- <ProductTagsListContainer>
554
- {product.tags.map(tag => (
555
- <ProductTagWrapper key={tag.id}>
556
- <img src={optimizeImage(tag?.image || theme.images?.dummies?.product, 'h_40,c_limit')} alt='' />
557
- <span>{tag.name}</span>
558
- </ProductTagWrapper>
559
- ))}
560
- </ProductTagsListContainer>
555
+ {product?.tags?.length > 0 && (
556
+ <ProductTagsListContainer>
557
+ {product.tags.map(tag => (
558
+ <ProductTagWrapper key={tag.id}>
559
+ <img src={optimizeImage(tag?.image || theme.images?.dummies?.product, 'h_40,c_limit')} alt='' />
560
+ <span>{tag.name}</span>
561
+ </ProductTagWrapper>
562
+ ))}
563
+ </ProductTagsListContainer>
564
+ )}
561
565
  <Divider />
562
566
  <ProductEdition>
563
567
  {
@@ -61,7 +61,7 @@ const ProductShareUI = (props) => {
61
61
  )}
62
62
  <ShareButtons
63
63
  ref={contentElement}
64
- className='a2a_kit a2a_kit_size_32 a2a_floating_style a2a_vertical_style'
64
+ className='a2a_kit a2a_kit_size_32 a2a_vertical_style'
65
65
  data-a2a-url={urlToShare}
66
66
  showShareButton={showShareButton}
67
67
  >
@@ -49,7 +49,6 @@ export const IconShare = styled.div`
49
49
 
50
50
  &:nth-child(1) > svg {
51
51
  background-color: white;
52
- padding: 5px;
53
52
  border-radius: 9px;
54
53
  margin: 5px 0px;
55
54
  }
@@ -75,8 +74,7 @@ export const ShareButtons = styled.div`
75
74
 
76
75
  @media (min-width: 1201px) {
77
76
  top: 35px;
78
- left: 0px;
79
- right: 0px;
77
+ left: -8px;
80
78
  }
81
79
  `
82
80
  export const CopyButton = styled.a`
@@ -87,7 +87,8 @@ export const RenderProductsLayout = (props) => {
87
87
  onBusinessClick,
88
88
  handleChangePriceFilterValues,
89
89
  priceFilterValues,
90
- handleUpdateProfessionals
90
+ handleUpdateProfessionals,
91
+ isCustomerMode,
91
92
  } = props
92
93
 
93
94
  const theme = useTheme()
@@ -192,9 +193,11 @@ export const RenderProductsLayout = (props) => {
192
193
  />
193
194
  )}
194
195
 
195
- <PageBannerWrapper>
196
- <PageBanner position='web_business_page' />
197
- </PageBannerWrapper>
196
+ {!isCustomerMode && (
197
+ <PageBannerWrapper>
198
+ <PageBanner position='web_business_page' />
199
+ </PageBannerWrapper>
200
+ )}
198
201
 
199
202
  {!errorQuantityProducts && SearchProductsComponent && !useKioskApp && (
200
203
  <>
@@ -473,6 +476,7 @@ export const RenderProductsLayout = (props) => {
473
476
  isSkeleton
474
477
  categories={[]}
475
478
  openBusinessInformation={openBusinessInformation}
479
+ isCustomerMode={isCustomerMode}
476
480
  />
477
481
  </div>
478
482
  </BusinessCategoryProductWrapper>
@@ -70,7 +70,7 @@ const ResetPasswordUI = (props) => {
70
70
  } else if (!formState.loading && formState.result?.result?.length) {
71
71
  setAlertState({
72
72
  open: true,
73
- content: formState.result?.result === 'OK' ? t('PASSWORD_RESET_SUCCESS', 'Password changed successfully') : t(formState.result?.result, 'Password changed successfully')
73
+ content: t('PASSWORD_RESET_SUCCESS', 'Password changed successfully')
74
74
  })
75
75
  }
76
76
  if (!formState.loading && formState.result?.result?.length > 0 && !formState.result.error) {
@@ -14,6 +14,10 @@ export const DropdownWrapper = styled.div`
14
14
  display: flex;
15
15
  align-items: center;
16
16
  gap: 10px;
17
+
18
+ > h4 {
19
+ font-size: 16px;
20
+ }
17
21
  `
18
22
  export const HoursWrappers = styled.div`
19
23
  flex-direction: column;
@@ -13,7 +13,7 @@ import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
13
13
  import SiJsonwebtokens from '@meronex/icons/si/SiJsonwebtokens'
14
14
  import BiMessageDetail from '@meronex/icons/bi/BiMessageDetail'
15
15
  import BsSearch from '@meronex/icons/bs/BsSearch'
16
- import { Heart, Tag } from 'react-bootstrap-icons'
16
+ import { Heart, Tag, X as CloseIcon } from 'react-bootstrap-icons'
17
17
 
18
18
  import { useEvent, useLanguage, useOrder, useSession, useConfig } from 'ordering-components-external'
19
19
  import { useTheme } from 'styled-components'
@@ -35,7 +35,8 @@ import {
35
35
  MenuLinkIcon,
36
36
  MenuLinkText,
37
37
  TextInfo,
38
- MenuLinkSeparator
38
+ MenuLinkSeparator,
39
+ MobileMessage
39
40
  } from './styles'
40
41
 
41
42
  export const SidebarMenu = (props) => {