ordering-ui-external 1.5.4 → 1.6.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.ff76ec87ed271a678f9d.js +1 -0
- package/_bundles/{1.ordering-ui.5de718771fdf8a9bc402.js → 1.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{2.ordering-ui.5de718771fdf8a9bc402.js → 2.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{4.ordering-ui.5de718771fdf8a9bc402.js → 4.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{5.ordering-ui.5de718771fdf8a9bc402.js → 5.ordering-ui.ff76ec87ed271a678f9d.js} +1 -1
- package/_bundles/{6.ordering-ui.5de718771fdf8a9bc402.js → 6.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{7.ordering-ui.5de718771fdf8a9bc402.js → 7.ordering-ui.ff76ec87ed271a678f9d.js} +2 -2
- package/_bundles/{7.ordering-ui.5de718771fdf8a9bc402.js.LICENSE.txt → 7.ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.5de718771fdf8a9bc402.js → 8.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{9.ordering-ui.5de718771fdf8a9bc402.js → 9.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/ordering-ui.ff76ec87ed271a678f9d.js +2 -0
- package/_bundles/{ordering-ui.5de718771fdf8a9bc402.js.LICENSE.txt → ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessTypeFilter/index.js +6 -3
- package/_modules/components/CancellationComponent/index.js +58 -0
- package/_modules/components/CancellationComponent/styles.js +43 -0
- package/_modules/components/Header/index.js +1 -1
- package/_modules/index.js +7 -0
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +1 -1
- package/_modules/themes/five/src/components/AddressForm/index.js +5 -5
- package/_modules/themes/five/src/components/AddressList/index.js +3 -1
- package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +4 -2
- package/_modules/themes/five/src/components/BusinessController/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessReviews/index.js +4 -4
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -5
- package/_modules/themes/five/src/components/Cart/index.js +13 -2
- package/_modules/themes/five/src/components/HomeHero/index.js +5 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderActionsSection.js +38 -0
- package/_modules/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +27 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +64 -60
- package/_modules/themes/five/src/components/OrderDetails/styles.js +7 -5
- package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +4 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -3
- package/_modules/themes/five/src/components/ServiceForm/index.js +33 -7
- package/_modules/themes/five/src/components/ServiceForm/styles.js +8 -3
- package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
- package/_modules/themes/five/src/components/SingleProductCard/index.js +4 -4
- package/_modules/themes/five/src/components/UserFormDetails/index.js +51 -26
- package/_modules/themes/five/src/components/UserFormDetails/styles.js +9 -3
- package/_modules/themes/five/src/components/UserVerification/index.js +7 -2
- package/index-template.js +7 -5
- package/package.json +2 -2
- package/src/components/BusinessTypeFilter/index.js +2 -2
- package/src/components/CancellationComponent/index.js +62 -0
- package/src/components/CancellationComponent/styles.js +162 -0
- package/src/components/Header/index.js +1 -1
- package/src/index.js +2 -0
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +1 -0
- package/src/themes/five/src/components/AddressForm/index.js +2 -2
- package/src/themes/five/src/components/AddressList/index.js +2 -1
- package/src/themes/five/src/components/AddressList/styles.js +4 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +3 -2
- package/src/themes/five/src/components/BusinessController/index.js +68 -44
- package/src/themes/five/src/components/BusinessReviews/index.js +4 -4
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +15 -11
- package/src/themes/five/src/components/Cart/index.js +24 -9
- package/src/themes/five/src/components/HomeHero/index.js +4 -2
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +5 -1
- package/src/themes/five/src/components/OrderDetails/OrderActionsSection.js +33 -0
- package/src/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +20 -0
- package/src/themes/five/src/components/OrderDetails/index.js +84 -100
- package/src/themes/five/src/components/OrderDetails/styles.js +4 -1
- package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +4 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
- package/src/themes/five/src/components/OrdersOption/index.js +3 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -2
- package/src/themes/five/src/components/ServiceForm/index.js +162 -139
- package/src/themes/five/src/components/ServiceForm/styles.js +10 -0
- package/src/themes/five/src/components/SignUpApproval/index.js +6 -7
- package/src/themes/five/src/components/SingleProductCard/index.js +3 -3
- package/src/themes/five/src/components/UserFormDetails/index.js +59 -23
- package/src/themes/five/src/components/UserFormDetails/styles.js +26 -0
- package/src/themes/five/src/components/UserVerification/index.js +18 -11
- package/template/app.js +385 -367
- package/template/components/SubdomainComponent/index.js +54 -0
- package/template/config.json +4 -1
- package/_bundles/0.ordering-ui.5de718771fdf8a9bc402.js +0 -1
- package/_bundles/ordering-ui.5de718771fdf8a9bc402.js +0 -2
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const Hero = styled.div`
|
|
4
|
+
margin-bottom: 30px;
|
|
5
|
+
width: 100%;
|
|
6
|
+
background: black;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
@media (min-width: 450px) {
|
|
11
|
+
height: 370px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (min-width: 821px) {
|
|
15
|
+
height: ${({ height }) => height || '450px'};
|
|
16
|
+
}
|
|
17
|
+
`
|
|
18
|
+
|
|
19
|
+
export const BgImg = styled.img`
|
|
20
|
+
${({ src }) => src && css`
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
opacity: 0.4;
|
|
24
|
+
object-fit: cover;
|
|
25
|
+
position: absolute;
|
|
26
|
+
`}
|
|
27
|
+
`
|
|
28
|
+
|
|
29
|
+
export const HeroText = styled.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
height: 100%;
|
|
35
|
+
color: ${props => props.theme.colors.backgroundPage};
|
|
36
|
+
opacity: .9;
|
|
37
|
+
text-align: center;
|
|
38
|
+
|
|
39
|
+
.title {
|
|
40
|
+
font-size: 40px;
|
|
41
|
+
margin: 10px 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.sub-title {
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
line-height: 24px;
|
|
47
|
+
font-weight: 100;
|
|
48
|
+
margin: 0;
|
|
49
|
+
max-width: 560px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.terms {
|
|
53
|
+
font-style: italic;
|
|
54
|
+
}
|
|
55
|
+
`
|
|
56
|
+
|
|
57
|
+
export const LogoImg = styled.img`
|
|
58
|
+
${({ src }) => src && css`
|
|
59
|
+
width: 120px;
|
|
60
|
+
height: 120px;
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
margin-bottom: 30px;
|
|
63
|
+
`}
|
|
64
|
+
`
|
|
65
|
+
|
|
66
|
+
export const Content = styled.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
margin-bottom: 30px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
height: 200px;
|
|
74
|
+
background-color: #F3F9FF;
|
|
75
|
+
text-align: center;
|
|
76
|
+
|
|
77
|
+
p {
|
|
78
|
+
font-size: x-large;
|
|
79
|
+
color: ${props => props.theme.colors.headingColor};
|
|
80
|
+
margin: 0;
|
|
81
|
+
max-width: 600px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
button {
|
|
85
|
+
margin-top: 20px;
|
|
86
|
+
}
|
|
87
|
+
`
|
|
88
|
+
|
|
89
|
+
export const Segment = styled.div`
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
margin-bottom: 30px;
|
|
95
|
+
text-align: center:
|
|
96
|
+
width: 100%;
|
|
97
|
+
text-align: center;
|
|
98
|
+
|
|
99
|
+
p {
|
|
100
|
+
font-size: x-large;
|
|
101
|
+
color: ${props => props.theme.colors.headingColor};
|
|
102
|
+
margin: 0;
|
|
103
|
+
max-width: 660px;
|
|
104
|
+
margin-bottom: 30px;
|
|
105
|
+
}
|
|
106
|
+
`
|
|
107
|
+
|
|
108
|
+
export const InputWrapper = styled.div`
|
|
109
|
+
margin: 10px 20px 0px;
|
|
110
|
+
display: flex;
|
|
111
|
+
|
|
112
|
+
button {
|
|
113
|
+
width: 80px;
|
|
114
|
+
margin-left: -10px;
|
|
115
|
+
border-radius: 0 7.6px 7.6px 0;
|
|
116
|
+
padding: 4px;
|
|
117
|
+
z-index: 100;
|
|
118
|
+
}
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
align-items: center;
|
|
122
|
+
position: relative;
|
|
123
|
+
margin: 0;
|
|
124
|
+
margin-top: 10px;
|
|
125
|
+
margin-bottom: 20px;
|
|
126
|
+
width: 100%;
|
|
127
|
+
padding: 0 20px;
|
|
128
|
+
margin-right: 20px;
|
|
129
|
+
|
|
130
|
+
@media(min-width: 681px){
|
|
131
|
+
width: 60%;
|
|
132
|
+
padding: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media(min-width: 1201px){
|
|
136
|
+
width: 50%;
|
|
137
|
+
}
|
|
138
|
+
`
|
|
139
|
+
|
|
140
|
+
export const BusinessSearch = styled.div`
|
|
141
|
+
width: 100%;
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: flex-end;
|
|
144
|
+
position: relative;
|
|
145
|
+
|
|
146
|
+
input {
|
|
147
|
+
border: none;
|
|
148
|
+
border-bottom: 1px solid #E9ECEF;
|
|
149
|
+
border-radius: 0px;
|
|
150
|
+
width: 100%;
|
|
151
|
+
background-repeat: no-repeat;
|
|
152
|
+
background-size: 30px 18px;
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
padding-left: 30px;
|
|
155
|
+
padding-right: 50px;
|
|
156
|
+
|
|
157
|
+
@media (min-width: 681px) {
|
|
158
|
+
width: 100%;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
}
|
|
162
|
+
`
|
|
@@ -241,7 +241,7 @@ export const Header = (props) => {
|
|
|
241
241
|
<RightHeader>
|
|
242
242
|
<Menu>
|
|
243
243
|
{
|
|
244
|
-
!auth && windowSize.width > 870 && (
|
|
244
|
+
!auth && windowSize.width > 870 && !isCustomerMode && (
|
|
245
245
|
<>
|
|
246
246
|
<MenuLink onClick={() => handleGoToPage({ page: 'signin' })} name='signin'>{t('SIGN_IN', theme?.defaultLanguages?.SIGN_IN || 'Sign in')}</MenuLink>
|
|
247
247
|
{!isHideSignup && (
|
package/src/index.js
CHANGED
|
@@ -100,6 +100,7 @@ import { useWindowSize } from './hooks/useWindowSize'
|
|
|
100
100
|
import { useCountdownTimer } from './hooks/useCountdownTimer'
|
|
101
101
|
import { useIntersectionObserver } from './hooks/useIntersectionObserver'
|
|
102
102
|
import { useIsMounted } from './hooks/useIsMounted'
|
|
103
|
+
import { CancellationComponent } from './components/CancellationComponent'
|
|
103
104
|
|
|
104
105
|
import { Button } from './styles/Buttons'
|
|
105
106
|
import { Input, InputGroup, InputPrimary, InputGroupLeft, InputGroupPrimary, InputGroupRight, InputSecundary, TextArea } from './styles/Inputs'
|
|
@@ -150,6 +151,7 @@ export {
|
|
|
150
151
|
BusinessesMap,
|
|
151
152
|
BusinessReviews,
|
|
152
153
|
BusinessTypeFilter,
|
|
154
|
+
CancellationComponent,
|
|
153
155
|
CardForm,
|
|
154
156
|
Cart,
|
|
155
157
|
CartContent,
|
|
@@ -77,8 +77,8 @@ const AddressFormUI = (props) => {
|
|
|
77
77
|
: formState.changes?.location ?? null
|
|
78
78
|
)
|
|
79
79
|
|
|
80
|
-
const isHideMap = orderingTheme?.theme?.
|
|
81
|
-
const isHideIcons = orderingTheme?.theme?.
|
|
80
|
+
const isHideMap = orderingTheme?.theme?.address?.components?.map?.hidden
|
|
81
|
+
const isHideIcons = orderingTheme?.theme?.address?.components?.icons?.hidden
|
|
82
82
|
|
|
83
83
|
const maxLimitLocation = configState?.configs?.meters_to_change_address?.value
|
|
84
84
|
const googleMapsApiKey = configState?.configs?.google_maps_api_key?.value
|
|
@@ -91,7 +91,7 @@ const AddressListUI = (props) => {
|
|
|
91
91
|
const showIcons = !orderingTheme?.theme?.profile?.components?.address_list?.components?.icons?.hidden
|
|
92
92
|
const showZipcode = !orderingTheme?.theme?.profile?.components?.address_list?.components?.zipcode?.hidden
|
|
93
93
|
const showInternalNumber = !orderingTheme?.theme?.profile?.components?.address_list?.components?.internal_number?.hidden
|
|
94
|
-
|
|
94
|
+
const notFoundImage = orderingTheme?.theme?.profile?.components?.address_list?.components?.image
|
|
95
95
|
const openAddress = (address) => {
|
|
96
96
|
setCurAddress(address)
|
|
97
97
|
setAddressOpen(true)
|
|
@@ -326,6 +326,7 @@ const AddressListUI = (props) => {
|
|
|
326
326
|
{!(addressList.loading || actionStatus.loading || orderState.loading) && addressList.error && (
|
|
327
327
|
addressList.error.length > 0 && (
|
|
328
328
|
<NotFoundSource
|
|
329
|
+
image={notFoundImage}
|
|
329
330
|
content={addressList.error[0]?.message || addressList.error[0]}
|
|
330
331
|
/>
|
|
331
332
|
)
|
|
@@ -4,7 +4,10 @@ import { darken } from 'polished'
|
|
|
4
4
|
export const AddressListContainer = styled.div`
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
padding:
|
|
7
|
+
padding: 0;
|
|
8
|
+
@media (min-width: 768px) {
|
|
9
|
+
padding: 0px 10px;
|
|
10
|
+
}
|
|
8
11
|
${({ isProfile }) => !isProfile && css`
|
|
9
12
|
width: 100%;
|
|
10
13
|
`}
|
|
@@ -84,7 +84,8 @@ export const BusinessBasicInformation = (props) => {
|
|
|
84
84
|
const showSort = !orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.sort?.hidden
|
|
85
85
|
const isInfoShrunken = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.layout?.position === 'shrunken'
|
|
86
86
|
const hideCity = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.city?.hidden
|
|
87
|
-
|
|
87
|
+
const layoutsWithOldSearch = ['starbucks', 'old']
|
|
88
|
+
const hideSearch = layoutsWithOldSearch.includes(orderingTheme?.theme?.business_view?.components?.product_search?.components?.layout?.type)
|
|
88
89
|
const getBusinessType = () => {
|
|
89
90
|
if (Object.keys(business).length <= 0) return t('GENERAL', 'General')
|
|
90
91
|
const _types = []
|
|
@@ -349,7 +350,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
349
350
|
</BusinessInfoItem>
|
|
350
351
|
</BusinessInfo>
|
|
351
352
|
</BusinessInfoContent>
|
|
352
|
-
{(categoryState?.products?.length !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !business?.professionals?.length && (
|
|
353
|
+
{!hideSearch && (categoryState?.products?.length !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !business?.professionals?.length && (
|
|
353
354
|
<SearchComponent />
|
|
354
355
|
)}
|
|
355
356
|
</BusinessInfoContainer>
|
|
@@ -62,7 +62,8 @@ const BusinessControllerUI = (props) => {
|
|
|
62
62
|
businessDeliveryTime,
|
|
63
63
|
businessPickupTime,
|
|
64
64
|
businessDistance,
|
|
65
|
-
handleFavoriteBusiness
|
|
65
|
+
handleFavoriteBusiness,
|
|
66
|
+
businessState
|
|
66
67
|
} = props
|
|
67
68
|
const [configState] = useConfig()
|
|
68
69
|
const theme = useTheme()
|
|
@@ -78,6 +79,13 @@ const BusinessControllerUI = (props) => {
|
|
|
78
79
|
const favoriteRef = useRef(null)
|
|
79
80
|
|
|
80
81
|
const businessRows = orderingTheme?.theme?.business_listing_view?.components?.layout?.rows
|
|
82
|
+
const hideBusinessLogo = theme?.business_listing_view?.components?.business?.components?.logo?.hidden
|
|
83
|
+
const hideBusinessFee = theme?.business_listing_view?.components?.business?.components?.fee?.hidden
|
|
84
|
+
const hideBusinessTime = theme?.business_listing_view?.components?.business?.components?.time?.hidden
|
|
85
|
+
const hideBusinessDistance = theme?.business_listing_view?.components?.business?.components?.distance?.hidden
|
|
86
|
+
const hideBusinessReviews = theme?.business_listing_view?.components?.business?.components?.reviews?.hidden
|
|
87
|
+
const hideBusinessFavorite = theme?.business_listing_view?.components?.business?.components?.favorite?.hidden
|
|
88
|
+
const hideBusinessOffer = theme?.business_listing_view?.components?.business?.components?.offer?.hidden
|
|
81
89
|
|
|
82
90
|
// const handleShowAlert = () => {
|
|
83
91
|
// setAlertState({ open: true, content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')] })
|
|
@@ -92,7 +100,7 @@ const BusinessControllerUI = (props) => {
|
|
|
92
100
|
|
|
93
101
|
const handleChangeFavorite = () => {
|
|
94
102
|
if (auth) {
|
|
95
|
-
handleFavoriteBusiness && handleFavoriteBusiness(!business?.favorite)
|
|
103
|
+
handleFavoriteBusiness && handleFavoriteBusiness(!businessState?.business?.favorite)
|
|
96
104
|
} else {
|
|
97
105
|
setModalPageToShow('login')
|
|
98
106
|
setIsModalOpen(true)
|
|
@@ -157,13 +165,13 @@ const BusinessControllerUI = (props) => {
|
|
|
157
165
|
{isSkeleton ? (
|
|
158
166
|
<Skeleton height={isCustomerMode ? 100 : 140} />
|
|
159
167
|
) : (
|
|
160
|
-
<BusinessHeader bgimage={optimizeImage((businessHeader || business?.header || theme.images?.dummies?.
|
|
168
|
+
<BusinessHeader bgimage={optimizeImage((businessHeader || business?.header || theme.images?.dummies?.businessHeader), 'h_400,c_limit')} isClosed={!isBusinessOpen}>
|
|
161
169
|
<BusinessTags>
|
|
162
170
|
{(businessFeatured ?? business?.featured) &&
|
|
163
171
|
<span className='crown'>
|
|
164
172
|
<FaCrown />
|
|
165
173
|
</span>}
|
|
166
|
-
{!isCustomLayout && (configState?.configs?.preorder_status_enabled?.value === '1') && (
|
|
174
|
+
{!hideBusinessOffer && !isCustomLayout && (configState?.configs?.preorder_status_enabled?.value === '1') && (
|
|
167
175
|
<div>
|
|
168
176
|
{getBusinessOffer((businessOffers ?? business?.offers)) && <span>{getBusinessOffer((businessOffers ?? business?.offers)) || parsePrice(0)}</span>}
|
|
169
177
|
{!isBusinessOpen && <span>{t('PREORDER', 'PreOrder')}</span>}
|
|
@@ -179,33 +187,41 @@ const BusinessControllerUI = (props) => {
|
|
|
179
187
|
</BusinessHero>
|
|
180
188
|
<BusinessContent>
|
|
181
189
|
<BusinessLogoWrapper>
|
|
182
|
-
|
|
183
|
-
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<Skeleton height={70} width={70} />
|
|
187
|
-
)}
|
|
188
|
-
</WrapperBusinessLogo>
|
|
189
|
-
<BusinessStarInfo>
|
|
190
|
-
{!isSkeleton ? (
|
|
191
|
-
(businessReviews ?? business?.reviews?.total) > 0 && (
|
|
192
|
-
<div className='reviews'>
|
|
193
|
-
<BisStar />
|
|
194
|
-
<span>{(businessReviews ?? business?.reviews?.total)}</span>
|
|
195
|
-
</div>
|
|
196
|
-
)
|
|
197
|
-
) : (
|
|
198
|
-
<Skeleton width={50} />
|
|
199
|
-
)}
|
|
200
|
-
<FavoriteWrapper ref={favoriteRef} onClick={handleChangeFavorite}>
|
|
201
|
-
{!isSkeleton ? (
|
|
202
|
-
<>
|
|
203
|
-
{(business?.favorite) ? <Like /> : <DisLike />}
|
|
204
|
-
</>
|
|
190
|
+
{!hideBusinessLogo && (
|
|
191
|
+
<WrapperBusinessLogo isSkeleton={isSkeleton} isCustomerMode={isCustomerMode}>
|
|
192
|
+
{!isSkeleton && (businessLogo || business?.logo || theme.images?.dummies?.businessLogo) ? (
|
|
193
|
+
<BusinessLogo bgimage={optimizeImage((businessLogo || business?.logo || theme.images?.dummies?.businessLogo), 'h_200,c_limit')} />
|
|
205
194
|
) : (
|
|
206
|
-
<Skeleton
|
|
195
|
+
<Skeleton height={70} width={70} />
|
|
207
196
|
)}
|
|
208
|
-
</
|
|
197
|
+
</WrapperBusinessLogo>
|
|
198
|
+
)}
|
|
199
|
+
<BusinessStarInfo>
|
|
200
|
+
{!hideBusinessReviews && (
|
|
201
|
+
<>
|
|
202
|
+
{!isSkeleton ? (
|
|
203
|
+
(businessReviews ?? business?.reviews?.total) > 0 && (
|
|
204
|
+
<div className='reviews'>
|
|
205
|
+
<BisStar />
|
|
206
|
+
<span>{(businessReviews ?? business?.reviews?.total)}</span>
|
|
207
|
+
</div>
|
|
208
|
+
)
|
|
209
|
+
) : (
|
|
210
|
+
<Skeleton width={50} />
|
|
211
|
+
)}
|
|
212
|
+
</>
|
|
213
|
+
)}
|
|
214
|
+
{!hideBusinessFavorite && (
|
|
215
|
+
<FavoriteWrapper ref={favoriteRef} onClick={handleChangeFavorite}>
|
|
216
|
+
{!isSkeleton ? (
|
|
217
|
+
<>
|
|
218
|
+
{(businessState?.business?.favorite) ? <Like /> : <DisLike />}
|
|
219
|
+
</>
|
|
220
|
+
) : (
|
|
221
|
+
<Skeleton width={16} height={16} />
|
|
222
|
+
)}
|
|
223
|
+
</FavoriteWrapper>
|
|
224
|
+
)}
|
|
209
225
|
</BusinessStarInfo>
|
|
210
226
|
</BusinessLogoWrapper>
|
|
211
227
|
<BusinessInfo className='info'>
|
|
@@ -218,7 +234,7 @@ const BusinessControllerUI = (props) => {
|
|
|
218
234
|
)}
|
|
219
235
|
</div>
|
|
220
236
|
<Medadata isCustomerMode={isCustomerMode} isSkeleton={isSkeleton}>
|
|
221
|
-
{orderType === 1 && (
|
|
237
|
+
{!hideBusinessFee && orderType === 1 && (
|
|
222
238
|
<>
|
|
223
239
|
{(businessDeliveryPrice ?? business?.delivery_price) >= 0 ? (
|
|
224
240
|
<p>
|
|
@@ -230,21 +246,29 @@ const BusinessControllerUI = (props) => {
|
|
|
230
246
|
)}
|
|
231
247
|
</>
|
|
232
248
|
)}
|
|
233
|
-
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
249
|
+
{!hideBusinessTime && (
|
|
250
|
+
<>
|
|
251
|
+
{Object.keys(business).length > 0 ? (
|
|
252
|
+
<p className='bullet'>
|
|
253
|
+
<GoPrimitiveDot />
|
|
254
|
+
{convertHoursToMinutes(orderState?.options?.type === 1 ? (businessDeliveryTime ?? business?.delivery_time) : (businessPickupTime ?? business?.pickup_time)) || <Skeleton width={100} />}
|
|
255
|
+
</p>
|
|
256
|
+
) : (
|
|
257
|
+
<Skeleton width={65} />
|
|
258
|
+
)}
|
|
259
|
+
</>
|
|
240
260
|
)}
|
|
241
|
-
{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
261
|
+
{!hideBusinessDistance && (
|
|
262
|
+
<>
|
|
263
|
+
{(businessDistance ?? business?.distance) >= 0 ? (
|
|
264
|
+
<p className='bullet'>
|
|
265
|
+
<GoPrimitiveDot />
|
|
266
|
+
{parseDistance((businessDistance ?? business?.distance))}
|
|
267
|
+
</p>
|
|
268
|
+
) : (
|
|
269
|
+
<Skeleton width={65} />
|
|
270
|
+
)}
|
|
271
|
+
</>
|
|
248
272
|
)}
|
|
249
273
|
{isCustomerMode && hasInformationLength && (
|
|
250
274
|
<CallCenterInformation>
|
|
@@ -39,10 +39,10 @@ export const BusinessReviewsUI = (props) => {
|
|
|
39
39
|
if (raiting) handleClickOption(raiting)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
const showRanking = !orderingTheme?.theme?.business_view?.components?.
|
|
43
|
-
const showReviewDate = !orderingTheme?.theme?.business_view?.components?.
|
|
44
|
-
const showCustomerComments = !orderingTheme?.theme?.business_view?.components?.
|
|
45
|
-
const showSearch = !orderingTheme?.theme?.business_view?.components?.
|
|
42
|
+
const showRanking = !orderingTheme?.theme?.business_view?.components?.review?.components?.ranking?.hidden
|
|
43
|
+
const showReviewDate = !orderingTheme?.theme?.business_view?.components?.review?.components?.review_date?.hidden
|
|
44
|
+
const showCustomerComments = !orderingTheme?.theme?.business_view?.components?.review?.components?.customer_comments?.hidden
|
|
45
|
+
const showSearch = !orderingTheme?.theme?.business_view?.components?.review?.components?.search?.hidden
|
|
46
46
|
const hideElement = !(!showReviewDate && !showCustomerComments)
|
|
47
47
|
|
|
48
48
|
const reviewPoints = [1, 2, 3, 4, 5]
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -96,7 +96,9 @@ const BusinessesListingUI = (props) => {
|
|
|
96
96
|
const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
|
|
97
97
|
const [favoriteIds, setFavoriteIds] = useState([])
|
|
98
98
|
const hideCities = theme?.business_listing_view?.components?.cities?.hidden ?? true
|
|
99
|
-
|
|
99
|
+
const hideSearch = theme?.business_listing_view?.components?.search?.hidden
|
|
100
|
+
const hideFilter = theme?.business_listing_view?.components?.filter?.hidden
|
|
101
|
+
const hideSearchSection = hideCities && hideSearch && hideFilter
|
|
100
102
|
const businessesIds = isCustomLayout &&
|
|
101
103
|
businessesList.businesses &&
|
|
102
104
|
businessesList.businesses?.map(business => business.id)
|
|
@@ -314,23 +316,25 @@ const BusinessesListingUI = (props) => {
|
|
|
314
316
|
{isCustomerMode && (
|
|
315
317
|
<OrdersSection titleContent={t('PREVIOUS_ORDERS', 'Previous orders')} />
|
|
316
318
|
)}
|
|
317
|
-
{!isCustomerMode && (
|
|
319
|
+
{!isCustomerMode && !hideSearchSection && (
|
|
318
320
|
<>
|
|
319
321
|
<WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
{!hideSearch && (
|
|
323
|
+
<SearchBar
|
|
324
|
+
lazyLoad
|
|
325
|
+
search={searchValue}
|
|
326
|
+
isCustomLayout={isCustomLayout}
|
|
327
|
+
placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
|
|
328
|
+
onSearch={handleChangeSearch}
|
|
329
|
+
handleCustomEnter={() => onRedirectPage({ page: 'business_search' })}
|
|
330
|
+
/>
|
|
331
|
+
)}
|
|
328
332
|
{!hideCities && citiesState?.cities?.length > 0 && (
|
|
329
333
|
<Button color='primary' onClick={handleOpenCities}>
|
|
330
334
|
{citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)?.name || t('SELECT_A_CITY', 'Select a city')}
|
|
331
335
|
</Button>
|
|
332
336
|
)}
|
|
333
|
-
{configs?.advanced_business_search_enabled?.value === '1' && (
|
|
337
|
+
{!hideFilter && configs?.advanced_business_search_enabled?.value === '1' && (
|
|
334
338
|
<FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
|
|
335
339
|
)}
|
|
336
340
|
{isCustomLayout && (
|
|
@@ -15,6 +15,7 @@ import { TextArea } from '../../styles/Inputs'
|
|
|
15
15
|
import { SpinnerLoader } from '../../../../../components/SpinnerLoader'
|
|
16
16
|
import { CartStoresListing } from '../../../../franchise/src/components/CartStoresListing'
|
|
17
17
|
import { DriverTips } from '../DriverTips'
|
|
18
|
+
import { ServiceForm } from '../ServiceForm'
|
|
18
19
|
import {
|
|
19
20
|
CartContainer,
|
|
20
21
|
OrderBill,
|
|
@@ -565,15 +566,29 @@ const CartUI = (props) => {
|
|
|
565
566
|
onClose={() => setModalIsOpen(false)}
|
|
566
567
|
disableOverflowX
|
|
567
568
|
>
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
569
|
+
{!curProduct?.calendar_event ? (
|
|
570
|
+
<ProductForm
|
|
571
|
+
isCartProduct
|
|
572
|
+
productCart={curProduct}
|
|
573
|
+
businessSlug={cart?.business?.slug}
|
|
574
|
+
businessId={cart?.business_id}
|
|
575
|
+
categoryId={curProduct?.category_id}
|
|
576
|
+
productId={curProduct?.id}
|
|
577
|
+
onSave={handlerProductAction}
|
|
578
|
+
/>
|
|
579
|
+
) : (
|
|
580
|
+
<ServiceForm
|
|
581
|
+
isCartProduct
|
|
582
|
+
isService
|
|
583
|
+
productCart={curProduct}
|
|
584
|
+
businessSlug={cart?.business?.slug}
|
|
585
|
+
businessId={cart?.business_id}
|
|
586
|
+
categoryId={curProduct?.category_id}
|
|
587
|
+
productId={curProduct?.id}
|
|
588
|
+
onSave={handlerProductAction}
|
|
589
|
+
professionalSelected={curProduct?.calendar_event?.professional}
|
|
590
|
+
/>
|
|
591
|
+
)}
|
|
577
592
|
</Modal>
|
|
578
593
|
<Modal
|
|
579
594
|
width='70%'
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useTheme } from 'styled-components'
|
|
2
3
|
import { OriginalHomeHero } from './layouts/OriginalHomeHero'
|
|
3
4
|
import { RedHomeHero } from './layouts/RedHomeHero'
|
|
4
5
|
import { StarbucksHomeHero } from './layouts/StarbucksHomeHero'
|
|
5
6
|
|
|
6
7
|
export const HomeHero = (props) => {
|
|
8
|
+
const theme = useTheme()
|
|
7
9
|
const HomeLayoutConfig = {
|
|
8
10
|
homepage_settings: {
|
|
9
|
-
layout: 'original', // 'original', 'starbucks', 'red'
|
|
10
|
-
contentPosition: 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
11
|
+
layout: theme?.homepage_view?.components?.layout?.type || 'original', // 'original', 'starbucks', 'red'
|
|
12
|
+
contentPosition: theme?.homepage_view?.components?.layout?.position || 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
const layout = HomeLayoutConfig?.homepage_settings?.layout !== undefined
|
|
@@ -178,7 +178,11 @@ export const SingleOrderHeader = styled.div`
|
|
|
178
178
|
> div {
|
|
179
179
|
> div {
|
|
180
180
|
display: flex;
|
|
181
|
-
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
align-items: center;
|
|
183
|
+
@media (min-width: 769px) {
|
|
184
|
+
flex-direction: row;
|
|
185
|
+
}
|
|
182
186
|
p {
|
|
183
187
|
line-height: 24px;
|
|
184
188
|
font-size: 14px;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useLanguage } from 'ordering-components-external'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
4
|
+
import { Button } from '../../styles/Buttons'
|
|
5
|
+
import { MyOrderActions } from './styles'
|
|
6
|
+
|
|
7
|
+
export const OrderActionsSection = (props) => {
|
|
8
|
+
const {
|
|
9
|
+
userCustomerId,
|
|
10
|
+
isService,
|
|
11
|
+
handleGoToPage
|
|
12
|
+
} = props
|
|
13
|
+
const [, t] = useLanguage()
|
|
14
|
+
const theme = useTheme()
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
{!userCustomerId && (
|
|
19
|
+
<MyOrderActions>
|
|
20
|
+
<Button
|
|
21
|
+
color='primary'
|
|
22
|
+
outline
|
|
23
|
+
onClick={() => handleGoToPage({ page: 'orders' })}
|
|
24
|
+
>
|
|
25
|
+
{isService
|
|
26
|
+
? t('YOUR_APPOINTMENTS', 'Your appointments')
|
|
27
|
+
: t('YOUR_ORDERS', theme?.defaultLanguages?.YOUR_ORDERS || 'Your Orders')}
|
|
28
|
+
</Button>
|
|
29
|
+
</MyOrderActions>
|
|
30
|
+
)}
|
|
31
|
+
</>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useLanguage } from 'ordering-components-external'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
4
|
+
import { HeaderInfo } from './styles'
|
|
5
|
+
|
|
6
|
+
export const OrderHeaderInfoSection = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
isService
|
|
9
|
+
} = props
|
|
10
|
+
|
|
11
|
+
const [, t] = useLanguage()
|
|
12
|
+
const theme = useTheme()
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<HeaderInfo>
|
|
16
|
+
<h1>{isService ? t('SERVICES', 'Services') : t('ORDER_MESSAGE_RECEIVED', theme?.defaultLanguages?.ORDER_MESSAGE_RECEIVED || 'Your order has been received')}</h1>
|
|
17
|
+
<p>{!isService && t('ORDER_MESSAGE_HEADER_TEXT', theme?.defaultLanguages?.ORDER_MESSAGE_HEADER_TEXT || 'Once business accepts your order, we will send you an email, thank you!')}</p>
|
|
18
|
+
</HeaderInfo>
|
|
19
|
+
)
|
|
20
|
+
}
|