ordering-ui-external 14.1.45 → 14.1.47
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.
- package/_bundles/{7.ordering-ui.d9252dcccf4ce0155028.js → 7.ordering-ui.a574355896c3077ecd50.js} +1 -1
- package/_bundles/ordering-ui.a574355896c3077ecd50.js +2 -0
- package/_modules/components/BusinessesMap/index.js +7 -22
- package/_modules/components/LogoutButton/index.js +1 -7
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +8 -12
- package/_modules/themes/callcenterOriginal/src/components/HeaderOption/index.js +6 -26
- package/_modules/themes/callcenterOriginal/src/components/HeaderOption/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/index.js +74 -69
- package/_modules/themes/callcenterOriginal/src/components/UserPopover/index.js +30 -21
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +25 -21
- package/_modules/themes/five/src/components/BusinessController/index.js +3 -1
- package/_modules/themes/five/src/components/BusinessController/styles.js +7 -4
- package/_modules/themes/five/src/components/Checkout/index.js +5 -8
- package/package.json +2 -2
- package/src/components/BusinessesMap/index.js +24 -38
- package/src/components/LogoutButton/index.js +3 -5
- package/src/themes/callcenterOriginal/src/components/Header/index.js +14 -12
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +18 -40
- package/src/themes/callcenterOriginal/src/components/HeaderOption/index.js +30 -51
- package/src/themes/callcenterOriginal/src/components/HeaderOption/styles.js +2 -4
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/index.js +75 -101
- package/src/themes/callcenterOriginal/src/components/UserPopover/index.js +36 -17
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -0
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +13 -1
- package/src/themes/five/src/components/BusinessController/index.js +15 -1
- package/src/themes/five/src/components/BusinessController/styles.js +12 -1
- package/src/themes/five/src/components/Checkout/index.js +1 -2
- package/_bundles/ordering-ui.d9252dcccf4ce0155028.js +0 -2
- /package/_bundles/{0.ordering-ui.d9252dcccf4ce0155028.js → 0.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{1.ordering-ui.d9252dcccf4ce0155028.js → 1.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{2.ordering-ui.d9252dcccf4ce0155028.js → 2.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{4.ordering-ui.d9252dcccf4ce0155028.js → 4.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{5.ordering-ui.d9252dcccf4ce0155028.js → 5.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{6.ordering-ui.d9252dcccf4ce0155028.js → 6.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{7.ordering-ui.d9252dcccf4ce0155028.js.LICENSE.txt → 7.ordering-ui.a574355896c3077ecd50.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.d9252dcccf4ce0155028.js → 8.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{9.ordering-ui.d9252dcccf4ce0155028.js → 9.ordering-ui.a574355896c3077ecd50.js} +0 -0
- /package/_bundles/{ordering-ui.d9252dcccf4ce0155028.js.LICENSE.txt → ordering-ui.a574355896c3077ecd50.js.LICENSE.txt} +0 -0
|
@@ -5,9 +5,7 @@ export const Container = styled.div`
|
|
|
5
5
|
|
|
6
6
|
${({ variant }) => variant === 'cart' && css`
|
|
7
7
|
> span {
|
|
8
|
-
|
|
9
|
-
height: 20px;
|
|
10
|
-
padding: 10px 9px;
|
|
8
|
+
padding: 10px;
|
|
11
9
|
display: flex;
|
|
12
10
|
align-items: center;
|
|
13
11
|
background: ${props => props.theme.colors.primary};
|
|
@@ -21,7 +19,7 @@ export const Container = styled.div`
|
|
|
21
19
|
margin-right: 10px;
|
|
22
20
|
` : css`
|
|
23
21
|
margin-left: 10px;
|
|
24
|
-
`}
|
|
22
|
+
`}
|
|
25
23
|
}
|
|
26
24
|
svg {
|
|
27
25
|
font-size: 17px;
|
|
@@ -9,10 +9,13 @@ import AiOutlineHome from '@meronex/icons/ai/AiOutlineHome'
|
|
|
9
9
|
import BiStore from '@meronex/icons/bi/BiStore'
|
|
10
10
|
import FaUserCircle from '@meronex/icons/fa/FaUserCircle'
|
|
11
11
|
import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
|
|
12
|
+
import GiHistogram from '@meronex/icons/gi/GiHistogram'
|
|
13
|
+
import BsGraphUp from '@meronex/icons/bs/BsGraphUp'
|
|
12
14
|
|
|
13
15
|
import { useEvent, useLanguage, useOrder, useSession } from 'ordering-components-external'
|
|
14
16
|
import { useTheme } from 'styled-components'
|
|
15
17
|
|
|
18
|
+
import { capitalize } from '../../../../../utils'
|
|
16
19
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
17
20
|
import { LogoutButton } from '../../../../../components/LogoutButton'
|
|
18
21
|
import { Modal } from '../Modal'
|
|
@@ -35,9 +38,20 @@ import {
|
|
|
35
38
|
MobileMessage
|
|
36
39
|
} from './styles'
|
|
37
40
|
|
|
41
|
+
const extraOptions = [
|
|
42
|
+
{ name: 'profile', pathname: '/profile', displayName: 'view account', key: 'view_account' },
|
|
43
|
+
{ name: 'help', pathname: '/help', displayName: 'help', key: 'help' }
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
const adminOptionsDefault = [
|
|
47
|
+
{ name: 'orderlist', pathname: '/orderlist', displayName: 'order list', key: 'ORDER_LIST' },
|
|
48
|
+
{ name: 'deliveries', pathname: '/deliveries', displayName: 'delivery dashboard', key: 'DELIVERY_DASHBOARD' },
|
|
49
|
+
{ name: 'drivers_dashboard', pathname: '/drivers', displayName: 'drivers dashboard', key: 'DRIVERS_DASHBOARD' }
|
|
50
|
+
]
|
|
51
|
+
|
|
38
52
|
export const SidebarMenu = (props) => {
|
|
39
53
|
const { auth, isHideSignup, userCustomer, isCustomerMode } = props
|
|
40
|
-
const [{ login }] = useSession()
|
|
54
|
+
const [sessionState, { login }] = useSession()
|
|
41
55
|
const [events] = useEvent()
|
|
42
56
|
const [, t] = useLanguage()
|
|
43
57
|
const [{ options }] = useOrder()
|
|
@@ -48,8 +62,6 @@ export const SidebarMenu = (props) => {
|
|
|
48
62
|
const [modalPageToShow, setModalPageToShow] = useState(null)
|
|
49
63
|
const [showMessage, setShowMessage] = useState(false)
|
|
50
64
|
|
|
51
|
-
const isHome = window.location.pathname === '/' || window.location.pathname === '/home'
|
|
52
|
-
|
|
53
65
|
const closeModal = () => {
|
|
54
66
|
setModalIsOpen(false)
|
|
55
67
|
setModalPageToShow(null)
|
|
@@ -104,21 +116,26 @@ export const SidebarMenu = (props) => {
|
|
|
104
116
|
}, [width])
|
|
105
117
|
|
|
106
118
|
useEffect(() => {
|
|
107
|
-
if(!isCustomerMode) return
|
|
119
|
+
if (!isCustomerMode) return
|
|
108
120
|
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
|
109
121
|
setShowMessage(true)
|
|
110
122
|
}
|
|
111
123
|
}, [])
|
|
112
124
|
|
|
125
|
+
const getMenuIcon = (icon) => {
|
|
126
|
+
const list = {
|
|
127
|
+
profile: <FaRegAddressCard />,
|
|
128
|
+
help: <BiHelpCircle />,
|
|
129
|
+
orderlist: <FaRegListAlt />,
|
|
130
|
+
deliveries: <GiHistogram />,
|
|
131
|
+
drivers_dashboard: <BsGraphUp />
|
|
132
|
+
}
|
|
133
|
+
return list[icon]
|
|
134
|
+
}
|
|
135
|
+
|
|
113
136
|
return (
|
|
114
137
|
<>
|
|
115
|
-
{
|
|
116
|
-
<React.Fragment key={i}>
|
|
117
|
-
{BeforeElement}
|
|
118
|
-
</React.Fragment>))}
|
|
119
|
-
{props.beforeComponents?.map((BeforeComponent, i) => (
|
|
120
|
-
<BeforeComponent key={i} {...props} />))}
|
|
121
|
-
{showMessage && (
|
|
138
|
+
{showMessage && (
|
|
122
139
|
<MobileMessage>
|
|
123
140
|
<div>
|
|
124
141
|
<CloseIcon onClick={() => setShowMessage(false)} />
|
|
@@ -128,18 +145,13 @@ export const SidebarMenu = (props) => {
|
|
|
128
145
|
)}
|
|
129
146
|
<Container auth={auth}>
|
|
130
147
|
<IconContent
|
|
131
|
-
isHome={isHome}
|
|
132
148
|
aria-label='menu'
|
|
133
149
|
onClick={() => actionSidebar(true)}
|
|
134
150
|
>
|
|
135
151
|
<IosMenu />
|
|
136
152
|
</IconContent>
|
|
137
|
-
<SidebarContent
|
|
138
|
-
id='sidebar_menu'
|
|
139
|
-
isHome={isHome}
|
|
140
|
-
>
|
|
153
|
+
<SidebarContent id='sidebar_menu'>
|
|
141
154
|
<MenuClose
|
|
142
|
-
isHome={isHome}
|
|
143
155
|
aria-label='close'
|
|
144
156
|
onClick={() => actionSidebar(false)}
|
|
145
157
|
>
|
|
@@ -147,17 +159,15 @@ export const SidebarMenu = (props) => {
|
|
|
147
159
|
</MenuClose>
|
|
148
160
|
|
|
149
161
|
{userCustomer && (
|
|
150
|
-
<MenuLink
|
|
162
|
+
<MenuLink isCustomer={userCustomer}>
|
|
151
163
|
<WrappContent>
|
|
152
164
|
<MenuLinkIcon
|
|
153
|
-
isHome={isHome}
|
|
154
165
|
active={false}
|
|
155
166
|
>
|
|
156
167
|
<FaUserCircle />
|
|
157
168
|
</MenuLinkIcon>
|
|
158
169
|
<MenuLinkText>
|
|
159
170
|
<TextInfo
|
|
160
|
-
isHome={isHome}
|
|
161
171
|
active={false}
|
|
162
172
|
>
|
|
163
173
|
{`${userCustomer?.name} ${userCustomer?.lastname}`}
|
|
@@ -172,13 +182,9 @@ export const SidebarMenu = (props) => {
|
|
|
172
182
|
</MenuLink>
|
|
173
183
|
)}
|
|
174
184
|
|
|
175
|
-
<MenuLink
|
|
176
|
-
isHome={isHome}
|
|
177
|
-
onClick={() => handleGoToPage({ page: options?.address?.location ? 'search' : 'home' })}
|
|
178
|
-
>
|
|
185
|
+
<MenuLink onClick={() => handleGoToPage({ page: options?.address?.location ? 'search' : 'home' })}>
|
|
179
186
|
<WrappContent>
|
|
180
187
|
<MenuLinkIcon
|
|
181
|
-
isHome={isHome}
|
|
182
188
|
active={
|
|
183
189
|
window.location.pathname === '/' ||
|
|
184
190
|
window.location.pathname === '/home' ||
|
|
@@ -193,7 +199,6 @@ export const SidebarMenu = (props) => {
|
|
|
193
199
|
</MenuLinkIcon>
|
|
194
200
|
<MenuLinkText>
|
|
195
201
|
<TextInfo
|
|
196
|
-
isHome={isHome}
|
|
197
202
|
active={
|
|
198
203
|
window.location.pathname === '/' ||
|
|
199
204
|
window.location.pathname === '/home' ||
|
|
@@ -217,75 +222,57 @@ export const SidebarMenu = (props) => {
|
|
|
217
222
|
|
|
218
223
|
{auth && (
|
|
219
224
|
<>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
<
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
<TextInfo
|
|
265
|
-
isHome={isHome}
|
|
266
|
-
active={
|
|
267
|
-
window.location.pathname === '/help'
|
|
268
|
-
}
|
|
269
|
-
>
|
|
270
|
-
{t('HELP', 'help')}
|
|
271
|
-
</TextInfo>
|
|
272
|
-
</MenuLinkText>
|
|
273
|
-
<MenuLinkSeparator>
|
|
274
|
-
<div>
|
|
275
|
-
<hr />
|
|
276
|
-
</div>
|
|
277
|
-
</MenuLinkSeparator>
|
|
278
|
-
</WrappContent>
|
|
279
|
-
</MenuLink>
|
|
225
|
+
{extraOptions.map(option => (
|
|
226
|
+
<MenuLink
|
|
227
|
+
key={option.key}
|
|
228
|
+
onClick={() => handleGoToPage({ page: option.name })}
|
|
229
|
+
>
|
|
230
|
+
<WrappContent>
|
|
231
|
+
<MenuLinkIcon active={window.location.pathname === option.pathname}>
|
|
232
|
+
{getMenuIcon(option.name)}
|
|
233
|
+
</MenuLinkIcon>
|
|
234
|
+
<MenuLinkText>
|
|
235
|
+
<TextInfo active={window.location.pathname === option.pathname}>
|
|
236
|
+
{t((option.key || option.name).toUpperCase(), capitalize(option.displayName || option.name))}
|
|
237
|
+
</TextInfo>
|
|
238
|
+
</MenuLinkText>
|
|
239
|
+
<MenuLinkSeparator>
|
|
240
|
+
<div>
|
|
241
|
+
<hr />
|
|
242
|
+
</div>
|
|
243
|
+
</MenuLinkSeparator>
|
|
244
|
+
</WrappContent>
|
|
245
|
+
</MenuLink>
|
|
246
|
+
))}
|
|
247
|
+
{sessionState?.user?.level === 0 && adminOptionsDefault.map(option => (
|
|
248
|
+
<MenuLink
|
|
249
|
+
key={option.key}
|
|
250
|
+
onClick={() => handleGoToPage({ page: option.name })}
|
|
251
|
+
>
|
|
252
|
+
<WrappContent>
|
|
253
|
+
<MenuLinkIcon active={window.location.pathname === option.pathname}>
|
|
254
|
+
{getMenuIcon(option.name)}
|
|
255
|
+
</MenuLinkIcon>
|
|
256
|
+
<MenuLinkText>
|
|
257
|
+
<TextInfo active={window.location.pathname === option.pathname}>
|
|
258
|
+
{t((option.key || option.name).toUpperCase(), capitalize(option.displayName || option.name))}
|
|
259
|
+
</TextInfo>
|
|
260
|
+
</MenuLinkText>
|
|
261
|
+
<MenuLinkSeparator>
|
|
262
|
+
<div>
|
|
263
|
+
<hr />
|
|
264
|
+
</div>
|
|
265
|
+
</MenuLinkSeparator>
|
|
266
|
+
</WrappContent>
|
|
267
|
+
</MenuLink>
|
|
268
|
+
))}
|
|
280
269
|
{
|
|
281
270
|
!isCustomerMode && (
|
|
282
271
|
<MenuLink
|
|
283
|
-
isHome={isHome}
|
|
284
272
|
onClick={() => handleGoToPage({ page: 'orders' })}
|
|
285
273
|
>
|
|
286
274
|
<WrappContent>
|
|
287
275
|
<MenuLinkIcon
|
|
288
|
-
isHome={isHome}
|
|
289
276
|
active={
|
|
290
277
|
window.location.pathname === '/profile/orders'
|
|
291
278
|
}
|
|
@@ -294,7 +281,6 @@ export const SidebarMenu = (props) => {
|
|
|
294
281
|
</MenuLinkIcon>
|
|
295
282
|
<MenuLinkText>
|
|
296
283
|
<TextInfo
|
|
297
|
-
isHome={isHome}
|
|
298
284
|
active={
|
|
299
285
|
window.location.pathname === '/profile/orders'
|
|
300
286
|
}
|
|
@@ -318,19 +304,16 @@ export const SidebarMenu = (props) => {
|
|
|
318
304
|
{!auth && (
|
|
319
305
|
<>
|
|
320
306
|
<MenuLink
|
|
321
|
-
isHome={isHome}
|
|
322
307
|
onClick={() => handleOpenLoginSignUp('login')}
|
|
323
308
|
>
|
|
324
309
|
<WrappContent>
|
|
325
310
|
<MenuLinkIcon
|
|
326
|
-
isHome={isHome}
|
|
327
311
|
active={modalPageToShow === 'login'}
|
|
328
312
|
>
|
|
329
313
|
<AiOutlineLogin />
|
|
330
314
|
</MenuLinkIcon>
|
|
331
315
|
<MenuLinkText>
|
|
332
316
|
<TextInfo
|
|
333
|
-
isHome={isHome}
|
|
334
317
|
active={modalPageToShow === 'login'}
|
|
335
318
|
>
|
|
336
319
|
{t('SIGN_IN', 'Sign in')}
|
|
@@ -345,19 +328,16 @@ export const SidebarMenu = (props) => {
|
|
|
345
328
|
</MenuLink>
|
|
346
329
|
{!isHideSignup && (
|
|
347
330
|
<MenuLink
|
|
348
|
-
isHome={isHome}
|
|
349
331
|
onClick={() => handleOpenLoginSignUp('signup')}
|
|
350
332
|
>
|
|
351
333
|
<WrappContent>
|
|
352
334
|
<MenuLinkIcon
|
|
353
|
-
isHome={isHome}
|
|
354
335
|
active={modalPageToShow === 'signup'}
|
|
355
336
|
>
|
|
356
337
|
<AiOutlineUserAdd />
|
|
357
338
|
</MenuLinkIcon>
|
|
358
339
|
<MenuLinkText>
|
|
359
340
|
<TextInfo
|
|
360
|
-
isHome={isHome}
|
|
361
341
|
active={modalPageToShow === 'signup'}
|
|
362
342
|
>
|
|
363
343
|
{t('SIGNUP', 'Sign up')}
|
|
@@ -435,12 +415,6 @@ export const SidebarMenu = (props) => {
|
|
|
435
415
|
</Modal>
|
|
436
416
|
)}
|
|
437
417
|
</Container>
|
|
438
|
-
{props.afterComponents?.map((AfterComponent, i) => (
|
|
439
|
-
<AfterComponent key={i} {...props} />))}
|
|
440
|
-
{props.afterElements?.map((AfterElement, i) => (
|
|
441
|
-
<React.Fragment key={i}>
|
|
442
|
-
{AfterElement}
|
|
443
|
-
</React.Fragment>))}
|
|
444
418
|
</>
|
|
445
419
|
)
|
|
446
420
|
}
|
|
@@ -27,6 +27,12 @@ const extraOptions = [
|
|
|
27
27
|
{ name: 'help', pathname: '/help', displayName: 'help', key: 'help' }
|
|
28
28
|
]
|
|
29
29
|
|
|
30
|
+
const adminOptionsDefault = [
|
|
31
|
+
{ name: 'orderlist', pathname: '/orderlist', displayName: 'order list', key: 'ORDER_LIST' },
|
|
32
|
+
{ name: 'deliveries', pathname: '/deliveries', displayName: 'delivery dashboard', key: 'DELIVERY_DASHBOARD' },
|
|
33
|
+
{ name: 'drivers_dashboard', pathname: '/drivers', displayName: 'drivers dashboard', key: 'DRIVERS_DASHBOARD' }
|
|
34
|
+
]
|
|
35
|
+
|
|
30
36
|
export const UserPopover = (props) => {
|
|
31
37
|
const {
|
|
32
38
|
open,
|
|
@@ -58,7 +64,7 @@ export const UserPopover = (props) => {
|
|
|
58
64
|
]
|
|
59
65
|
})
|
|
60
66
|
|
|
61
|
-
const { styles, attributes
|
|
67
|
+
const { styles, attributes } = popper
|
|
62
68
|
|
|
63
69
|
useEffect(() => {
|
|
64
70
|
// forceUpdate && forceUpdate()
|
|
@@ -99,12 +105,6 @@ export const UserPopover = (props) => {
|
|
|
99
105
|
}
|
|
100
106
|
return (
|
|
101
107
|
<div style={{ overflow: 'hidden' }}>
|
|
102
|
-
{props.beforeElements?.map((BeforeElement, i) => (
|
|
103
|
-
<React.Fragment key={i}>
|
|
104
|
-
{BeforeElement}
|
|
105
|
-
</React.Fragment>))}
|
|
106
|
-
{props.beforeComponents?.map((BeforeComponent, i) => (
|
|
107
|
-
<BeforeComponent key={i} {...props} />))}
|
|
108
108
|
<HeaderItem
|
|
109
109
|
isPhoto={sessionState?.user?.photo}
|
|
110
110
|
isHome={isHome}
|
|
@@ -150,20 +150,39 @@ export const UserPopover = (props) => {
|
|
|
150
150
|
))
|
|
151
151
|
)
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
{!(sessionState?.user?.level === 0) && (
|
|
154
|
+
<>
|
|
155
|
+
<Divider />
|
|
156
|
+
{withLogout && (
|
|
157
|
+
<PopoverListItemLogout onClose={props.onClose} />
|
|
158
|
+
)}
|
|
159
|
+
</>
|
|
157
160
|
)}
|
|
158
161
|
</ExtraOptions>
|
|
162
|
+
{sessionState?.user?.level === 0 && (
|
|
163
|
+
<>
|
|
164
|
+
<Divider />
|
|
165
|
+
<ExtraOptions>
|
|
166
|
+
{
|
|
167
|
+
adminOptionsDefault && (adminOptionsDefault.map((option, i) => (
|
|
168
|
+
<PopoverListLink
|
|
169
|
+
key={i}
|
|
170
|
+
active={window.location.pathname === option.pathname}
|
|
171
|
+
onClick={() => handleGoToPage(option.name)}
|
|
172
|
+
>
|
|
173
|
+
{t((option.key || option.name).toUpperCase(), capitalize(option.displayName || option.name))}
|
|
174
|
+
</PopoverListLink>
|
|
175
|
+
)))
|
|
176
|
+
}
|
|
177
|
+
<Divider />
|
|
178
|
+
{withLogout && (
|
|
179
|
+
<PopoverListItemLogout onClose={props.onClose} />
|
|
180
|
+
)}
|
|
181
|
+
</ExtraOptions>
|
|
182
|
+
</>
|
|
183
|
+
)}
|
|
159
184
|
</PopoverList>
|
|
160
185
|
</PopoverBody>
|
|
161
|
-
{props.afterComponents?.map((AfterComponent, i) => (
|
|
162
|
-
<AfterComponent key={i} {...props} />))}
|
|
163
|
-
{props.afterElements?.map((AfterElement, i) => (
|
|
164
|
-
<React.Fragment key={i}>
|
|
165
|
-
{AfterElement}
|
|
166
|
-
</React.Fragment>))}
|
|
167
186
|
</div>
|
|
168
187
|
)
|
|
169
188
|
}
|
|
@@ -59,6 +59,9 @@ 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
|
+
{isCustomerMode && business?.address && (
|
|
63
|
+
<h3>{business?.address}</h3>
|
|
64
|
+
)}
|
|
62
65
|
<span id='business_name_feedback' />
|
|
63
66
|
{business?.ribbon?.enabled && (
|
|
64
67
|
<RibbonBox
|
|
@@ -411,11 +411,23 @@ export const TitleWrapper = styled.div`
|
|
|
411
411
|
`}
|
|
412
412
|
`}
|
|
413
413
|
}
|
|
414
|
+
|
|
414
415
|
@media (min-width: 768px) {
|
|
415
416
|
font-size: 32px;
|
|
416
|
-
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
+
|
|
420
|
+
h3 {
|
|
421
|
+
font-size: 16px;
|
|
422
|
+
line-height: 36px;
|
|
423
|
+
margin: 0px;
|
|
424
|
+
font-weight: 500;
|
|
425
|
+
width: 100%;
|
|
426
|
+
overflow: hidden;
|
|
427
|
+
white-space: nowrap;
|
|
428
|
+
text-overflow: ellipsis;
|
|
429
|
+
background: ${({ theme }) => theme?.colors?.backgroundPage};
|
|
430
|
+
}
|
|
419
431
|
`
|
|
420
432
|
|
|
421
433
|
export const RibbonBox = styled.div`
|
|
@@ -33,7 +33,8 @@ import {
|
|
|
33
33
|
FavoriteWrapper,
|
|
34
34
|
BusinessHeaderClosedContainer,
|
|
35
35
|
ScheduleContainer,
|
|
36
|
-
ClosedContainer
|
|
36
|
+
ClosedContainer,
|
|
37
|
+
BusinessAddress
|
|
37
38
|
// CardOverlay
|
|
38
39
|
} from './styles'
|
|
39
40
|
import GoPrimitiveDot from '@meronex/icons/go/GoPrimitiveDot'
|
|
@@ -258,6 +259,19 @@ const BusinessControllerUI = (props) => {
|
|
|
258
259
|
<Skeleton width={100} />
|
|
259
260
|
)}
|
|
260
261
|
</div>
|
|
262
|
+
{isCustomerMode && (
|
|
263
|
+
<>
|
|
264
|
+
{business?.address ? (
|
|
265
|
+
<div>
|
|
266
|
+
<BusinessAddress>{business?.address}</BusinessAddress>
|
|
267
|
+
</div>
|
|
268
|
+
) : (
|
|
269
|
+
<div>
|
|
270
|
+
<Skeleton width={100} />
|
|
271
|
+
</div>
|
|
272
|
+
)}
|
|
273
|
+
</>
|
|
274
|
+
)}
|
|
261
275
|
<Medadata isCustomerMode={isCustomerMode} isSkeleton={isSkeleton}>
|
|
262
276
|
{!hideBusinessFee && orderType === 1 && (
|
|
263
277
|
<>
|
|
@@ -310,7 +310,7 @@ export const BusinessInfoItem = styled.div`
|
|
|
310
310
|
}
|
|
311
311
|
`
|
|
312
312
|
|
|
313
|
-
export const BusinessName = styled.
|
|
313
|
+
export const BusinessName = styled.h5`
|
|
314
314
|
font-size: 16px;
|
|
315
315
|
overflow: hidden;
|
|
316
316
|
text-overflow: ellipsis;
|
|
@@ -533,3 +533,14 @@ export const ClosedContainer = styled.div`
|
|
|
533
533
|
width: 100%;
|
|
534
534
|
line-break: anywhere;
|
|
535
535
|
`
|
|
536
|
+
|
|
537
|
+
export const BusinessAddress = styled.h6`
|
|
538
|
+
font-size: 14px;
|
|
539
|
+
overflow: hidden;
|
|
540
|
+
text-overflow: ellipsis;
|
|
541
|
+
white-space: nowrap;
|
|
542
|
+
margin-block-start: 0;
|
|
543
|
+
margin-block-end: 0;
|
|
544
|
+
font-weight: 400;
|
|
545
|
+
color: ${props => props.theme.colors.darkTextColor};
|
|
546
|
+
`
|
|
@@ -108,7 +108,6 @@ const CheckoutUI = (props) => {
|
|
|
108
108
|
} = props
|
|
109
109
|
|
|
110
110
|
const theme = useTheme()
|
|
111
|
-
const [ordering] = useApi()
|
|
112
111
|
const [{ options, loading }] = useOrder()
|
|
113
112
|
const [, t] = useLanguage()
|
|
114
113
|
const [{ parsePrice }] = useUtils()
|
|
@@ -134,7 +133,7 @@ const CheckoutUI = (props) => {
|
|
|
134
133
|
const [paymethodClicked, setPaymethodClicked] = useState(null)
|
|
135
134
|
const [productLoading, setProductLoading] = useState(false)
|
|
136
135
|
|
|
137
|
-
const shouldActivateOrderDetailModal =
|
|
136
|
+
const shouldActivateOrderDetailModal = isCustomerMode
|
|
138
137
|
const cardsMethods = ['stripe', 'credomatic']
|
|
139
138
|
const stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect']
|
|
140
139
|
const businessConfigs = businessDetails?.business?.configs ?? []
|