ordering-ui-external 4.0.6 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.2b6bfdaa8b236eb288fa.js → 0.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{1.ordering-ui.2b6bfdaa8b236eb288fa.js → 1.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{2.ordering-ui.2b6bfdaa8b236eb288fa.js → 2.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{4.ordering-ui.2b6bfdaa8b236eb288fa.js → 4.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{5.ordering-ui.2b6bfdaa8b236eb288fa.js → 5.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{6.ordering-ui.2b6bfdaa8b236eb288fa.js → 6.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{7.ordering-ui.2b6bfdaa8b236eb288fa.js → 7.ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
- package/_bundles/{8.ordering-ui.2b6bfdaa8b236eb288fa.js → 8.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{9.ordering-ui.2b6bfdaa8b236eb288fa.js → 9.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{ordering-ui.2b6bfdaa8b236eb288fa.js → ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
- package/_modules/components/BusinessBasicInformation/index.js +4 -4
- package/_modules/components/BusinessBasicInformation/styles.js +4 -1
- package/_modules/components/UserProfileForm/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +4 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +2 -6
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +23 -43
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +14 -12
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/index.js +16 -1
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +11 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +58 -55
- package/_modules/themes/five/src/components/BusinessInformation/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +9 -5
- package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
- package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +8 -4
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +18 -14
- package/_modules/themes/five/src/components/Checkout/index.js +6 -6
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +5 -2
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +44 -39
- package/_modules/themes/five/src/components/OrderContextUI/index.js +61 -7
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +1 -1
- package/_modules/themes/five/src/components/PageBanner/index.js +3 -3
- package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +20 -18
- package/_modules/themes/five/src/components/ProductShare/index.js +1 -1
- package/_modules/themes/five/src/components/ProductShare/styles.js +2 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +5 -3
- package/_modules/themes/five/src/components/ResetPassword/index.js +6 -7
- package/_modules/themes/five/src/components/ScheduleAccordion/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +4 -2
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +18 -15
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
- package/_modules/themes/five/src/components/TaxInformation/styles.js +1 -1
- package/package.json +2 -2
- package/src/components/BusinessBasicInformation/index.js +7 -10
- package/src/components/BusinessBasicInformation/styles.js +13 -0
- package/src/components/UserProfileForm/styles.js +0 -1
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -5
- package/src/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/Header/index.js +2 -40
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +6 -3
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/index.js +19 -1
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +27 -0
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +5 -1
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +7 -0
- package/src/themes/five/src/components/BusinessInformation/index.js +2 -0
- package/src/themes/five/src/components/BusinessInformation/styles.js +10 -1
- package/src/themes/five/src/components/BusinessItemAccordion/styles.js +3 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -2
- package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +5 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -1
- package/src/themes/five/src/components/Checkout/index.js +2 -1
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +16 -10
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +16 -1
- package/src/themes/five/src/components/OrderContextUI/index.js +47 -3
- package/src/themes/five/src/components/OrderContextUI/styles.js +3 -0
- package/src/themes/five/src/components/PageBanner/index.js +3 -3
- package/src/themes/five/src/components/PhoneAutocomplete/styles.js +4 -0
- package/src/themes/five/src/components/ProductForm/index.js +28 -24
- package/src/themes/five/src/components/ProductShare/index.js +1 -1
- package/src/themes/five/src/components/ProductShare/styles.js +1 -3
- package/src/themes/five/src/components/RenderProductsLayout/index.js +8 -4
- package/src/themes/five/src/components/ResetPassword/index.js +1 -1
- package/src/themes/five/src/components/ScheduleAccordion/styles.js +4 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +3 -2
- package/src/themes/five/src/components/SingleOrderCard/index.js +4 -4
- package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
- package/src/themes/five/src/components/TaxInformation/styles.js +3 -0
- package/template/pages/BusinessProductsList/index.js +1 -0
- /package/_bundles/{7.ordering-ui.2b6bfdaa8b236eb288fa.js.LICENSE.txt → 7.ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.2b6bfdaa8b236eb288fa.js.LICENSE.txt → ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {
|
|
3
3
|
CardWrapper,
|
|
4
|
-
CardsContainer
|
|
4
|
+
CardsContainer,
|
|
5
|
+
CardsContainerWrapper
|
|
5
6
|
} from './styles'
|
|
6
7
|
import { OrdersContainer } from '../OrdersOption/styles'
|
|
7
8
|
|
|
8
9
|
import { SingleOrderCard } from '../SingleOrderCard'
|
|
9
10
|
import { Pagination } from '../Pagination'
|
|
11
|
+
import { AutoScroll } from '../AutoScroll'
|
|
10
12
|
|
|
11
13
|
export const HorizontalOrdersLayout = (props) => {
|
|
12
14
|
const {
|
|
@@ -38,15 +40,19 @@ export const HorizontalOrdersLayout = (props) => {
|
|
|
38
40
|
isBusinessesPage={isBusinessesPage}
|
|
39
41
|
>
|
|
40
42
|
<CardWrapper>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
<
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
<CardsContainerWrapper>
|
|
44
|
+
<CardsContainer>
|
|
45
|
+
<AutoScroll scrollId='orderScroll'>
|
|
46
|
+
{orders.length > 0 && ordersToShow.map((order, i) => (
|
|
47
|
+
<SingleOrderCard
|
|
48
|
+
{...props}
|
|
49
|
+
key={order.id || order.id?.[0] || i}
|
|
50
|
+
order={order}
|
|
51
|
+
/>
|
|
52
|
+
))}
|
|
53
|
+
</AutoScroll>
|
|
54
|
+
</CardsContainer>
|
|
55
|
+
</CardsContainerWrapper>
|
|
50
56
|
{orders.length > 0 && ordersToShow.length > 0 && (
|
|
51
57
|
<Pagination
|
|
52
58
|
currentPage={pagination.currentPage}
|
|
@@ -21,7 +21,22 @@ export const CardWrapper = styled.div`
|
|
|
21
21
|
`
|
|
22
22
|
export const CardsContainer = styled.div`
|
|
23
23
|
display: flex;
|
|
24
|
-
|
|
24
|
+
`
|
|
25
|
+
|
|
26
|
+
export const CardsContainerWrapper = styled.div`
|
|
27
|
+
margin-bottom: 10px;
|
|
28
|
+
display: flex;
|
|
29
|
+
overflow: auto hidden;
|
|
30
|
+
::-webkit-scrollbar {
|
|
31
|
+
width: 6px;
|
|
32
|
+
height: 6px;
|
|
33
|
+
}
|
|
34
|
+
${({ isLoading }) => isLoading && css`
|
|
35
|
+
::-webkit-scrollbar {
|
|
36
|
+
width: 0px;
|
|
37
|
+
height: 0px;
|
|
38
|
+
}
|
|
39
|
+
`}
|
|
25
40
|
`
|
|
26
41
|
|
|
27
42
|
export const Price = styled.div`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import { useLanguage, useOrder, useConfig, useSession } from 'ordering-components-external'
|
|
2
|
+
import { useLanguage, useOrder, useConfig, useSession, useBusiness } from 'ordering-components-external'
|
|
3
3
|
import { MomentPopover } from '../../../../pwa/src/components/MomentPopover'
|
|
4
4
|
import { OrderTypeSelectorHeader } from '../../../../../components/OrderTypeSelectorHeader'
|
|
5
5
|
import FaMapMarkerAlt from '@meronex/icons/fa/FaMapMarkerAlt'
|
|
@@ -14,24 +14,38 @@ import {
|
|
|
14
14
|
ItemInline
|
|
15
15
|
} from './styles'
|
|
16
16
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
17
|
+
import { MomentContent } from '../MomentContent'
|
|
18
|
+
import { OrderTypeSelectorContent } from '../OrderTypeSelectorContent'
|
|
19
|
+
import { getCateringValues } from '../../../../../utils'
|
|
20
|
+
import { useLocation } from 'react-router-dom'
|
|
17
21
|
|
|
18
22
|
export const OrderContextUI = (props) => {
|
|
19
23
|
const { isCheckOut, setMapErrors, isCustomerMode, isBusinessList } = props
|
|
20
24
|
|
|
25
|
+
const { pathname } = useLocation()
|
|
21
26
|
const [, t] = useLanguage()
|
|
22
27
|
const [orderState] = useOrder()
|
|
23
28
|
const [configState] = useConfig()
|
|
24
29
|
const [{ auth }] = useSession()
|
|
30
|
+
const [{ business }] = useBusiness()
|
|
25
31
|
|
|
26
32
|
const [openPopover, setOpenPopover] = useState({})
|
|
27
33
|
const [modals, setModals] = useState({ listOpen: false, formOpen: false, citiesOpen: false })
|
|
28
34
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
35
|
+
const [modalSelected, setModalSelected] = useState(null)
|
|
36
|
+
const [modalIsOpen, setModalIsOpen] = useState(false)
|
|
29
37
|
const windowSize = useWindowSize()
|
|
30
38
|
const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
|
|
31
39
|
|
|
32
40
|
const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
|
|
33
41
|
const isPreOrderSetting = configState?.configs?.preorder_status_enabled?.value === '1'
|
|
42
|
+
const cateringTypeString = orderState?.options?.type === 7
|
|
43
|
+
? 'catering_delivery'
|
|
44
|
+
: orderState?.options?.type === 8
|
|
45
|
+
? 'catering_pickup'
|
|
46
|
+
: null
|
|
34
47
|
|
|
48
|
+
const cateringValues = getCateringValues(cateringTypeString, pathname.includes('store') && Object?.keys(business || {})?.length > 0 ? business?.configs : configState?.configs)
|
|
35
49
|
const handleTogglePopover = (type) => {
|
|
36
50
|
setOpenPopover({
|
|
37
51
|
...openPopover,
|
|
@@ -67,6 +81,11 @@ export const OrderContextUI = (props) => {
|
|
|
67
81
|
}
|
|
68
82
|
}
|
|
69
83
|
|
|
84
|
+
const openModal = (opt) => {
|
|
85
|
+
setModalSelected(opt)
|
|
86
|
+
setModalIsOpen(true)
|
|
87
|
+
}
|
|
88
|
+
|
|
70
89
|
useEffect(() => {
|
|
71
90
|
const handleCloseallPopovers = () => handleClosePopover('moment')
|
|
72
91
|
window.addEventListener('scroll', handleCloseallPopovers)
|
|
@@ -84,13 +103,14 @@ export const OrderContextUI = (props) => {
|
|
|
84
103
|
<span>{orderState.options?.address?.address || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?')}</span>
|
|
85
104
|
</AddressMenu>
|
|
86
105
|
<FeatureItems>
|
|
87
|
-
<ItemInline>
|
|
106
|
+
<ItemInline onClick={() => openModal('delivery')}>
|
|
88
107
|
<OrderTypeSelectorHeader configTypes={configTypes} autoCloseWhenScroll={windowSize.width < 576} />
|
|
89
108
|
</ItemInline>
|
|
90
109
|
{isPreOrderSetting && (
|
|
91
|
-
<ItemInline>
|
|
110
|
+
<ItemInline onClick={() => openModal('moment')}>
|
|
92
111
|
<MomentPopover
|
|
93
112
|
open={openPopover.moment}
|
|
113
|
+
onCustomClick={() => openModal('moment')}
|
|
94
114
|
onClick={() => handleTogglePopover('moment')}
|
|
95
115
|
onClose={() => handleClosePopover('moment')}
|
|
96
116
|
isBanner
|
|
@@ -99,6 +119,30 @@ export const OrderContextUI = (props) => {
|
|
|
99
119
|
)}
|
|
100
120
|
</FeatureItems>
|
|
101
121
|
</Container>
|
|
122
|
+
{modalIsOpen && (
|
|
123
|
+
<Modal
|
|
124
|
+
open={modalIsOpen}
|
|
125
|
+
onClose={() => setModalIsOpen(false)}
|
|
126
|
+
width={orderState?.options?.user_id ? '70%' : '50%'}
|
|
127
|
+
>
|
|
128
|
+
{modalSelected === 'moment' && (
|
|
129
|
+
<MomentContent
|
|
130
|
+
onClose={() => setModalIsOpen(false)}
|
|
131
|
+
cateringPreorder={!!cateringTypeString}
|
|
132
|
+
isHeader
|
|
133
|
+
business={pathname.includes('store') && business}
|
|
134
|
+
{...cateringValues}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
{modalSelected === 'delivery' && (
|
|
138
|
+
<OrderTypeSelectorContent
|
|
139
|
+
onClose={() => setModalIsOpen(false)}
|
|
140
|
+
configTypes={!configState?.loading && configTypes?.length > 0 ? configTypes : null}
|
|
141
|
+
defaultValue={!(!configState?.loading && configTypes?.length > 0) && 1}
|
|
142
|
+
/>
|
|
143
|
+
)}
|
|
144
|
+
</Modal>
|
|
145
|
+
)}
|
|
102
146
|
<Modal
|
|
103
147
|
title={t('ADDRESS_FORM', 'Address Form')}
|
|
104
148
|
open={modals.formOpen}
|
|
@@ -120,15 +120,15 @@ const PageBannerUI = (props) => {
|
|
|
120
120
|
<Swiper
|
|
121
121
|
navigation
|
|
122
122
|
spaceBetween={0}
|
|
123
|
+
shortSwipes={false}
|
|
123
124
|
loop={pageBannerState.banner?.items.length > 1}
|
|
124
125
|
>
|
|
125
126
|
{pageBannerState.banner?.items.map((img, i) => (
|
|
126
127
|
<SwiperSlide
|
|
127
128
|
key={i}
|
|
129
|
+
onClick={() => handleGoToPage(img?.action)}
|
|
128
130
|
>
|
|
129
|
-
<ImageWrapper
|
|
130
|
-
onClick={() => handleGoToPage(img?.action)}
|
|
131
|
-
>
|
|
131
|
+
<ImageWrapper>
|
|
132
132
|
<img src={img.url} className='banner-img' alt='' />
|
|
133
133
|
</ImageWrapper>
|
|
134
134
|
</SwiperSlide>
|
|
@@ -294,22 +294,24 @@ const ProductOptionsUI = (props) => {
|
|
|
294
294
|
})
|
|
295
295
|
menuList.length && menuList.forEach(menu => {
|
|
296
296
|
const elementTop = scrollElement.scrollTop
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
297
|
+
if (document.getElementById(menu)) {
|
|
298
|
+
const topPos = document.getElementById(menu).offsetTop
|
|
299
|
+
if (Math.abs(elementTop - topPos) < extraHeight) {
|
|
300
|
+
setTabValue(menu)
|
|
301
|
+
const elementLeft = document.getElementById(`menu_${menu}`).offsetLeft
|
|
302
|
+
const scrollLeft = document.getElementById('all').scrollLeft
|
|
303
|
+
if (elementLeft < scrollLeft) {
|
|
304
|
+
document.getElementById('all').scrollTo({
|
|
305
|
+
left: elementLeft,
|
|
306
|
+
behavior: 'smooth'
|
|
307
|
+
})
|
|
308
|
+
}
|
|
309
|
+
if (elementLeft < scrollLeft + scrollElement.clientWidth) {
|
|
310
|
+
document.getElementById('all').scrollTo({
|
|
311
|
+
left: elementLeft - scrollElement.clientWidth / 2,
|
|
312
|
+
behavior: 'smooth'
|
|
313
|
+
})
|
|
314
|
+
}
|
|
313
315
|
}
|
|
314
316
|
}
|
|
315
317
|
})
|
|
@@ -550,14 +552,16 @@ const ProductOptionsUI = (props) => {
|
|
|
550
552
|
</ProductDescription>
|
|
551
553
|
)}
|
|
552
554
|
</ProductFormTitle>
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
<
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
555
|
+
{product?.tags?.length > 0 && (
|
|
556
|
+
<ProductTagsListContainer>
|
|
557
|
+
{product.tags.map(tag => (
|
|
558
|
+
<ProductTagWrapper key={tag.id}>
|
|
559
|
+
<img src={optimizeImage(tag?.image || theme.images?.dummies?.product, 'h_40,c_limit')} alt='' />
|
|
560
|
+
<span>{tag.name}</span>
|
|
561
|
+
</ProductTagWrapper>
|
|
562
|
+
))}
|
|
563
|
+
</ProductTagsListContainer>
|
|
564
|
+
)}
|
|
561
565
|
<Divider />
|
|
562
566
|
<ProductEdition>
|
|
563
567
|
{
|
|
@@ -61,7 +61,7 @@ const ProductShareUI = (props) => {
|
|
|
61
61
|
)}
|
|
62
62
|
<ShareButtons
|
|
63
63
|
ref={contentElement}
|
|
64
|
-
className='a2a_kit a2a_kit_size_32
|
|
64
|
+
className='a2a_kit a2a_kit_size_32 a2a_vertical_style'
|
|
65
65
|
data-a2a-url={urlToShare}
|
|
66
66
|
showShareButton={showShareButton}
|
|
67
67
|
>
|
|
@@ -49,7 +49,6 @@ export const IconShare = styled.div`
|
|
|
49
49
|
|
|
50
50
|
&:nth-child(1) > svg {
|
|
51
51
|
background-color: white;
|
|
52
|
-
padding: 5px;
|
|
53
52
|
border-radius: 9px;
|
|
54
53
|
margin: 5px 0px;
|
|
55
54
|
}
|
|
@@ -75,8 +74,7 @@ export const ShareButtons = styled.div`
|
|
|
75
74
|
|
|
76
75
|
@media (min-width: 1201px) {
|
|
77
76
|
top: 35px;
|
|
78
|
-
left:
|
|
79
|
-
right: 0px;
|
|
77
|
+
left: -8px;
|
|
80
78
|
}
|
|
81
79
|
`
|
|
82
80
|
export const CopyButton = styled.a`
|
|
@@ -87,7 +87,8 @@ export const RenderProductsLayout = (props) => {
|
|
|
87
87
|
onBusinessClick,
|
|
88
88
|
handleChangePriceFilterValues,
|
|
89
89
|
priceFilterValues,
|
|
90
|
-
handleUpdateProfessionals
|
|
90
|
+
handleUpdateProfessionals,
|
|
91
|
+
isCustomerMode,
|
|
91
92
|
} = props
|
|
92
93
|
|
|
93
94
|
const theme = useTheme()
|
|
@@ -192,9 +193,11 @@ export const RenderProductsLayout = (props) => {
|
|
|
192
193
|
/>
|
|
193
194
|
)}
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
{!isCustomerMode && (
|
|
197
|
+
<PageBannerWrapper>
|
|
198
|
+
<PageBanner position='web_business_page' />
|
|
199
|
+
</PageBannerWrapper>
|
|
200
|
+
)}
|
|
198
201
|
|
|
199
202
|
{!errorQuantityProducts && SearchProductsComponent && !useKioskApp && (
|
|
200
203
|
<>
|
|
@@ -473,6 +476,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
473
476
|
isSkeleton
|
|
474
477
|
categories={[]}
|
|
475
478
|
openBusinessInformation={openBusinessInformation}
|
|
479
|
+
isCustomerMode={isCustomerMode}
|
|
476
480
|
/>
|
|
477
481
|
</div>
|
|
478
482
|
</BusinessCategoryProductWrapper>
|
|
@@ -70,7 +70,7 @@ const ResetPasswordUI = (props) => {
|
|
|
70
70
|
} else if (!formState.loading && formState.result?.result?.length) {
|
|
71
71
|
setAlertState({
|
|
72
72
|
open: true,
|
|
73
|
-
content:
|
|
73
|
+
content: t('PASSWORD_RESET_SUCCESS', 'Password changed successfully')
|
|
74
74
|
})
|
|
75
75
|
}
|
|
76
76
|
if (!formState.loading && formState.result?.result?.length > 0 && !formState.result.error) {
|
|
@@ -13,7 +13,7 @@ import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
|
|
|
13
13
|
import SiJsonwebtokens from '@meronex/icons/si/SiJsonwebtokens'
|
|
14
14
|
import BiMessageDetail from '@meronex/icons/bi/BiMessageDetail'
|
|
15
15
|
import BsSearch from '@meronex/icons/bs/BsSearch'
|
|
16
|
-
import { Heart, Tag } from 'react-bootstrap-icons'
|
|
16
|
+
import { Heart, Tag, X as CloseIcon } from 'react-bootstrap-icons'
|
|
17
17
|
|
|
18
18
|
import { useEvent, useLanguage, useOrder, useSession, useConfig } from 'ordering-components-external'
|
|
19
19
|
import { useTheme } from 'styled-components'
|
|
@@ -35,7 +35,8 @@ import {
|
|
|
35
35
|
MenuLinkIcon,
|
|
36
36
|
MenuLinkText,
|
|
37
37
|
TextInfo,
|
|
38
|
-
MenuLinkSeparator
|
|
38
|
+
MenuLinkSeparator,
|
|
39
|
+
MobileMessage
|
|
39
40
|
} from './styles'
|
|
40
41
|
|
|
41
42
|
export const SidebarMenu = (props) => {
|
|
@@ -254,9 +254,9 @@ const SingleOrderCardUI = (props) => {
|
|
|
254
254
|
}
|
|
255
255
|
</Price>
|
|
256
256
|
)}
|
|
257
|
-
{pastOrders &&
|
|
258
|
-
<ButtonWrapper>
|
|
259
|
-
{!isOrderReviewed && !isFavorite && (!order?.review || (order.driver && !order?.user_review)) && !hideReviewOrderButton && (
|
|
257
|
+
{pastOrders && (
|
|
258
|
+
<ButtonWrapper isCustomerMode={isCustomerMode}>
|
|
259
|
+
{!isOrderReviewed && !isFavorite && (!order?.review || (order.driver && !order?.user_review)) && !hideReviewOrderButton && !isCustomerMode && (
|
|
260
260
|
<Button
|
|
261
261
|
outline
|
|
262
262
|
color='primary'
|
|
@@ -273,7 +273,7 @@ const SingleOrderCardUI = (props) => {
|
|
|
273
273
|
)}
|
|
274
274
|
</ButtonWrapper>
|
|
275
275
|
)}
|
|
276
|
-
{!order?.business?.length && !hideFavorite && (
|
|
276
|
+
{!order?.business?.length && !hideFavorite && !isCustomerMode && (
|
|
277
277
|
<FavoriteWrapper onClick={() => handleChangeFavorite(order)} className='favorite'>
|
|
278
278
|
{isSkeleton ? <Skeleton width={20} height={20} /> : (
|
|
279
279
|
<>
|
|
@@ -200,7 +200,7 @@ export const BusinessLogoWrapper = (props) => {
|
|
|
200
200
|
export const ButtonWrapper = styled.div`
|
|
201
201
|
position: absolute;
|
|
202
202
|
right: 0px;
|
|
203
|
-
top: 4px
|
|
203
|
+
${({ isCustomerMode }) => isCustomerMode ? css`bottom: 4px;` : css`top: 4px;`}
|
|
204
204
|
display: flex;
|
|
205
205
|
align-items: center;
|
|
206
206
|
|
|
@@ -44,7 +44,8 @@ const SingleProductCardUI = (props) => {
|
|
|
44
44
|
handleFavoriteProduct,
|
|
45
45
|
isFavorite,
|
|
46
46
|
isPreviously,
|
|
47
|
-
viewString
|
|
47
|
+
viewString,
|
|
48
|
+
isCustomerMode
|
|
48
49
|
} = props
|
|
49
50
|
|
|
50
51
|
const [, t] = useLanguage()
|
|
@@ -165,7 +166,7 @@ const SingleProductCardUI = (props) => {
|
|
|
165
166
|
<CardInfo soldOut={isSoldOut || maxProductQuantity <= 0} isBgimage={optimizeImage(product?.images || theme?.images?.dummies?.product, 'h_86,c_limit')} oneLine={isPreviously}>
|
|
166
167
|
<TitleWrapper>
|
|
167
168
|
{!isSkeleton ? (<h1>{product?.name}</h1>) : (<Skeleton width={100} />)}
|
|
168
|
-
{!useKioskApp && !isPreviously && (
|
|
169
|
+
{(!useKioskApp && !isPreviously && isCustomerMode) && (
|
|
169
170
|
!isSkeleton ? (
|
|
170
171
|
<span onClick={() => handleChangeFavorite()} ref={favoriteRef}>
|
|
171
172
|
{product?.favorite ? <Like /> : <DisLike />}
|
|
File without changes
|