ordering-ui-external 14.1.49 → 14.1.52

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 (126) hide show
  1. package/_bundles/{7.ordering-ui.697d19ddfcc29dfbeb52.js → 7.ordering-ui.746cebc54de638e8e528.js} +1 -1
  2. package/_bundles/ordering-ui.746cebc54de638e8e528.js +2 -0
  3. package/_modules/components/GoogleGpsButton/index.js +11 -3
  4. package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
  5. package/_modules/themes/callcenterOriginal/index.js +7 -0
  6. package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -5
  7. package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -7
  8. package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +59 -19
  9. package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +10 -4
  10. package/_modules/themes/callcenterOriginal/src/components/ConfirmAddressForm/index.js +638 -0
  11. package/_modules/themes/callcenterOriginal/src/components/ConfirmAddressForm/styles.js +50 -0
  12. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +33 -4
  13. package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/index.js +17 -10
  14. package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +58 -106
  15. package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +6 -29
  16. package/_modules/themes/callcenterOriginal/src/components/SearchBar/index.js +2 -2
  17. package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +21 -1
  18. package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +49 -8
  19. package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +12 -9
  20. package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/index.js +30 -12
  21. package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/styles.js +11 -5
  22. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
  23. package/_modules/themes/five/src/components/BusinessController/franchises/OloBusinessController/index.js +192 -0
  24. package/_modules/themes/five/src/components/BusinessController/franchises/OloBusinessController/styles.js +114 -0
  25. package/_modules/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/index.js +572 -0
  26. package/_modules/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/styles.js +89 -0
  27. package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -2
  28. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +31 -118
  29. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  30. package/_modules/themes/five/src/components/Checkout/OrderDetail.js +1 -3
  31. package/_modules/themes/five/src/components/Checkout/index.js +22 -4
  32. package/_modules/themes/five/src/components/DriverTips/styles.js +1 -1
  33. package/_modules/themes/five/src/components/Header/index.js +8 -7
  34. package/_modules/themes/five/src/components/Header/styles.js +28 -25
  35. package/_modules/themes/five/src/components/HighestRated/franchises/OloHighestRated/index.js +116 -0
  36. package/_modules/themes/five/src/components/HighestRated/franchises/OloHighestRated/styles.js +22 -0
  37. package/_modules/themes/five/src/components/HomeHero/franchises/OloHomeHero/index.js +136 -0
  38. package/_modules/themes/five/src/components/HomeHero/franchises/OloHomeHero/styles.js +46 -0
  39. package/_modules/themes/five/src/components/HomeHero/index.js +5 -2
  40. package/_modules/themes/five/src/components/InputPhoneNumber/index.js +19 -12
  41. package/_modules/themes/five/src/components/LogoutPopup/index.js +2 -1
  42. package/_modules/themes/five/src/components/Modal/index.js +6 -3
  43. package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +2 -2
  44. package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +2 -1
  45. package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
  46. package/_modules/themes/five/src/components/OrderTypesSquares/index.js +160 -0
  47. package/_modules/themes/five/src/components/OrderTypesSquares/styles.js +39 -0
  48. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +4 -4
  49. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
  50. package/_modules/themes/five/src/components/SearchBar/index.js +2 -2
  51. package/_modules/themes/five/src/components/SignUpForm/index.js +11 -8
  52. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
  53. package/_modules/themes/five/src/components/UserDetails/index.js +5 -2
  54. package/_modules/themes/five/src/styles/Buttons/index.js +1 -1
  55. package/index-template.js +9 -1
  56. package/package.json +2 -2
  57. package/src/components/GoogleGpsButton/index.js +10 -2
  58. package/src/components/VerticalOrdersLayout/styles.js +2 -2
  59. package/src/themes/callcenterOriginal/index.js +2 -0
  60. package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +44 -23
  61. package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +8 -0
  62. package/src/themes/callcenterOriginal/src/components/AddressList/index.js +67 -22
  63. package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +16 -1
  64. package/src/themes/callcenterOriginal/src/components/ConfirmAddressForm/index.js +579 -0
  65. package/src/themes/callcenterOriginal/src/components/ConfirmAddressForm/styles.js +275 -0
  66. package/src/themes/callcenterOriginal/src/components/Header/index.js +22 -0
  67. package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/index.js +13 -8
  68. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +34 -100
  69. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +0 -52
  70. package/src/themes/callcenterOriginal/src/components/SearchBar/index.js +2 -2
  71. package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +19 -1
  72. package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +45 -11
  73. package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
  74. package/src/themes/callcenterOriginal/src/components/UserFormDetails/index.js +40 -14
  75. package/src/themes/callcenterOriginal/src/components/UserFormDetails/styles.js +19 -1
  76. package/src/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
  77. package/src/themes/five/src/components/BusinessController/franchises/OloBusinessController/index.js +237 -0
  78. package/src/themes/five/src/components/BusinessController/franchises/OloBusinessController/styles.js +367 -0
  79. package/src/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/index.js +582 -0
  80. package/src/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/styles.js +307 -0
  81. package/src/themes/five/src/components/BusinessesListing/index.js +19 -4
  82. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +7 -104
  83. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -2
  84. package/src/themes/five/src/components/Checkout/OrderDetail.js +1 -5
  85. package/src/themes/five/src/components/Checkout/index.js +20 -2
  86. package/src/themes/five/src/components/DriverTips/styles.js +1 -0
  87. package/src/themes/five/src/components/Header/index.js +17 -12
  88. package/src/themes/five/src/components/Header/styles.js +51 -4
  89. package/src/themes/five/src/components/HighestRated/franchises/OloHighestRated/index.js +114 -0
  90. package/src/themes/five/src/components/HighestRated/franchises/OloHighestRated/styles.js +57 -0
  91. package/src/themes/five/src/components/HomeHero/franchises/OloHomeHero/index.js +122 -0
  92. package/src/themes/five/src/components/HomeHero/franchises/OloHomeHero/styles.js +125 -0
  93. package/src/themes/five/src/components/HomeHero/index.js +16 -3
  94. package/src/themes/five/src/components/InputPhoneNumber/index.js +14 -9
  95. package/src/themes/five/src/components/LogoutPopup/index.js +3 -1
  96. package/src/themes/five/src/components/Modal/index.js +6 -3
  97. package/src/themes/five/src/components/MultiOrdersDetails/styles.js +3 -3
  98. package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +3 -1
  99. package/src/themes/five/src/components/OrderItAgain/styles.js +2 -0
  100. package/src/themes/five/src/components/OrderTypesSquares/index.js +157 -0
  101. package/src/themes/five/src/components/OrderTypesSquares/styles.js +62 -0
  102. package/src/themes/five/src/components/ProductItemAccordion/index.js +2 -2
  103. package/src/themes/five/src/components/RenderProductsLayout/styles.js +2 -0
  104. package/src/themes/five/src/components/SearchBar/index.js +2 -2
  105. package/src/themes/five/src/components/SignUpForm/index.js +5 -3
  106. package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
  107. package/src/themes/five/src/components/UserDetails/index.js +3 -1
  108. package/src/themes/five/src/styles/Buttons/index.js +2 -2
  109. package/template/app.js +14 -11
  110. package/template/assets/images/catering.svg +13 -0
  111. package/template/assets/images/curbside.svg +19 -0
  112. package/template/assets/images/drivethru.svg +19 -0
  113. package/template/assets/images/eatin.svg +17 -0
  114. package/template/components/SubdomainComponent/index.js +4 -8
  115. package/template/pages/BusinessesList/index.js +1 -1
  116. package/_bundles/ordering-ui.697d19ddfcc29dfbeb52.js +0 -2
  117. /package/_bundles/{0.ordering-ui.697d19ddfcc29dfbeb52.js → 0.ordering-ui.746cebc54de638e8e528.js} +0 -0
  118. /package/_bundles/{1.ordering-ui.697d19ddfcc29dfbeb52.js → 1.ordering-ui.746cebc54de638e8e528.js} +0 -0
  119. /package/_bundles/{2.ordering-ui.697d19ddfcc29dfbeb52.js → 2.ordering-ui.746cebc54de638e8e528.js} +0 -0
  120. /package/_bundles/{4.ordering-ui.697d19ddfcc29dfbeb52.js → 4.ordering-ui.746cebc54de638e8e528.js} +0 -0
  121. /package/_bundles/{5.ordering-ui.697d19ddfcc29dfbeb52.js → 5.ordering-ui.746cebc54de638e8e528.js} +0 -0
  122. /package/_bundles/{6.ordering-ui.697d19ddfcc29dfbeb52.js → 6.ordering-ui.746cebc54de638e8e528.js} +0 -0
  123. /package/_bundles/{7.ordering-ui.697d19ddfcc29dfbeb52.js.LICENSE.txt → 7.ordering-ui.746cebc54de638e8e528.js.LICENSE.txt} +0 -0
  124. /package/_bundles/{8.ordering-ui.697d19ddfcc29dfbeb52.js → 8.ordering-ui.746cebc54de638e8e528.js} +0 -0
  125. /package/_bundles/{9.ordering-ui.697d19ddfcc29dfbeb52.js → 9.ordering-ui.746cebc54de638e8e528.js} +0 -0
  126. /package/_bundles/{ordering-ui.697d19ddfcc29dfbeb52.js.LICENSE.txt → ordering-ui.746cebc54de638e8e528.js.LICENSE.txt} +0 -0
