ordering-ui-external 14.1.7 → 14.1.9

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 (81) hide show
  1. package/_bundles/{7.ordering-ui.d53641b81f759911f36f.js → 7.ordering-ui.8deae335e250e653c308.js} +1 -1
  2. package/_bundles/ordering-ui.8deae335e250e653c308.js +2 -0
  3. package/_modules/components/BusinessesMap/index.js +14 -5
  4. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
  5. package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +32 -11
  6. package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +7 -6
  7. package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +12 -5
  8. package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
  9. package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
  10. package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +10 -11
  11. package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +3 -4
  12. package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
  13. package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +12 -6
  14. package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +6 -3
  15. package/_modules/themes/callcenterOriginal/src/styles/Buttons/index.js +5 -6
  16. package/_modules/themes/five/src/components/AddressDetails/styles.js +2 -2
  17. package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +5 -3
  18. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +14 -2
  19. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +1 -1
  20. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -8
  21. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
  22. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
  23. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  24. package/_modules/themes/five/src/components/Cart/index.js +1 -1
  25. package/_modules/themes/five/src/components/Cart/styles.js +5 -2
  26. package/_modules/themes/five/src/components/Checkout/index.js +2 -2
  27. package/_modules/themes/five/src/components/Checkout/styles.js +5 -4
  28. package/_modules/themes/five/src/components/OrderDetails/index.js +12 -5
  29. package/_modules/themes/five/src/components/OrdersOption/styles.js +1 -1
  30. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +6 -5
  31. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +1 -1
  32. package/_modules/themes/five/src/components/UserDetails/index.js +7 -7
  33. package/_modules/themes/five/src/components/UserDetails/styles.js +8 -7
  34. package/_modules/themes/five/src/components/UserFormDetails/index.js +5 -5
  35. package/package.json +2 -2
  36. package/src/components/BusinessesMap/index.js +11 -5
  37. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
  38. package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +49 -16
  39. package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -8
  40. package/src/themes/callcenterOriginal/src/components/AddressList/index.js +9 -3
  41. package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -6
  42. package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
  43. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +6 -8
  44. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +1 -1
  45. package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
  46. package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +5 -5
  47. package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
  48. package/src/themes/callcenterOriginal/src/styles/Buttons/index.js +3 -3
  49. package/src/themes/five/src/components/AddressDetails/styles.js +2 -4
  50. package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -2
  51. package/src/themes/five/src/components/BusinessBasicInformation/index.js +17 -6
  52. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +6 -1
  53. package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -9
  54. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
  55. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
  56. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  57. package/src/themes/five/src/components/Cart/index.js +7 -1
  58. package/src/themes/five/src/components/Cart/styles.js +6 -0
  59. package/src/themes/five/src/components/Checkout/index.js +20 -20
  60. package/src/themes/five/src/components/Checkout/styles.js +8 -0
  61. package/src/themes/five/src/components/FavoriteList/index.js +9 -8
  62. package/src/themes/five/src/components/FavoriteList/styles.js +1 -0
  63. package/src/themes/five/src/components/OrderDetails/index.js +38 -3
  64. package/src/themes/five/src/components/OrdersOption/styles.js +1 -1
  65. package/src/themes/five/src/components/ProductOptionSubOption/index.js +2 -1
  66. package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
  67. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +1 -1
  68. package/src/themes/five/src/components/UserDetails/index.js +8 -8
  69. package/src/themes/five/src/components/UserDetails/styles.js +16 -9
  70. package/src/themes/five/src/components/UserFormDetails/index.js +2 -4
  71. package/_bundles/ordering-ui.d53641b81f759911f36f.js +0 -2
  72. /package/_bundles/{0.ordering-ui.d53641b81f759911f36f.js → 0.ordering-ui.8deae335e250e653c308.js} +0 -0
  73. /package/_bundles/{1.ordering-ui.d53641b81f759911f36f.js → 1.ordering-ui.8deae335e250e653c308.js} +0 -0
  74. /package/_bundles/{2.ordering-ui.d53641b81f759911f36f.js → 2.ordering-ui.8deae335e250e653c308.js} +0 -0
  75. /package/_bundles/{4.ordering-ui.d53641b81f759911f36f.js → 4.ordering-ui.8deae335e250e653c308.js} +0 -0
  76. /package/_bundles/{5.ordering-ui.d53641b81f759911f36f.js → 5.ordering-ui.8deae335e250e653c308.js} +0 -0
  77. /package/_bundles/{6.ordering-ui.d53641b81f759911f36f.js → 6.ordering-ui.8deae335e250e653c308.js} +0 -0
  78. /package/_bundles/{7.ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → 7.ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
  79. /package/_bundles/{8.ordering-ui.d53641b81f759911f36f.js → 8.ordering-ui.8deae335e250e653c308.js} +0 -0
  80. /package/_bundles/{9.ordering-ui.d53641b81f759911f36f.js → 9.ordering-ui.8deae335e250e653c308.js} +0 -0
  81. /package/_bundles/{ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
@@ -1,20 +1,22 @@
1
1
  import React from 'react'
2
2
  import { BusinessesMap as BusinessesMapController, GoogleMapsMap, useConfig, useOrder } from 'ordering-components-external'
3
3
  import { WrapperMap } from './styles'
4
+ import { useTheme } from 'styled-components'
4
5
 
5
6
  const BusinessesMapUI = (props) => {
6
7
  const {
7
8
  userLocation,
8
9
  businessLocations,
9
10
  onBusinessClick,
10
- setErrors
11
+ setErrors,
12
+ businessList
11
13
  } = props
12
14
 
13
15
  const [configState] = useConfig()
14
16
  const [orderState] = useOrder()
15
-
17
+ const theme = useTheme()
16
18
  const googleMapsControls = {
17
- defaultZoom: 15,
19
+ defaultZoom: 18,
18
20
  zoomControl: true,
19
21
  streetViewControl: false,
20
22
  fullscreenControl: false,
@@ -23,7 +25,7 @@ const BusinessesMapUI = (props) => {
23
25
  mapTypeControlOptions: {
24
26
  mapTypeIds: ['roadmap', 'satellite']
25
27
  },
26
- isMarkerDraggable: true
28
+ isMarkerDraggable: false
27
29
  }
28
30
 
29
31
  return (
@@ -36,13 +38,17 @@ const BusinessesMapUI = (props) => {
36
38
  <BeforeComponent key={i} {...props} />))}
37
39
  <WrapperMap disabled={orderState.loading}>
38
40
  <GoogleMapsMap
41
+ useMapWithBusinessZones
42
+ deactiveAlerts
43
+ businessMap
39
44
  apiKey={configState?.configs?.google_maps_api_key?.value}
40
45
  location={userLocation}
41
46
  locations={businessLocations}
42
47
  mapControls={googleMapsControls}
43
48
  maxLimitLocation={parseInt(configState?.configs?.meters_to_change_address?.value)}
44
- businessMap
45
49
  onBusinessClick={onBusinessClick}
50
+ businessZones={businessList?.map(business => business?.zones)}
51
+ fallbackIcon={theme.images?.dummies?.businessLogo}
46
52
  setErrors={setErrors}
47
53
  />
48
54
  </WrapperMap>
@@ -125,7 +125,7 @@ const SingleOrderCardUI = (props) => {
125
125
  className='review'
126
126
  onClick={() => setOrderSelected(order)}
127
127
  >
128
- {order?.review ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')}
128
+ {!!order?.review ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')}
129
129
  </Button>
130
130
  )}
131
131
  {!hideReorderButton && typeof order?.id === 'number' && (
@@ -69,6 +69,7 @@ const AddressFormUI = (props) => {
69
69
  const [alertState, setAlertState] = useState({ open: false, content: [] })
70
70
  const [addressValue, setAddressValue] = useState(formState.changes?.address ?? addressState.address?.address ?? '')
71
71
  const [firstLocationNoEdit, setFirstLocationNoEdit] = useState({ value: null })
72
+ const [showMap, setShowMap] = useState(false)
72
73
  const isEditing = !!addressState.address?.id
73
74
  const googleInputRef = useRef()
74
75
 
@@ -438,22 +439,53 @@ const AddressFormUI = (props) => {
438
439
  />
439
440
  </AddressWrap>
440
441
 
441
- {locationChange && (addressState?.address?.location || formState?.changes?.location) && (
442
- <WrapperMap isEnableContinueButton={isEnableContinueButton} notUseCustomerInfo={notUseCustomerInfo}>
443
- <GoogleMapsMap
444
- useMapWithBusinessZones
445
- deactiveAlerts
446
- apiKey={googleMapsApiKey}
447
- location={locationChange}
448
- locations={businessesList?.businesses}
449
- fixedLocation={!isEditing ? firstLocationNoEdit.value : null}
450
- mapControls={googleMapsControls}
451
- handleChangeAddressMap={handleChangeAddress}
452
- setErrors={setMapErrors}
453
- maxLimitLocation={parseInt(maxLimitLocation, 10)}
454
- businessZones={businessesList?.businesses?.map(business => business?.zones)}
455
- fallbackIcon={theme.images?.dummies?.businessLogo}
456
- />
442
+ {(addressState?.address?.location || formState?.changes?.location) && (
443
+ <WrapperMap isEnableContinueButton={isEnableContinueButton} notUseCustomerInfo={notUseCustomerInfo} addFormRestrictions={addFormRestrictions}>
444
+ <section>
445
+ {!showMap && (
446
+ <>
447
+ <GeoAlt style={{ fontSize: 25, marginRight: 5 }} />
448
+ {(addressState?.address?.address || formState?.changes?.address) && (
449
+ <span>{addressState?.address?.address || formState?.changes?.address}{', '}</span>
450
+ )}
451
+ {(addressState?.address?.country || formState?.changes?.country) && (
452
+ <span>{addressState?.address?.country || formState?.changes?.country}{', '}</span>
453
+ )}
454
+ {(addressState?.address?.address_notes || formState?.changes?.address_notes) && (
455
+ <span>{addressState?.address?.address_notes || formState?.changes?.address_notes}{', '}</span>
456
+ )}
457
+ {(addressState?.address?.internal_number || formState?.changes?.internal_number) && (
458
+ <span>{addressState?.address?.internal_number || formState?.changes?.internal_number}{', '}</span>
459
+ )}
460
+ {(addressState?.address?.zipcode || formState?.changes?.zipcode) && (
461
+ <span>{addressState?.address?.zipcode || formState?.changes?.zipcode}{', '}</span>
462
+ )}
463
+ </>
464
+ )}
465
+ <a
466
+ style={{ textDecoration: 'underline', color: 'blue', cursor: 'pointer' }}
467
+ onClick={() => setShowMap(!showMap)}
468
+ >
469
+ {showMap ? t('HIDE_MAP', 'Hide Map') : t('SHOW_MAP', 'Show Map')}
470
+ </a>
471
+ </section>
472
+ {locationChange && showMap && (
473
+ <GoogleMapsMap
474
+ useMapWithBusinessZones
475
+ deactiveAlerts
476
+ avoidFitBounds
477
+ apiKey={googleMapsApiKey}
478
+ location={locationChange}
479
+ locations={businessesList?.businesses}
480
+ fixedLocation={!isEditing ? firstLocationNoEdit.value : null}
481
+ mapControls={googleMapsControls}
482
+ handleChangeAddressMap={handleChangeAddress}
483
+ setErrors={setMapErrors}
484
+ maxLimitLocation={parseInt(maxLimitLocation, 10)}
485
+ businessZones={businessesList?.businesses?.map(business => business?.zones)}
486
+ fallbackIcon={theme.images?.dummies?.businessLogo}
487
+ />
488
+ )}
457
489
  </WrapperMap>
458
490
  )}
459
491
  </React.Fragment>
@@ -522,6 +554,7 @@ const AddressFormUI = (props) => {
522
554
  type='button'
523
555
  disabled={formState.loading}
524
556
  onClick={() => onCancel()}
557
+ hoverColor='#CCC'
525
558
  >
526
559
  {t('CANCEL', 'Cancel')}
527
560
  </Button>
@@ -198,18 +198,20 @@ export const AddressTagSection = styled.div`
198
198
  `
199
199
 
200
200
  export const WrapperMap = styled.div`
201
+ z-index: 100;
201
202
  width: 50%;
202
203
  position: absolute;
203
204
  bottom: 2%;
204
205
  right: 0;
205
206
  padding-right: 20px;
206
- ${({ isEnableContinueButton, notUseCustomerInfo }) => isEnableContinueButton ? css`
207
- height: 460px;
208
- ` : notUseCustomerInfo ? css`
209
- height: 370px;
210
- ` : css`
211
- height: 480px;
212
- `}
207
+ height: ${({ isEnableContinueButton, notUseCustomerInfo, addFormRestrictions }) =>
208
+ isEnableContinueButton
209
+ ? addFormRestrictions ? '460px' : '425px'
210
+ : notUseCustomerInfo
211
+ ? '370px'
212
+ : '480px'
213
+ };
214
+
213
215
  > div {
214
216
  position: relative !important;
215
217
  width: 100% !important;
@@ -237,7 +239,7 @@ export const AddressMarkContainer = styled.div`
237
239
  align-items: center;
238
240
  border-radius: 4px;
239
241
  position: absolute;
240
- top: -35px;
242
+ top: 50px;
241
243
  width: max-content;
242
244
  p {
243
245
  margin: 0;
@@ -202,11 +202,15 @@ const AddressListUI = (props) => {
202
202
  }, [isOpenUserData])
203
203
 
204
204
  useEffect(() => {
205
- if (userCustomerSetup?.imported_address_text && addressList.addresses?.length === 0 && !addressList?.loading && !addressList?.error) {
205
+ const addressValidation = addressList.addresses?.length === 0 && !addressList?.loading && !addressList?.error
206
+ if (userCustomerSetup?.imported_address_text && addressValidation) {
206
207
  openAddress({
207
208
  address: userCustomerSetup?.imported_address_text
208
209
  })
209
210
  }
211
+ if (!userCustomerSetup?.imported_address_text && addressValidation) {
212
+ openAddress({})
213
+ }
210
214
  }, [userCustomerSetup?.imported_address_text, addressList.addresses, addressList?.loading, addressList?.error])
211
215
 
212
216
  return (
@@ -228,13 +232,14 @@ const AddressListUI = (props) => {
228
232
  addFormRestrictions={addFormRestrictions}
229
233
  >
230
234
  {
231
- !addFormRestrictions && (!isPopover || !addressOpen) && !isOpenUserData && (
235
+ !addFormRestrictions && !addressOpen && !isOpenUserData && (
232
236
  <Button
233
237
  className='add'
234
238
  outline
235
239
  color={isEnableContinueButton && addressList?.addresses?.length > 0 ? 'secondary' : 'primary'}
236
240
  onClick={() => openAddress({})}
237
241
  disabled={orderState?.loading || actionStatus.loading}
242
+ hoverColor='#CCC'
238
243
  >
239
244
  {(orderState?.loading || actionStatus.loading) ? t('LOADING', 'Loading') : t('ADD_NEW_ADDRESS', 'Add New Address')}
240
245
  </Button>
@@ -348,7 +353,7 @@ const AddressListUI = (props) => {
348
353
  )}
349
354
  </List>
350
355
  {addressOpen && !notUseCustomerInfo && (
351
- <AddressFormContainer width='50%' isEnableContinueButton={isEnableContinueButton}>
356
+ <AddressFormContainer width='50%' isEnableContinueButton={isEnableContinueButton} addFormRestrictions={addFormRestrictions}>
352
357
  <TitleFormContainer>
353
358
  {!addFormRestrictions && (
354
359
  <CloseIcon>
@@ -374,6 +379,7 @@ const AddressListUI = (props) => {
374
379
  type='button'
375
380
  disabled={(addressList.loading || actionStatus.loading || orderState.loading)}
376
381
  onClick={() => onCancel()}
382
+ hoverColor='#CCC'
377
383
  >
378
384
  {t('CANCEL', 'Cancel')}
379
385
  </Button>
@@ -105,7 +105,7 @@ export const AddressItemActions = styled.div`
105
105
  cursor: pointer;
106
106
  margin: 0px 5px;
107
107
  font-size: 20px;
108
-
108
+
109
109
  svg {
110
110
  color: #B1BCCC;
111
111
  }
@@ -175,7 +175,7 @@ export const ContinueButton = styled.div`
175
175
  width: 100%;
176
176
  position: sticky;
177
177
  bottom: 1px;
178
-
178
+
179
179
  button {
180
180
  width: 100%;
181
181
  white-space: nowrap;
@@ -204,7 +204,7 @@ export const List = styled.div`
204
204
  margin-top: 0px;
205
205
  ` : css`
206
206
  margin-top: 200px;
207
- `}
207
+ `}
208
208
  ${({ addFormRestrictions }) => addFormRestrictions && css`
209
209
  height: 405px;
210
210
  `}
@@ -219,9 +219,9 @@ export const AddressFormContainer = styled.div`
219
219
  ${({ width }) => css`
220
220
  width: ${width};
221
221
  `}
222
- ${({ isEnableContinueButton }) => isEnableContinueButton && css`
222
+ ${({ isEnableContinueButton, addFormRestrictions }) => isEnableContinueButton && css`
223
223
  position: relative;
224
- bottom: 189px;
224
+ bottom: 164px;
225
225
  `}
226
226
  `
227
227
 
@@ -234,7 +234,7 @@ export const CloseIcon = styled.div`
234
234
  `
235
235
 
236
236
  export const TitleFormContainer = styled.div`
237
- display: flex;
237
+ display: flex;
238
238
  align-items: center;
239
239
  margin-top: 7px;
240
240
  h1 {
@@ -159,7 +159,7 @@ export const ErrorMsg = styled.span`
159
159
  export const InputBeforeIconWrapper = styled.div`
160
160
  position: absolute;
161
161
  height: 100%;
162
- top: 13px;
162
+ top: 10px;
163
163
  left: 100px;
164
164
 
165
165
  ${props => props.theme.rtl && css`
@@ -4,7 +4,6 @@ import {
4
4
  PhoneAutocomplete as PhoneAutocompleteController,
5
5
  useLanguage,
6
6
  useOrder,
7
- useCustomer,
8
7
  useConfig,
9
8
  useEvent
10
9
  } from 'ordering-components-external'
@@ -62,7 +61,6 @@ const PhoneAutocompleteUI = (props) => {
62
61
  const [orderState, { changeType }] = useOrder()
63
62
  const [, t] = useLanguage()
64
63
  const theme = useTheme()
65
- const [, { deleteUserCustomer }] = useCustomer()
66
64
  const [configState] = useConfig()
67
65
  const [events] = useEvent()
68
66
  const [alertState, setAlertState] = useState({ open: false, content: [] })
@@ -78,7 +76,7 @@ const PhoneAutocompleteUI = (props) => {
78
76
  value: userCustomer.cellphone || userCustomer.phone,
79
77
  label: `${countryPhoneCode ? `(${countryPhoneCode})` : ''} ${userCustomer?.phone && !userCustomer?.cellphone ? `${userCustomer?.phone}` : ''} ${userCustomer?.cellphone ? `${userCustomer.cellphone}` : ''} - {${userCustomer.name}}`,
80
78
  flag: userCustomer?.imported_address_text && userCustomer?.addresses?.length === 0,
81
- lastname: userCustomer.lastname
79
+ lastname: `${userCustomer.name} ${userCustomer.lastname}`
82
80
  } : null)
83
81
  const configTypes = configState?.configs?.order_types_allowed?.value.split('|').filter(value => (allOrderTypes.includes(Number(value)))).map(value => Number(value)) || []
84
82
  const userName = userCustomer?.lastname
@@ -141,6 +139,7 @@ const PhoneAutocompleteUI = (props) => {
141
139
  setOptSelected(null)
142
140
  setCustomersPhones({ ...customersPhones, users: [] })
143
141
  setInputValue('')
142
+ onChangeNumber('')
144
143
  return
145
144
  }
146
145
  let user
@@ -149,7 +148,7 @@ const PhoneAutocompleteUI = (props) => {
149
148
  }
150
149
  setOptSelected({
151
150
  ...option,
152
- lastname: user?.lastname ?? user?.name
151
+ lastname: `${user?.name} ${user?.lastname}`
153
152
  })
154
153
  setInputValue(option ? option?.value : '')
155
154
  if (!option) {
@@ -181,7 +180,6 @@ const PhoneAutocompleteUI = (props) => {
181
180
  const handleCloseAddressList = () => {
182
181
  setOpenModal({ ...openModal, customer: false })
183
182
  setCustomerState({ ...customerState, result: { error: false } })
184
- deleteUserCustomer(true)
185
183
  if (isFromUrlPhone) {
186
184
  onRedirectPhoneUrlPage && onRedirectPhoneUrlPage('home')
187
185
  }
@@ -197,7 +195,7 @@ const PhoneAutocompleteUI = (props) => {
197
195
  const countryPhoneCode = user?.country_phone_code ?? user?.country_code
198
196
  const obj = {}
199
197
  obj.value = user.cellphone || user.phone
200
- obj.label = `${countryPhoneCode ? `(${countryPhoneCode})` : ''} ${user?.phone && !user?.cellphone ? `${user?.phone}` : ''} ${user?.cellphone ? `${user.cellphone}` : ''} - {${user.name}}`
198
+ obj.label = `${countryPhoneCode ? `(${countryPhoneCode})` : ''} ${user?.phone && !user?.cellphone ? `${user?.phone}` : ''} ${user?.cellphone ? `${user.cellphone}` : ''} - {${user.name} ${user?.lastname ?? ''}}`
201
199
  obj.flag = user?.imported_address_text && user?.addresses?.length === 0
202
200
  return obj
203
201
  }) || []
@@ -328,7 +326,7 @@ const PhoneAutocompleteUI = (props) => {
328
326
  onChange={onChange}
329
327
  onInputChange={onInputChange}
330
328
  isLoading={customersPhones?.loading}
331
- options={optionsToSelect}
329
+ options={optionsToSelect.filter(opt => inputValue ? opt.value.toString().includes(inputValue) : opt)}
332
330
  components={{ Option }}
333
331
  />
334
332
  {optSelected && (
@@ -351,7 +349,7 @@ const PhoneAutocompleteUI = (props) => {
351
349
  onClose={() => setOpenModal({ ...openModal, signup: false })}
352
350
  >
353
351
  <SignUpForm
354
- externalPhoneNumber={`${localPhoneCode || countryCallingCode} ${optSelected?.value || phone}`}
352
+ externalPhoneNumber={`${countryCallingCode || localPhoneCode} ${optSelected?.value || phone}`}
355
353
  saveCustomerUser={saveCustomerUser}
356
354
  fieldsNotValid={props.fieldsNotValid}
357
355
  useChekoutFileds
@@ -357,7 +357,7 @@ export const IconTypeButton = styled.div`
357
357
  align-items: center;
358
358
  width: 44px;
359
359
  height: 44px;
360
- background: ${({ activated, theme }) => activated ? theme?.colors?.white : '#F3F9FF'};
360
+ background: ${({ theme }) => theme?.colors?.danger100 ?? '#FEEDF0'};
361
361
  border-radius: 44px;
362
362
  `
363
363
 
@@ -247,7 +247,7 @@ const SignUpFormUI = (props) => {
247
247
  <BeforeComponent key={i} {...props} />))}
248
248
  <SignUpContainer isPopup={isPopup}>
249
249
  <FormSide isPopup={isPopup}>
250
- <Title>{t('CREATE_NEW_USER', 'Create new user')}</Title>
250
+ <Title>{t('CREATE_USER', 'Create new user')}</Title>
251
251
  <FormInput
252
252
  noValidate
253
253
  isPopup={isPopup}
@@ -395,7 +395,7 @@ const SignUpFormUI = (props) => {
395
395
  type='submit'
396
396
  disabled={formState.loading || validationFields?.loading}
397
397
  >
398
- {formState.loading ? `${t('LOADING', 'Loading')}...` : t('CREATE_NEW_USER', 'Create new user')}
398
+ {formState.loading ? `${t('LOADING', 'Loading')}...` : t('CREATE_USER', 'Create new user')}
399
399
  </Button>
400
400
  </ButtonContainer>
401
401
  </FormInput>
@@ -407,7 +407,7 @@ const SignUpFormUI = (props) => {
407
407
  )}
408
408
  </FormSide>
409
409
  <Alert
410
- title={t('CREATE_NEW_USER', 'Create new user')}
410
+ title={t('CREATE_USER', 'Create new user')}
411
411
  content={alertState.content}
412
412
  acceptText={t('ACCEPT', 'Accept')}
413
413
  open={alertState.open}
@@ -72,18 +72,18 @@ const UserDetailsUI = (props) => {
72
72
  <BeforeComponent key={i} {...props} />))}
73
73
  {(validationFields.loading || formState.loading || userState.loading) && (
74
74
  <UserData>
75
- {validationFieldsLength?.map(field => (
75
+ {[...Array(isCustomerMode ? 1 : validationFieldsLength?.length)]?.map(field => (
76
76
  <React.Fragment key={field?.id}>
77
- <Skeleton width={250} height={50} />
78
- <Skeleton width={180} height={25} />
79
- <Skeleton width={210} height={50} />
77
+ <Skeleton width={250} height={isCustomerMode ? 10 : 50} />
78
+ <Skeleton width={180} height={isCustomerMode ? 10 : 25} />
79
+ <Skeleton width={210} height={isCustomerMode ? 10 : 50} />
80
80
  </React.Fragment>
81
81
  ))}
82
82
  </UserData>
83
83
  )}
84
84
 
85
85
  {!(validationFields.loading || formState.loading || userState.loading) && (
86
- <Container>
86
+ <Container isEdit={isEdit}>
87
87
  {isModal && (
88
88
  <TitleContainer isAddressFormOpen={isAddressFormOpen && !isEdit}>
89
89
  <ModalIcon>
@@ -1,6 +1,8 @@
1
1
  import styled, { css } from 'styled-components'
2
2
 
3
- export const Container = styled.div``
3
+ export const Container = styled.div`
4
+ height: ${({ isEdit }) => isEdit ? 'auto' : '145px'};
5
+ `
4
6
 
5
7
  export const Header = styled.div`
6
8
  display: flex;
@@ -109,7 +109,7 @@ export const Button = styled.button`
109
109
  `}
110
110
  }
111
111
  `}
112
- ${({ outline }) => outline && css`
112
+ ${({ outline, hoverColor }) => outline && css`
113
113
  background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
114
114
  color: #CCC;
115
115
  border-color: #CCC;
@@ -119,7 +119,7 @@ export const Button = styled.button`
119
119
  }
120
120
  &:hover {
121
121
  background: '#CCC';
122
- color: #FFF;
122
+ color: ${hoverColor ?? '#FFF'};
123
123
  }
124
124
  `}
125
125
  ${({ circle }) => circle && css`
@@ -154,7 +154,7 @@ export const Button = styled.button`
154
154
  `}
155
155
  ${({ color }) => color === 'primary' && css`
156
156
  background: ${props => props.theme.colors.primary};
157
- color: ${props => props.theme.colors.primaryContrast};
157
+ color: #FFF;
158
158
  border-color: ${props => props.theme.colors.primary};
159
159
  &:hover {
160
160
  background: ${props => props.theme.colors.primary};
@@ -38,9 +38,7 @@ export const Text = styled.div`
38
38
  white-space: nowrap;
39
39
 
40
40
  h1{
41
- overflow: hidden;
42
- text-overflow: ellipsis;
43
- white-space: nowrap;
41
+ white-space: normal;
44
42
  width: 100%;
45
43
  font-weight: 600;
46
44
  font-size: 16px;
@@ -67,6 +65,6 @@ export const Text = styled.div`
67
65
 
68
66
  export const ToggleMap = styled.div`
69
67
  span {
70
- margin: 0 auto;
68
+ margin: 0;
71
69
  }
72
70
  `
@@ -59,6 +59,7 @@ export const BusinessInfoComponent = (props) => {
59
59
  {!loading ? (
60
60
  <TitleWrapper isCustomLayout={isCustomLayout} disableLeftSpace={singleBusinessRedirect}>
61
61
  <h2 className='bold' id='business_name'>{business?.name}</h2>
62
+ <span id='business_name_feedback' />
62
63
  {business?.ribbon?.enabled && (
63
64
  <RibbonBox
64
65
  bgColor={business?.ribbon?.color}
@@ -204,11 +205,11 @@ export const BusinessInfoComponent = (props) => {
204
205
  <div className='preorder-Reviews'>
205
206
  {isPreOrderSetting && (
206
207
  <>
207
- <span onClick={() => setIsPreOrder(true)}>{t('PREORDER', 'Preorder')}</span>
208
+ <span onClick={() => setIsPreOrder(true)}>{isCustomerMode ? t('CHANGE_SCHEDULE', 'Change schedule') : t('PREORDER', 'Preorder')}</span>
208
209
  <span className='dot'>•</span>
209
210
  </>
210
211
  )}
211
- {business.reviews?.reviews && !hideReviewsPopup && <span onClick={() => setIsBusinessReviews(true)}>{t('REVIEWS', 'Reviews')}</span>}
212
+ {business.reviews?.reviews && !hideReviewsPopup && !isCustomerMode && <span onClick={() => setIsBusinessReviews(true)}>{t('REVIEWS', 'Reviews')}</span>}
212
213
  </div>
213
214
  ) : (
214
215
  <Skeleton width={isCustomerMode ? 100 : 150} />
@@ -132,7 +132,7 @@ export const BusinessBasicInformation = (props) => {
132
132
  const handleScroll = () => {
133
133
  const searchElement = document.getElementById('search-component')
134
134
  if (searchElement) {
135
- const limit = window.pageYOffset >= (isChew ? searchElement?.offsetTop + 40 : searchElement?.offsetTop) && window.pageYOffset > 0
135
+ const limit = window.scrollY >= (isChew ? searchElement?.offsetTop + 40 : searchElement?.offsetTop) && window.scrollY > 0
136
136
  if (limit) {
137
137
  const classAdded = searchElement.classList.contains('fixed-search')
138
138
  !classAdded && searchElement.classList.add('fixed-search')
@@ -140,15 +140,26 @@ export const BusinessBasicInformation = (props) => {
140
140
  searchElement && searchElement.classList.remove('fixed-search')
141
141
  }
142
142
  }
143
+ const backArrowElement = document.getElementById('back-arrow')
143
144
 
144
145
  const businessNameElement = document.getElementById('business_name')
146
+ const businessNameFeedbackElement = document.getElementById('business_name_feedback')
145
147
  if (businessNameElement) {
146
- const limit = window.pageYOffset >= (isChew && searchElement ? searchElement?.offsetTop + 40 : (businessNameElement?.offsetTop - 55)) && window.pageYOffset > 0
148
+ const limit = window.scrollY >= (isChew && searchElement ? searchElement?.offsetTop + 40 : (businessNameElement?.offsetTop - 55)) && window.scrollY > 0
147
149
  if (limit) {
148
150
  const classAdded = businessNameElement.classList.contains('fixed-name')
149
151
  !classAdded && businessNameElement.classList.add('fixed-name')
152
+ if (!isChew) {
153
+ const classAdded2 = backArrowElement?.classList?.contains?.('fixed-arrow')
154
+ !classAdded2 && backArrowElement.classList.add('fixed-arrow')
155
+ }
156
+ if (businessNameFeedbackElement) businessNameFeedbackElement.style.display = 'block'
150
157
  } else {
151
158
  businessNameElement && businessNameElement.classList.remove('fixed-name')
159
+ if (!isChew) {
160
+ backArrowElement && backArrowElement.classList.remove('fixed-arrow')
161
+ }
162
+ if (businessNameFeedbackElement) businessNameFeedbackElement.style.display = 'none'
152
163
  }
153
164
  }
154
165
  }
@@ -236,10 +247,10 @@ export const BusinessBasicInformation = (props) => {
236
247
  />
237
248
  </WrapperFloatingSearch>
238
249
  )}
239
- {!hideInfoIcon && (
240
- <BusinessMoreDetail>
241
- <BsInfoCircle onClick={() => setOpenBusinessInformation(true)} />
242
- </BusinessMoreDetail>
250
+ {!hideInfoIcon && (
251
+ <BusinessMoreDetail>
252
+ <BsInfoCircle onClick={() => setOpenBusinessInformation(true)} />
253
+ </BusinessMoreDetail>
243
254
  )}
244
255
  </>
245
256
  )}
@@ -368,7 +368,11 @@ export const TitleWrapper = styled.div`
368
368
  display: flex;
369
369
  align-items: center;
370
370
  flex-wrap: wrap;
371
-
371
+ span {
372
+ height: 70px;
373
+ width: 1px;
374
+ display: none;
375
+ }
372
376
  h2 {
373
377
  font-size: 24px;
374
378
  line-height: 36px;
@@ -409,6 +413,7 @@ export const TitleWrapper = styled.div`
409
413
  }
410
414
  @media (min-width: 768px) {
411
415
  font-size: 32px;
416
+
412
417
  }
413
418
  }
414
419
  `
@@ -230,8 +230,8 @@ const BusinessProductsListingUI = (props) => {
230
230
  const backArrowElement = document.getElementById('back-arrow')
231
231
  const searchElement = document.getElementById('search-component')
232
232
  if (backArrowElement) {
233
- const limit = window.pageYOffset >= backArrowElement?.offsetTop && window.pageYOffset > 0
234
- const limitWidth = window.pageYOffset >= searchElement?.offsetTop + 40 && window.pageYOffset > 0
233
+ const limit = window.scrollY >= backArrowElement?.offsetTop - 10 && window.scrollY > 0
234
+ const limitWidth = window.scrollY >= searchElement?.offsetTop + 45 && window.scrollY > 0
235
235
  if (isChew) {
236
236
  if (limit && !limitWidth) {
237
237
  const classWidthAdded = backArrowElement.classList.contains('fixed-arrow-width')
@@ -240,13 +240,6 @@ const BusinessProductsListingUI = (props) => {
240
240
  backArrowElement && backArrowElement.classList.remove('fixed-arrow-width')
241
241
  }
242
242
  }
243
-
244
- if (limit) {
245
- const classAdded = backArrowElement.classList.contains('fixed-arrow')
246
- !classAdded && backArrowElement.classList.add('fixed-arrow')
247
- } else {
248
- backArrowElement && backArrowElement.classList.remove('fixed-arrow')
249
- }
250
243
  }
251
244
 
252
245
  const innerHeightScrolltop = window.innerHeight + document.documentElement?.scrollTop + PIXELS_TO_SCROLL
@@ -32,7 +32,7 @@ export const OrdersSection = (props) => {
32
32
  horizontal
33
33
  isBusinessesPage
34
34
  onRedirectPage={onRedirectPage}
35
- titleContent={t('CARTS', 'Carts')}
35
+ titleContent={t('OPEN_CARTS', 'Open carts')}
36
36
  businessesIds={businessesIds}
37
37
  customArray={
38
38
  getCustomArray(orderState.carts)?.filter(cart => cart.products.length > 0)
@@ -418,7 +418,7 @@ const BusinessesListingUI = (props) => {
418
418
  </HightestRatedWrapper>
419
419
  )}
420
420
 
421
- {(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
421
+ {(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden && !isCustomerMode) && (
422
422
  <BusinessTypeFilter
423
423
  images={props.images}
424
424
  businessTypes={props.businessTypes}
@@ -430,7 +430,7 @@ const BusinessesListingUI = (props) => {
430
430
  <SearchContainer>
431
431
  {isCustomLayout && (
432
432
  <BusinessesTitle isCustomerMode={isCustomerMode}>
433
- {t('BUSINESSES', 'Businesses')}
433
+ {isCustomerMode ? t('SELECT_THE_BUSINESS', 'Select the business') : t('BUSINESSES', 'businesses')}
434
434
  </BusinessesTitle>
435
435
  )}
436
436
  <WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
@@ -261,7 +261,7 @@ export const Title = styled.h2`
261
261
  font-weight: 600;
262
262
  font-size: 24px;
263
263
  color: ${props => props.theme?.colors.headingColor};
264
- margin: 0px 20px 5px 20px;
264
+ margin: 20px 20px 5px 20px;
265
265
  `
266
266
 
267
267
  export const TypesWrapper = styled.div`