ordering-ui-external 1.4.5 → 1.5.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.9c913f613f7ccfd32dd9.js → 0.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{1.ordering-ui.9c913f613f7ccfd32dd9.js → 1.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{2.ordering-ui.9c913f613f7ccfd32dd9.js → 2.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{4.ordering-ui.9c913f613f7ccfd32dd9.js → 4.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{5.ordering-ui.9c913f613f7ccfd32dd9.js → 5.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{6.ordering-ui.9c913f613f7ccfd32dd9.js → 6.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{7.ordering-ui.9c913f613f7ccfd32dd9.js → 7.ordering-ui.b1e32f04828ea3f944e1.js} +2 -2
- package/_bundles/{7.ordering-ui.9c913f613f7ccfd32dd9.js.LICENSE.txt → 7.ordering-ui.b1e32f04828ea3f944e1.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.9c913f613f7ccfd32dd9.js → 8.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{9.ordering-ui.9c913f613f7ccfd32dd9.js → 9.ordering-ui.b1e32f04828ea3f944e1.js} +1 -1
- package/_bundles/{ordering-ui.9c913f613f7ccfd32dd9.js → ordering-ui.b1e32f04828ea3f944e1.js} +2 -2
- package/_bundles/{ordering-ui.9c913f613f7ccfd32dd9.js.LICENSE.txt → ordering-ui.b1e32f04828ea3f944e1.js.LICENSE.txt} +0 -0
- package/_modules/components/LogoutButton/index.js +9 -4
- package/_modules/components/PaymentOptions/index.js +14 -7
- package/_modules/components/SpinnerLoader/styles.js +1 -1
- package/_modules/components/UserProfileForm/index.js +15 -2
- package/_modules/components/UserProfileForm/styles.js +1 -1
- package/_modules/hooks/useRecaptcha.js +62 -0
- package/_modules/themes/five/src/components/AddressForm/styles.js +3 -3
- package/_modules/themes/five/src/components/AddressList/index.js +1 -1
- package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +5 -5
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +12 -10
- package/_modules/themes/five/src/components/BusinessController/index.js +6 -4
- package/_modules/themes/five/src/components/BusinessController/styles.js +10 -4
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +21 -6
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +6 -17
- package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +3 -4
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +11 -3
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessReviews/index.js +16 -8
- package/_modules/themes/five/src/components/BusinessReviews/styles.js +6 -4
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +58 -34
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -23
- package/_modules/themes/five/src/components/DriverTips/styles.js +1 -1
- package/_modules/themes/five/src/components/Footer/index.js +2 -1
- package/_modules/themes/five/src/components/Footer/styles.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +18 -11
- package/_modules/themes/five/src/components/Header/styles.js +7 -7
- package/_modules/themes/five/src/components/HomeHero/index.js +0 -15
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +116 -31
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +36 -37
- package/_modules/themes/five/src/components/LoginForm/index.js +62 -21
- package/_modules/themes/five/src/components/LoginForm/styles.js +1 -1
- package/_modules/themes/five/src/components/Messages/index.js +19 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +6 -6
- package/_modules/themes/five/src/components/MyOrders/index.js +4 -4
- package/_modules/themes/five/src/components/NavigationBar/index.js +145 -34
- package/_modules/themes/five/src/components/NavigationBar/styles.js +1 -1
- package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +2 -14
- package/_modules/themes/five/src/components/PaymentOptions/index.js +23 -16
- package/_modules/themes/five/src/components/PaymentOptions/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +9 -7
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +10 -4
- package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +11 -3
- package/_modules/themes/five/src/components/ProductShare/ProductCopyURL.js +61 -0
- package/_modules/themes/five/src/components/ProductShare/index.js +107 -0
- package/_modules/themes/five/src/components/ProductShare/styles.js +40 -0
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +18 -16
- package/_modules/themes/five/src/components/ReviewProduct/index.js +5 -3
- package/_modules/themes/five/src/components/ReviewProduct/styles.js +19 -3
- package/_modules/themes/five/src/components/SearchProducts/index.js +13 -2
- package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpForm/index.js +60 -20
- package/_modules/themes/five/src/components/SignUpForm/styles.js +2 -2
- package/_modules/themes/five/src/components/SingleProductCard/index.js +36 -2
- package/_modules/themes/five/src/components/UserProfileForm/index.js +105 -8
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +30 -17
- package/_modules/utils/index.js +26 -11
- package/index-template.js +11 -1
- package/package.json +2 -2
- package/src/components/LogoutButton/index.js +10 -8
- package/src/components/PaymentOptions/index.js +16 -11
- package/src/components/SpinnerLoader/styles.js +1 -0
- package/src/components/UserProfileForm/index.js +12 -2
- package/src/components/UserProfileForm/styles.js +1 -1
- package/src/hooks/useRecaptcha.js +40 -0
- package/src/themes/five/src/components/AddressForm/styles.js +3 -2
- package/src/themes/five/src/components/AddressList/index.js +1 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +74 -71
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +69 -20
- package/src/themes/five/src/components/BusinessController/index.js +3 -1
- package/src/themes/five/src/components/BusinessController/styles.js +8 -0
- package/src/themes/five/src/components/BusinessListingSearch/index.js +16 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +6 -18
- package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -0
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +2 -3
- package/src/themes/five/src/components/BusinessReviews/index.js +17 -10
- package/src/themes/five/src/components/BusinessReviews/styles.js +7 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +64 -19
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +99 -1
- package/src/themes/five/src/components/DriverTips/styles.js +1 -1
- package/src/themes/five/src/components/Footer/index.js +9 -5
- package/src/themes/five/src/components/Footer/styles.js +2 -6
- package/src/themes/five/src/components/Header/index.js +16 -8
- package/src/themes/five/src/components/Header/styles.js +49 -8
- package/src/themes/five/src/components/HomeHero/index.js +0 -6
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +163 -60
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +145 -82
- package/src/themes/five/src/components/LoginForm/index.js +30 -4
- package/src/themes/five/src/components/LoginForm/styles.js +8 -0
- package/src/themes/five/src/components/Messages/index.js +8 -2
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +34 -1
- package/src/themes/five/src/components/MyOrders/index.js +4 -4
- package/src/themes/five/src/components/NavigationBar/index.js +153 -39
- package/src/themes/five/src/components/NavigationBar/styles.js +2 -2
- package/src/themes/five/src/components/PaymentOptionStripe/index.js +2 -14
- package/src/themes/five/src/components/PaymentOptions/index.js +13 -7
- package/src/themes/five/src/components/PaymentOptions/styles.js +5 -0
- package/src/themes/five/src/components/ProductForm/index.js +9 -7
- package/src/themes/five/src/components/ProductItemAccordion/index.js +67 -53
- package/src/themes/five/src/components/ProductItemAccordion/styles.js +26 -0
- package/src/themes/five/src/components/ProductShare/ProductCopyURL.js +53 -0
- package/src/themes/five/src/components/ProductShare/index.js +104 -0
- package/src/themes/five/src/components/ProductShare/styles.js +165 -0
- package/src/themes/five/src/components/RenderProductsLayout/index.js +2 -8
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +5 -0
- package/src/themes/five/src/components/ReviewProduct/index.js +10 -3
- package/src/themes/five/src/components/ReviewProduct/styles.js +43 -0
- package/src/themes/five/src/components/SearchProducts/index.js +16 -3
- package/src/themes/five/src/components/SignUpApproval/index.js +8 -7
- package/src/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +26 -2
- package/src/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +26 -2
- package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +26 -2
- package/src/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +26 -2
- package/src/themes/five/src/components/SignUpForm/index.js +26 -1
- package/src/themes/five/src/components/SignUpForm/styles.js +9 -2
- package/src/themes/five/src/components/SingleProductCard/index.js +26 -1
- package/src/themes/five/src/components/UserPopover/index.js +1 -1
- package/src/themes/five/src/components/UserProfileForm/index.js +83 -5
- package/src/themes/five/src/components/UserProfileForm/styles.js +49 -0
- package/src/utils/index.js +36 -9
- package/template/app.js +12 -11
- package/template/assets/images/amex.svg +30 -0
- package/template/assets/images/diners.svg +16 -0
- package/template/assets/images/discover.svg +17 -0
- package/template/assets/images/jcb.svg +33 -0
- package/template/assets/images/unionpay.svg +25 -0
- package/template/components/HelmetTags/index.js +1 -1
- package/template/components/ScrollToTop/index.js +7 -5
- package/template/pages/BusinessProductsList/index.js +8 -4
- package/template/pages/MyOrders/index.js +4 -1
- package/template/pages/OrderDetails/index.js +11 -2
- package/template/pages/Profile/index.js +8 -2
|
@@ -19,19 +19,24 @@ import {
|
|
|
19
19
|
ReviewTime,
|
|
20
20
|
ReviewItemHeader,
|
|
21
21
|
ReviewItemContent,
|
|
22
|
-
SearchContainer
|
|
22
|
+
SearchContainer,
|
|
23
|
+
ReviewStars
|
|
23
24
|
} from './styles'
|
|
24
25
|
|
|
25
26
|
import BsFillStarFill from '@meronex/icons/bs/BsFillStarFill'
|
|
27
|
+
import { StarFill } from 'react-bootstrap-icons'
|
|
26
28
|
|
|
27
29
|
export const BusinessReviewsUI = (props) => {
|
|
28
|
-
const { stars, reviewsList, handleClickOption } = props
|
|
30
|
+
const { stars, reviewsList, handleClickOption, onChangeReview } = props
|
|
29
31
|
const [, t] = useLanguage()
|
|
30
32
|
const [theme] = useTheme()
|
|
31
33
|
const [orderingTheme] = useOrderingTheme()
|
|
32
34
|
const handleOnChange = (evt) => {
|
|
33
|
-
if (evt.target.value
|
|
34
|
-
else
|
|
35
|
+
if (evt.target.value) onChangeReview(evt.target.value)
|
|
36
|
+
else onChangeReview('')
|
|
37
|
+
}
|
|
38
|
+
const handleClickRaiting = (raiting) => {
|
|
39
|
+
if (raiting) handleClickOption(raiting)
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
const showRanking = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.ranking?.hidden
|
|
@@ -40,7 +45,7 @@ export const BusinessReviewsUI = (props) => {
|
|
|
40
45
|
const showSearch = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.search?.hidden
|
|
41
46
|
const hideElement = !(!showReviewDate && !showCustomerComments)
|
|
42
47
|
|
|
43
|
-
const reviewPoints = [
|
|
48
|
+
const reviewPoints = [1, 2, 3, 4, 5]
|
|
44
49
|
|
|
45
50
|
return (
|
|
46
51
|
<>
|
|
@@ -71,9 +76,7 @@ export const BusinessReviewsUI = (props) => {
|
|
|
71
76
|
? (
|
|
72
77
|
<SearchContainer>
|
|
73
78
|
<input
|
|
74
|
-
type='
|
|
75
|
-
min='1'
|
|
76
|
-
max='5'
|
|
79
|
+
type= 'text'
|
|
77
80
|
onChange={handleOnChange}
|
|
78
81
|
placeholder={t('SEARCH', 'Search')}
|
|
79
82
|
style={{ backgroundImage: `url(${theme?.images?.general?.searchIcon})` }}
|
|
@@ -85,7 +88,7 @@ export const BusinessReviewsUI = (props) => {
|
|
|
85
88
|
)}
|
|
86
89
|
{showRanking && (
|
|
87
90
|
<ReviewsProgressWrapper>
|
|
88
|
-
<p>{t('
|
|
91
|
+
<p>{t('CUSTOMER_REVIEWS', 'Customers reviews')}</p>
|
|
89
92
|
<ReviewsProgressContent>
|
|
90
93
|
<ReviewsProgressBar style={{ width: `${(stars / 5) * 100}%` }} />
|
|
91
94
|
{reviewPoints.map((reviewPoint, i) => {
|
|
@@ -93,12 +96,16 @@ export const BusinessReviewsUI = (props) => {
|
|
|
93
96
|
return (
|
|
94
97
|
<ReviewsMarkPoint
|
|
95
98
|
key={i}
|
|
99
|
+
onClick={() => handleClickRaiting(i + 1)}
|
|
96
100
|
style={{
|
|
97
101
|
left: theme.rtl !== isLastReviewPoint ? 'initial' : `${25 * (isLastReviewPoint ? 0 : i)}%`,
|
|
98
102
|
right: theme.rtl !== isLastReviewPoint ? `${25 * (isLastReviewPoint ? 0 : i)}%` : 'initial'
|
|
99
103
|
}}
|
|
100
104
|
>
|
|
101
|
-
|
|
105
|
+
<ReviewStars>
|
|
106
|
+
{reviewPoint}
|
|
107
|
+
<StarFill className='start' />
|
|
108
|
+
</ReviewStars>
|
|
102
109
|
</ReviewsMarkPoint>
|
|
103
110
|
)
|
|
104
111
|
})}
|
|
@@ -121,6 +121,7 @@ export const ReviewsMarkPoint = styled.span`
|
|
|
121
121
|
top: 15px;
|
|
122
122
|
font-size: 12px;
|
|
123
123
|
color: #CED4DA;
|
|
124
|
+
cursor: pointer
|
|
124
125
|
`
|
|
125
126
|
|
|
126
127
|
export const ReviewTime = styled.p`
|
|
@@ -159,3 +160,9 @@ export const SearchContainer = styled.div`
|
|
|
159
160
|
`}
|
|
160
161
|
}
|
|
161
162
|
`
|
|
163
|
+
|
|
164
|
+
export const ReviewStars = styled.div`
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
gap: 5px;
|
|
168
|
+
`
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import FiMap from '@meronex/icons/fi/FiMap'
|
|
|
4
4
|
import FiFilter from '@meronex/icons/fi/FiFilter'
|
|
5
5
|
import IosRadioButtonOff from '@meronex/icons/ios/IosRadioButtonOff'
|
|
6
6
|
import RiRadioButtonFill from '@meronex/icons/ri/RiRadioButtonFill'
|
|
7
|
+
import FaMapMarkerAlt from '@meronex/icons/fa/FaMapMarkerAlt'
|
|
7
8
|
import {
|
|
8
9
|
useOrder,
|
|
9
10
|
useSession,
|
|
@@ -26,9 +27,14 @@ import {
|
|
|
26
27
|
BusinessCityList,
|
|
27
28
|
CityItem,
|
|
28
29
|
BusinessLogo,
|
|
29
|
-
BusinessLogosContainer
|
|
30
|
+
BusinessLogosContainer,
|
|
31
|
+
BusinessBanner,
|
|
32
|
+
BusinessFeatures,
|
|
33
|
+
AddressMenu,
|
|
34
|
+
FeatureItems,
|
|
35
|
+
ItemInline
|
|
30
36
|
} from './styles'
|
|
31
|
-
|
|
37
|
+
import { useWindowSize } from '../../../../../../../hooks/useWindowSize'
|
|
32
38
|
import { Button } from '../../../../styles/Buttons'
|
|
33
39
|
import { NotFoundSource } from '../../../NotFoundSource'
|
|
34
40
|
|
|
@@ -48,6 +54,8 @@ import { BusinessPreorder } from '../../../BusinessPreorder'
|
|
|
48
54
|
import { OrderProgress } from '../../../OrderProgress'
|
|
49
55
|
|
|
50
56
|
import Skeleton from 'react-loading-skeleton'
|
|
57
|
+
import { MomentPopover } from '../../../../../../pwa/src/components/MomentPopover'
|
|
58
|
+
import { OrderTypeSelectorHeader } from '../../../../../../../components/OrderTypeSelectorHeader'
|
|
51
59
|
|
|
52
60
|
const PIXELS_TO_SCROLL = 300
|
|
53
61
|
|
|
@@ -75,10 +83,12 @@ const BusinessesListingUI = (props) => {
|
|
|
75
83
|
const [orderState, { changeCityFilter }] = useOrder()
|
|
76
84
|
const [{ auth }] = useSession()
|
|
77
85
|
const [{ configs }] = useConfig()
|
|
86
|
+
const windowSize = useWindowSize()
|
|
78
87
|
const theme = useTheme()
|
|
79
88
|
const [modals, setModals] = useState({ listOpen: false, formOpen: false, citiesOpen: false })
|
|
80
89
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
81
90
|
const [activeMap, setActiveMap] = useState(false)
|
|
91
|
+
const [openPopover, setOpenPopover] = useState({})
|
|
82
92
|
const [mapErrors, setMapErrors] = useState('')
|
|
83
93
|
const [isPreorder, setIsPreorder] = useState(false)
|
|
84
94
|
const [preorderBusiness, setPreorderBusiness] = useState(null)
|
|
@@ -112,6 +122,20 @@ const BusinessesListingUI = (props) => {
|
|
|
112
122
|
}
|
|
113
123
|
}
|
|
114
124
|
|
|
125
|
+
const handleTogglePopover = (type) => {
|
|
126
|
+
setOpenPopover({
|
|
127
|
+
...openPopover,
|
|
128
|
+
[type]: !openPopover[type]
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const handleClosePopover = (type) => {
|
|
133
|
+
setOpenPopover({
|
|
134
|
+
...openPopover,
|
|
135
|
+
[type]: false
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
|
|
115
139
|
const handleFindBusinesses = () => {
|
|
116
140
|
if (!orderState?.options?.address?.location) {
|
|
117
141
|
setAlertState({ open: true, content: [t('SELECT_AN_ADDRESS_TO_SEARCH', 'Select or add an address to search')] })
|
|
@@ -248,18 +272,45 @@ const BusinessesListingUI = (props) => {
|
|
|
248
272
|
{props.beforeComponents?.map((BeforeComponent, i) => (
|
|
249
273
|
<BeforeComponent key={i} {...props} />))}
|
|
250
274
|
<BusinessContainer>
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
275
|
+
<BusinessBanner>
|
|
276
|
+
{windowSize.width < 576 && (
|
|
277
|
+
<BusinessFeatures>
|
|
278
|
+
<AddressMenu
|
|
279
|
+
onClick={() => handleClickAddress()}
|
|
280
|
+
>
|
|
281
|
+
<FaMapMarkerAlt />
|
|
282
|
+
<span>{orderState.options?.address?.address || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?')}</span>
|
|
283
|
+
</AddressMenu>
|
|
284
|
+
<FeatureItems>
|
|
285
|
+
<ItemInline>
|
|
286
|
+
<OrderTypeSelectorHeader />
|
|
287
|
+
</ItemInline>
|
|
288
|
+
<ItemInline>
|
|
289
|
+
<MomentPopover
|
|
290
|
+
open={openPopover.moment}
|
|
291
|
+
onClick={() => handleTogglePopover('moment')}
|
|
292
|
+
onClose={() => handleClosePopover('moment')}
|
|
293
|
+
isBanner
|
|
294
|
+
/>
|
|
295
|
+
</ItemInline>
|
|
296
|
+
</FeatureItems>
|
|
297
|
+
</BusinessFeatures>
|
|
298
|
+
)}
|
|
299
|
+
<BusinessHeroImg
|
|
300
|
+
bgimage={theme.images?.general?.businessHero}
|
|
301
|
+
height={theme?.business_listing_view?.components?.business_hero?.style?.height}
|
|
261
302
|
/>
|
|
262
|
-
</
|
|
303
|
+
</BusinessBanner>
|
|
304
|
+
{!!Object.values(orderState?.carts)?.length && (
|
|
305
|
+
<OrderProgressWrapper>
|
|
306
|
+
<OrderProgress
|
|
307
|
+
franchiseId={props.franchiseId}
|
|
308
|
+
userCustomerId={userCustomer?.id}
|
|
309
|
+
asDashboard={isCustomerMode}
|
|
310
|
+
isCustomerMode={isCustomerMode}
|
|
311
|
+
/>
|
|
312
|
+
</OrderProgressWrapper>
|
|
313
|
+
)}
|
|
263
314
|
{isCustomerMode && (
|
|
264
315
|
<OrdersSection titleContent={t('PREVIOUS_ORDERS', 'Previous orders')} />
|
|
265
316
|
)}
|
|
@@ -413,11 +464,6 @@ const BusinessesListingUI = (props) => {
|
|
|
413
464
|
/>
|
|
414
465
|
))
|
|
415
466
|
)}
|
|
416
|
-
{businessesList.error && businessesList.error.length > 0 && businessesList.businesses.length === 0 && (
|
|
417
|
-
businessesList.error.map((e, i) => (
|
|
418
|
-
<ErrorMessage key={i}>{t('ERROR', 'ERROR')}: [{e?.message || e}]</ErrorMessage>
|
|
419
|
-
))
|
|
420
|
-
)}
|
|
421
467
|
</BusinessList>
|
|
422
468
|
</>
|
|
423
469
|
<Modal
|
|
@@ -513,6 +559,5 @@ export const OriginalBusinessesListing = (props) => {
|
|
|
513
559
|
UIComponent: BusinessesListingUI,
|
|
514
560
|
paginationSettings: { initialPage: 1, pageSize: 25, controlType: 'infinity' }
|
|
515
561
|
}
|
|
516
|
-
|
|
517
562
|
return <BusinessListController {...businessListingProps} />
|
|
518
563
|
}
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js
CHANGED
|
@@ -7,6 +7,104 @@ export const BusinessContainer = styled.div`
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
`
|
|
9
9
|
|
|
10
|
+
export const BusinessBanner = styled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
margin-bottom: 30px;
|
|
15
|
+
position: relative;
|
|
16
|
+
@media (max-width: 481px) {
|
|
17
|
+
margin-bottom: 0px;
|
|
18
|
+
}
|
|
19
|
+
`
|
|
20
|
+
|
|
21
|
+
export const BusinessFeatures = styled.div`
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 10%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
padding: 0 15px;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
`
|
|
28
|
+
|
|
29
|
+
export const AddressMenu = styled.div`
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
background-color: #fff;
|
|
35
|
+
color: #344050;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
border-radius: 50px;
|
|
38
|
+
padding: 13px 19px;
|
|
39
|
+
margin-bottom: 10px;
|
|
40
|
+
span {
|
|
41
|
+
width: 100%;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
svg {
|
|
47
|
+
margin-right: 5px;
|
|
48
|
+
color: #B1BCCC;
|
|
49
|
+
${props => props.theme?.rtl && css`
|
|
50
|
+
margin-left: 5px;
|
|
51
|
+
margin-right: 0;
|
|
52
|
+
`}
|
|
53
|
+
}
|
|
54
|
+
`
|
|
55
|
+
|
|
56
|
+
export const FeatureItems = styled.div`
|
|
57
|
+
width: 100%;
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
`
|
|
61
|
+
|
|
62
|
+
export const ItemInline = styled.div`
|
|
63
|
+
> span #select-input {
|
|
64
|
+
background-color: #F8F9FA !important;
|
|
65
|
+
border: none;
|
|
66
|
+
border-radius: 7.6px;
|
|
67
|
+
svg {
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
}
|
|
70
|
+
#list {
|
|
71
|
+
background-color: #fff;
|
|
72
|
+
border: none;
|
|
73
|
+
border-radius: 7.6px;
|
|
74
|
+
left: 0px;
|
|
75
|
+
right: initial;
|
|
76
|
+
${props => props.theme.rtl && css`
|
|
77
|
+
left: initial;
|
|
78
|
+
right: 0px;
|
|
79
|
+
`}
|
|
80
|
+
}
|
|
81
|
+
> div:first-child {
|
|
82
|
+
font-size: 11px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.moment-popover {
|
|
86
|
+
> div:first-child {
|
|
87
|
+
font-size: 11px;
|
|
88
|
+
padding: 4px 7px;
|
|
89
|
+
svg {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`
|
|
95
|
+
|
|
96
|
+
export const BusinessSearch = styled.div`
|
|
97
|
+
display: flex;
|
|
98
|
+
background-color: #f8f9fa;
|
|
99
|
+
align-items: center;
|
|
100
|
+
padding: 7px;
|
|
101
|
+
border-radius: 7px;
|
|
102
|
+
font-size: 11px;
|
|
103
|
+
svg {
|
|
104
|
+
font-size: 15px;
|
|
105
|
+
}
|
|
106
|
+
`
|
|
107
|
+
|
|
10
108
|
export const BusinessList = styled.div`
|
|
11
109
|
display: flex;
|
|
12
110
|
flex-wrap: wrap;
|
|
@@ -87,7 +185,7 @@ export const BusinessesTitle = styled.h1`
|
|
|
87
185
|
export const BusinessHeroImgStyled = styled.div`
|
|
88
186
|
margin-bottom: 30px;
|
|
89
187
|
width: 100%;
|
|
90
|
-
height:
|
|
188
|
+
height: calc(65vh - 98px);
|
|
91
189
|
${({ bgimage }) => bgimage && css`
|
|
92
190
|
background-repeat: no-repeat, repeat;
|
|
93
191
|
background-size: cover;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useApi } from 'ordering-components-external'
|
|
3
3
|
|
|
4
|
+
import { Container } from './styles'
|
|
5
|
+
|
|
4
6
|
export const Footer = () => {
|
|
5
7
|
const [footerState, setfooterState] = useState({ body: null, loading: false, error: null })
|
|
6
8
|
const [ordering] = useApi()
|
|
@@ -35,15 +37,17 @@ export const Footer = () => {
|
|
|
35
37
|
}, [])
|
|
36
38
|
|
|
37
39
|
return (
|
|
38
|
-
|
|
40
|
+
<Container>
|
|
39
41
|
{
|
|
40
42
|
footerState.body && (
|
|
41
|
-
<div
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
<div
|
|
44
|
+
style={{ wordBreak: 'break-all', padding: '0px 10px' }}
|
|
45
|
+
dangerouslySetInnerHTML={{
|
|
46
|
+
__html: footerState.body
|
|
47
|
+
}}
|
|
44
48
|
/>
|
|
45
49
|
)
|
|
46
50
|
}
|
|
47
|
-
|
|
51
|
+
</Container>
|
|
48
52
|
)
|
|
49
53
|
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components'
|
|
2
2
|
|
|
3
3
|
export const Container = styled.div`
|
|
4
|
-
|
|
5
|
-
width: 100%;
|
|
6
|
-
border-top: 1px solid #d9d9d9;
|
|
7
|
-
padding: 15px;
|
|
8
|
-
background: #F8F9FA;
|
|
4
|
+
display: none;
|
|
9
5
|
|
|
10
6
|
@media (min-width: 768px) {
|
|
11
|
-
|
|
7
|
+
display: block;
|
|
12
8
|
}
|
|
13
9
|
`
|
|
14
10
|
|
|
@@ -212,7 +212,7 @@ export const Header = (props) => {
|
|
|
212
212
|
<BeforeComponent key={i} {...props} />))}
|
|
213
213
|
<HeaderContainer>
|
|
214
214
|
<InnerHeader>
|
|
215
|
-
<LeftHeader>
|
|
215
|
+
<LeftHeader id='left-side'>
|
|
216
216
|
<SidebarMenu
|
|
217
217
|
auth={auth}
|
|
218
218
|
isHideSignup={isHideSignup}
|
|
@@ -227,7 +227,7 @@ export const Header = (props) => {
|
|
|
227
227
|
</LogoHeader>
|
|
228
228
|
</LeftHeader>
|
|
229
229
|
{isShowOrderOptions && !props.isCustomLayout && (
|
|
230
|
-
<Menu className='left-header' isCustomerMode={isCustomerMode}>
|
|
230
|
+
<Menu id='center-side' className='left-header' isCustomerMode={isCustomerMode}>
|
|
231
231
|
{windowSize.width > 820 && isFarAway && (
|
|
232
232
|
<FarAwayMessage>
|
|
233
233
|
<TiWarningOutline />
|
|
@@ -240,7 +240,8 @@ export const Header = (props) => {
|
|
|
240
240
|
isCustomerMode={isCustomerMode}
|
|
241
241
|
onClick={(e) => handleClickUserCustomer(e)}
|
|
242
242
|
>
|
|
243
|
-
<GeoAlt />
|
|
243
|
+
<GeoAlt />
|
|
244
|
+
<span>{orderState.options?.address?.address || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}</span>
|
|
244
245
|
</AddressMenu>
|
|
245
246
|
<Divider />
|
|
246
247
|
</>
|
|
@@ -268,7 +269,12 @@ export const Header = (props) => {
|
|
|
268
269
|
<AddressMenu
|
|
269
270
|
onClick={() => openModal('address')}
|
|
270
271
|
>
|
|
271
|
-
<GeoAlt />
|
|
272
|
+
<GeoAlt />
|
|
273
|
+
<span>
|
|
274
|
+
<p>
|
|
275
|
+
{orderState.options?.address?.address || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
|
|
276
|
+
</p>
|
|
277
|
+
</span>
|
|
272
278
|
</AddressMenu>
|
|
273
279
|
)}
|
|
274
280
|
{!isCustomerMode && (isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
|
|
@@ -301,7 +307,7 @@ export const Header = (props) => {
|
|
|
301
307
|
</Menu>
|
|
302
308
|
)}
|
|
303
309
|
{onlineStatus && (
|
|
304
|
-
<RightHeader>
|
|
310
|
+
<RightHeader id='right-side'>
|
|
305
311
|
<Menu isCustomerMode={isCustomerMode}>
|
|
306
312
|
{
|
|
307
313
|
!auth && windowSize.width > 920 && (
|
|
@@ -374,7 +380,7 @@ export const Header = (props) => {
|
|
|
374
380
|
<AddressMenu
|
|
375
381
|
onClick={() => openModal('address')}
|
|
376
382
|
>
|
|
377
|
-
<GeoAlt /> {orderState.options?.address?.address
|
|
383
|
+
<GeoAlt /> {orderState.options?.address?.address || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
|
|
378
384
|
</AddressMenu>
|
|
379
385
|
{!isCustomerMode && (isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
|
|
380
386
|
<HeaderOption
|
|
@@ -396,7 +402,7 @@ export const Header = (props) => {
|
|
|
396
402
|
)}
|
|
397
403
|
<HeaderOption
|
|
398
404
|
variant='address'
|
|
399
|
-
addressState={orderState?.options?.address?.address
|
|
405
|
+
addressState={orderState?.options?.address?.address}
|
|
400
406
|
onClick={(variant) => openModal(variant)}
|
|
401
407
|
/>
|
|
402
408
|
{!isCustomerMode && (isPreOrderSetting || configState?.configs?.preorder_status_enabled?.value === undefined) && (
|
|
@@ -413,9 +419,10 @@ export const Header = (props) => {
|
|
|
413
419
|
)}
|
|
414
420
|
{modalIsOpen && (
|
|
415
421
|
<Modal
|
|
422
|
+
title={(!auth && modalSelected === 'address') && t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
|
|
416
423
|
open={modalIsOpen}
|
|
417
424
|
onClose={() => setModalIsOpen(false)}
|
|
418
|
-
width={modalSelected === 'address' ? '70%' : '700px'}
|
|
425
|
+
width={modalSelected === 'address' ? orderState?.options?.user_id ? '70%' : '50%' : '700px'}
|
|
419
426
|
>
|
|
420
427
|
{modalSelected === 'cart' && (
|
|
421
428
|
<CartContent
|
|
@@ -504,6 +511,7 @@ export const Header = (props) => {
|
|
|
504
511
|
onClose={() => closeAuthModal()}
|
|
505
512
|
width='50%'
|
|
506
513
|
authModal
|
|
514
|
+
closeOnBackdrop={false}
|
|
507
515
|
>
|
|
508
516
|
{modalPageToShow === 'login' && (
|
|
509
517
|
<LoginForm
|
|
@@ -12,9 +12,38 @@ export const InnerHeader = styled.div`
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
color: #FFF;
|
|
14
14
|
justify-content: space-between;
|
|
15
|
-
|
|
16
|
-
margin: 15px auto;
|
|
15
|
+
margin: 15px 0;
|
|
17
16
|
align-items: center;
|
|
17
|
+
|
|
18
|
+
#left-side {
|
|
19
|
+
width: 20%;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
}
|
|
22
|
+
#right-side {
|
|
23
|
+
width: 20%;
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
}
|
|
26
|
+
#center-side {
|
|
27
|
+
width: calc(60% - 30px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: 1024px) {
|
|
31
|
+
#center-side {
|
|
32
|
+
width: calc(60% - 140px);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (min-width: 1200px) {
|
|
37
|
+
#center-side {
|
|
38
|
+
width: calc(60% - 200px);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (min-width: 1500px) {
|
|
43
|
+
#center-side {
|
|
44
|
+
width: calc(60% - 260px);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
18
47
|
`
|
|
19
48
|
|
|
20
49
|
export const LogoHeader = styled.div`
|
|
@@ -75,7 +104,7 @@ export const Menu = styled.div`
|
|
|
75
104
|
|
|
76
105
|
#select-input {
|
|
77
106
|
border-radius: 7.6px;
|
|
78
|
-
|
|
107
|
+
|
|
79
108
|
#list {
|
|
80
109
|
border-radius: 7.6px;
|
|
81
110
|
}
|
|
@@ -85,7 +114,7 @@ export const Menu = styled.div`
|
|
|
85
114
|
height: 40px;
|
|
86
115
|
border-color: #CCC;
|
|
87
116
|
background-color: #CCC !important;
|
|
88
|
-
|
|
117
|
+
|
|
89
118
|
svg {
|
|
90
119
|
font-size: 16px;
|
|
91
120
|
}
|
|
@@ -126,7 +155,7 @@ export const Menu = styled.div`
|
|
|
126
155
|
padding: 0 20px;
|
|
127
156
|
margin: 0 70px;
|
|
128
157
|
}
|
|
129
|
-
|
|
158
|
+
|
|
130
159
|
@media (min-width: 1200px) {
|
|
131
160
|
padding: 0 30px;
|
|
132
161
|
margin: 0 100px;
|
|
@@ -275,10 +304,21 @@ export const AddressMenu = styled.div`
|
|
|
275
304
|
align-items: center;
|
|
276
305
|
position: relative;
|
|
277
306
|
|
|
307
|
+
span {
|
|
308
|
+
width: 85%;
|
|
309
|
+
p {
|
|
310
|
+
margin: 0;
|
|
311
|
+
padding: 0;
|
|
312
|
+
text-overflow: ellipsis;
|
|
313
|
+
white-space: nowrap;
|
|
314
|
+
overflow: hidden;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
278
318
|
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
279
|
-
|
|
319
|
+
flex: 0.8;
|
|
280
320
|
` : css`
|
|
281
|
-
width:
|
|
321
|
+
width: 50%;
|
|
282
322
|
`}
|
|
283
323
|
|
|
284
324
|
svg {
|
|
@@ -297,7 +337,7 @@ export const AddressMenu = styled.div`
|
|
|
297
337
|
}
|
|
298
338
|
@media (min-width: 820px) {
|
|
299
339
|
${({ isCustomerMode }) => !isCustomerMode && css`
|
|
300
|
-
width:
|
|
340
|
+
width: 50%;
|
|
301
341
|
`}
|
|
302
342
|
}
|
|
303
343
|
`
|
|
@@ -339,6 +379,7 @@ export const FarAwayMessage = styled.div`
|
|
|
339
379
|
position: absolute;
|
|
340
380
|
display: flex;
|
|
341
381
|
align-items: center;
|
|
382
|
+
z-index: 2000;
|
|
342
383
|
top: 100%;
|
|
343
384
|
background: ${props => props.theme.colors.warning100};
|
|
344
385
|
border: 1px solid ${props => props.theme.colors.warning500};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useConfig } from 'ordering-components-external'
|
|
3
2
|
import { OriginalHomeHero } from './layouts/OriginalHomeHero'
|
|
4
3
|
import { RedHomeHero } from './layouts/RedHomeHero'
|
|
5
4
|
import { StarbucksHomeHero } from './layouts/StarbucksHomeHero'
|
|
6
5
|
|
|
7
6
|
export const HomeHero = (props) => {
|
|
8
|
-
const [{ configs }] = useConfig()
|
|
9
|
-
|
|
10
|
-
// *****************************
|
|
11
|
-
// HomeLayout = configs
|
|
12
7
|
const HomeLayoutConfig = {
|
|
13
8
|
homepage_settings: {
|
|
14
9
|
layout: 'original', // 'original', 'starbucks', 'red'
|
|
@@ -17,7 +12,6 @@ export const HomeHero = (props) => {
|
|
|
17
12
|
}
|
|
18
13
|
const layout = HomeLayoutConfig?.homepage_settings?.layout !== undefined
|
|
19
14
|
? HomeLayoutConfig?.homepage_settings?.layout : 'original'
|
|
20
|
-
// *****************************
|
|
21
15
|
|
|
22
16
|
const homeLayoutProps = {
|
|
23
17
|
...props,
|