ordering-ui-external 1.2.2 → 1.3.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.fc62fe574704c7c4d033.js → 0.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/{1.ordering-ui.fc62fe574704c7c4d033.js → 1.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/{3.ordering-ui.fc62fe574704c7c4d033.js → 3.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/{4.ordering-ui.fc62fe574704c7c4d033.js → 4.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/5.ordering-ui.aee3f88f00476e436e39.js +1 -0
- package/_bundles/{6.ordering-ui.fc62fe574704c7c4d033.js → 6.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/7.ordering-ui.aee3f88f00476e436e39.js +2 -0
- package/_bundles/{7.ordering-ui.fc62fe574704c7c4d033.js.LICENSE.txt → 7.ordering-ui.aee3f88f00476e436e39.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.fc62fe574704c7c4d033.js → 8.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/{9.ordering-ui.fc62fe574704c7c4d033.js → 9.ordering-ui.aee3f88f00476e436e39.js} +1 -1
- package/_bundles/ordering-ui.aee3f88f00476e436e39.js +2 -0
- package/_bundles/{ordering-ui.fc62fe574704c7c4d033.js.LICENSE.txt → ordering-ui.aee3f88f00476e436e39.js.LICENSE.txt} +0 -0
- package/_modules/components/AutoScroll/styles.js +3 -3
- package/_modules/hooks/useIsMounted.js +24 -0
- package/_modules/index.js +8 -0
- package/_modules/themes/five/index.js +33 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessController/styles.js +42 -42
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +12 -2
- package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +5 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +10 -3
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +7 -3
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -0
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +1 -1
- package/_modules/themes/five/src/components/MyOrders/index.js +9 -3
- package/_modules/themes/five/src/components/NavigationBar/index.js +159 -0
- package/_modules/themes/five/src/components/NavigationBar/styles.js +33 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +71 -41
- package/_modules/themes/five/src/components/ProfessionalBusinessFilter/index.js +96 -0
- package/_modules/themes/five/src/components/ProfessionalBusinessFilter/styles.js +48 -0
- package/_modules/themes/five/src/components/ProfessionalFilter/index.js +35 -7
- package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +10 -4
- package/_modules/themes/five/src/components/ProfessionalInfo/index.js +120 -0
- package/_modules/themes/five/src/components/ProfessionalInfo/styles.js +100 -0
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +36 -13
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +21 -18
- package/_modules/themes/five/src/components/ReviewProfessional/index.js +314 -0
- package/_modules/themes/five/src/components/ReviewProfessional/styles.js +137 -0
- package/_modules/themes/five/src/components/SignUpApproval/index.js +106 -0
- package/_modules/themes/five/src/components/SignUpApproval/styles.js +71 -0
- package/_modules/themes/five/src/components/SignUpBusiness/index.js +7 -383
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +405 -0
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/styles.js +110 -0
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +400 -0
- package/_modules/themes/five/src/components/SignUpBusiness/{styles.js → layouts/OldSignUpBusiness/styles.js} +0 -0
- package/_modules/themes/five/src/components/SignUpDriver/index.js +7 -383
- package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +405 -0
- package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/styles.js +106 -0
- package/_modules/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +400 -0
- package/_modules/themes/five/src/components/SignUpDriver/{styles.js → layouts/OldSignUpDriver/styles.js} +0 -0
- package/_modules/themes/five/src/components/SingleProductCard/styles.js +1 -1
- package/_modules/utils/index.js +103 -0
- package/package.json +2 -2
- package/src/components/AutoScroll/styles.js +11 -12
- package/src/hooks/useIsMounted.js +18 -0
- package/src/index.js +2 -0
- package/src/themes/five/index.js +9 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/src/themes/five/src/components/BusinessController/styles.js +3 -6
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +10 -2
- package/src/themes/five/src/components/BusinessProductsCategories/styles.js +5 -0
- package/src/themes/five/src/components/BusinessProductsListing/index.js +8 -2
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -0
- package/src/themes/five/src/components/MultiCheckout/index.js +1 -0
- package/src/themes/five/src/components/MultiCheckout/styles.js +1 -0
- package/src/themes/five/src/components/MyOrders/index.js +6 -3
- package/src/themes/five/src/components/NavigationBar/index.js +104 -0
- package/src/themes/five/src/components/NavigationBar/styles.js +44 -0
- package/src/themes/five/src/components/OrderDetails/index.js +19 -11
- package/src/themes/five/src/components/ProfessionalBusinessFilter/index.js +82 -0
- package/src/themes/five/src/components/ProfessionalBusinessFilter/styles.js +71 -0
- package/src/themes/five/src/components/ProfessionalFilter/index.js +30 -7
- package/src/themes/five/src/components/ProfessionalFilter/styles.js +15 -2
- package/src/themes/five/src/components/ProfessionalInfo/index.js +133 -0
- package/src/themes/five/src/components/ProfessionalInfo/styles.js +140 -0
- package/src/themes/five/src/components/RenderProductsLayout/index.js +37 -16
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +6 -1
- package/src/themes/five/src/components/ReviewProfessional/index.js +239 -0
- package/src/themes/five/src/components/ReviewProfessional/styles.js +233 -0
- package/src/themes/five/src/components/SignUpApproval/index.js +108 -0
- package/src/themes/five/src/components/SignUpApproval/styles.js +98 -0
- package/src/themes/five/src/components/SignUpBusiness/index.js +10 -374
- package/src/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +382 -0
- package/src/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/styles.js +256 -0
- package/src/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +378 -0
- package/src/themes/five/src/components/SignUpBusiness/{styles.js → layouts/OldSignUpBusiness/styles.js} +0 -0
- package/src/themes/five/src/components/SignUpDriver/index.js +10 -374
- package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +382 -0
- package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/styles.js +262 -0
- package/src/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +378 -0
- package/src/themes/five/src/components/SignUpDriver/{styles.js → layouts/OldSignUpDriver/styles.js} +0 -0
- package/src/themes/five/src/components/SingleProductCard/styles.js +3 -1
- package/src/utils/index.js +54 -0
- package/_bundles/5.ordering-ui.fc62fe574704c7c4d033.js +0 -1
- package/_bundles/7.ordering-ui.fc62fe574704c7c4d033.js +0 -2
- package/_bundles/ordering-ui.fc62fe574704c7c4d033.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
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
|
+
import { Heart as DisLike, HeartFill as Like, InfoCircle } from 'react-bootstrap-icons'
|
|
5
5
|
import {
|
|
6
6
|
Container,
|
|
7
7
|
ProfessionalItem,
|
|
@@ -9,11 +9,13 @@ import {
|
|
|
9
9
|
ContentWrapper,
|
|
10
10
|
ProfessionalListing,
|
|
11
11
|
InfoWrapper,
|
|
12
|
-
HeartIconWrapper
|
|
12
|
+
HeartIconWrapper,
|
|
13
|
+
IconWrapper
|
|
13
14
|
} from './styles'
|
|
14
15
|
import { Modal } from '../Modal'
|
|
15
16
|
import { ProfessionalProfile } from '../ProfessionalProfile'
|
|
16
17
|
import { AutoScroll } from '../AutoScroll'
|
|
18
|
+
import { ProfessionalInfo } from '../ProfessionalInfo'
|
|
17
19
|
|
|
18
20
|
export const ProfessionalFilter = (props) => {
|
|
19
21
|
const {
|
|
@@ -24,16 +26,24 @@ export const ProfessionalFilter = (props) => {
|
|
|
24
26
|
|
|
25
27
|
const [, t] = useLanguage()
|
|
26
28
|
const [open, setOpen] = useState(false)
|
|
29
|
+
const [reviewOpen, setReviewOpen] = useState(false)
|
|
27
30
|
const [currentProfessional, setCurrentProfessional] = useState(null)
|
|
28
31
|
|
|
29
|
-
const handleOpenProfile = (professional) => {
|
|
32
|
+
const handleOpenProfile = (e, professional) => {
|
|
33
|
+
if (e.target.closest('.info')) return
|
|
30
34
|
setCurrentProfessional(professional)
|
|
31
35
|
setOpen(true)
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
const handleOpenReview = (professional) => {
|
|
39
|
+
setReviewOpen(true)
|
|
40
|
+
setCurrentProfessional(professional)
|
|
41
|
+
}
|
|
42
|
+
|
|
34
43
|
const handleCloseProfile = () => {
|
|
35
44
|
setCurrentProfessional(null)
|
|
36
45
|
setOpen(false)
|
|
46
|
+
setReviewOpen(false)
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
return (
|
|
@@ -53,14 +63,17 @@ export const ProfessionalFilter = (props) => {
|
|
|
53
63
|
<ProfessionalItem
|
|
54
64
|
key={i}
|
|
55
65
|
active={professional?.id === professionalSelected?.id}
|
|
56
|
-
onClick={() => handleOpenProfile(professional)}
|
|
66
|
+
onClick={(e) => handleOpenProfile(e, professional)}
|
|
57
67
|
>
|
|
58
68
|
{professional?.photo ? <ProfessionalPhoto bgimage={professional?.photo} /> : <FaUserAlt />}
|
|
59
69
|
<InfoWrapper>
|
|
60
70
|
<p className='name'>{professional?.name} {professional?.lastname}</p>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
<IconWrapper>
|
|
72
|
+
<InfoCircle className='info' onClick={() => handleOpenReview(professional)} />
|
|
73
|
+
<HeartIconWrapper>
|
|
74
|
+
{professional?.favorite ? <Like /> : <DisLike />}
|
|
75
|
+
</HeartIconWrapper>
|
|
76
|
+
</IconWrapper>
|
|
64
77
|
</InfoWrapper>
|
|
65
78
|
</ProfessionalItem>
|
|
66
79
|
))}
|
|
@@ -80,6 +93,16 @@ export const ProfessionalFilter = (props) => {
|
|
|
80
93
|
handleChangeProfessionalSelected={handleChangeProfessionalSelected}
|
|
81
94
|
/>
|
|
82
95
|
</Modal>
|
|
96
|
+
<Modal
|
|
97
|
+
open={reviewOpen}
|
|
98
|
+
width='760px'
|
|
99
|
+
padding='0'
|
|
100
|
+
onClose={() => handleCloseProfile()}
|
|
101
|
+
>
|
|
102
|
+
<ProfessionalInfo
|
|
103
|
+
userId={currentProfessional?.id}
|
|
104
|
+
/>
|
|
105
|
+
</Modal>
|
|
83
106
|
</>
|
|
84
107
|
)
|
|
85
108
|
}
|
|
@@ -96,11 +96,24 @@ export const InfoWrapper = styled.div`
|
|
|
96
96
|
width: calc(100% - 54px);
|
|
97
97
|
`
|
|
98
98
|
|
|
99
|
-
export const HeartIconWrapper = styled.
|
|
99
|
+
export const HeartIconWrapper = styled.span`
|
|
100
100
|
display: flex;
|
|
101
|
-
justify-content:
|
|
101
|
+
justify-content: center;
|
|
102
|
+
align-items: center;
|
|
102
103
|
svg {
|
|
103
104
|
color: ${props => props.theme.colors.danger500};
|
|
104
105
|
font-size: 16px;
|
|
105
106
|
}
|
|
106
107
|
`
|
|
108
|
+
|
|
109
|
+
export const IconWrapper = styled.div`
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
.info {
|
|
113
|
+
margin-right: 10px;
|
|
114
|
+
${props => props.theme.rtl && css`
|
|
115
|
+
margin-left: 10px;
|
|
116
|
+
margin-right: 0px;
|
|
117
|
+
`}
|
|
118
|
+
}
|
|
119
|
+
`
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useUtils, useLanguage, ProfessionalInfo as ProfessionalInfoController } from 'ordering-components-external'
|
|
3
|
+
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
4
|
+
import Skeleton from 'react-loading-skeleton'
|
|
5
|
+
import {
|
|
6
|
+
Container,
|
|
7
|
+
PhotoWrapper,
|
|
8
|
+
ProfessionalPhoto,
|
|
9
|
+
InfoWrapper,
|
|
10
|
+
OccupationWrapper,
|
|
11
|
+
Description,
|
|
12
|
+
Divider,
|
|
13
|
+
ReviewWrapper,
|
|
14
|
+
ReviewItemContatiner,
|
|
15
|
+
ReviewQualityContainer,
|
|
16
|
+
ReviewBarContainer,
|
|
17
|
+
ReviewQualityTextContainer,
|
|
18
|
+
Comment,
|
|
19
|
+
ReviewBar,
|
|
20
|
+
NotReviewed
|
|
21
|
+
} from './styles'
|
|
22
|
+
|
|
23
|
+
const ProfessionalInfoUI = (props) => {
|
|
24
|
+
const {
|
|
25
|
+
userState,
|
|
26
|
+
userReviewState
|
|
27
|
+
} = props
|
|
28
|
+
|
|
29
|
+
const [{ optimizeImage }] = useUtils()
|
|
30
|
+
const [, t] = useLanguage()
|
|
31
|
+
|
|
32
|
+
const getReviewPercent = (quality) => {
|
|
33
|
+
const reviewPercents = {
|
|
34
|
+
1: 0,
|
|
35
|
+
2: 25,
|
|
36
|
+
3: 50,
|
|
37
|
+
4: 75,
|
|
38
|
+
5: 100
|
|
39
|
+
}
|
|
40
|
+
if (typeof reviewPercents[quality] !== 'undefined') return reviewPercents[quality]
|
|
41
|
+
return quality / 5 * 100
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Container>
|
|
46
|
+
<PhotoWrapper>
|
|
47
|
+
{userState?.loading ? (
|
|
48
|
+
<Skeleton
|
|
49
|
+
width={250}
|
|
50
|
+
height={250}
|
|
51
|
+
/>
|
|
52
|
+
) : (
|
|
53
|
+
<>
|
|
54
|
+
{userState?.user?.photo ? (
|
|
55
|
+
<ProfessionalPhoto
|
|
56
|
+
bgimage={optimizeImage(userState?.user?.photo, 'h_200,c_limit')}
|
|
57
|
+
/>
|
|
58
|
+
) : <FaUserAlt />}
|
|
59
|
+
</>
|
|
60
|
+
)}
|
|
61
|
+
</PhotoWrapper>
|
|
62
|
+
<InfoWrapper>
|
|
63
|
+
<h2>{userState?.loading ? <Skeleton width={120} height={20} /> : userState?.user?.name}</h2>
|
|
64
|
+
<OccupationWrapper>
|
|
65
|
+
{userState?.loading ? <Skeleton width={100} height={15} /> : <p>{userState?.user?.occupation?.name}</p>}
|
|
66
|
+
</OccupationWrapper>
|
|
67
|
+
{userState?.user?.occupation?.description && (
|
|
68
|
+
<Description>{userState?.user?.occupation?.description}</Description>
|
|
69
|
+
)}
|
|
70
|
+
</InfoWrapper>
|
|
71
|
+
<Divider />
|
|
72
|
+
<ReviewWrapper>
|
|
73
|
+
<h2>{t('REVIEWS', 'Reviews')}</h2>
|
|
74
|
+
{userReviewState.loading ? (
|
|
75
|
+
[...Array(5).keys()].map(i => (
|
|
76
|
+
<ReviewItemContatiner key={i}>
|
|
77
|
+
<ReviewQualityContainer>
|
|
78
|
+
<ReviewBarContainer>
|
|
79
|
+
<Skeleton height={10} />
|
|
80
|
+
</ReviewBarContainer>
|
|
81
|
+
</ReviewQualityContainer>
|
|
82
|
+
<ReviewQualityTextContainer>
|
|
83
|
+
<p><Skeleton width={40} /></p>
|
|
84
|
+
<p><Skeleton width={40} /></p>
|
|
85
|
+
<p><Skeleton width={40} /></p>
|
|
86
|
+
<p><Skeleton width={40} /></p>
|
|
87
|
+
<p><Skeleton width={40} /></p>
|
|
88
|
+
</ReviewQualityTextContainer>
|
|
89
|
+
<Comment>
|
|
90
|
+
<div><Skeleton width={300} /></div>
|
|
91
|
+
<div><Skeleton width={200} /></div>
|
|
92
|
+
</Comment>
|
|
93
|
+
</ReviewItemContatiner>
|
|
94
|
+
))
|
|
95
|
+
) : (
|
|
96
|
+
userReviewState?.reviews.map(review => (
|
|
97
|
+
<ReviewItemContatiner key={review?.id}>
|
|
98
|
+
<ReviewQualityContainer>
|
|
99
|
+
<ReviewBarContainer>
|
|
100
|
+
<ReviewBar
|
|
101
|
+
percentage={getReviewPercent(review?.qualification)}
|
|
102
|
+
/>
|
|
103
|
+
</ReviewBarContainer>
|
|
104
|
+
<ReviewQualityTextContainer>
|
|
105
|
+
<p>{t('TERRIBLE', 'Terrible')}</p>
|
|
106
|
+
<p>{t('BAD', 'Bad')}</p>
|
|
107
|
+
<p>{t('OKAY', 'Okay')}</p>
|
|
108
|
+
<p>{t('GOOD', 'Good')}</p>
|
|
109
|
+
<p>{t('GREAT', 'Great')}</p>
|
|
110
|
+
</ReviewQualityTextContainer>
|
|
111
|
+
</ReviewQualityContainer>
|
|
112
|
+
<Comment>{review?.comment}</Comment>
|
|
113
|
+
</ReviewItemContatiner>
|
|
114
|
+
))
|
|
115
|
+
)}
|
|
116
|
+
|
|
117
|
+
{!userReviewState.loading && userReviewState.reviews.length === 0 && (
|
|
118
|
+
<NotReviewed>
|
|
119
|
+
{t('ERROR_REVIEW_FIND', 'The review does not exist.')}
|
|
120
|
+
</NotReviewed>
|
|
121
|
+
)}
|
|
122
|
+
</ReviewWrapper>
|
|
123
|
+
</Container>
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const ProfessionalInfo = (props) => {
|
|
128
|
+
const professionalInfoProps = {
|
|
129
|
+
...props,
|
|
130
|
+
UIComponent: ProfessionalInfoUI
|
|
131
|
+
}
|
|
132
|
+
return <ProfessionalInfoController {...professionalInfoProps} />
|
|
133
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
position: relative;
|
|
6
|
+
padding: 30px 20px 0px 20px;
|
|
7
|
+
`
|
|
8
|
+
|
|
9
|
+
export const PhotoWrapper = styled.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
|
|
13
|
+
svg {
|
|
14
|
+
width: 220px;
|
|
15
|
+
height: 200px;
|
|
16
|
+
}
|
|
17
|
+
`
|
|
18
|
+
|
|
19
|
+
const ProfessionalPhotoStyled = styled.div`
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
position: relative;
|
|
22
|
+
background-repeat: no-repeat, repeat;
|
|
23
|
+
background-size: cover;
|
|
24
|
+
background-position: center;
|
|
25
|
+
object-fit: cover;
|
|
26
|
+
height: 298px;
|
|
27
|
+
width: 314px;
|
|
28
|
+
min-width: 300px;
|
|
29
|
+
border-radius: 7.6px;
|
|
30
|
+
margin-bottom: 36px;
|
|
31
|
+
`
|
|
32
|
+
|
|
33
|
+
export const ProfessionalPhoto = (props) => {
|
|
34
|
+
const style = {}
|
|
35
|
+
if (props.bgimage) {
|
|
36
|
+
style.backgroundImage = `url(${props.bgimage})`
|
|
37
|
+
}
|
|
38
|
+
return (
|
|
39
|
+
<ProfessionalPhotoStyled {...props} style={style}>
|
|
40
|
+
{props.children}
|
|
41
|
+
</ProfessionalPhotoStyled>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const InfoWrapper = styled.div`
|
|
46
|
+
h2 {
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
font-size: 24px;
|
|
49
|
+
line-height: 34px;
|
|
50
|
+
margin-top: 0px;
|
|
51
|
+
margin-bottom: 4px;
|
|
52
|
+
}
|
|
53
|
+
`
|
|
54
|
+
|
|
55
|
+
export const OccupationWrapper = styled.div`
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
margin-bottom: 13px;
|
|
59
|
+
> p {
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-weight: 400;
|
|
62
|
+
font-size: 16px;
|
|
63
|
+
}
|
|
64
|
+
`
|
|
65
|
+
|
|
66
|
+
export const Description = styled.p`
|
|
67
|
+
margin-top: 0px;
|
|
68
|
+
margin-bottom: 19px;
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
line-height: 24px;
|
|
72
|
+
`
|
|
73
|
+
|
|
74
|
+
export const Divider = styled.div`
|
|
75
|
+
background: ${props => props.theme.colors.grayDividerColor};
|
|
76
|
+
margin-left: -20px;
|
|
77
|
+
width: calc(100% + 40px);
|
|
78
|
+
height: 8px;
|
|
79
|
+
`
|
|
80
|
+
|
|
81
|
+
export const ReviewWrapper = styled.div`
|
|
82
|
+
margin-top: 25px;
|
|
83
|
+
> h2 {
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
font-size: 20px;
|
|
86
|
+
line-height: 30px;
|
|
87
|
+
margin-top: 0px;
|
|
88
|
+
margin-bottom: 15px;
|
|
89
|
+
}
|
|
90
|
+
`
|
|
91
|
+
|
|
92
|
+
export const ReviewItemContatiner = styled.div`
|
|
93
|
+
margin-bottom: 40px;
|
|
94
|
+
`
|
|
95
|
+
|
|
96
|
+
export const ReviewQualityContainer = styled.div`
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
`
|
|
100
|
+
|
|
101
|
+
export const ReviewBarContainer = styled.div`
|
|
102
|
+
margin: 15px 0;
|
|
103
|
+
`
|
|
104
|
+
|
|
105
|
+
const ReviewBarStyled = styled.div`
|
|
106
|
+
height: 6px;
|
|
107
|
+
border-radius: 10px;
|
|
108
|
+
background: ${props => `linear-gradient(to right, ${props.theme.colors.headingColor} ${props.percentage}%, ${props.theme.colors.grayDividerColor} ${props.percentage}%)`};
|
|
109
|
+
`
|
|
110
|
+
|
|
111
|
+
export const ReviewBar = (props) => {
|
|
112
|
+
return (
|
|
113
|
+
<ReviewBarStyled
|
|
114
|
+
{...props}
|
|
115
|
+
>
|
|
116
|
+
{props.children}
|
|
117
|
+
</ReviewBarStyled>
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const ReviewQualityTextContainer = styled.div`
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: space-between;
|
|
125
|
+
|
|
126
|
+
p {
|
|
127
|
+
margin: 0px;
|
|
128
|
+
color: ${props => props.theme.colors.lightGray};
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
}
|
|
131
|
+
`
|
|
132
|
+
|
|
133
|
+
export const Comment = styled.div`
|
|
134
|
+
font-size: 12px;
|
|
135
|
+
margin: 25px 0;
|
|
136
|
+
`
|
|
137
|
+
|
|
138
|
+
export const NotReviewed = styled.p`
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
`
|
|
@@ -41,6 +41,7 @@ import { SearchProducts as SearchProductsStarbucks } from '../../../../six/src/c
|
|
|
41
41
|
import { ProfessionalFilter } from '../ProfessionalFilter'
|
|
42
42
|
import { SearchIconWrapper } from '../BusinessBasicInformation/styles'
|
|
43
43
|
import { OrderItAgain } from '../OrderItAgain'
|
|
44
|
+
import { ProfessionalBusinessFilter } from '../ProfessionalBusinessFilter'
|
|
44
45
|
|
|
45
46
|
const layoutOne = 'groceries'
|
|
46
47
|
|
|
@@ -79,7 +80,9 @@ export const RenderProductsLayout = (props) => {
|
|
|
79
80
|
handleUpdateProducts,
|
|
80
81
|
handleChangeProfessionalSelected,
|
|
81
82
|
professionalSelected,
|
|
82
|
-
onBusinessClick
|
|
83
|
+
onBusinessClick,
|
|
84
|
+
handleChangePriceFilterValues,
|
|
85
|
+
priceFilterValues
|
|
83
86
|
} = props
|
|
84
87
|
|
|
85
88
|
const theme = useTheme()
|
|
@@ -170,6 +173,26 @@ export const RenderProductsLayout = (props) => {
|
|
|
170
173
|
{!businessLayout.layoutOne && (
|
|
171
174
|
<BusinessContent isCustomLayout={isCustomLayout || useKioskApp} id='wrapper-categories'>
|
|
172
175
|
<BusinessCategoryProductWrapper showCartOnProductList={showCartOnProductList}>
|
|
176
|
+
{business?.professionals?.length > 0 && !useKioskApp && (
|
|
177
|
+
<>
|
|
178
|
+
<ProfessionalBusinessFilter
|
|
179
|
+
sortByOptions={sortByOptions}
|
|
180
|
+
handleChangeSortBy={handleChangeSortBy}
|
|
181
|
+
sortByValue={sortByValue}
|
|
182
|
+
handleChangeSearch={handleChangeSearch}
|
|
183
|
+
business={business}
|
|
184
|
+
handleChangePriceFilterValues={handleChangePriceFilterValues}
|
|
185
|
+
priceFilterValues={priceFilterValues}
|
|
186
|
+
/>
|
|
187
|
+
<ProfessionalFilterWrapper>
|
|
188
|
+
<ProfessionalFilter
|
|
189
|
+
professionals={business?.professionals}
|
|
190
|
+
professionalSelected={professionalSelected}
|
|
191
|
+
handleChangeProfessionalSelected={handleChangeProfessionalSelected}
|
|
192
|
+
/>
|
|
193
|
+
</ProfessionalFilterWrapper>
|
|
194
|
+
</>
|
|
195
|
+
)}
|
|
173
196
|
<div style={{ position: 'relative' }}>
|
|
174
197
|
{!(business?.categories?.length === 0 && !categoryId) && (
|
|
175
198
|
<BusinessLayoutCategories
|
|
@@ -186,6 +209,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
186
209
|
business={business}
|
|
187
210
|
currentCart={currentCart}
|
|
188
211
|
wContainerStyle={useKioskApp && 'calc(100% - 50px)'}
|
|
212
|
+
isProfessional={business?.professionals?.length > 0 && !useKioskApp}
|
|
189
213
|
/>
|
|
190
214
|
)}
|
|
191
215
|
{useKioskApp && (
|
|
@@ -226,15 +250,6 @@ export const RenderProductsLayout = (props) => {
|
|
|
226
250
|
</MobileCartViewWrapper>
|
|
227
251
|
)} */}
|
|
228
252
|
<WrapContent id='businessProductList'>
|
|
229
|
-
{business?.professionals?.length > 0 && (
|
|
230
|
-
<ProfessionalFilterWrapper>
|
|
231
|
-
<ProfessionalFilter
|
|
232
|
-
professionals={business?.professionals}
|
|
233
|
-
professionalSelected={professionalSelected}
|
|
234
|
-
handleChangeProfessionalSelected={handleChangeProfessionalSelected}
|
|
235
|
-
/>
|
|
236
|
-
</ProfessionalFilterWrapper>
|
|
237
|
-
)}
|
|
238
253
|
{!business?.loading && business?.previously_products?.length > 0 && (
|
|
239
254
|
<OrderItAgain
|
|
240
255
|
onProductClick={onProductClick}
|
|
@@ -273,7 +288,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
273
288
|
</WrapContent>
|
|
274
289
|
</BusinessCategoryProductWrapper>
|
|
275
290
|
{showCartOnProductList && (
|
|
276
|
-
<BusinessCartContainer id='BusinessCartContainer'>
|
|
291
|
+
<BusinessCartContainer id='BusinessCartContainer' isProfessional={business?.professionals?.length > 0 && !useKioskApp}>
|
|
277
292
|
<BusinessCartContent maxHeight={window.innerHeight - 100}>
|
|
278
293
|
{currentCart?.products?.length > 0 ? (
|
|
279
294
|
<>
|
|
@@ -395,11 +410,17 @@ export const RenderProductsLayout = (props) => {
|
|
|
395
410
|
openBusinessInformation={openBusinessInformation}
|
|
396
411
|
/>
|
|
397
412
|
)}
|
|
398
|
-
<
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
413
|
+
<BusinessContent isCustomLayout={isCustomLayout || useKioskApp} id='wrapper-categories'>
|
|
414
|
+
<BusinessCategoryProductWrapper showCartOnProductList={showCartOnProductList}>
|
|
415
|
+
<div style={{ position: 'relative' }}>
|
|
416
|
+
<BusinessProductsCategories
|
|
417
|
+
isSkeleton
|
|
418
|
+
categories={[]}
|
|
419
|
+
openBusinessInformation={openBusinessInformation}
|
|
420
|
+
/>
|
|
421
|
+
</div>
|
|
422
|
+
</BusinessCategoryProductWrapper>
|
|
423
|
+
</BusinessContent>
|
|
403
424
|
<WrapContent>
|
|
404
425
|
<BusinessProductsList
|
|
405
426
|
categories={[]}
|
|
@@ -71,6 +71,11 @@ export const BusinessCartContainer = styled(BusinessCategoriesContainer)`
|
|
|
71
71
|
display: none;
|
|
72
72
|
margin-top: 70px;
|
|
73
73
|
min-width: 325px;
|
|
74
|
+
@media (min-width: 769px) {
|
|
75
|
+
${({ isProfessional }) => isProfessional && css`
|
|
76
|
+
margin-top: 0px;
|
|
77
|
+
`}
|
|
78
|
+
}
|
|
74
79
|
@media (min-width: 1000px) {
|
|
75
80
|
display: block;
|
|
76
81
|
}
|
|
@@ -208,7 +213,7 @@ export const WrapperSearch = styled.div`
|
|
|
208
213
|
`
|
|
209
214
|
|
|
210
215
|
export const ProfessionalFilterWrapper = styled.div`
|
|
211
|
-
|
|
216
|
+
padding-bottom: 35px;
|
|
212
217
|
${({ isTop }) => isTop && css`
|
|
213
218
|
margin-top: 30px;
|
|
214
219
|
`}
|