@@ -0,0 +1,307 @@
1
+ import styled, { css } from 'styled-components'
2
+ import React from 'react'
3
+
4
+ export const BusinessContainer = styled.div`
5
+ display: flex;
6
+ flex-direction: row;
7
+ width: 100%;
8
+ height: 100%;
9
+ `
10
+
11
+ export const BusinessSearch = styled.div`
12
+ display: flex;
13
+ background-color: #f8f9fa;
14
+ align-items: center;
15
+ padding: 7px;
16
+ border-radius: 7px;
17
+ font-size: 11px;
18
+ svg {
19
+ font-size: 15px;
20
+ }
21
+ `
22
+
23
+ export const BusinessList = styled.div`
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ `
27
+
28
+ export const ErrorMessage = styled.span`
29
+ padding: 20px;
30
+ width: 100%;
31
+ background-color: #CCCCCC;
32
+ margin: 0px 15px;
33
+ color: #D81313;
34
+ font-weight: bold;
35
+ `
36
+
37
+ export const PreviousOrders = styled.div`
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ margin: 10px 20px 0px;
41
+ `
42
+
43
+ export const HightestRatedWrapper = styled.div`
44
+ padding: 50px 0 30px 0;
45
+ `
46
+
47
+ export const Divider = styled.div`
48
+ background: rgb(230, 234, 233);
49
+ height: 8px;
50
+ width: 100%;
51
+ `
52
+
53
+ export const HeaderSearchMode = styled.div`
54
+ position: absolute;
55
+ width: 200px;
56
+ `
57
+
58
+ export const AddressFormWrapper = styled.div`
59
+ @media (min-width: 450px) {
60
+ margin-top: 20px;
61
+ }
62
+ `
63
+
64
+ export const IconTypeButton = styled.div`
65
+ display: flex;
66
+ justify-content: center;
67
+ align-items: center;
68
+ width: 44px;
69
+ height: 44px;
70
+ background: ${({ activated, theme }) => activated ? theme?.colors?.white : '#F3F9FF'};
71
+ border-radius: 44px;
72
+ `
73
+
74
+ export const TypesContainer = styled.div`
75
+ display: flex;
76
+ margin-top: 20px;
77
+ `
78
+
79
+ export const AdditionalTypesContainer = styled.div`
80
+ width: 60%;
81
+ display: flex;
82
+ margin-bottom: 20px;
83
+ button {
84
+ padding: 4px 10px;
85
+ border-radius: 50px;
86
+ font-size: 10px;
87
+ line-height: 0;
88
+ height: 25px;
89
+ margin-right: 20px;
90
+ }
91
+ .activated {
92
+ color: ${({ theme }) => theme?.colors?.darkTextColor}
93
+ }
94
+ `
95
+
96
+ export const TypeButton = styled.div`
97
+ display: flex;
98
+ align-items: center;
99
+ width: 215px;
100
+ height: 75px;
101
+ border-radius: 7.6px;
102
+ padding: 16px;
103
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);
104
+ margin-right: 32px;
105
+ cursor: pointer;
106
+ box-sizing: border-box;
107
+ background: ${({ activated, theme }) => activated ? theme?.colors?.primary : theme?.colors?.white};
108
+ p{
109
+ margin: 0;
110
+ margin-left: 33px;
111
+ ${({ activated, theme }) => activated && css`
112
+ color: ${theme?.colors?.white};
113
+ `}
114
+ }
115
+ `
116
+
117
+ export const Title = styled.h2`
118
+ font-size: 32px;
119
+ font-weight: 600;
120
+ margin: 0;
121
+ margin-bottom: 20px;
122
+ `
123
+
124
+ export const Subtitle = styled.h3`
125
+ font-size: 18px;
126
+ font-weight: 400;
127
+ margin: 0;
128
+ margin-bottom: 20px;
129
+ `
130
+
131
+ export const BusinessListContainer = styled.div`
132
+ display: flex;
133
+ flex-direction: column;
134
+ width: 50%;
135
+ padding: 40px 20px 0px 20px;
136
+ box-sizing: border-box;
137
+ `
138
+
139
+ export const AdditionalTypesWrapper = styled.div`
140
+ display: flex;
141
+ flex-direction: column;
142
+ padding: 20px;
143
+ padding-bottom: 0;
144
+ `
145
+
146
+ export const WrapInput = styled.div`
147
+ position: relative;
148
+ cursor: pointer;
149
+ background: #FFFFFF;
150
+ padding: 8px 16px;
151
+ border: 1px solid #DEE2E6;
152
+ box-sizing: border-box;
153
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
154
+ border-radius: 7.6px;
155
+ display: flex;
156
+ align-items: center;
157
+ margin-bottom: 22px;
158
+ margin-top: 22px;
159
+ width: 100%;
160
+ height: 44px;
161
+ ${({ withIcon }) => withIcon && css`
162
+ box-sizing: border-box;
163
+
164
+ &::before {
165
+ content: "";
166
+ position: absolute;
167
+ right: 5px;
168
+ top: 0;
169
+ bottom: 18px;
170
+ width: 15px;
171
+
172
+ ${props => props.theme?.rtl && css`
173
+ left: 5px;
174
+ right: initial;
175
+ `}
176
+ }
177
+
178
+ @media (min-width: 576px) {
179
+ padding: 10px 25px;
180
+ margin-bottom: 27px;
181
+ }
182
+ `}
183
+
184
+ p{
185
+ color: ${props => props.theme.colors.darkTextColor};
186
+ position: relative;
187
+ margin: 0;
188
+ overflow: hidden;
189
+ text-overflow: ellipsis;
190
+ white-space: nowrap;
191
+ font-size: 12px;
192
+ line-height: 18px;
193
+ @media (min-width: 576px) {
194
+ font-size: 1rem;
195
+ line-height: initial;
196
+ }
197
+ }
198
+
199
+ svg {
200
+ color: #B1BCCC;
201
+ font-size: 20px;
202
+ ${props => props.theme?.rtl ? css`
203
+ margin-left: 12px;
204
+ ` : css`
205
+ margin-right: 12px;
206
+ `}
207
+
208
+ @media (min-width: 576px) {
209
+ ${props => props.theme?.rtl ? css`
210
+ margin-left: 20px;
211
+ ` : css`
212
+ margin-right: 20px;
213
+ `}
214
+ }
215
+ }
216
+ `
217
+
218
+ export const PaginationContainer = styled.div`
219
+ align-self: flex-end;
220
+ width: 100%;
221
+ margin-bottom: 20px;
222
+ `
223
+
224
+ export const WrapperMap = styled.div`
225
+ width: 50%;
226
+ max-height: 2500px;
227
+ > div {
228
+ position: relative !important;
229
+ width: 100% !important;
230
+ height: 100% !important;
231
+ }
232
+ .btn-choose-store {
233
+ line-height: 30px;
234
+ padding: 0 10px;
235
+ font-size: 14px;
236
+ cursor: pointer;
237
+ outline: none;
238
+ overflow: hidden;
239
+ text-overflow: ellipsis;
240
+ min-width: 80px;
241
+ height: 38px;
242
+ font-size: 14px;
243
+ background: ${props => props.theme.colors.primary};
244
+ color: ${props => props.theme.colors.primaryContrast};
245
+ border-color: ${props => props.theme.colors.primary};
246
+ }
247
+
248
+ .btn-address-map {
249
+ cursor: pointer;
250
+ &:hover{
251
+ text-decoration: underline;
252
+ }
253
+ }
254
+ .className {
255
+ object-fit: none;
256
+ }
257
+ `
258
+
259
+ export const CityContainer = styled.div`
260
+ width: 100%;
261
+ padding: 20px;
262
+ display: flex;
263
+ justify-content: space-between;
264
+ align-items: center;
265
+ border-bottom: 1px solid ${({ theme }) => theme?.colors?.tertiary || '#fff'};;
266
+ height: 70px;
267
+ margin: 0;
268
+ box-sizing: border-box;
269
+
270
+ h3{
271
+ font-size: 16px;
272
+ }
273
+ ${({ isSelected }) => isSelected && css`
274
+
275
+ `}
276
+ `
277
+
278
+ export const LoadMoreButtonCityWrap = styled.div`
279
+ margin-top: 10px;
280
+ button {
281
+ width: 100%;
282
+ }
283
+ `
284
+
285
+ export const ViewLocations = styled.div`
286
+ p {
287
+ color: ${({ theme }) => theme?.colors?.primary};
288
+ cursor: pointer;
289
+ }
290
+ `
291
+
292
+ export const CitiesContainer = styled.div`
293
+ border-radius: 7.6px;
294
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);
295
+ > div {
296
+ cursor: pointer;
297
+ }
298
+ margin-bottom: 20px;
299
+ `
300
+
301
+ export const Separator = styled.div`
302
+ height: 1px;
303
+ margin-left: 20px;
304
+ margin-right: 40px;
305
+ background: #E9ECEF;
306
+ box-sizing: border-box;
307
+ `
@@ -4,18 +4,33 @@ import { RedBusinessesListing } from './layouts/RedBusinessesListing'
4
4
  import { StarbucksBusinessesListing } from './layouts/StarbucksBusinessesListing'
