ordering-ui-external 1.7.2 → 1.8.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.f9c3deec77a8e21645ed.js → 0.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/2.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
- package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.a7de4e953ec3c5879d9b.js} +2 -2
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/ordering-ui.a7de4e953ec3c5879d9b.js +2 -0
- package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessInformation/index.js +4 -8
- package/_modules/components/OrdersOption/styles.js +4 -2
- package/_modules/components/Pagination/index.js +100 -0
- package/_modules/components/Pagination/styles.js +56 -0
- package/_modules/components/SmartAppBanner/index.js +2 -1
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
- package/_modules/components/VerticalOrdersLayout/index.js +115 -41
- package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
- package/_modules/index.js +7 -0
- package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
- package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
- package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
- package/_modules/themes/five/src/components/CardForm/index.js +17 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
- package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
- package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
- package/_modules/themes/five/src/components/Footer/index.js +16 -6
- package/_modules/themes/five/src/components/Footer/styles.js +11 -9
- package/_modules/themes/five/src/components/Header/index.js +14 -9
- package/_modules/themes/five/src/components/Header/styles.js +64 -44
- package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
- package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
- package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
- package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
- package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
- package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
- package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
- package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
- package/_modules/themes/five/src/components/Pagination/index.js +99 -0
- package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
- package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
- package/_modules/themes/five/src/components/Promotions/index.js +7 -2
- package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
- package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
- package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
- package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +36 -32
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
- package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
- package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
- package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
- package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
- package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
- package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessInformation/index.js +3 -8
- package/src/components/OrdersOption/styles.js +5 -5
- package/src/components/Pagination/index.js +107 -0
- package/src/components/Pagination/styles.js +106 -0
- package/src/components/SmartAppBanner/index.js +1 -0
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
- package/src/components/VerticalOrdersLayout/index.js +86 -48
- package/src/components/VerticalOrdersLayout/styles.js +66 -22
- package/src/index.js +2 -0
- package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
- package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
- package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
- package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
- package/src/themes/five/src/components/CardForm/index.js +49 -8
- package/src/themes/five/src/components/CardForm/styles.js +20 -2
- package/src/themes/five/src/components/CartPopover/index.js +2 -1
- package/src/themes/five/src/components/CartPopover/styles.js +3 -3
- package/src/themes/five/src/components/Footer/index.js +15 -6
- package/src/themes/five/src/components/Footer/styles.js +15 -14
- package/src/themes/five/src/components/Header/index.js +6 -4
- package/src/themes/five/src/components/Header/styles.js +14 -11
- package/src/themes/five/src/components/HeaderOption/index.js +13 -10
- package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
- package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/src/themes/five/src/components/LoginForm/index.js +2 -1
- package/src/themes/five/src/components/MyOrders/index.js +20 -62
- package/src/themes/five/src/components/MyOrders/styles.js +1 -2
- package/src/themes/five/src/components/OrderDetails/index.js +9 -0
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
- package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
- package/src/themes/five/src/components/OrdersOption/index.js +10 -16
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
- package/src/themes/five/src/components/PageBanner/index.js +58 -0
- package/src/themes/five/src/components/PageBanner/styles.js +58 -0
- package/src/themes/five/src/components/Pagination/index.js +106 -0
- package/src/themes/five/src/components/Pagination/styles.js +106 -0
- package/src/themes/five/src/components/ProductForm/index.js +108 -84
- package/src/themes/five/src/components/ProductForm/styles.js +94 -12
- package/src/themes/five/src/components/Promotions/index.js +22 -16
- package/src/themes/five/src/components/Promotions/styles.js +10 -4
- package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
- package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
- package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
- package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -5
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
- package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/src/themes/five/src/components/UserPopover/index.js +2 -0
- package/src/themes/five/src/components/UserPopover/styles.js +2 -2
- package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
- package/src/themes/six/src/components/BusinessController/index.js +163 -62
- package/src/themes/six/src/components/BusinessController/styles.js +53 -14
- package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
- package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/src/themes/six/src/components/SearchBar/index.js +27 -8
- package/src/themes/six/src/components/SearchBar/styles.js +33 -2
- package/template/app.js +364 -364
- package/template/assets/images/chew_logo.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
- package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
OfferData,
|
|
15
15
|
Code,
|
|
16
16
|
BusinessInfo,
|
|
17
|
-
OfferView
|
|
17
|
+
OfferView,
|
|
18
|
+
OfferInfoWrapper
|
|
18
19
|
} from './styles'
|
|
19
20
|
import { SearchBar } from '../SearchBar'
|
|
20
21
|
import { Button } from '../../styles/Buttons'
|
|
@@ -22,6 +23,7 @@ import { Modal } from '../Modal'
|
|
|
22
23
|
import Skeleton from 'react-loading-skeleton'
|
|
23
24
|
import { NotFoundSource } from '../NotFoundSource'
|
|
24
25
|
import { checkSiteUrl } from '../../../../../utils'
|
|
26
|
+
import { useTheme } from 'styled-components'
|
|
25
27
|
|
|
26
28
|
const PromotionsUI = (props) => {
|
|
27
29
|
const {
|
|
@@ -32,6 +34,7 @@ const PromotionsUI = (props) => {
|
|
|
32
34
|
setOfferSelected
|
|
33
35
|
} = props
|
|
34
36
|
const [, t] = useLanguage()
|
|
37
|
+
const theme = useTheme()
|
|
35
38
|
const [{ parseDate, parsePrice }] = useUtils()
|
|
36
39
|
const [events] = useEvent()
|
|
37
40
|
const [openModal, setOpenModal] = useState(false)
|
|
@@ -93,21 +96,24 @@ const PromotionsUI = (props) => {
|
|
|
93
96
|
)}
|
|
94
97
|
{!offersState?.loading && offersState.offers?.length > 0 && filteredOffers?.map(offer => (
|
|
95
98
|
<SingleOfferContainer key={offer.id}>
|
|
96
|
-
<
|
|
97
|
-
<
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
<OfferInfoWrapper>
|
|
100
|
+
<BusinessLogo bgimage={offer?.image || theme.images?.dummies?.businessLogo} />
|
|
101
|
+
<OfferInformation>
|
|
102
|
+
<h2>{offer?.name}</h2>
|
|
103
|
+
<Description>{offer?.description}</Description>
|
|
104
|
+
<ExpiresAt>
|
|
105
|
+
{t('EXPIRES', 'Expires')} {parseDate(offer?.end, { outputFormat: 'MMM DD, YYYY' })}
|
|
106
|
+
</ExpiresAt>
|
|
107
|
+
<AvailableBusinesses>
|
|
108
|
+
<p>{t('APPLY_FOR', 'Apply for')}:</p>
|
|
109
|
+
<p>
|
|
110
|
+
{offer.businesses.map((business, i) => (
|
|
111
|
+
<React.Fragment key={business?.id}>{' '}{business?.name}{i + 1 < offer.businesses?.length ? ',' : ''}</React.Fragment>
|
|
112
|
+
))}
|
|
113
|
+
</p>
|
|
114
|
+
</AvailableBusinesses>
|
|
115
|
+
</OfferInformation>
|
|
116
|
+
</OfferInfoWrapper>
|
|
111
117
|
<Button
|
|
112
118
|
color='primary'
|
|
113
119
|
onClick={() => handleClickOffer(offer)}
|
|
@@ -63,11 +63,18 @@ export const ExpiresAt = styled.p`
|
|
|
63
63
|
color: #414954;
|
|
64
64
|
`
|
|
65
65
|
|
|
66
|
+
export const OfferInfoWrapper = styled.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
gap: 10px;
|
|
69
|
+
max-width: 70%;
|
|
70
|
+
align-items: center;
|
|
71
|
+
`
|
|
72
|
+
|
|
66
73
|
export const OfferInformation = styled.div`
|
|
67
74
|
display: flex;
|
|
68
75
|
flex-direction: column;
|
|
69
76
|
justify-content: space-between;
|
|
70
|
-
width:
|
|
77
|
+
width: 50%;
|
|
71
78
|
${({ isSkeleton }) => isSkeleton && css`
|
|
72
79
|
width: 100%;
|
|
73
80
|
`}
|
|
@@ -76,12 +83,12 @@ export const OfferInformation = styled.div`
|
|
|
76
83
|
text-overflow: ellipsis;
|
|
77
84
|
display: -webkit-box;
|
|
78
85
|
-webkit-line-clamp: 2;
|
|
79
|
-
line-clamp: 2;
|
|
86
|
+
line-clamp: 2;
|
|
80
87
|
-webkit-box-orient: vertical;
|
|
81
88
|
font-size: 14px;
|
|
82
89
|
}
|
|
83
90
|
@media (min-width: 720px){
|
|
84
|
-
width:
|
|
91
|
+
width: 70%;
|
|
85
92
|
h2{
|
|
86
93
|
font-size: 16px;
|
|
87
94
|
}
|
|
@@ -105,7 +112,6 @@ export const SearchBarContainer = styled.div`
|
|
|
105
112
|
`
|
|
106
113
|
|
|
107
114
|
const BusinessLogoStyled = styled.div`
|
|
108
|
-
display: flex;
|
|
109
115
|
width: 65px;
|
|
110
116
|
height: 65px;
|
|
111
117
|
box-sizing: border-box;
|
|
@@ -2,8 +2,8 @@ import React, { useState, useEffect } from 'react'
|
|
|
2
2
|
import { useTheme } from 'styled-components'
|
|
3
3
|
import { useLanguage, useConfig, useUtils, useOrderingTheme } from 'ordering-components-external'
|
|
4
4
|
import CgSearch from '@meronex/icons/cg/CgSearch'
|
|
5
|
+
import BsCaretLeftFill from '@meronex/icons/bs/BsCaretLeftFill'
|
|
5
6
|
import { Cart3 } from 'react-bootstrap-icons'
|
|
6
|
-
|
|
7
7
|
import { BusinessBasicInformation } from '../BusinessBasicInformation'
|
|
8
8
|
import { BusinessBasicInformation as BusinessBasicInformationRed } from '../../../../seven'
|
|
9
9
|
import { BusinessBasicInformation as BusinessBasicInformationStarbucks } from '../../../../six'
|
|
@@ -32,7 +32,9 @@ import {
|
|
|
32
32
|
WrapperSearch,
|
|
33
33
|
ProfessionalFilterWrapper,
|
|
34
34
|
WrapperSearchAbsolute,
|
|
35
|
-
NearBusiness
|
|
35
|
+
NearBusiness,
|
|
36
|
+
PageBannerWrapper,
|
|
37
|
+
CategorySelectedContainer
|
|
36
38
|
} from './styles'
|
|
37
39
|
|
|
38
40
|
import { SearchProducts as SearchProductsOriginal } from '../../../../../themes/five/src/components/SearchProducts'
|
|
@@ -42,6 +44,8 @@ import { ProfessionalFilter } from '../ProfessionalFilter'
|
|
|
42
44
|
import { SearchIconWrapper } from '../BusinessBasicInformation/styles'
|
|
43
45
|
import { OrderItAgain } from '../OrderItAgain'
|
|
44
46
|
import { ProfessionalBusinessFilter } from '../ProfessionalBusinessFilter'
|
|
47
|
+
import { PageBanner } from '../PageBanner'
|
|
48
|
+
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
45
49
|
|
|
46
50
|
const layoutOne = 'groceries'
|
|
47
51
|
|
|
@@ -90,9 +94,10 @@ export const RenderProductsLayout = (props) => {
|
|
|
90
94
|
const [{ configs }] = useConfig()
|
|
91
95
|
const [{ parsePrice }] = useUtils()
|
|
92
96
|
const [orderingTheme] = useOrderingTheme()
|
|
97
|
+
const windowSize = useWindowSize()
|
|
93
98
|
const [isCartModal, setisCartModal] = useState(false)
|
|
94
99
|
const [openSearchProducts, setOpenSearchProducts] = useState(false)
|
|
95
|
-
|
|
100
|
+
const [categoryClicked, setCategoryClicked] = useState(false)
|
|
96
101
|
const isUseParentCategory = (configs?.use_parent_category?.value === 'true' || configs?.use_parent_category?.value === '1') && !useKioskApp
|
|
97
102
|
const BusinessBasicInformationComponent =
|
|
98
103
|
orderingTheme?.theme?.business_view?.components?.header?.components?.layout?.type === 'red'
|
|
@@ -104,9 +109,9 @@ export const RenderProductsLayout = (props) => {
|
|
|
104
109
|
: BusinessBasicInformation
|
|
105
110
|
|
|
106
111
|
const SearchProductsComponent =
|
|
107
|
-
|
|
112
|
+
theme?.business_view?.components?.product_search?.components?.layout?.type === 'old'
|
|
108
113
|
? SearchProductsOld
|
|
109
|
-
:
|
|
114
|
+
: theme?.business_view?.components?.product_search?.components?.layout?.type === 'starbucks'
|
|
110
115
|
? SearchProductsStarbucks
|
|
111
116
|
: null
|
|
112
117
|
|
|
@@ -126,6 +131,9 @@ export const RenderProductsLayout = (props) => {
|
|
|
126
131
|
: BusinessProductsList
|
|
127
132
|
|
|
128
133
|
const handleSaveProduct = () => {
|
|
134
|
+
if (windowSize.width < 993) {
|
|
135
|
+
return
|
|
136
|
+
}
|
|
129
137
|
const productContainer = document.getElementsByClassName('bp-list')[0]
|
|
130
138
|
scrollTo(productContainer, 500, 1250)
|
|
131
139
|
}
|
|
@@ -163,8 +171,14 @@ export const RenderProductsLayout = (props) => {
|
|
|
163
171
|
categoryState={categoryState}
|
|
164
172
|
errorQuantityProducts={errorQuantityProducts}
|
|
165
173
|
sortByValue={sortByValue}
|
|
174
|
+
categoryClicked={categoryClicked}
|
|
166
175
|
/>
|
|
167
176
|
)}
|
|
177
|
+
|
|
178
|
+
<PageBannerWrapper>
|
|
179
|
+
<PageBanner position='web_business_page' />
|
|
180
|
+
</PageBannerWrapper>
|
|
181
|
+
|
|
168
182
|
{!errorQuantityProducts && SearchProductsComponent && !useKioskApp && (
|
|
169
183
|
<>
|
|
170
184
|
<WrapperSearch>
|
|
@@ -340,61 +354,72 @@ export const RenderProductsLayout = (props) => {
|
|
|
340
354
|
<BusinessContent>
|
|
341
355
|
<BusinessCategoriesContainer offSticky>
|
|
342
356
|
{!(business?.categories?.length === 0 && !categoryId) && (
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
<>
|
|
358
|
+
{(!categoryClicked || windowSize.width >= 993) ? (
|
|
359
|
+
<BusinessLayoutCategories
|
|
360
|
+
component='categories'
|
|
361
|
+
categories={[
|
|
362
|
+
{ id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') },
|
|
363
|
+
{ id: 'featured', name: t('FEATURED', theme?.defaultLanguages?.FEATURED || 'Featured') },
|
|
364
|
+
...business?.categories.sort((a, b) => a.rank - b.rank)
|
|
365
|
+
]}
|
|
366
|
+
categorySelected={categorySelected}
|
|
367
|
+
onClickCategory={onClickCategory}
|
|
368
|
+
featured={featuredProducts}
|
|
369
|
+
openBusinessInformation={openBusinessInformation}
|
|
370
|
+
openCategories={openCategories}
|
|
371
|
+
business={business}
|
|
372
|
+
currentCart={currentCart}
|
|
373
|
+
useKioskApp={useKioskApp}
|
|
374
|
+
setCategoryClicked={setCategoryClicked}
|
|
375
|
+
/>
|
|
376
|
+
) : (
|
|
377
|
+
<CategorySelectedContainer onClick={() => setCategoryClicked(false)}>
|
|
378
|
+
<BsCaretLeftFill /> {categorySelected?.name}
|
|
379
|
+
</CategorySelectedContainer>
|
|
380
|
+
)}
|
|
381
|
+
</>
|
|
359
382
|
)}
|
|
360
383
|
</BusinessCategoriesContainer>
|
|
361
|
-
|
|
362
|
-
<
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
384
|
+
{(categoryClicked || windowSize.width >= 993) && (
|
|
385
|
+
<BusinessCategoryProductWrapper>
|
|
386
|
+
<WrapContent isGroceries id='groceries'>
|
|
387
|
+
{!business?.loading && business?.previously_products?.length > 0 && (
|
|
388
|
+
<OrderItAgain
|
|
389
|
+
onProductClick={onProductClick}
|
|
390
|
+
productList={business?.previously_products}
|
|
391
|
+
businessId={business?.id}
|
|
392
|
+
isGroceries
|
|
393
|
+
/>
|
|
394
|
+
)}
|
|
395
|
+
<BusinessLayoutProductsList
|
|
396
|
+
categories={[
|
|
397
|
+
{ id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') },
|
|
398
|
+
{ id: 'featured', name: t('FEATURED', theme?.defaultLanguages?.FEATURED || 'Featured') },
|
|
399
|
+
...business?.categories.sort((a, b) => a.rank - b.rank)
|
|
400
|
+
]}
|
|
401
|
+
category={categorySelected}
|
|
402
|
+
onClickCategory={onClickCategory}
|
|
403
|
+
categoriesState={props.categoriesState}
|
|
404
|
+
categoryState={categoryState}
|
|
367
405
|
businessId={business?.id}
|
|
368
|
-
|
|
406
|
+
errors={errors}
|
|
407
|
+
onProductClick={onProductClick}
|
|
408
|
+
handleSearchRedirect={handleSearchRedirect}
|
|
409
|
+
featured={featuredProducts}
|
|
410
|
+
searchValue={searchValue}
|
|
411
|
+
isCartOnProductsList={isCartOnProductsList && currentCart?.products?.length > 0}
|
|
412
|
+
handleClearSearch={handleChangeSearch}
|
|
413
|
+
errorQuantityProducts={errorQuantityProducts}
|
|
414
|
+
business={business}
|
|
415
|
+
currentCart={currentCart}
|
|
416
|
+
handleUpdateProducts={handleUpdateProducts}
|
|
417
|
+
professionalSelected={professionalSelected}
|
|
418
|
+
handleChangeProfessionalSelected={handleChangeProfessionalSelected}
|
|
369
419
|
/>
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
{ id: null, name: t('ALL', theme?.defaultLanguages?.ALL || 'All') },
|
|
374
|
-
{ id: 'featured', name: t('FEATURED', theme?.defaultLanguages?.FEATURED || 'Featured') },
|
|
375
|
-
...business?.categories.sort((a, b) => a.rank - b.rank)
|
|
376
|
-
]}
|
|
377
|
-
category={categorySelected}
|
|
378
|
-
onClickCategory={onClickCategory}
|
|
379
|
-
categoriesState={props.categoriesState}
|
|
380
|
-
categoryState={categoryState}
|
|
381
|
-
businessId={business?.id}
|
|
382
|
-
errors={errors}
|
|
383
|
-
onProductClick={onProductClick}
|
|
384
|
-
handleSearchRedirect={handleSearchRedirect}
|
|
385
|
-
featured={featuredProducts}
|
|
386
|
-
searchValue={searchValue}
|
|
387
|
-
isCartOnProductsList={isCartOnProductsList && currentCart?.products?.length > 0}
|
|
388
|
-
handleClearSearch={handleChangeSearch}
|
|
389
|
-
errorQuantityProducts={errorQuantityProducts}
|
|
390
|
-
business={business}
|
|
391
|
-
currentCart={currentCart}
|
|
392
|
-
handleUpdateProducts={handleUpdateProducts}
|
|
393
|
-
professionalSelected={professionalSelected}
|
|
394
|
-
handleChangeProfessionalSelected={handleChangeProfessionalSelected}
|
|
395
|
-
/>
|
|
396
|
-
</WrapContent>
|
|
397
|
-
</BusinessCategoryProductWrapper>
|
|
420
|
+
</WrapContent>
|
|
421
|
+
</BusinessCategoryProductWrapper>
|
|
422
|
+
)}
|
|
398
423
|
</BusinessContent>
|
|
399
424
|
</>
|
|
400
425
|
|
|
@@ -424,16 +449,19 @@ export const RenderProductsLayout = (props) => {
|
|
|
424
449
|
</div>
|
|
425
450
|
</BusinessCategoryProductWrapper>
|
|
426
451
|
</BusinessContent>
|
|
427
|
-
|
|
428
|
-
<
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
452
|
+
{(categoryClicked || windowSize.width >= 993) && (
|
|
453
|
+
<WrapContent>
|
|
454
|
+
<BusinessProductsList
|
|
455
|
+
categories={[]}
|
|
456
|
+
useKioskApp={useKioskApp}
|
|
457
|
+
category={categorySelected}
|
|
458
|
+
categoryState={categoryState}
|
|
459
|
+
isBusinessLoading={isLoading}
|
|
460
|
+
handleUpdateProducts={handleUpdateProducts}
|
|
461
|
+
errorQuantityProducts={errorQuantityProducts}
|
|
462
|
+
/>
|
|
463
|
+
</WrapContent>
|
|
464
|
+
)}
|
|
437
465
|
</>
|
|
438
466
|
)}
|
|
439
467
|
<Modal
|
|
@@ -13,15 +13,12 @@ export const WrappLayout = styled.div``
|
|
|
13
13
|
export const WrapContent = styled.div`
|
|
14
14
|
padding: 5px;
|
|
15
15
|
background: ${props => props.theme.colors.backgroundPage};
|
|
16
|
-
|
|
17
16
|
${({ isGroceries }) => !isGroceries && css`
|
|
18
17
|
margin-top: 70px;
|
|
19
18
|
`}
|
|
20
|
-
|
|
21
19
|
@media (min-width: 576px) {
|
|
22
20
|
padding: 0px;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
&#businessProductList {
|
|
26
23
|
> div {
|
|
27
24
|
margin-top: 30px;
|
|
@@ -33,7 +30,6 @@ export const BusinessContent = styled.div`
|
|
|
33
30
|
margin-top: ${props => props.isCustomLayout ? 0 : 30}px;
|
|
34
31
|
display: flex;
|
|
35
32
|
flex-direction: column;
|
|
36
|
-
|
|
37
33
|
@media (min-width: 993px) {
|
|
38
34
|
flex-direction: row;
|
|
39
35
|
}
|
|
@@ -41,18 +37,15 @@ export const BusinessContent = styled.div`
|
|
|
41
37
|
|
|
42
38
|
export const BusinessCategoryProductWrapper = styled.div`
|
|
43
39
|
width: 100%;
|
|
44
|
-
|
|
45
40
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
46
41
|
.category-lists::-webkit-scrollbar {
|
|
47
42
|
display: none;
|
|
48
43
|
}
|
|
49
|
-
|
|
50
44
|
/* Hide scrollbar for IE, Edge and Firefox */
|
|
51
45
|
.category-lists {
|
|
52
46
|
-ms-overflow-style: none;
|
|
53
47
|
scrollbar-width: none;
|
|
54
48
|
}
|
|
55
|
-
|
|
56
49
|
@media (min-width: 1000px) {
|
|
57
50
|
width: ${({ showCartOnProductList }) => showCartOnProductList ? '70%' : '85%'};
|
|
58
51
|
}
|
|
@@ -93,26 +86,21 @@ export const BusinessCartContent = styled.div`
|
|
|
93
86
|
margin-bottom: 30px;
|
|
94
87
|
max-height: ${({ maxHeight }) => `${maxHeight}px`};
|
|
95
88
|
overflow: auto;
|
|
96
|
-
|
|
97
89
|
.product.accordion {
|
|
98
90
|
margin: 0;
|
|
99
91
|
}
|
|
100
|
-
|
|
101
92
|
/* .accordion.active {
|
|
102
93
|
padding-bottom: 10px;
|
|
103
94
|
} */
|
|
104
|
-
|
|
105
95
|
${({ isModal }) => !isModal && css`
|
|
106
96
|
border: 1px solid #E9ECEF;
|
|
107
97
|
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
|
|
108
98
|
border-radius: 7.6px;
|
|
109
99
|
`}
|
|
110
|
-
|
|
111
100
|
@media (min-width: 1200px) {
|
|
112
101
|
position: sticky;
|
|
113
102
|
top: 0;
|
|
114
103
|
}
|
|
115
|
-
|
|
116
104
|
@media (min-width: 768px) {
|
|
117
105
|
padding: 35px 30px;
|
|
118
106
|
}
|
|
@@ -123,13 +111,11 @@ export const EmptyCart = styled.div`
|
|
|
123
111
|
display: flex;
|
|
124
112
|
flex-direction: column;
|
|
125
113
|
align-items: center;
|
|
126
|
-
|
|
127
114
|
svg {
|
|
128
115
|
font-size: 45px;
|
|
129
116
|
color: #B1BCCC;
|
|
130
117
|
margin-top: 10px;
|
|
131
118
|
}
|
|
132
|
-
|
|
133
119
|
p {
|
|
134
120
|
font-size: 14px;
|
|
135
121
|
color: #B1BCCC;
|
|
@@ -143,13 +129,11 @@ export const EmptyBtnWrapper = styled.div`
|
|
|
143
129
|
align-items: center;
|
|
144
130
|
justify-content: space-between;
|
|
145
131
|
margin-top: 20px;
|
|
146
|
-
|
|
147
132
|
span {
|
|
148
133
|
font-weight: 600;
|
|
149
134
|
font-size: 16px;
|
|
150
135
|
color: ${props => props.theme.colors.darkTextColor};
|
|
151
136
|
}
|
|
152
|
-
|
|
153
137
|
button {
|
|
154
138
|
color: #748194;
|
|
155
139
|
background: #F8F9FA;
|
|
@@ -175,12 +159,10 @@ export const MobileCartViewWrapper = styled.div`
|
|
|
175
159
|
box-sizing: border-box;
|
|
176
160
|
z-index: 1000;
|
|
177
161
|
box-shadow: 0px 4px 10px rgb(0 0 0 / 12%);
|
|
178
|
-
|
|
179
162
|
span {
|
|
180
163
|
font-weight: 600;
|
|
181
164
|
font-size: 16px;
|
|
182
165
|
}
|
|
183
|
-
|
|
184
166
|
button {
|
|
185
167
|
height: 44px;
|
|
186
168
|
border-radius: 7.6px;
|
|
@@ -192,7 +174,6 @@ export const WrapperSearch = styled.div`
|
|
|
192
174
|
display: flex;
|
|
193
175
|
align-items: center;
|
|
194
176
|
justify-content: flex-end;
|
|
195
|
-
|
|
196
177
|
.search-bar {
|
|
197
178
|
margin-right: 10px;
|
|
198
179
|
${props => props.theme?.rtl && css`
|
|
@@ -201,16 +182,13 @@ export const WrapperSearch = styled.div`
|
|
|
201
182
|
`}
|
|
202
183
|
input {
|
|
203
184
|
width: 100%;
|
|
204
|
-
|
|
205
185
|
@media (min-width: 500px) {
|
|
206
186
|
width: 250px;
|
|
207
187
|
}
|
|
208
188
|
}
|
|
209
189
|
}
|
|
210
|
-
|
|
211
190
|
div:last-child {
|
|
212
191
|
text-align: right;
|
|
213
|
-
|
|
214
192
|
${props => props.theme?.rtl && css`
|
|
215
193
|
text-align: left;
|
|
216
194
|
`}
|
|
@@ -241,3 +219,26 @@ export const WrapperSearchAbsolute = styled.div`
|
|
|
241
219
|
export const NearBusiness = styled.div`
|
|
242
220
|
width: 100%;
|
|
243
221
|
`
|
|
222
|
+
export const PageBannerWrapper = styled.div`
|
|
223
|
+
> div {
|
|
224
|
+
border-radius: 8px;
|
|
225
|
+
}
|
|
226
|
+
`
|
|
227
|
+
|
|
228
|
+
export const CategorySelectedContainer = styled.div`
|
|
229
|
+
display: inline;
|
|
230
|
+
margin-left: 10px;
|
|
231
|
+
color: ${({ theme }) => theme?.colors?.primary};
|
|
232
|
+
padding-right: 5px;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
p{
|
|
235
|
+
margin: 0;
|
|
236
|
+
}
|
|
237
|
+
svg {
|
|
238
|
+
position: relative;
|
|
239
|
+
top: 2px;
|
|
240
|
+
margin-right: 3px;
|
|
241
|
+
width: 14px;
|
|
242
|
+
height: 14px;
|
|
243
|
+
}
|
|
244
|
+
`
|
|
@@ -374,6 +374,7 @@ const SignUpFormUI = (props) => {
|
|
|
374
374
|
isPopup={isPopup}
|
|
375
375
|
onSubmit={formMethods.handleSubmit(onSubmit)}
|
|
376
376
|
isSkeleton={useChekoutFileds && validationFields?.loading}
|
|
377
|
+
autoComplete='on'
|
|
377
378
|
>
|
|
378
379
|
{props.beforeMidElements?.map((BeforeMidElements, i) => (
|
|
379
380
|
<React.Fragment key={i}>
|
|
@@ -417,7 +418,7 @@ const SignUpFormUI = (props) => {
|
|
|
417
418
|
pattern: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i
|
|
418
419
|
})}
|
|
419
420
|
required={!!field.required}
|
|
420
|
-
autoComplete='
|
|
421
|
+
autoComplete='on'
|
|
421
422
|
isError={formMethods.errors?.email && !notValidationFields.includes(field.code)}
|
|
422
423
|
/>
|
|
423
424
|
<InputBeforeIcon>
|
|
@@ -128,7 +128,6 @@ const SingleOrderCardUI = (props) => {
|
|
|
128
128
|
|
|
129
129
|
const showBusinessLogo = !orderingTheme?.theme?.orders?.components?.business_logo?.hidden
|
|
130
130
|
const showDate = !orderingTheme?.theme?.orders?.components?.date?.hidden
|
|
131
|
-
const showMap = !orderingTheme?.theme?.orders?.components?.map?.hidden
|
|
132
131
|
|
|
133
132
|
return (
|
|
134
133
|
<>
|
|
@@ -144,26 +143,6 @@ const SingleOrderCardUI = (props) => {
|
|
|
144
143
|
isCustomerMode={isCustomerMode}
|
|
145
144
|
onClick={(e) => handleClickCard(e, order?.uuid)}
|
|
146
145
|
>
|
|
147
|
-
{(configs?.google_maps_api_key?.value || isBusinessesPage) && showMap && (
|
|
148
|
-
<>
|
|
149
|
-
{isSkeleton ? (
|
|
150
|
-
<Skeleton height={80} />
|
|
151
|
-
) : (
|
|
152
|
-
<Map isBusinessesPage={isBusinessesPage}>
|
|
153
|
-
<img
|
|
154
|
-
src={
|
|
155
|
-
isBusinessesPage
|
|
156
|
-
? (order?.business?.header || order?.business?.logo || theme.images?.dummies?.businessLogo)
|
|
157
|
-
: getGoogleMapImage(order?.business?.location, configs?.google_maps_api_key?.value)
|
|
158
|
-
}
|
|
159
|
-
alt={isBusinessesPage ? 'business_header' : 'google-maps-img'}
|
|
160
|
-
height={isBusinessesPage ? '200px' : '100px'}
|
|
161
|
-
width='400px'
|
|
162
|
-
/>
|
|
163
|
-
</Map>
|
|
164
|
-
)}
|
|
165
|
-
</>
|
|
166
|
-
)}
|
|
167
146
|
<Content isCustomerMode={isCustomerMode}>
|
|
168
147
|
{isSkeleton ? (
|
|
169
148
|
<Skeleton width={60} height={60} />
|