ordering-ui-external 10.4.1 → 10.5.1

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 (75) hide show
  1. package/_bundles/{0.ordering-ui.62d46eec3c210c5257aa.js → 0.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  2. package/_bundles/{1.ordering-ui.62d46eec3c210c5257aa.js → 1.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  3. package/_bundles/{2.ordering-ui.62d46eec3c210c5257aa.js → 2.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  4. package/_bundles/{4.ordering-ui.62d46eec3c210c5257aa.js → 4.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  5. package/_bundles/{5.ordering-ui.62d46eec3c210c5257aa.js → 5.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  6. package/_bundles/{6.ordering-ui.62d46eec3c210c5257aa.js → 6.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  7. package/_bundles/{7.ordering-ui.62d46eec3c210c5257aa.js → 7.ordering-ui.cc1d13aa04732fde3671.js} +2 -2
  8. package/_bundles/{8.ordering-ui.62d46eec3c210c5257aa.js → 8.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  9. package/_bundles/{9.ordering-ui.62d46eec3c210c5257aa.js → 9.ordering-ui.cc1d13aa04732fde3671.js} +1 -1
  10. package/_bundles/ordering-ui.cc1d13aa04732fde3671.js +2 -0
  11. package/_modules/themes/callcenterOriginal/src/components/Orders/DeliveriesManager/index.js +4 -2
  12. package/_modules/themes/callcenterOriginal/src/components/Orders/OrdersDashboardControls/index.js +3 -1
  13. package/_modules/themes/callcenterOriginal/src/components/Orders/OrdersManager/index.js +2 -0
  14. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +8 -7
  15. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +5 -2
  16. package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +25 -19
  17. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -0
  18. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +133 -31
  19. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +37 -3
  20. package/_modules/themes/five/src/components/Cart/index.js +10 -6
  21. package/_modules/themes/five/src/components/Checkout/index.js +67 -22
  22. package/_modules/themes/five/src/components/GiftCard/GiftCardOrdersList/index.js +53 -0
  23. package/_modules/themes/five/src/components/GiftCard/GiftCardOrdersList/styles.js +16 -0
  24. package/_modules/themes/five/src/components/GiftCard/HorizontalGiftCardOrdersLayout/index.js +69 -0
  25. package/_modules/themes/five/src/components/GiftCard/HorizontalGiftCardOrdersLayout/styles.js +16 -0
  26. package/_modules/themes/five/src/components/GiftCard/SingleGiftCard/index.js +90 -0
  27. package/_modules/themes/five/src/components/GiftCard/SingleGiftCard/styles.js +43 -0
  28. package/_modules/themes/five/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.js +75 -0
  29. package/_modules/themes/five/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.js +19 -0
  30. package/_modules/themes/five/src/components/MyOrders/index.js +6 -1
  31. package/_modules/themes/five/src/components/OrderProgress/index.js +1 -1
  32. package/_modules/themes/five/src/components/OrdersOption/index.js +1 -0
  33. package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +165 -31
  34. package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +53 -9
  35. package/_modules/themes/five/src/components/ProductForm/index.js +1 -0
  36. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
  37. package/_modules/themes/five/src/components/UserFormDetails/index.js +5 -17
  38. package/_modules/themes/five/src/components/UserFormDetails/styles.js +3 -7
  39. package/index-template.js +9 -1
  40. package/package.json +2 -2
  41. package/src/themes/callcenterOriginal/src/components/Orders/DeliveriesManager/index.js +3 -1
  42. package/src/themes/callcenterOriginal/src/components/Orders/OrdersDashboardControls/index.js +5 -1
  43. package/src/themes/callcenterOriginal/src/components/Orders/OrdersManager/index.js +2 -0
  44. package/src/themes/five/src/components/BusinessBasicInformation/index.js +6 -3
  45. package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -2
  46. package/src/themes/five/src/components/BusinessItemAccordion/styles.js +8 -7
  47. package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -0
  48. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +156 -36
  49. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +66 -0
  50. package/src/themes/five/src/components/Cart/index.js +7 -4
  51. package/src/themes/five/src/components/Checkout/index.js +61 -35
  52. package/src/themes/five/src/components/GiftCard/GiftCardOrdersList/index.js +50 -0
  53. package/src/themes/five/src/components/GiftCard/GiftCardOrdersList/styles.js +34 -0
  54. package/src/themes/five/src/components/GiftCard/HorizontalGiftCardOrdersLayout/index.js +75 -0
  55. package/src/themes/five/src/components/GiftCard/HorizontalGiftCardOrdersLayout/styles.js +29 -0
  56. package/src/themes/five/src/components/GiftCard/SingleGiftCard/index.js +79 -0
  57. package/src/themes/five/src/components/GiftCard/SingleGiftCard/styles.js +79 -0
  58. package/src/themes/five/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.js +72 -0
  59. package/src/themes/five/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.js +31 -0
  60. package/src/themes/five/src/components/MyOrders/index.js +6 -1
  61. package/src/themes/five/src/components/OrderProgress/index.js +1 -1
  62. package/src/themes/five/src/components/OrdersOption/index.js +1 -0
  63. package/src/themes/five/src/components/PhoneAutocomplete/index.js +195 -46
  64. package/src/themes/five/src/components/PhoneAutocomplete/styles.js +106 -10
  65. package/src/themes/five/src/components/ProductForm/index.js +1 -0
  66. package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
  67. package/src/themes/five/src/components/UserFormDetails/index.js +6 -27
  68. package/src/themes/five/src/components/UserFormDetails/styles.js +0 -16
  69. package/template/assets/images/delivery.svg +11 -0
  70. package/template/assets/images/phone-hero-callcenter.png +0 -0
  71. package/template/assets/images/phone.svg +11 -0
  72. package/template/assets/images/pickup.svg +17 -0
  73. package/_bundles/ordering-ui.62d46eec3c210c5257aa.js +0 -2
  74. /package/_bundles/{7.ordering-ui.62d46eec3c210c5257aa.js.LICENSE.txt → 7.ordering-ui.cc1d13aa04732fde3671.js.LICENSE.txt} +0 -0
  75. /package/_bundles/{ordering-ui.62d46eec3c210c5257aa.js.LICENSE.txt → ordering-ui.cc1d13aa04732fde3671.js.LICENSE.txt} +0 -0
@@ -4,7 +4,8 @@ import {
4
4
  PhoneAutocomplete as PhoneAutocompleteController,
5
5
  useLanguage,
6
6
  useOrder,
7
- useCustomer
7
+ useCustomer,
8
+ useConfig
8
9
  } from 'ordering-components-external'
9
10
  import { useTheme } from 'styled-components'
10
11
 
@@ -22,7 +23,14 @@ import {
22
23
  Slogan,
23
24
  UserEdit,
24
25
  WrappBtn,
25
- SelectContainer
26
+ SelectContainer,
27
+ TypesContainer,
28
+ TypeButton,
29
+ IconTypeButton,
30
+ AdditionalTypesContainer,
31
+ PhoneAutocompleteContainer,
32
+ ImageWrapper,
33
+ ContinueButton
26
34
  } from './styles'
27
35
 
28
36
  import MdcCellphoneAndroid from '@meronex/icons/mdc/MdcCellphoneAndroid'
@@ -39,19 +47,26 @@ const PhoneAutocompleteUI = (props) => {
39
47
  onChangeNumber,
40
48
  setCustomerState,
41
49
  countryCallingCode,
42
- onRedirectPage
50
+ onRedirectPage,
51
+ urlPhone,
52
+ orderTypes,
53
+ localPhoneCode
43
54
  } = props
44
- const [orderState] = useOrder()
55
+ const allOrderTypes = [1, 2, 3, 4, 5]
56
+ const pickupTypes = [2, 3, 4, 5]
57
+ const [orderState, { changeType }] = useOrder()
45
58
  const [, t] = useLanguage()
46
59
  const theme = useTheme()
47
60
  const [, { deleteUserCustomer }] = useCustomer()
61
+ const [configState] = useConfig()
48
62
  const [alertState, setAlertState] = useState({ open: false, content: [] })
49
- const [inputValue, setInputValue] = useState('')
63
+ const [inputValue, setInputValue] = useState(urlPhone ?? '')
50
64
  const [optSelected, setOptSelected] = useState(null)
51
65
  const [isOpenUserData, setIsOpenUserData] = useState(false)
52
66
  const [isAddressFormOpen, setIsAddressFormOpen] = useState(false)
67
+ const [isPickupSelected, setIsPickupSelected] = useState(pickupTypes.includes(orderState?.options?.type))
53
68
  const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
54
-
69
+ const configTypes = configState?.configs?.order_types_allowed?.value.split('|').filter(value => (allOrderTypes.includes(Number(value)))).map(value => Number(value)) || []
55
70
  const userName = userCustomer?.lastname
56
71
  ? `${userCustomer?.name} ${userCustomer?.lastname}`
57
72
  : userCustomer?.name
@@ -75,6 +90,15 @@ const PhoneAutocompleteUI = (props) => {
75
90
  }
76
91
  }
77
92
 
93
+ const handleChangeType = (value) => {
94
+ if (!orderState?.loading) {
95
+ changeType(value)
96
+ if (value === 1) {
97
+ setIsPickupSelected(false)
98
+ }
99
+ }
100
+ }
101
+
78
102
  useEffect(() => {
79
103
  if (customersPhones?.error) {
80
104
  setAlertState({ open: true, content: [customersPhones?.error] })
@@ -97,13 +121,16 @@ const PhoneAutocompleteUI = (props) => {
97
121
  }
98
122
 
99
123
  const onChange = (option) => {
100
- if (!option) { onChangeNumber('') }
101
124
  setOptSelected(option)
102
125
  setInputValue(option ? option?.value : '')
126
+ if (!option) { onChangeNumber(''); return }
103
127
  const user = customersPhones.users?.find(user => user.cellphone === option?.value || user.phone === option?.value)
104
128
  if (user) {
105
129
  setCustomerState({ ...customerState, result: user })
106
- setOpenModal({ ...openModal, customer: true })
130
+ setOpenModal({ signup: false, customer: true })
131
+ } else {
132
+ setCustomerState({ ...customerState, result: { error: false } })
133
+ setOpenModal({ customer: false, signup: true })
107
134
  }
108
135
  }
109
136
 
@@ -119,11 +146,17 @@ const PhoneAutocompleteUI = (props) => {
119
146
  }
120
147
 
121
148
  const handleCloseAddressList = () => {
122
- setOpenModal({ openModal, customer: false })
149
+ setOpenModal({ ...openModal, customer: false })
123
150
  setCustomerState({ ...customerState, result: { error: false } })
124
151
  deleteUserCustomer(true)
125
152
  }
126
153
 
154
+ const handleChangeToPickup = () => {
155
+ const firstEnabledPickupType = orderTypes.find(type => configTypes?.includes(type.value) && type.value !== 1)?.value
156
+ handleChangeType(firstEnabledPickupType)
157
+ setIsPickupSelected(true)
158
+ }
159
+
127
160
  const optionsToSelect = customersPhones.users.map(user => {
128
161
  const obj = {}
129
162
  obj.value = user.cellphone || user.phone
@@ -131,53 +164,140 @@ const PhoneAutocompleteUI = (props) => {
131
164
  return obj
132
165
  }) || []
133
166
 
167
+ useEffect(() => {
168
+ if (!urlPhone) return
169
+ onInputChange(urlPhone, { action: 'url' })
170
+ onChange({ value: urlPhone, label: urlPhone })
171
+ }, [urlPhone, customersPhones?.users?.length])
172
+
173
+ useEffect(() => {
174
+ if (pickupTypes.includes(orderState?.options?.type)) {
175
+ setIsPickupSelected(true)
176
+ }
177
+ }, [orderState?.options?.type])
178
+
179
+ const OrderTypesComponent = () => {
180
+ return (
181
+ <>
182
+ {orderTypes && (configTypes ? orderTypes.filter(type => configTypes?.includes(type.value) && type.value !== 1) : orderTypes).map((item, i) => (
183
+ <Button
184
+ key={item.value}
185
+ onClick={() => handleChangeType(item.value)}
186
+ color={orderState?.options?.type === item?.value ? 'primary' : 'secondary'}
187
+ disabled={orderState?.loading}
188
+ className={orderState?.options?.type !== item?.value ? 'activated' : ''}
189
+ >
190
+ {item.text}
191
+ </Button>
192
+ ))}
193
+ </>
194
+ )
195
+ }
196
+
134
197
  return (
135
198
  <>
136
- <PhoneContainer bgimage={theme.images?.general?.homeHero}>
199
+ <PhoneContainer>
137
200
  <ContentWrapper>
138
201
  <Title>{t('TITLE_HOME_CALLCENTER', 'Welcome to your Ordering Call Center.')}</Title>
139
- <Slogan>{t('SUBTITLE_HOME_CALLCENTER', 'Start First by adding the customers\' phone number')}</Slogan>
140
- {!userCustomer && (
141
- <SelectContainer>
142
- <MdcCellphoneAndroid size={26} />
143
- <Select
144
- isSearchable
145
- isClearable
146
- className='basic-single'
147
- classNamePrefix='select'
148
- placeholder={t('PHONE_NUMBER', 'Phone number')}
149
- value={optSelected}
150
- noOptionsMessage={() => inputValue?.length > 6 ? t('NO_OPTIONS', 'No options') : t('TYPE_AT_LEAST_NUMBER_SUGGEST', 'Type at least 7 numbers for suggesstions')}
151
- inputValue={!optSelected ? inputValue : ''}
152
- onChange={onChange}
153
- onInputChange={onInputChange}
154
- isLoading={customersPhones?.loading}
155
- options={optionsToSelect}
156
- />
157
- </SelectContainer>
202
+ <Slogan>{t('SUBTITLE_HOME_CALLCENTER', 'Start first by selecting a delivery type')}</Slogan>
203
+ {!(userCustomer && orderState?.options?.address?.address) && (
204
+ <TypesContainer>
205
+ {configTypes.includes(1) && (
206
+ <TypeButton onClick={() => handleChangeType(1)} disabled={orderState?.loading} activated={!isPickupSelected}>
207
+ <IconTypeButton activated={!isPickupSelected}>
208
+ <img
209
+ src={theme?.images?.general?.deliveryIco}
210
+ width={20}
211
+ height={20}
212
+ />
213
+ </IconTypeButton>
214
+ <p>{t('DELIVERY', 'Delivery')}</p>
215
+ </TypeButton>
216
+ )}
217
+ {configTypes.some(type => pickupTypes.includes(type)) && (
218
+ <TypeButton
219
+ disabled={orderState?.loading}
220
+ activated={isPickupSelected}
221
+ onClick={() => handleChangeToPickup()}
222
+ >
223
+ <IconTypeButton activated={isPickupSelected}>
224
+ <img
225
+ src={theme?.images?.general?.pickupIco}
226
+ width={22}
227
+ height={22}
228
+ />
229
+ </IconTypeButton>
230
+ <p>{t('PICKUP', 'Pickup')}</p>
231
+ </TypeButton>
232
+ )}
233
+ </TypesContainer>
234
+ )}
235
+ {isPickupSelected && (
236
+ <>
237
+ <p>{t('WHAT_PICKUP_YOU_NEED', 'What kind of pickup do you need?')}</p>
238
+ <AdditionalTypesContainer>
239
+ <OrderTypesComponent />
240
+ </AdditionalTypesContainer>
241
+ </>
242
+ )}
243
+ {configTypes.includes(orderState?.options?.type) && (
244
+ <>
245
+ {!userCustomer && (
246
+ <PhoneAutocompleteContainer>
247
+ <h2>
248
+ {t('ADDING_CUSTOMERS_PHONE_NUMBER', 'Adding the customers’ phone number')}
249
+ </h2>
250
+ <WrappBtn>
251
+ <Button
252
+ color={(inputValue || (userCustomer && orderState?.options?.address?.address)) ? 'primary' : 'secundary'}
253
+ onMouseDown={() => !(userCustomer && orderState?.options?.address?.address) ? createNewUser() : handleFindClick()}
254
+ disabled={(!inputValue && !(userCustomer && orderState?.options?.address?.address))}
255
+ >
256
+ {
257
+ !(userCustomer && orderState?.options?.address?.address)
258
+ ? t('CREATE_CUSTOMER', 'Create new customer')
259
+ : `${t('CONTINUE_WITH', 'Continue with')} ${userName}`
260
+ }
261
+ </Button>
262
+ </WrappBtn>
263
+ <SelectContainer>
264
+ <MdcCellphoneAndroid size={18} color={theme?.colors?.primary} />
265
+ <Select
266
+ isSearchable
267
+ isClearable
268
+ className='basic-single'
269
+ classNamePrefix='select'
270
+ placeholder={t('PHONE_NUMBER', 'Phone number')}
271
+ value={optSelected}
272
+ noOptionsMessage={() => inputValue?.length > 6 ? t('NO_OPTIONS', 'No options') : t('TYPE_AT_LEAST_NUMBER_SUGGEST', 'Type at least 7 numbers for suggesstions')}
273
+ inputValue={!optSelected ? inputValue : ''}
274
+ onChange={onChange}
275
+ onInputChange={onInputChange}
276
+ isLoading={customersPhones?.loading}
277
+ options={optionsToSelect}
278
+ />
279
+ {optSelected && (
280
+ <ContinueButton>
281
+ <Button onClick={() => onChange(optSelected)} color='primary'>
282
+ {t('CONTINUE', 'Continue')}
283
+ </Button>
284
+ </ContinueButton>
285
+ )}
286
+ </SelectContainer>
287
+ </PhoneAutocompleteContainer>
288
+ )}
289
+ </>
158
290
  )}
159
- <WrappBtn>
160
- <Button
161
- color={inputValue || (userCustomer && orderState?.options?.address?.address) ? 'primary' : 'secundary'}
162
- onMouseDown={() => !(userCustomer && orderState?.options?.address?.address) ? createNewUser() : handleFindClick()}
163
- disabled={!inputValue && !(userCustomer && orderState?.options?.address?.address)}
164
- >
165
- {
166
- !(userCustomer && orderState?.options?.address?.address)
167
- ? t('CREATE_CUSTOMER', 'Create new customer')
168
- : `${t('CONTINUE_WITH', 'Continue with')} ${userName}`
169
- }
170
- </Button>
171
- </WrappBtn>
172
291
  </ContentWrapper>
292
+ <ImageWrapper bgimage={theme?.images?.general?.phoneHero} />
173
293
  </PhoneContainer>
174
294
  <Modal
175
295
  open={openModal.signup}
176
296
  width='80%'
177
- onClose={() => setOpenModal({ openModal, signup: false })}
297
+ onClose={() => setOpenModal({ ...openModal, signup: false })}
178
298
  >
179
299
  <SignUpForm
180
- externalPhoneNumber={`${countryCallingCode} ${optSelected?.value || phone}`}
300
+ externalPhoneNumber={`${localPhoneCode || countryCallingCode} ${optSelected?.value || phone}`}
181
301
  saveCustomerUser={saveCustomerUser}
182
302
  fieldsNotValid={props.fieldsNotValid}
183
303
  useChekoutFileds
@@ -210,7 +330,8 @@ const PhoneAutocompleteUI = (props) => {
210
330
  changeOrderAddressWithDefault
211
331
  userCustomerSetup={{
212
332
  ...customerState?.result,
213
- phone
333
+ phone,
334
+ urlPhone
214
335
  }}
215
336
  isEnableContinueButton
216
337
  isCustomerMode
@@ -234,9 +355,37 @@ const PhoneAutocompleteUI = (props) => {
234
355
  }
235
356
 
236
357
  export const PhoneAutocomplete = (props) => {
358
+ const [, t] = useLanguage()
237
359
  const phoneProps = {
238
360
  UIComponent: PhoneAutocompleteUI,
239
- ...props
361
+ ...props,
362
+ orderTypes: props.orderTypes || [
363
+ {
364
+ value: 1,
365
+ text: t('DELIVERY', 'Delivery'),
366
+ description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description'),
367
+ },
368
+ {
369
+ value: 2,
370
+ text: t('PICKUP', 'Pickup'),
371
+ description: t('ORDERTYPE_DESCRIPTION_PICKUP', 'Pickup description')
372
+ },
373
+ {
374
+ value: 3,
375
+ text: t('EAT_IN', 'Eat in'),
376
+ description: t('ORDERTYPE_DESCRIPTION_EATIN', 'Eat in description')
377
+ },
378
+ {
379
+ value: 4,
380
+ text: t('CURBSIDE', 'Curbside'),
381
+ description: t('ORDERTYPE_DESCRIPTION_CURBSIDE', 'Curbside description')
382
+ },
383
+ {
384
+ value: 5,
385
+ text: t('DRIVE_THRU', 'Drive thru'),
386
+ description: t('ORDERTYPE_DESCRIPTION_DRIVETHRU', 'Drive Thru description')
387
+ }
388
+ ]
240
389
  }
241
390
 
242
391
  return <PhoneAutocompleteController {...phoneProps} />
@@ -1,9 +1,10 @@
1
+ import React from 'react'
1
2
  import styled, { css } from 'styled-components'
2
3
 
3
4
  export const PhoneContainer = styled.div`
4
5
  width: 100%;
5
6
  height: calc(100vh - 97px);
6
-
7
+ display: flex;
7
8
  ${({ bgimage }) => bgimage && css`
8
9
  background-repeat: no-repeat, repeat;
9
10
  background-size: cover;
@@ -78,10 +79,7 @@ export const ContentWrapper = styled.div`
78
79
  justify-content: center;
79
80
  height: 100%;
80
81
  padding: 0px 20px 0px;
81
-
82
- .basic-single {
83
- margin-bottom: 15px;
84
- }
82
+ width: 70%;
85
83
 
86
84
  .select__control {
87
85
  border-radius: 30px;
@@ -126,11 +124,14 @@ export const ContentWrapper = styled.div`
126
124
  padding: 0px 40px 0px;
127
125
  `}
128
126
  }
127
+ @media (min-width: 1400px){
128
+ width: 60%;
129
+ }
129
130
  `
130
131
 
131
132
  export const WrappBtn = styled.div`
132
133
  width: 50%;
133
-
134
+ margin-top: 20px;
134
135
  button {
135
136
  min-width: 130px;
136
137
  max-width: 400px;
@@ -145,7 +146,6 @@ export const Title = styled.h1`
145
146
  text-align: left;
146
147
  font: normal normal normal 80px ${props => props.theme.fonts.special?.name || 'Georgia'};
147
148
  letter-spacing: 0px;
148
- color: #ffffff;
149
149
  text-shadow: 0px 3px 6px #00000029;
150
150
  opacity: 1;
151
151
  font-size: 35px;
@@ -160,7 +160,6 @@ export const Slogan = styled.p`
160
160
  text-align: left;
161
161
  font-size: 18px;
162
162
  letter-spacing: 0px;
163
- color: #fff;
164
163
  opacity: 1;
165
164
  margin-bottom: 15px;
166
165
 
@@ -256,7 +255,7 @@ export const SelectContainer = styled.div`
256
255
  svg{
257
256
  position: absolute;
258
257
  top: 0;
259
- left: 0;
258
+ left: 20px;
260
259
  transform: translate(50%, 70%);
261
260
  z-index: 10;
262
261
  }
@@ -264,7 +263,8 @@ export const SelectContainer = styled.div`
264
263
  width: 100%;
265
264
  .select__placeholder, .select__single-value, input {
266
265
  margin-left: 40px;
267
- z-index: 100
266
+ z-index: 100;
267
+ bottom: -10px;
268
268
  }
269
269
  .select__menu {
270
270
  position: relative;
@@ -279,6 +279,18 @@ export const SelectContainer = styled.div`
279
279
  height: 30px;
280
280
  }
281
281
  }
282
+ .select__control {
283
+ height: 45px;
284
+ padding-left: 10px;
285
+ }
286
+ .select__indicator {
287
+ bottom: 8px;
288
+ position: relative;
289
+ }
290
+ input {
291
+ position: relative;
292
+ top: -5px;
293
+ }
282
294
  }
283
295
  `
284
296
 
@@ -287,3 +299,87 @@ export const SearchContainer = styled.div`
287
299
  top: 0;
288
300
  width: 90%;
289
301
  `
302
+
303
+ const ImageWrapperStyled = styled.div`
304
+ width: 30%;
305
+ ${({ bgimage }) => bgimage && css`
306
+ background-repeat: no-repeat, repeat;
307
+ background-size: cover;
308
+ object-fit: cover;
309
+ background-position: center;
310
+ `}
311
+ @media (min-width: 1400px){
312
+ width: 40%;
313
+ }
314
+ `
315
+
316
+ export const ImageWrapper = (props) => {
317
+ const style = {}
318
+ style.backgroundImage = `url(${props.bgimage})`
319
+
320
+ return (
321
+ <ImageWrapperStyled {...props} style={style}>
322
+ {props.children}
323
+ </ImageWrapperStyled>
324
+ )
325
+ }
326
+
327
+ export const TypeButton = styled.div`
328
+ display: flex;
329
+ align-items: center;
330
+ width: 215px;
331
+ height: 75px;
332
+ border-radius: 7.6px;
333
+ padding: 16px;
334
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);
335
+ margin-right: 32px;
336
+ margin-bottom: 32px;
337
+ cursor: pointer;
338
+ background: ${({ activated, theme }) => activated ? theme?.colors?.primary : theme?.colors?.white};
339
+ p{
340
+ margin: 0;
341
+ margin-left: 33px;
342
+ ${({ activated, theme }) => activated && css`
343
+ color: ${theme?.colors?.white};
344
+ `}
345
+ }
346
+ `
347
+
348
+ export const IconTypeButton = styled.div`
349
+ display: flex;
350
+ justify-content: center;
351
+ align-items: center;
352
+ width: 44px;
353
+ height: 44px;
354
+ background: ${({ activated, theme }) => activated ? theme?.colors?.white : '#F3F9FF'};
355
+ border-radius: 44px;
356
+ `
357
+
358
+ export const TypesContainer = styled.div`
359
+ display: flex;
360
+ `
361
+
362
+ export const AdditionalTypesContainer = styled.div`
363
+ width: 60%;
364
+ display: flex;
365
+ margin-bottom: 20px;
366
+ button {
367
+ padding: 4px 10px;
368
+ border-radius: 50px;
369
+ font-size: 10px;
370
+ line-height: 0;
371
+ height: 25px;
372
+ margin-right: 20px;
373
+ }
374
+ .activated {
375
+ color: ${({ theme }) => theme?.colors?.darkTextColor}
376
+ }
377
+ `
378
+
379
+ export const PhoneAutocompleteContainer = styled.div`
380
+
381
+ h2 {
382
+ font-size: 20px;
383
+ margin-bottom: 20px;
384
+ }
385
+ `
@@ -416,6 +416,7 @@ const ProductOptionsUI = (props) => {
416
416
  observer
417
417
  observeParents
418
418
  parallax
419
+ slidesPerView={1}
419
420
  thumbs={{ swiper: thumbsSwiper }} className='mySwiper2'
420
421
  onSlideChange={() => handleSlideChange()}
421
422
  >
@@ -64,7 +64,7 @@ export const CardContainer = styled.div`
64
64
  `}
65
65
  }
66
66
  `}
67
-
67
+
68
68
  `}
69
69
  `
70
70
 
@@ -14,8 +14,7 @@ import {
14
14
  InputPhoneNumberWrapper,
15
15
  LanguageSelectorWrapper,
16
16
  SwitchWrapper,
17
- NotificationsGroupSwitchWrapper,
18
- TextLinkWrapper
17
+ NotificationsGroupSwitchWrapper
19
18
  } from './styles'
20
19
 
21
20
  import { Switch } from '../../../../../styles/Switch'
@@ -331,7 +330,7 @@ export const UserFormDetailsUI = (props) => {
331
330
  <BeforeMidComponents key={i} {...props} />))
332
331
  }
333
332
  {sortInputFields({ values: validationFields?.fields?.checkout }).map(field =>
334
- showField && showField(field.code) && showFieldWithTheme(field.code) && (
333
+ ((showField && showField(field.code) && showFieldWithTheme(field.code)) || user?.guest_id) && (
335
334
  <React.Fragment key={field.id}>
336
335
  {field.code === 'email' ? (
337
336
  ((requiredFields && requiredFields.includes(field.code)) || !requiredFields) && (
@@ -381,7 +380,7 @@ export const UserFormDetailsUI = (props) => {
381
380
  </React.Fragment>
382
381
  )
383
382
  )}
384
- {showInputBirthday && (
383
+ {((!user?.guest_id && showInputBirthday) || (user?.guest_id && requiredFields.includes('birthdate'))) && (
385
384
  <InputPhoneNumberWrapper>
386
385
  <p>{t('BIRTHDATE', 'Birthdate')}</p>
387
386
  <Input
@@ -392,11 +391,11 @@ export const UserFormDetailsUI = (props) => {
392
391
  onFocus={() => setOpenCalendar(true)}
393
392
  />
394
393
  {openCalendar && (
395
- <DatePickerUI value={birthdate} onChange={_handleChangeDate} name={'birthdate'}/>
394
+ <DatePickerUI value={birthdate} onChange={_handleChangeDate} name={'birthdate'}/>
396
395
  )}
397
396
  </InputPhoneNumberWrapper>
398
397
  )}
399
- {!!showInputPhoneNumber && showCustomerCellphone && ((requiredFields && requiredFields.includes('cellphone')) || !requiredFields) && (
398
+ {((!user?.guest_id && !!showInputPhoneNumber) || (user?.guest_id && requiredFields.includes('cellphone'))) && showCustomerCellphone && ((requiredFields && requiredFields.includes('cellphone')) || !requiredFields) && (
400
399
  <InputPhoneNumberWrapper>
401
400
  <p>{t('PHONE', 'Phone')}</p>
402
401
  <InputPhoneNumber
@@ -498,7 +497,7 @@ export const UserFormDetailsUI = (props) => {
498
497
  {formState.loading ? t('UPDATING', 'Updating...') : t('UPDATE', 'Update')}
499
498
  </Button>
500
499
  )}
501
- {requiredFields && !userSession?.guest_id && (
500
+ {requiredFields && (
502
501
  <Button
503
502
  id='form-btn'
504
503
  color='primary'
@@ -509,26 +508,6 @@ export const UserFormDetailsUI = (props) => {
509
508
  </Button>
510
509
  )}
511
510
  </ActionsForm>
512
- {requiredFields && isCheckout && userSession?.guest_id && (
513
- <>
514
- <Button
515
- id='form-btn'
516
- color='primary'
517
- type='button'
518
- onClick={() => setModalIsOpen(true)}
519
- disabled={formState.loading}
520
- >
521
- {formState.loading ? t('UPDATING', 'Updating...') : t('SIGN_UP_AND_PLACE_ORDER', 'Sign up and place order')}
522
- </Button>
523
- {isAllowGuest && (
524
- <TextLinkWrapper>
525
- <span onClick={() => handlePlaceOrderAsGuest()}>
526
- {t('PLACE_ORDER_AS_GUEST', 'Place order as guest')}
527
- </span>
528
- </TextLinkWrapper>
529
- )}
530
- </>
531
- )}
532
511
  </>
533
512
  ) : (
534
513
  <SkeletonForm>
@@ -208,19 +208,3 @@ export const SwitchWrapper = styled.div`
208
208
  justify-content: space-between;
209
209
  width: 100%;
210
210
  `
211
-
212
- export const TextLinkWrapper = styled.span`
213
- width: 100%;
214
- display: flex;
215
- justify-content: center;
216
- margin-top: 15px;
217
- span {
218
- font-size: 14px;
219
- text-align: center;
220
- cursor: pointer;
221
- color: ${props => props.theme.colors.primary};
222
- &:hover {
223
- text-decoration: underline;
224
- }
225
- }
226
- `
@@ -0,0 +1,11 @@
1
+ <svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_11706_62033)">
3
+ <path d="M15.7498 17.0625C15.7498 17.1495 15.7844 17.233 15.8459 17.2945C15.9075 17.3561 15.9909 17.3906 16.078 17.3906H16.4061V18.1722L15.9313 18.4095L16.2246 18.9968L16.7342 18.7418L17.2438 18.9968L17.5371 18.4095L17.0623 18.1722V17.3906H17.3905C17.4775 17.3906 17.5609 17.3561 17.6225 17.2945C17.684 17.233 17.7186 17.1495 17.7186 17.0625C17.7346 16.6065 17.7934 16.153 17.8941 15.708C18.0001 15.508 18.0526 15.284 18.0464 15.0577C18.0402 14.8314 17.9756 14.6106 17.8589 14.4167C17.7422 14.2228 17.5773 14.0623 17.3803 13.9509C17.1832 13.8395 16.9607 13.781 16.7344 13.781C16.508 13.781 16.2855 13.8395 16.0885 13.9509C15.8914 14.0623 15.7265 14.2228 15.6098 14.4167C15.4931 14.6106 15.4285 14.8314 15.4224 15.0577C15.4162 15.284 15.4686 15.508 15.5746 15.708C15.6752 16.153 15.7339 16.6065 15.7498 17.0625ZM16.7342 14.4375C16.8498 14.4374 16.9634 14.4679 17.0634 14.5258C17.1634 14.5837 17.2464 14.667 17.3039 14.7672C17.3614 14.8675 17.3914 14.9812 17.3909 15.0968C17.3904 15.2124 17.3593 15.3258 17.3009 15.4255C17.2833 15.4551 17.2705 15.4873 17.2631 15.521C17.174 15.921 17.1122 16.3266 17.0784 16.735H16.3894C16.3555 16.3266 16.2938 15.921 16.2046 15.521C16.1974 15.4871 16.1846 15.4546 16.1669 15.4248C16.1086 15.3251 16.0777 15.2117 16.0773 15.0961C16.0768 14.9806 16.1069 14.867 16.1645 14.7668C16.2221 14.6666 16.3051 14.5834 16.4051 14.5256C16.5051 14.4678 16.6187 14.4374 16.7342 14.4375Z" fill="#2C7BE5"/>
4
+ <path d="M20.6391 12.6502L20.0156 11.4069V9.84375C20.0156 9.75673 19.9811 9.67327 19.9195 9.61173C19.858 9.55019 19.7745 9.51562 19.6875 9.51562H13.7813C13.6942 9.51562 13.6108 9.55019 13.5492 9.61173C13.4877 9.67327 13.4531 9.75673 13.4531 9.84375V11.4069L12.8297 12.6502H12.833C12.8095 12.6955 12.7971 12.7458 12.7969 12.7969V13.1631C12.697 13.1147 12.5938 13.0734 12.4881 13.0397L10.2096 12.3375C10.6731 11.9397 11.0524 11.4531 11.3251 10.9065C11.5978 10.3599 11.7584 9.76428 11.7974 9.15469C12.1687 9.08114 12.5031 8.8815 12.744 8.5896C12.9848 8.2977 13.1174 7.9315 13.1192 7.55304C13.121 7.17459 12.9918 6.80716 12.7537 6.51301C12.5156 6.21886 12.1831 6.0161 11.8125 5.93906V3.9375C11.8114 2.98058 11.4308 2.06318 10.7541 1.38653C10.0775 0.709889 9.16006 0.329254 8.20314 0.328125H6.23439C5.27747 0.329254 4.36007 0.709889 3.68342 1.38653C3.00678 2.06318 2.62614 2.98058 2.62502 3.9375V5.93906C2.25448 6.0161 1.92197 6.21886 1.68383 6.51301C1.44569 6.80716 1.31657 7.17459 1.31834 7.55304C1.32012 7.9315 1.45269 8.2977 1.69358 8.5896C1.93447 8.8815 2.26886 9.08114 2.64011 9.15469C2.67918 9.76428 2.83978 10.3599 3.11246 10.9065C3.38514 11.4531 3.7644 11.9396 4.22791 12.3375L1.94941 13.0397C1.47899 13.1827 1.06721 13.4736 0.775161 13.8691C0.483112 14.2647 0.326353 14.7438 0.32814 15.2355V20.3438C0.32814 20.4308 0.36271 20.5142 0.424246 20.5758C0.485781 20.6373 0.569241 20.6719 0.656265 20.6719H20.3438C20.4308 20.6719 20.5142 20.6373 20.5758 20.5758C20.6373 20.5142 20.6719 20.4308 20.6719 20.3438V12.7969C20.6724 12.7461 20.6612 12.6959 20.6391 12.6502ZM19.4847 11.8125L19.8129 12.4688H13.6559L13.984 11.8125H19.4847ZM19.3594 10.1719V11.1562H14.1094V10.1719H19.3594ZM4.90056 12.8185C5.60247 13.234 6.40313 13.4531 7.21877 13.4531C8.0344 13.4531 8.83506 13.234 9.53697 12.8185L9.56978 12.829C9.32524 13.2305 8.97909 13.5602 8.56628 13.7851C8.15348 14.0099 7.68865 14.1217 7.21877 14.1094C6.74878 14.122 6.28379 14.0103 5.8708 13.7856C5.45781 13.5609 5.11147 13.2311 4.86677 12.8297L4.90056 12.8185ZM10.9535 5.25L10.7159 5.7248C10.6889 5.77944 10.647 5.8254 10.5952 5.85747C10.5433 5.88955 10.4835 5.90645 10.4226 5.90625H4.01495C3.95398 5.90645 3.89418 5.88955 3.84233 5.85747C3.79048 5.8254 3.74866 5.77944 3.72161 5.7248L3.48405 5.25H10.9535ZM5.27955 4.59375C5.35667 4.1352 5.59379 3.71881 5.94881 3.41851C6.30382 3.11821 6.75377 2.95344 7.21877 2.95344C7.68376 2.95344 8.13371 3.11821 8.48872 3.41851C8.84374 3.71881 9.08086 4.1352 9.15798 4.59375H5.27955ZM3.28127 6.23438C3.37332 6.33795 3.48633 6.42076 3.61282 6.47733C3.73932 6.5339 3.87639 6.56293 4.01495 6.5625H10.4226C10.5611 6.56293 10.6982 6.5339 10.8247 6.47733C10.9512 6.42076 11.0642 6.33795 11.1563 6.23438V8.53125H9.42672C9.30814 8.53144 9.19051 8.5101 9.07956 8.46825L7.73786 7.96327C7.39672 7.85053 7.02815 7.85191 6.68786 7.9672L5.35797 8.46825C5.24702 8.5101 5.12939 8.53144 5.01081 8.53125H3.28127V6.23438ZM12.4661 7.54688C12.4656 7.74933 12.4025 7.94666 12.2855 8.11188C12.1685 8.2771 12.0033 8.40214 11.8125 8.46989V6.62386C12.0033 6.69161 12.1685 6.81665 12.2855 6.98187C12.4025 7.14709 12.4656 7.34442 12.4661 7.54688ZM3.28127 3.9375C3.28213 3.15455 3.59354 2.40391 4.14717 1.85028C4.7008 1.29665 5.45144 0.985243 6.23439 0.984375H8.20314C8.98609 0.985243 9.73673 1.29665 10.2904 1.85028C10.844 2.40391 11.1554 3.15455 11.1563 3.9375V4.59375H9.82112C9.74167 3.95959 9.4334 3.37626 8.9542 2.95336C8.47501 2.53045 7.85788 2.29708 7.21877 2.29708C6.57965 2.29708 5.96252 2.53045 5.48333 2.95336C5.00414 3.37626 4.69586 3.95959 4.61641 4.59375H3.28127V3.9375ZM1.96614 7.54688C1.96675 7.34351 2.03046 7.14535 2.14847 6.97973C2.26649 6.81411 2.43299 6.68919 2.62502 6.62222V8.47153C2.43299 8.40456 2.26649 8.27964 2.14847 8.11402C2.03046 7.9484 1.96675 7.75024 1.96614 7.54688ZM3.298 9.1875H5.01081C5.20842 9.18766 5.40442 9.15197 5.5893 9.08217L6.9077 8.58539C7.10567 8.51939 7.31947 8.51789 7.51834 8.58113L8.84791 9.08217C9.0329 9.15195 9.229 9.18763 9.42672 9.1875H11.1395C11.0589 10.172 10.6109 11.0902 9.88441 11.7596C9.15796 12.429 8.20627 12.8006 7.21844 12.8006C6.2306 12.8006 5.27891 12.429 4.55246 11.7596C3.82601 11.0902 3.37797 10.172 3.29734 9.1875H3.298ZM0.98439 15.2355C0.983047 14.8843 1.09498 14.542 1.30358 14.2595C1.51218 13.9769 1.80632 13.7692 2.14234 13.6671L4.22823 13.0266C4.51767 13.5642 4.95025 14.0112 5.47807 14.3181C6.00589 14.6251 6.60836 14.78 7.21877 14.7656C7.82917 14.78 8.43164 14.6251 8.95946 14.3181C9.48728 14.0112 9.91986 13.5642 10.2093 13.0266L12.2949 13.6677C12.4765 13.7267 12.6465 13.8171 12.7969 13.9348V20.0156H11.8125V16.4062H11.1563V20.0156H3.28127V16.4062H2.62502V20.0156H0.98439V15.2355ZM20.0156 20.0156H13.4531V13.125H20.0156V20.0156Z" fill="#2C7BE5"/>
5
+ </g>
6
+ <defs>
7
+ <clipPath id="clip0_11706_62033">
8
+ <rect width="21" height="21" fill="white"/>
9
+ </clipPath>
10
+ </defs>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="19" height="16" viewBox="0 0 19 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_11706_62084)">
3
+ <path d="M12.9949 1C13.2959 1 13.5846 1.10536 13.7974 1.29289C14.0103 1.48043 14.1299 1.73478 14.1299 2V14C14.1299 14.2652 14.0103 14.5196 13.7974 14.7071C13.5846 14.8946 13.2959 15 12.9949 15H6.185C5.88399 15 5.5953 14.8946 5.38245 14.7071C5.1696 14.5196 5.05002 14.2652 5.05002 14V2C5.05002 1.73478 5.1696 1.48043 5.38245 1.29289C5.5953 1.10536 5.88399 1 6.185 1H12.9949ZM6.185 0C5.58297 0 5.0056 0.210714 4.5799 0.585786C4.15419 0.960859 3.91504 1.46957 3.91504 2V14C3.91504 14.5304 4.15419 15.0391 4.5799 15.4142C5.0056 15.7893 5.58297 16 6.185 16H12.9949C13.5969 16 14.1743 15.7893 14.6 15.4142C15.0257 15.0391 15.2648 14.5304 15.2648 14V2C15.2648 1.46957 15.0257 0.960859 14.6 0.585786C14.1743 0.210714 13.5969 0 12.9949 0L6.185 0Z" fill="#2C7BE5"/>
4
+ <path d="M9.59006 14C9.89107 14 10.1798 13.8946 10.3926 13.7071C10.6055 13.5196 10.725 13.2652 10.725 13C10.725 12.7348 10.6055 12.4804 10.3926 12.2929C10.1798 12.1054 9.89107 12 9.59006 12C9.28904 12 9.00036 12.1054 8.78751 12.2929C8.57466 12.4804 8.45508 12.7348 8.45508 13C8.45508 13.2652 8.57466 13.5196 8.78751 13.7071C9.00036 13.8946 9.28904 14 9.59006 14Z" fill="#2C7BE5"/>
5
+ </g>
6
+ <defs>
7
+ <clipPath id="clip0_11706_62084">
8
+ <rect width="18.1597" height="16" fill="white" transform="translate(0.509766)"/>
9
+ </clipPath>
10
+ </defs>
11
+ </svg>