5
5
  import { BusinessListing as AppointmentsBusinessListing } from './layouts/AppointmentsBusinessListing'
6
6
  import { useTheme } from 'styled-components'
7
+ import { OloBusinessesListing } from './franchises/OloBusinessesListing'
7
8
 
8
9
  export const BusinessesListing = (props) => {
9
10
  const { logosLayout } = props
10
11
  const theme = useTheme()
12
+ const websiteTheme = theme?.my_products?.components?.website_theme?.components?.type
13
+
14
+ const franchiseLayout = theme?.my_products?.components?.website_theme?.components?.franchise_slug
15
+
11
16
  const layout = theme?.business_listing_view?.components?.layout?.type || 'original'
12
17
  const isStarbucksLayout = ['starbucks', 'mapview'].includes(layout)
18
+ const oloLayout = ['franchise_1', 'franchise_2']
13
19
  return (
14
20
  <>
15
- {(layout === 'original' || logosLayout) && <OriginalBusinessesListing {...props} />}
16
- {(isStarbucksLayout) && !logosLayout && <StarbucksBusinessesListing {...props} />}
17
- {(layout === 'red') && !logosLayout && <RedBusinessesListing {...props} />}
18
- {(layout === 'appointments') && !logosLayout && <AppointmentsBusinessListing {...props} />}
21
+ {websiteTheme === 'franchise' ? (
22
+ <>
23
+ {oloLayout.includes(franchiseLayout) && <OloBusinessesListing {...props} />}
24
+ {!franchiseLayout && <OriginalBusinessesListing {...props} />}
25
+ </>
26
+ ) : (
27
+ <>
28
+ {(layout === 'original' || logosLayout) && <OriginalBusinessesListing {...props} />}
29
+ {(isStarbucksLayout) && !logosLayout && <StarbucksBusinessesListing {...props} />}
30
+ {(layout === 'red') && !logosLayout && <RedBusinessesListing {...props} />}
31
+ {(layout === 'appointments') && !logosLayout && <AppointmentsBusinessListing {...props} />}
32
+ </>
33
+ )}
19
34
  </>
20
35
  )
21
36
  }
