ordering-ui-external 1.1.7 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.ff2158785c5abf7d9a26.js → 0.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{1.ordering-ui.ff2158785c5abf7d9a26.js → 1.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{3.ordering-ui.ff2158785c5abf7d9a26.js → 3.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{4.ordering-ui.ff2158785c5abf7d9a26.js → 4.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{5.ordering-ui.ff2158785c5abf7d9a26.js → 5.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{6.ordering-ui.ff2158785c5abf7d9a26.js → 6.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{7.ordering-ui.ff2158785c5abf7d9a26.js → 7.ordering-ui.5a3714c3be025beef39b.js} +1 -1
- package/_bundles/{7.ordering-ui.ff2158785c5abf7d9a26.js.LICENSE.txt → 7.ordering-ui.5a3714c3be025beef39b.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.ff2158785c5abf7d9a26.js → 8.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/{9.ordering-ui.ff2158785c5abf7d9a26.js → 9.ordering-ui.5a3714c3be025beef39b.js} +0 -0
- package/_bundles/ordering-ui.5a3714c3be025beef39b.js +2 -0
- package/_bundles/{ordering-ui.ff2158785c5abf7d9a26.js.LICENSE.txt → ordering-ui.5a3714c3be025beef39b.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/index.js +8 -0
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +5 -3
- package/_modules/themes/five/src/components/Cart/index.js +14 -3
- package/_modules/themes/five/src/components/Cart/styles.js +9 -3
- package/_modules/themes/five/src/components/Checkout/index.js +1 -10
- package/_modules/themes/five/src/components/Checkout/styles.js +1 -1
- package/_modules/themes/five/src/components/Modal/styles.js +1 -1
- package/_modules/themes/five/src/components/MomentControl/styles.js +1 -1
- package/_modules/themes/five/src/components/MultiCheckout/index.js +4 -0
- package/_modules/themes/five/src/components/OrderItAgain/index.js +60 -0
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +46 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +5 -0
- package/_modules/themes/five/src/components/ProfessionalFilter/index.js +4 -2
- package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +20 -8
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +16 -3
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +27 -24
- package/_modules/themes/five/src/components/ReviewProduct/styles.js +6 -6
- package/_modules/themes/five/src/components/ServiceForm/index.js +5 -7
- package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -5
- package/_modules/themes/five/src/components/SidebarMenu/index.js +13 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -3
- package/_modules/themes/five/src/components/SingleProductCard/index.js +15 -7
- package/_modules/themes/five/src/components/SingleProductCard/styles.js +60 -48
- package/_modules/themes/four/src/components/BusinessBasicInformation/index.js +1 -1
- package/package.json +1 -1
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/BusinessInformation/styles.js +3 -3
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -2
- package/src/themes/five/src/components/Cart/index.js +37 -2
- package/src/themes/five/src/components/Cart/styles.js +17 -0
- package/src/themes/five/src/components/Checkout/index.js +1 -5
- package/src/themes/five/src/components/Checkout/styles.js +5 -1
- package/src/themes/five/src/components/Modal/styles.js +5 -0
- package/src/themes/five/src/components/MomentControl/index.js +48 -48
- package/src/themes/five/src/components/MomentControl/styles.js +0 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +2 -0
- package/src/themes/five/src/components/OrderItAgain/index.js +46 -0
- package/src/themes/five/src/components/OrderItAgain/styles.js +60 -0
- package/src/themes/five/src/components/ProductForm/index.js +1 -0
- package/src/themes/five/src/components/ProfessionalFilter/index.js +10 -2
- package/src/themes/five/src/components/ProfessionalFilter/styles.js +24 -9
- package/src/themes/five/src/components/RenderProductsLayout/index.js +17 -1
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +5 -2
- package/src/themes/five/src/components/ReviewProduct/styles.js +14 -0
- package/src/themes/five/src/components/ServiceForm/index.js +31 -22
- package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +32 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +1 -2
- package/src/themes/five/src/components/SingleProductCard/index.js +9 -5
- package/src/themes/five/src/components/SingleProductCard/styles.js +21 -7
- package/src/themes/four/src/components/BusinessBasicInformation/index.js +15 -17
- package/_bundles/ordering-ui.ff2158785c5abf7d9a26.js +0 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
padding-top: 30px;
|
|
5
|
+
margin-right: 30px;
|
|
6
|
+
${props => props.theme.rtl && css`
|
|
7
|
+
margin-left: 30px;
|
|
8
|
+
margin-right: 0px;
|
|
9
|
+
`}
|
|
10
|
+
${({ isGroceries }) => isGroceries && css`
|
|
11
|
+
padding-top: 0px;
|
|
12
|
+
margin-right: 0px;
|
|
13
|
+
margin-left: 0px;
|
|
14
|
+
`}
|
|
15
|
+
`
|
|
16
|
+
|
|
17
|
+
export const ContentHeader = styled.div`
|
|
18
|
+
margin-bottom: 27px;
|
|
19
|
+
|
|
20
|
+
> h2 {
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
font-size: 24px;
|
|
23
|
+
line-height: 36px;
|
|
24
|
+
margin: 0px;
|
|
25
|
+
}
|
|
26
|
+
p {
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
line-height: 24px;
|
|
30
|
+
margin: 0px;
|
|
31
|
+
color: ${props => props.theme.colors.darkGray};
|
|
32
|
+
}
|
|
33
|
+
${({ isGroceries }) => isGroceries && css`
|
|
34
|
+
${props => props.theme.rtl ? css`
|
|
35
|
+
margin-right: 10px;
|
|
36
|
+
` : css`
|
|
37
|
+
margin-left: 10px;
|
|
38
|
+
`}
|
|
39
|
+
`}
|
|
40
|
+
`
|
|
41
|
+
|
|
42
|
+
export const ProductListWrapper = styled.div`
|
|
43
|
+
overflow: auto hidden;
|
|
44
|
+
width: 100%;
|
|
45
|
+
::-webkit-scrollbar {
|
|
46
|
+
width: 6px;
|
|
47
|
+
height: 6px;
|
|
48
|
+
}
|
|
49
|
+
`
|
|
50
|
+
|
|
51
|
+
export const ProductList = styled.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: row;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
align-items: center;
|
|
56
|
+
|
|
57
|
+
#orderItAgain > div {
|
|
58
|
+
width: 350px;
|
|
59
|
+
}
|
|
60
|
+
`
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import { useLanguage } from 'ordering-components-external'
|
|
3
3
|
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
4
|
+
import { Heart as DisLike, HeartFill as Like } from 'react-bootstrap-icons'
|
|
4
5
|
import {
|
|
5
6
|
Container,
|
|
6
7
|
ProfessionalItem,
|
|
7
8
|
ProfessionalPhoto,
|
|
8
9
|
ContentWrapper,
|
|
9
|
-
ProfessionalListing
|
|
10
|
+
ProfessionalListing,
|
|
11
|
+
InfoWrapper,
|
|
12
|
+
HeartIconWrapper
|
|
10
13
|
} from './styles'
|
|
11
14
|
import { Modal } from '../Modal'
|
|
12
15
|
import { ProfessionalProfile } from '../ProfessionalProfile'
|
|
@@ -53,7 +56,12 @@ export const ProfessionalFilter = (props) => {
|
|
|
53
56
|
onClick={() => handleOpenProfile(professional)}
|
|
54
57
|
>
|
|
55
58
|
{professional?.photo ? <ProfessionalPhoto bgimage={professional?.photo} /> : <FaUserAlt />}
|
|
56
|
-
<
|
|
59
|
+
<InfoWrapper>
|
|
60
|
+
<p className='name'>{professional?.name} {professional?.lastname}</p>
|
|
61
|
+
<HeartIconWrapper>
|
|
62
|
+
{professional?.favorite ? <Like /> : <DisLike />}
|
|
63
|
+
</HeartIconWrapper>
|
|
64
|
+
</InfoWrapper>
|
|
57
65
|
</ProfessionalItem>
|
|
58
66
|
))}
|
|
59
67
|
</AutoScroll>
|
|
@@ -32,9 +32,14 @@ export const ProfessionalItem = styled.div`
|
|
|
32
32
|
height: 42px;
|
|
33
33
|
width: 42px;
|
|
34
34
|
min-width: 42px;
|
|
35
|
+
margin-right: 12px;
|
|
36
|
+
${props => props.theme.rtl && css`
|
|
37
|
+
margin-left: 12px;
|
|
38
|
+
margin-right: 0px;
|
|
39
|
+
`}
|
|
35
40
|
}
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
p {
|
|
38
43
|
font-weight: 400;
|
|
39
44
|
font-size: 14px;
|
|
40
45
|
line-height: 24px;
|
|
@@ -42,14 +47,6 @@ export const ProfessionalItem = styled.div`
|
|
|
42
47
|
white-space: nowrap;
|
|
43
48
|
overflow: hidden;
|
|
44
49
|
text-overflow: ellipsis;
|
|
45
|
-
|
|
46
|
-
&.name {
|
|
47
|
-
margin-left: 12px;
|
|
48
|
-
${props => props.theme.rtl && css`
|
|
49
|
-
margin-right: 12px;
|
|
50
|
-
margin-left: 0px;
|
|
51
|
-
`}
|
|
52
|
-
}
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
${({ active }) => active && css`
|
|
@@ -68,6 +65,11 @@ const ProfessionalPhotoStyled = styled.div`
|
|
|
68
65
|
width: 42px;
|
|
69
66
|
min-width: 42px;
|
|
70
67
|
border-radius: 7.6px;
|
|
68
|
+
margin-right: 12px;
|
|
69
|
+
${props => props.theme.rtl && css`
|
|
70
|
+
margin-left: 12px;
|
|
71
|
+
margin-right: 0px;
|
|
72
|
+
`}
|
|
71
73
|
`
|
|
72
74
|
export const ProfessionalPhoto = (props) => {
|
|
73
75
|
const style = {}
|
|
@@ -89,3 +91,16 @@ export const ContentWrapper = styled.div`
|
|
|
89
91
|
export const ProfessionalListing = styled.div`
|
|
90
92
|
display: flex;
|
|
91
93
|
`
|
|
94
|
+
|
|
95
|
+
export const InfoWrapper = styled.div`
|
|
96
|
+
width: calc(100% - 54px);
|
|
97
|
+
`
|
|
98
|
+
|
|
99
|
+
export const HeartIconWrapper = styled.div`
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: flex-end;
|
|
102
|
+
svg {
|
|
103
|
+
color: ${props => props.theme.colors.danger500};
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
}
|
|
106
|
+
`
|
|
@@ -40,6 +40,7 @@ import { SearchProducts as SearchProductsOld } from '../../../../../components/R
|
|
|
40
40
|
import { SearchProducts as SearchProductsStarbucks } from '../../../../six/src/components/BusinessProductsListing/SearchProducts'
|
|
41
41
|
import { ProfessionalFilter } from '../ProfessionalFilter'
|
|
42
42
|
import { SearchIconWrapper } from '../BusinessBasicInformation/styles'
|
|
43
|
+
import { OrderItAgain } from '../OrderItAgain'
|
|
43
44
|
|
|
44
45
|
const layoutOne = 'groceries'
|
|
45
46
|
|
|
@@ -234,6 +235,13 @@ export const RenderProductsLayout = (props) => {
|
|
|
234
235
|
/>
|
|
235
236
|
</ProfessionalFilterWrapper>
|
|
236
237
|
)}
|
|
238
|
+
{!business?.loading && business?.previously_products?.length > 0 && (
|
|
239
|
+
<OrderItAgain
|
|
240
|
+
onProductClick={onProductClick}
|
|
241
|
+
productList={business?.previously_products}
|
|
242
|
+
businessId={business?.id}
|
|
243
|
+
/>
|
|
244
|
+
)}
|
|
237
245
|
<BusinessLayoutProductsList
|
|
238
246
|
categories={[
|
|
239
247
|
{ id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') },
|
|
@@ -333,7 +341,15 @@ export const RenderProductsLayout = (props) => {
|
|
|
333
341
|
)}
|
|
334
342
|
</BusinessCategoriesContainer>
|
|
335
343
|
<BusinessCategoryProductWrapper>
|
|
336
|
-
<WrapContent>
|
|
344
|
+
<WrapContent isGroceries>
|
|
345
|
+
{!business?.loading && business?.previously_products?.length > 0 && (
|
|
346
|
+
<OrderItAgain
|
|
347
|
+
onProductClick={onProductClick}
|
|
348
|
+
productList={business?.previously_products}
|
|
349
|
+
businessId={business?.id}
|
|
350
|
+
isGroceries
|
|
351
|
+
/>
|
|
352
|
+
)}
|
|
337
353
|
<BusinessLayoutProductsList
|
|
338
354
|
categories={[
|
|
339
355
|
{ id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') },
|
|
@@ -12,9 +12,12 @@ export const WrappLayout = styled.div``
|
|
|
12
12
|
|
|
13
13
|
export const WrapContent = styled.div`
|
|
14
14
|
padding: 5px;
|
|
15
|
-
margin-top: 70px;
|
|
16
15
|
background: ${props => props.theme.colors.backgroundPage};
|
|
17
16
|
|
|
17
|
+
${({ isGroceries }) => !isGroceries && css`
|
|
18
|
+
margin-top: 70px;
|
|
19
|
+
`}
|
|
20
|
+
|
|
18
21
|
@media (min-width: 576px) {
|
|
19
22
|
padding: 0px;
|
|
20
23
|
}
|
|
@@ -51,7 +54,7 @@ export const BusinessCategoryProductWrapper = styled.div`
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
@media (min-width: 1000px) {
|
|
54
|
-
width: ${({ showCartOnProductList }) => showCartOnProductList ? '70%' : '
|
|
57
|
+
width: ${({ showCartOnProductList }) => showCartOnProductList ? '70%' : '85%'};
|
|
55
58
|
}
|
|
56
59
|
`
|
|
57
60
|
|
|
@@ -9,15 +9,18 @@ export const ActionBlock = styled.div`
|
|
|
9
9
|
justify-content: space-between;
|
|
10
10
|
margin-top: 30px;
|
|
11
11
|
width: 100%;
|
|
12
|
+
|
|
12
13
|
span {
|
|
13
14
|
cursor: pointer;
|
|
14
15
|
font-weight: 600;
|
|
15
16
|
font-size: 16px;
|
|
16
17
|
user-select: none;
|
|
17
18
|
}
|
|
19
|
+
|
|
18
20
|
button {
|
|
19
21
|
font-size: 14px;
|
|
20
22
|
padding: 6px 20px;
|
|
23
|
+
|
|
21
24
|
svg {
|
|
22
25
|
color: white;
|
|
23
26
|
font-size: 21px;
|
|
@@ -40,6 +43,7 @@ export const HandReviewWrapper = styled.div`
|
|
|
40
43
|
display: flex;
|
|
41
44
|
align-items: center;
|
|
42
45
|
justify-content: space-between;
|
|
46
|
+
|
|
43
47
|
p {
|
|
44
48
|
font-size: 15px;
|
|
45
49
|
color: ${props => props.theme?.colors.headingColor};
|
|
@@ -58,16 +62,19 @@ export const HandReviewContent = styled.div`
|
|
|
58
62
|
|
|
59
63
|
export const HandIconWrapper = styled.span`
|
|
60
64
|
margin-left: 15px;
|
|
65
|
+
|
|
61
66
|
${props => props.theme?.rtl && css`
|
|
62
67
|
margin-right: 15px;
|
|
63
68
|
margin-left: 0;
|
|
64
69
|
`}
|
|
70
|
+
|
|
65
71
|
svg {
|
|
66
72
|
font-size: 24px;
|
|
67
73
|
color: #B1BCCC;
|
|
68
74
|
cursor: pointer;
|
|
69
75
|
transition: all 0.3s linear;
|
|
70
76
|
}
|
|
77
|
+
|
|
71
78
|
${({ active }) => active && css`
|
|
72
79
|
svg {
|
|
73
80
|
color: ${props => props.theme?.colors.primary};
|
|
@@ -86,6 +93,7 @@ export const AddCommentHideShow = styled.p`
|
|
|
86
93
|
transition: all 0.3s linear;
|
|
87
94
|
color: #909BA9;
|
|
88
95
|
font-size: 13px;
|
|
96
|
+
|
|
89
97
|
&:hover {
|
|
90
98
|
color: ${props => props.theme?.colors.primary};
|
|
91
99
|
}
|
|
@@ -97,12 +105,14 @@ export const AddCommentHideShow = styled.p`
|
|
|
97
105
|
|
|
98
106
|
export const Comments = styled.div`
|
|
99
107
|
margin-top: 50px;
|
|
108
|
+
|
|
100
109
|
p {
|
|
101
110
|
margin-top: 0;
|
|
102
111
|
margin-bottom: 8px;
|
|
103
112
|
font-size: 14px;
|
|
104
113
|
color: #344050;
|
|
105
114
|
}
|
|
115
|
+
|
|
106
116
|
textarea {
|
|
107
117
|
width: 100%;
|
|
108
118
|
box-sizing: border-box;
|
|
@@ -124,18 +134,22 @@ export const ButtonCustomized = styled(Button)`
|
|
|
124
134
|
background: #E9ECEF;
|
|
125
135
|
border: 1px solid #E9ECEF;
|
|
126
136
|
transition: all 0.3s linear;
|
|
137
|
+
|
|
127
138
|
${props => props.theme?.rtl && css`
|
|
128
139
|
margin-left: 18px;
|
|
129
140
|
margin-right: 0;
|
|
130
141
|
`}
|
|
142
|
+
|
|
131
143
|
svg {
|
|
132
144
|
vertical-align: middle;
|
|
133
145
|
margin-left: 5px;
|
|
146
|
+
|
|
134
147
|
${props => props.theme?.rtl && css`
|
|
135
148
|
margin-right: 5px;
|
|
136
149
|
margin-left: 0;
|
|
137
150
|
`}
|
|
138
151
|
}
|
|
152
|
+
|
|
139
153
|
${({ active }) => active && css`
|
|
140
154
|
background: ${props => props.theme?.colors.primary};
|
|
141
155
|
border: 1px solid ${props => props.theme?.colors.primary};
|
|
@@ -33,7 +33,8 @@ import {
|
|
|
33
33
|
NameWrapper,
|
|
34
34
|
StatusInfo,
|
|
35
35
|
DropDownWrapper,
|
|
36
|
-
DropDownTitle
|
|
36
|
+
DropDownTitle,
|
|
37
|
+
EmptyProfessional
|
|
37
38
|
} from './styles'
|
|
38
39
|
import moment from 'moment'
|
|
39
40
|
SwiperCore.use([Navigation])
|
|
@@ -201,31 +202,35 @@ const ServiceFormUI = (props) => {
|
|
|
201
202
|
</SectionHeader>
|
|
202
203
|
<ProfessionalSelectWrapper ref={dropDownRef}>
|
|
203
204
|
<SelectedItem onClick={() => setIsDropDown(prev => !prev)}>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
{isBusyTime(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
205
|
+
{currentProfessional ? (
|
|
206
|
+
<InfoWrapper>
|
|
207
|
+
{currentProfessional?.photo ? (
|
|
208
|
+
<ProfessionalPhoto
|
|
209
|
+
bgimage={currentProfessional?.photo}
|
|
210
|
+
/>
|
|
211
|
+
) : <FaUserAlt />}
|
|
212
|
+
<NameWrapper>
|
|
213
|
+
<p>{currentProfessional?.name} {currentProfessional?.lastname}</p>
|
|
214
|
+
<StatusInfo available={!isBusyTime()}>
|
|
215
|
+
{isBusyTime(currentProfessional) ? (
|
|
216
|
+
<>
|
|
217
|
+
<span className='status'>{t('BUSY_ON_SELECTED_TIME', 'Busy on selected time')}</span>
|
|
218
|
+
</>
|
|
219
|
+
) : (
|
|
220
|
+
<span className='status'>{t('AVAILABLE', 'Available')}</span>
|
|
221
|
+
)}
|
|
222
|
+
</StatusInfo>
|
|
223
|
+
</NameWrapper>
|
|
224
|
+
</InfoWrapper>
|
|
225
|
+
) : (
|
|
226
|
+
<p>{t('SELECT_PROFESSIONAL', 'Select professional')}</p>
|
|
227
|
+
)}
|
|
223
228
|
<ChevronDown />
|
|
224
229
|
</SelectedItem>
|
|
225
230
|
{isDropDown && (
|
|
226
231
|
<DropDownWrapper>
|
|
227
232
|
<DropDownTitle>{t('ANY_PROFESSIONAL_MEMBER', 'Any professional member')}</DropDownTitle>
|
|
228
|
-
{professionalList?.map((professional) =>
|
|
233
|
+
{professionalList?.map((professional) => (
|
|
229
234
|
<SelectedItem
|
|
230
235
|
key={professional?.id}
|
|
231
236
|
isDropDown
|
|
@@ -263,7 +268,7 @@ const ServiceFormUI = (props) => {
|
|
|
263
268
|
<h2>{t('SCHEDULE', 'Schedule')}</h2>
|
|
264
269
|
<span>{t('REQUIRED', 'Required')}</span>
|
|
265
270
|
</SectionHeader>
|
|
266
|
-
{currentProfessional
|
|
271
|
+
{currentProfessional ? (
|
|
267
272
|
<BusinessPreorder
|
|
268
273
|
business={currentProfessional}
|
|
269
274
|
isProfessional
|
|
@@ -271,6 +276,10 @@ const ServiceFormUI = (props) => {
|
|
|
271
276
|
onChangeMoment={setDateSelected}
|
|
272
277
|
useOrderContext={false}
|
|
273
278
|
/>
|
|
279
|
+
) : (
|
|
280
|
+
<EmptyProfessional>
|
|
281
|
+
{t('NO_SCHEDULE', 'No schedule')}
|
|
282
|
+
</EmptyProfessional>
|
|
274
283
|
)}
|
|
275
284
|
</ScheduleWrapper>
|
|
276
285
|
<ButtonWrapper>
|
|
@@ -190,6 +190,8 @@ export const DropDownWrapper = styled.div`
|
|
|
190
190
|
width: 100%;
|
|
191
191
|
z-index: 10;
|
|
192
192
|
box-sizing: border-box;
|
|
193
|
+
max-height: 263px;
|
|
194
|
+
overflow: auto;
|
|
193
195
|
`
|
|
194
196
|
|
|
195
197
|
export const SelectedItem = styled.div`
|
|
@@ -203,6 +205,11 @@ export const SelectedItem = styled.div`
|
|
|
203
205
|
cursor: pointer;
|
|
204
206
|
transition: all 0.3s linear;
|
|
205
207
|
|
|
208
|
+
> p {
|
|
209
|
+
margin: 0px;
|
|
210
|
+
line-height: 42px;
|
|
211
|
+
}
|
|
212
|
+
|
|
206
213
|
${({ isDropDown }) => isDropDown && css`
|
|
207
214
|
border: none;
|
|
208
215
|
padding: 12px 0px;
|
|
@@ -295,3 +302,12 @@ export const StatusInfo = styled.div`
|
|
|
295
302
|
}
|
|
296
303
|
`}
|
|
297
304
|
`
|
|
305
|
+
|
|
306
|
+
export const EmptyProfessional = styled.div`
|
|
307
|
+
min-height: 100px;
|
|
308
|
+
margin-bottom: 100px;
|
|
309
|
+
text-align: center;
|
|
310
|
+
display: flex;
|
|
311
|
+
align-items: center;
|
|
312
|
+
justify-content: center;
|
|
313
|
+
`
|
|
@@ -11,7 +11,7 @@ import BiStore from '@meronex/icons/bi/BiStore'
|
|
|
11
11
|
import FaUserCircle from '@meronex/icons/fa/FaUserCircle'
|
|
12
12
|
import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
|
|
13
13
|
import SiJsonwebtokens from '@meronex/icons/si/SiJsonwebtokens'
|
|
14
|
-
import { Heart } from 'react-bootstrap-icons'
|
|
14
|
+
import { Heart, Tag } from 'react-bootstrap-icons'
|
|
15
15
|
|
|
16
16
|
import { useEvent, useLanguage, useOrder, useSession, useConfig } from 'ordering-components-external'
|
|
17
17
|
import { useTheme } from 'styled-components'
|
|
@@ -50,6 +50,7 @@ export const SidebarMenu = (props) => {
|
|
|
50
50
|
const [modalPageToShow, setModalPageToShow] = useState(null)
|
|
51
51
|
|
|
52
52
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
|
|
53
|
+
const isPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
|
|
53
54
|
|
|
54
55
|
const closeModal = () => {
|
|
55
56
|
setModalIsOpen(false)
|
|
@@ -251,6 +252,36 @@ export const SidebarMenu = (props) => {
|
|
|
251
252
|
</WrappContent>
|
|
252
253
|
</MenuLink>
|
|
253
254
|
)}
|
|
255
|
+
{isPromotionsEnabled && (
|
|
256
|
+
<MenuLink
|
|
257
|
+
onClick={() => handleGoToPage({ page: 'promotions' })}
|
|
258
|
+
>
|
|
259
|
+
<WrappContent>
|
|
260
|
+
<MenuLinkIcon
|
|
261
|
+
active={
|
|
262
|
+
window.location.pathname === '/promotions'
|
|
263
|
+
}
|
|
264
|
+
>
|
|
265
|
+
<Tag />
|
|
266
|
+
</MenuLinkIcon>
|
|
267
|
+
<MenuLinkText>
|
|
268
|
+
<TextInfo
|
|
269
|
+
active={
|
|
270
|
+
window.location.pathname === '/promotions'
|
|
271
|
+
}
|
|
272
|
+
>
|
|
273
|
+
{t('PROMOTIONS', 'Promotions')}
|
|
274
|
+
</TextInfo>
|
|
275
|
+
</MenuLinkText>
|
|
276
|
+
<MenuLinkSeparator>
|
|
277
|
+
<div>
|
|
278
|
+
<hr />
|
|
279
|
+
</div>
|
|
280
|
+
</MenuLinkSeparator>
|
|
281
|
+
</WrappContent>
|
|
282
|
+
</MenuLink>
|
|
283
|
+
)}
|
|
284
|
+
|
|
254
285
|
<MenuLink
|
|
255
286
|
onClick={() => handleGoToPage({ page: 'help' })}
|
|
256
287
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { useLanguage, useUtils, useConfig, useOrder, SingleOrderCard as SingleOrderCardController } from 'ordering-components-external'
|
|
2
|
+
import { useLanguage, useUtils, useConfig, useOrder, useOrderingTheme, SingleOrderCard as SingleOrderCardController } from 'ordering-components-external'
|
|
3
3
|
import { Heart as DisLike, HeartFill as Like } from 'react-bootstrap-icons'
|
|
4
4
|
import { ReviewOrder } from '../ReviewOrder'
|
|
5
5
|
import { ReviewProduct } from '../ReviewProduct'
|
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
BusinessInformation
|
|
30
30
|
} from '../OrdersOption/styles'
|
|
31
|
-
import { useOrderingTheme } from 'ordering-components-external/_modules/contexts/OrderingThemeContext'
|
|
32
31
|
|
|
33
32
|
const SingleOrderCardUI = (props) => {
|
|
34
33
|
const {
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
QuantityContainer,
|
|
21
21
|
RibbonBox,
|
|
22
22
|
TitleWrapper,
|
|
23
|
+
LastOrder,
|
|
23
24
|
SkeletonCardInfo,
|
|
24
25
|
SkeletonCardLogo
|
|
25
26
|
} from './styles'
|
|
@@ -39,13 +40,14 @@ const SingleProductCardUI = (props) => {
|
|
|
39
40
|
useKioskApp,
|
|
40
41
|
productAddedToCartLength,
|
|
41
42
|
handleFavoriteProduct,
|
|
42
|
-
isFavorite
|
|
43
|
+
isFavorite,
|
|
44
|
+
isPreviously
|
|
43
45
|
} = props
|
|
44
46
|
|
|
45
47
|
const [, t] = useLanguage()
|
|
46
48
|
const [$element, isObserved] = useIntersectionObserver()
|
|
47
49
|
const [stateConfig] = useConfig()
|
|
48
|
-
const [{ parsePrice, optimizeImage }] = useUtils()
|
|
50
|
+
const [{ parsePrice, optimizeImage, parseDate }] = useUtils()
|
|
49
51
|
const [orderState] = useOrder()
|
|
50
52
|
const [{ auth }, { login }] = useSession()
|
|
51
53
|
const [orderingTheme] = useOrderingTheme()
|
|
@@ -127,6 +129,7 @@ const SingleProductCardUI = (props) => {
|
|
|
127
129
|
isCartOnProductsList={isCartOnProductsList}
|
|
128
130
|
style={useCustomFunctionality && customStyle}
|
|
129
131
|
className='product-card'
|
|
132
|
+
isShowAddButt={!useCustomFunctionality && !hideAddButton && !isSkeleton}
|
|
130
133
|
// productsRows={productsRows}
|
|
131
134
|
>
|
|
132
135
|
{isObservedValidation ? (
|
|
@@ -138,10 +141,10 @@ const SingleProductCardUI = (props) => {
|
|
|
138
141
|
<span>{productAddedToCartLength}</span>
|
|
139
142
|
</QuantityContainer>
|
|
140
143
|
)}
|
|
141
|
-
<CardInfo soldOut={isSoldOut || maxProductQuantity <= 0} isBgimage={optimizeImage(product?.images, 'h_86,c_limit')}>
|
|
144
|
+
<CardInfo soldOut={isSoldOut || maxProductQuantity <= 0} isBgimage={optimizeImage(product?.images, 'h_86,c_limit')} oneLine={isPreviously}>
|
|
142
145
|
<TitleWrapper>
|
|
143
146
|
{!isSkeleton ? (<h1>{product?.name}</h1>) : (<Skeleton width={100} />)}
|
|
144
|
-
{!useKioskApp && (
|
|
147
|
+
{!useKioskApp && !isPreviously && (
|
|
145
148
|
!isSkeleton ? (
|
|
146
149
|
<span onClick={() => handleChangeFavorite()} ref={favoriteRef}>
|
|
147
150
|
{product?.favorite ? <Like /> : <DisLike />}
|
|
@@ -160,6 +163,7 @@ const SingleProductCardUI = (props) => {
|
|
|
160
163
|
<Skeleton width={100} />
|
|
161
164
|
)}
|
|
162
165
|
{!isSkeleton ? (<p>{product?.description}</p>) : (<Skeleton width={100} />)}
|
|
166
|
+
{isPreviously && (!isSkeleton ? (<LastOrder>{t('LAST_ORDERED_ON', 'Last ordered on')} {parseDate(product?.last_ordered_date, { outputFormat: 'MMM DD, YYYY' })}</LastOrder>) : (<Skeleton width={80} />))}
|
|
163
167
|
</CardInfo>
|
|
164
168
|
{!isSkeleton ? (
|
|
165
169
|
<WrapLogo isBgimage={optimizeImage(product?.images, 'h_86,c_limit')}>
|
|
@@ -200,7 +204,7 @@ const SingleProductCardUI = (props) => {
|
|
|
200
204
|
</SkeletonCardLogo>
|
|
201
205
|
</div>
|
|
202
206
|
)}
|
|
203
|
-
{!useCustomFunctionality &&
|
|
207
|
+
{!useCustomFunctionality && !hideAddButton && !isSkeleton && (
|
|
204
208
|
<Button outline color='primary'>
|
|
205
209
|
{t('ADD', 'Add')}
|
|
206
210
|
</Button>
|
|
@@ -2,8 +2,10 @@ import React from 'react'
|
|
|
2
2
|
import styled, { css } from 'styled-components'
|
|
3
3
|
|
|
4
4
|
export const CardContainer = styled.div`
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
${({ isShowAddButt }) => css`
|
|
6
|
+
min-height: ${isShowAddButt ? '162px' : '110px'};
|
|
7
|
+
max-height: ${isShowAddButt ? '162px' : '110px'};
|
|
8
|
+
`}
|
|
7
9
|
background: ${({ soldOut }) => soldOut ? '#6c757d33' : '#FFF'};
|
|
8
10
|
border: 1px solid #E9ECEF;
|
|
9
11
|
padding: 10px;
|
|
@@ -21,18 +23,18 @@ export const CardContainer = styled.div`
|
|
|
21
23
|
margin-top: 10px;
|
|
22
24
|
}
|
|
23
25
|
${({ productsRows }) => productsRows ? css`
|
|
24
|
-
width: ${() => productsRows === 3 ? 'calc(33% -
|
|
26
|
+
width: ${() => productsRows === 3 ? 'calc(33% - 20px)' : 'calc(50% - 20px)'};
|
|
25
27
|
margin: 10px;
|
|
26
28
|
` : css`
|
|
27
29
|
width: 100%;
|
|
28
30
|
margin: 10px 0px;
|
|
29
31
|
@media (min-width: 576px) {
|
|
30
32
|
margin: 10px;
|
|
31
|
-
width: calc(100% -
|
|
33
|
+
width: calc(100% - 20px);
|
|
32
34
|
}
|
|
33
35
|
${({ isCartOnProductsList }) => isCartOnProductsList ? css`
|
|
34
36
|
@media (min-width: 993px) {
|
|
35
|
-
width: calc(50% -
|
|
37
|
+
width: calc(50% - 20px);
|
|
36
38
|
margin: 10px 20px 10px 0px;
|
|
37
39
|
${props => props.theme?.rtl && css`
|
|
38
40
|
margin: 10px 0px 10px 20px;
|
|
@@ -40,10 +42,10 @@ export const CardContainer = styled.div`
|
|
|
40
42
|
}
|
|
41
43
|
` : css`
|
|
42
44
|
@media (min-width: 681px) {
|
|
43
|
-
width: calc(49% -
|
|
45
|
+
width: calc(49% - 20px);
|
|
44
46
|
}
|
|
45
47
|
@media (min-width: 1440px) {
|
|
46
|
-
width: calc(33% -
|
|
48
|
+
width: calc(33% - 20px);
|
|
47
49
|
margin: 10px 20px 10px 0px;
|
|
48
50
|
${props => props.theme?.rtl && css`
|
|
49
51
|
margin: 10px 0px 10px 20px;
|
|
@@ -103,6 +105,11 @@ export const CardInfo = styled.div`
|
|
|
103
105
|
color: ${props => props.theme.colors.darkTextColor};
|
|
104
106
|
font-size: 14px;
|
|
105
107
|
}
|
|
108
|
+
${({ oneLine }) => oneLine && css`
|
|
109
|
+
p {
|
|
110
|
+
-webkit-line-clamp: 1;
|
|
111
|
+
}
|
|
112
|
+
`}
|
|
106
113
|
@media (min-width: 1024px) {
|
|
107
114
|
p {
|
|
108
115
|
font-size: 12px;
|
|
@@ -216,6 +223,13 @@ export const RibbonBox = styled.div`
|
|
|
216
223
|
`}
|
|
217
224
|
`
|
|
218
225
|
|
|
226
|
+
export const LastOrder = styled.span`
|
|
227
|
+
color: ${props => props.theme.colors.primary};
|
|
228
|
+
font-weight: 400;
|
|
229
|
+
font-size: 10px !important;
|
|
230
|
+
margin: 0px 3px;
|
|
231
|
+
`
|
|
232
|
+
|
|
219
233
|
export const TitleWrapper = styled.div`
|
|
220
234
|
display: flex;
|
|
221
235
|
align-items: center;
|
|
@@ -159,23 +159,21 @@ export const BusinessBasicInformation = (props) => {
|
|
|
159
159
|
</BusinessInfoItem>
|
|
160
160
|
</BusinessInfo>
|
|
161
161
|
</BusinessContent>
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
</WrapperSearch>
|
|
178
|
-
)}
|
|
162
|
+
<WrapperSearch>
|
|
163
|
+
<SearchBar
|
|
164
|
+
onSearch={handleChangeSearch}
|
|
165
|
+
search={searchValue}
|
|
166
|
+
placeholder={t('SEARCH_PRODUCTS', theme?.defaultLanguages?.SEARCH_PRODUCTS || 'Search Products')}
|
|
167
|
+
lazyLoad={businessState?.business?.lazy_load_products_recommended}
|
|
168
|
+
/>
|
|
169
|
+
<Select
|
|
170
|
+
notAsync
|
|
171
|
+
notReload
|
|
172
|
+
options={sortByOptions}
|
|
173
|
+
defaultValue={sortByValue}
|
|
174
|
+
onChange={(val) => handleChangeSortBy && handleChangeSortBy(val)}
|
|
175
|
+
/>
|
|
176
|
+
</WrapperSearch>
|
|
179
177
|
</BusinessInnerContainer>
|
|
180
178
|
|
|
181
179
|
<Modal
|