@@ -23,12 +23,7 @@ import {
23
23
  BusinessLogosContainer,
24
24
  BusinessBanner,
25
25
  BusinessLogosWrapper,
26
- AddressFormWrapper,
27
- Title,
28
- TypesContainer,
29
- TypeButton,
30
- IconTypeButton,
31
- AdditionalTypesContainer
26
+ AddressFormWrapper
32
27
  } from './styles'
33
28
  import { useWindowSize } from '../../../../../../../hooks/useWindowSize'
34
29
  import { Button } from '../../../../styles/Buttons'
@@ -55,6 +50,7 @@ import { OrdersSection } from './OrdersSection'
55
50
  import { getCateringValues } from '../../../../../../../utils'
56
51
  import { AddressList } from '../../../AddressList'
57
52
  import { AddressForm } from '../../../AddressForm'
53
+ import { OrderTypesSquares } from '../../../OrderTypesSquares'
58
54
 
59
55
  const PIXELS_TO_SCROLL = 300
60
56
 
@@ -78,11 +74,9 @@ const BusinessesListingUI = (props) => {
78
74
  actualSlug,
79
75
  orderTypes
80
76
  } = props
81
- const allOrderTypes = [1, 2, 3, 4, 5]
82
- const pickupTypes = [2, 4, 5]
83
- const eatInType = 3
77
+
84
78
  const [, t] = useLanguage()
85
- const [orderState, { changeCityFilter, changeType }] = useOrder()
79
+ const [orderState, { changeCityFilter }] = useOrder()
86
80
  const [{ auth }] = useSession()
87
81
  const [{ configs }] = useConfig()
88
82
  const windowSize = useWindowSize()
@@ -94,7 +88,6 @@ const BusinessesListingUI = (props) => {
94
88
  const [isPreorder, setIsPreorder] = useState(false)
95
89
  const [preorderBusiness, setPreorderBusiness] = useState(null)
96
90
  const [hasHighRatedBusiness, setHasHighRatedBusiness] = useState(true)
97
- const [orderTypeSelected, setOrderTypeSelected] = useState(orderState?.options?.type)
98
91
  const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
99
92
  const [favoriteIds, setFavoriteIds] = useState([])
100
93
  const allCitiesDisabled = citiesState?.cities?.every(city => !city.enabled)
@@ -114,7 +107,6 @@ const BusinessesListingUI = (props) => {
114
107
  : orderState?.options?.type === 8
115
108
  ? 'catering_pickup'
116
109
  : null
117
- const configTypes = configs?.order_types_allowed?.value.split('|').filter(value => (allOrderTypes.includes(Number(value)))).map(value => Number(value)) || []
118
110
  const cateringValues = preorderBusiness?.configs && getCateringValues(cateringTypeString, preorderBusiness?.configs)
119
111
 
120
112
  const handleScroll = useCallback(() => {
@@ -182,19 +174,6 @@ const BusinessesListingUI = (props) => {
182
174
  changeCityFilter(cityId === orderState?.options?.city_id ? null : cityId)
183
175
  }
184
176
 
185
- const handleChangeType = (value) => {
186
- if (!orderState?.loading) {
187
- changeType(value)
188
- setOrderTypeSelected(value)
189
- }
190
- }
191
-
192
- const handleChangeToPickup = () => {
193
- const firstEnabledPickupType = orderTypes.find(type => configTypes?.includes(type.value) && type.value !== 1)?.value
194
- handleChangeType(firstEnabledPickupType)
195
- setOrderTypeSelected(firstEnabledPickupType)
196
- }
197
-
198
177
  useEffect(() => {
199
178
  if (preorderBusiness) setIsPreorder(true)
200
179
  }, [preorderBusiness])
@@ -224,28 +203,6 @@ const BusinessesListingUI = (props) => {
224
203
  setHasHighRatedBusiness(true)
225
204
  }, [citiesState, orderState?.options?.city_id])
226
205
 
227
- useEffect(() => {
228
- setOrderTypeSelected(orderState?.options?.type)
229
- }, [orderState?.options?.type])
230
-
231
- const OrderTypesComponent = () => {
232
- return (
233
- <>
234
- {orderTypes && (configTypes ? orderTypes.filter(type => configTypes?.includes(type.value) && pickupTypes.includes(type?.value)) : orderTypes).map((item, i) => (
235
- <Button
236
- key={item.value}
237
- onClick={() => handleChangeType(item.value)}
238
- color={orderState?.options?.type === item?.value ? 'primary' : 'secondary'}
239
- disabled={orderState?.loading}
240
- className={orderState?.options?.type !== item?.value ? 'activated' : ''}
241
- >
242
- {item.text}
243
- </Button>
244
- ))}
245
- </>
246
- )
247
- }
248
-
249
206
  if (logosLayout) {
250
207
  return (
251
208
  <BusinessLogosWrapper>
@@ -295,63 +252,9 @@ const BusinessesListingUI = (props) => {
295
252
  )}
296
253
  {(userCustomer && orderState?.options?.address?.address && isCustomerMode) && (
297
254
  <>
298
- {(configTypes.includes(1) || configTypes.some(type => pickupTypes.includes(type))) && (
299
- <Title>{t('DELIVERY_TYPE', 'Delivery Type')}</Title>
300
- )}
301
- <TypesContainer>
302
- {configTypes.includes(1) && (
303
- <TypeButton onClick={() => handleChangeType(1)} disabled={orderState?.loading} activated={orderTypeSelected === 1}>
304
- <IconTypeButton activated={orderTypeSelected === 1}>
305
- <img
306
- src={theme?.images?.general?.deliveryIco}
307
- width={20}
308
- height={20}
309
- />
310
- </IconTypeButton>
311
- <p>{t('DELIVERY', 'Delivery')}</p>
312
- </TypeButton>
313
- )}
314
- {configTypes.some(type => pickupTypes.includes(type)) && (
315
- <TypeButton
316
- disabled={orderState?.loading}
317
- activated={pickupTypes.includes(orderTypeSelected)}
318
- onClick={() => handleChangeToPickup()}
319
- >
320
- <IconTypeButton activated={pickupTypes.includes(orderTypeSelected)}>
321
- <img
322
- src={theme?.images?.general?.pickupIco}
323
- width={22}
324
- height={22}
325
- />
326
- </IconTypeButton>
327
- <p>{t('PICKUP', 'Pickup')}</p>
328
- </TypeButton>
329
- )}
330
- {configTypes.some(type => eatInType === type) && (
331
- <TypeButton
332
- disabled={orderState?.loading}
333
- activated={orderTypeSelected === 3}
334
- onClick={() => handleChangeType(3)}
335
- >
336
- <IconTypeButton activated={orderTypeSelected === 3}>
337
- <img
338
- src={theme?.images?.general?.eatinIco}
339
- width={22}
340
- height={22}
341
- />
342
- </IconTypeButton>
343
- <p>{t('EAT_IN', 'Eat in')}</p>
344
- </TypeButton>
345
- )}
346
- </TypesContainer>
347
- {pickupTypes.includes(orderTypeSelected) && (
348
- <>
349
- <p>{t('WHAT_PICKUP_YOU_NEED', 'What kind of pickup do you need?')}</p>
350
- <AdditionalTypesContainer>
351
- <OrderTypesComponent />
352
- </AdditionalTypesContainer>
353
- </>
354
- )}
255
+ <OrderTypesSquares
256
+ orderTypes={orderTypes}
257
+ />
355
258
  </>
356
259
  )}
357
260
  {!isCustomerMode && (
@@ -59,7 +59,7 @@ export const WrapperSearch = styled.div`
59
59
  margin: 0;
60
60
  margin-top: 10px;
61
61
  margin-bottom: 20px;
62
- width: 100%;
62
+ width: 100%;
63
63
  padding: 0 20px;
64
64
  ${isCustomerMode ? css`
65
65
  margin-right: 20px;
@@ -69,7 +69,7 @@ export const WrapperSearch = styled.div`
69
69
  svg {
70
70
  align-self: auto;
71
71
  }
72
-
72
+
73
73
  @media(min-width: 681px){
74
74
  width: 75%;
75
75
  padding: 0;
@@ -9,20 +9,16 @@ export const OrderDetail = (props) => {
9
9
  const {
10
10
  item,
11
11
  placingOrder,
12
- orderType,
13
12
  customerAddress,
14
13
  onClick
15
14
  } = props
16
15
 
17
16
  const [, t] = useLanguage()
18
- const orderTypeList = [t('DELIVERY', 'Delivery'), t('PICKUP', 'Pickup'), t('EAT_IN', 'Eat in'), t('CURBSIDE', 'Curbside'), t('DRIVE_THRU', 'Drive thru')]
19
17
 
20
18
  return (
21
19
  <OrderDetailContainer>
20
+
22
21
  <h3>{customerAddress}</h3>
23
- <h3>
24
- {(orderTypeList[orderType - 1]) || t('DELIVERY', 'Delivery')}
25
- </h3>
26
22
  <div>
27
23
  {item?.products.filter(product => !product?.calendar_event).map(product => (
28
24
  <ProductItemAccordion
@@ -70,6 +70,7 @@ import { SignUpForm } from '../SignUpForm'
70
70
  import { LoginForm } from '../LoginForm'
71
71
  import { OrderDetail } from './OrderDetail'
72
72
  import { SpinnerLoader } from '../../../../../components/SpinnerLoader'
73
+ import { OrderTypesSquares } from '../OrderTypesSquares'
73
74
 
74
75
  const mapConfigs = {
75
76
  mapZoom: 16,
@@ -134,6 +135,7 @@ const CheckoutUI = (props) => {
134
135
  const [productLoading, setProductLoading] = useState(false)
135
136
 
136
137
  const shouldActivateOrderDetailModal = isCustomerMode
138
+ const orderTypeList = [t('DELIVERY', 'Delivery'), t('PICKUP', 'Pickup'), t('EAT_IN', 'Eat in'), t('CURBSIDE', 'Curbside'), t('DRIVE_THRU', 'Drive thru')]
137
139
  const cardsMethods = ['stripe', 'credomatic']
138
140
  const stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect']
139
141
  const businessConfigs = businessDetails?.business?.configs ?? []
@@ -273,6 +275,7 @@ const CheckoutUI = (props) => {
273
275
  const checkValidationFields = () => {
274
276
  setUserErrors([])
275
277
  const errors = []
278
+ const UKCodes = ['44']
276
279
  const userSelected = isCustomerMode ? customerState.user : user
277
280
  const _requiredFields = []
278
281
  Object.values(checkoutFieldsState?.fields).map(field => {
@@ -302,7 +305,15 @@ const CheckoutUI = (props) => {
302
305
  let phone = null
303
306
  phone = `+${userSelected?.country_phone_code}${userSelected?.cellphone.replace(`+${userSelected?.country_phone_code}`, '')}`
304
307
  const phoneNumber = parsePhoneNumber(phone)
305
- if (parseInt(configs?.validation_phone_number_lib?.value ?? 1, 10) && !phoneNumber?.isValid()) {
308
+ let enableIspossibly = false
309
+ if (UKCodes.includes(phoneNumber?.countryCallingCode)) {
310
+ const inputNumber = userSelected?.cellphone
311
+ const validationsForUK = ['01', '02', '07', '0800', '0808', '0845', '0870', '0871', '16']
312
+ const result = validationsForUK.some(areaCode => inputNumber?.startsWith(areaCode))
313
+ enableIspossibly = result
314
+ }
315
+ const validation = enableIspossibly ? phoneNumber?.isPossible?.() : phoneNumber?.isValid?.()
316
+ if (parseInt(configs?.validation_phone_number_lib?.value ?? 1, 10) && !validation) {
306
317
  errors.push(t('VALIDATION_ERROR_MOBILE_PHONE_INVALID', 'The field Phone number is invalid.'))
307
318
  }
308
319
  } else {
@@ -592,7 +603,9 @@ const CheckoutUI = (props) => {
592
603
  </WrapperLeftContent>
593
604
  </WrapperLeftContainer>
594
605
  <WrapperRightContainer>
595
-
606
+ {isCustomerMode && (
607
+ <OrderTypesSquares />
608
+ )}
596
609
  {
597
610
  !!(!isMultiDriverTips && driverTipsField) &&
598
611
  <>
@@ -862,6 +875,11 @@ const CheckoutUI = (props) => {
862
875
  width='760px'
863
876
  padding='30px'
864
877
  onClose={() => setOpenModal({ ...openModal, orderDetail: false })}
878
+ title={(orderTypeList[options?.type - 1]) || t('DELIVERY', 'Delivery')}
879
+ titleStyle={{
880
+ color: theme?.colors?.primary,
881
+ fontSize: 30
882
+ }}
865
883
  >
866
884
  <OrderDetail
867
885
  item={cart}
@@ -86,5 +86,6 @@ export const WrapperTips = styled.div`
86
86
 
87
87
  > div {
88
88
  margin: 5px;
89
+ text-align: center;
89
90
  }
90
91
  `
@@ -54,7 +54,6 @@ import { Button } from '../../styles/Buttons'
54
54
 
55
55
  export const Header = (props) => {
56
56
  const {
57
- isHome,
58
57
  location,
59
58
  isShowOrderOptions,
60
59
  isHideSignup,
@@ -114,6 +113,7 @@ export const Header = (props) => {
114
113
  ? 'catering_pickup'
115
114
  : null
116
115
 
116
+ const franchiseLayout = theme?.my_products?.components?.website_theme?.components?.franchise_slug
117
117
  const cateringValues = getCateringValues(cateringTypeString, pathname.includes('store') && Object?.keys(business || {})?.length > 0 ? business?.configs : configState?.configs)
118
118
 
119
119
  const handleSuccessSignup = (user) => {
@@ -299,6 +299,7 @@ export const Header = (props) => {
299
299
  )}
300
300
  {!isCustomerMode && (isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
301
301
  <MomentMenu
302
+ isFranchiseSlugOne={franchiseLayout === 'franchise_1'}
302
303
  onClick={configState?.configs?.max_days_preorder?.value === -1 || configState?.configs?.max_days_preorder?.value === 0
303
304
  ? null
304
305
  : () => openModal('moment')}
@@ -312,17 +313,21 @@ export const Header = (props) => {
312
313
  )}
313
314
  </>
314
315
  )}
315
- {windowSize.width > 768 ? (
316
- <OrderTypeSelectorHeader
317
- orderTypeList={orderTypeList}
318
- onClick={() => openModal('delivery')}
319
- />
320
- ) : (
321
- <HeaderOption
322
- variant='delivery'
323
- onClick={(variant) => openModal(variant)}
324
- orderTypeList={orderTypeList}
325
- />
316
+ {franchiseLayout !== 'franchise_1' && (
317
+ <>
318
+ {windowSize.width > 768 ? (
319
+ <OrderTypeSelectorHeader
320
+ orderTypeList={orderTypeList}
321
+ onClick={() => openModal('delivery')}
322
+ />
323
+ ) : (
324
+ <HeaderOption
325
+ variant='delivery'
326
+ onClick={(variant) => openModal(variant)}
327
+ orderTypeList={orderTypeList}
328
+ />
329
+ )}
330
+ </>
326
331
  )}
327
332
  </Menu>
328
333
  )}