ordering-ui-external 2.4.6 → 2.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.038c4b4d536032472bc7.js → 0.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{1.ordering-ui.038c4b4d536032472bc7.js → 1.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{2.ordering-ui.038c4b4d536032472bc7.js → 2.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{4.ordering-ui.038c4b4d536032472bc7.js → 4.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{5.ordering-ui.038c4b4d536032472bc7.js → 5.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{6.ordering-ui.038c4b4d536032472bc7.js → 6.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js → 7.ordering-ui.5657c6a53b3791887fd7.js} +2 -2
- package/_bundles/{8.ordering-ui.038c4b4d536032472bc7.js → 8.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/{9.ordering-ui.038c4b4d536032472bc7.js → 9.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
- package/_bundles/ordering-ui.5657c6a53b3791887fd7.js +2 -0
- package/_modules/components/OrdersOption/styles.js +1 -1
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +15 -8
- package/_modules/components/VerticalOrdersLayout/styles.js +2 -2
- package/_modules/contexts/ThemeContext/index.js +1 -0
- package/_modules/themes/five/src/components/AddressList/index.js +8 -7
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +28 -22
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +22 -21
- package/_modules/themes/five/src/components/BusinessController/index.js +5 -3
- package/_modules/themes/five/src/components/BusinessInformation/index.js +16 -10
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +5 -8
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +93 -74
- package/_modules/themes/five/src/components/BusinessListingSearch/styles.js +10 -4
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
- package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +38 -13
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +20 -9
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +35 -23
- package/_modules/themes/five/src/components/Cart/index.js +7 -3
- package/_modules/themes/five/src/components/Checkout/index.js +12 -11
- package/_modules/themes/five/src/components/Checkout/styles.js +8 -4
- package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +4 -3
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +14 -8
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +29 -21
- package/_modules/themes/five/src/components/Header/styles.js +44 -40
- package/_modules/themes/five/src/components/MultiCheckout/index.js +18 -16
- package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +6 -4
- package/_modules/themes/five/src/components/MyOrders/index.js +16 -10
- package/_modules/themes/five/src/components/MyOrders/styles.js +15 -12
- package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +5 -2
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +2 -2
- package/_modules/themes/five/src/components/OrderDetails/index.js +2 -2
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderProgress/index.js +15 -4
- package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +16 -4
- package/_modules/themes/five/src/components/PageBanner/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +27 -7
- package/_modules/themes/five/src/components/ProductForm/styles.js +40 -31
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +6 -6
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -3
- package/_modules/themes/five/src/components/ReviewProduct/index.js +9 -4
- package/_modules/themes/five/src/components/ServiceForm/index.js +22 -3
- package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -3
- package/_modules/themes/five/src/components/SidebarMenu/index.js +19 -10
- package/_modules/themes/five/src/components/SignUpForm/index.js +56 -29
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +26 -24
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +9 -5
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
- package/_modules/themes/five/src/components/UpsellingPage/index.js +2 -1
- package/_modules/themes/five/src/components/UserFormDetails/index.js +58 -18
- package/_modules/themes/five/src/components/UserFormDetails/styles.js +7 -3
- package/_modules/themes/five/src/components/UserPopover/index.js +41 -25
- package/_modules/themes/five/src/components/UserProfileForm/index.js +19 -11
- package/_modules/themes/five/src/styles/Buttons/index.js +68 -58
- package/_modules/themes/five/src/styles/Inputs/index.js +40 -16
- package/_modules/utils/index.js +8 -2
- package/index.html +1 -1
- package/package.json +3 -2
- package/src/components/OrdersOption/styles.js +1 -0
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +35 -17
- package/src/components/VerticalOrdersLayout/styles.js +9 -0
- package/src/contexts/ThemeContext/index.js +1 -0
- package/src/themes/five/src/components/AddressList/index.js +6 -6
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +24 -22
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +24 -3
- package/src/themes/five/src/components/BusinessController/index.js +4 -2
- package/src/themes/five/src/components/BusinessInformation/index.js +24 -12
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +5 -6
- package/src/themes/five/src/components/BusinessListingSearch/index.js +127 -101
- package/src/themes/five/src/components/BusinessListingSearch/styles.js +15 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
- package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +34 -9
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +26 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +9 -2
- package/src/themes/five/src/components/Cart/index.js +3 -4
- package/src/themes/five/src/components/Checkout/index.js +18 -4
- package/src/themes/five/src/components/Checkout/styles.js +22 -0
- package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +41 -31
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +15 -4
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
- package/src/themes/five/src/components/Header/index.js +17 -5
- package/src/themes/five/src/components/Header/styles.js +9 -6
- package/src/themes/five/src/components/MultiCheckout/index.js +9 -10
- package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +8 -5
- package/src/themes/five/src/components/MyOrders/index.js +13 -9
- package/src/themes/five/src/components/MyOrders/styles.js +3 -1
- package/src/themes/five/src/components/OrderDetails/OrderEta.js +3 -2
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +8 -2
- package/src/themes/five/src/components/OrderDetails/index.js +2 -2
- package/src/themes/five/src/components/OrderItAgain/styles.js +1 -1
- package/src/themes/five/src/components/OrderProgress/index.js +16 -5
- package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -4
- package/src/themes/five/src/components/PageBanner/styles.js +1 -4
- package/src/themes/five/src/components/ProductForm/index.js +23 -5
- package/src/themes/five/src/components/ProductForm/styles.js +36 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +37 -29
- package/src/themes/five/src/components/RenderProductsLayout/index.js +3 -3
- package/src/themes/five/src/components/ReviewProduct/index.js +14 -6
- package/src/themes/five/src/components/ServiceForm/index.js +22 -4
- package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +162 -144
- package/src/themes/five/src/components/SignUpForm/index.js +4 -3
- package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
- package/src/themes/five/src/components/SingleOrderCard/styles.js +9 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -3
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
- package/src/themes/five/src/components/UpsellingPage/index.js +1 -1
- package/src/themes/five/src/components/UserFormDetails/index.js +58 -14
- package/src/themes/five/src/components/UserFormDetails/styles.js +16 -0
- package/src/themes/five/src/components/UserPopover/index.js +26 -15
- package/src/themes/five/src/components/UserProfileForm/index.js +18 -9
- package/src/themes/five/src/styles/Buttons/index.js +11 -0
- package/src/themes/five/src/styles/Inputs/index.js +34 -0
- package/src/utils/index.js +5 -0
- package/template/app.js +5 -3
- package/template/theme.json +335 -24
- package/_bundles/ordering-ui.038c4b4d536032472bc7.js +0 -2
- /package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → 7.ordering-ui.5657c6a53b3791887fd7.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → ordering-ui.5657c6a53b3791887fd7.js.LICENSE.txt} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from 'react'
|
|
2
2
|
import TiArrowSortedUp from '@meronex/icons/ti/TiArrowSortedUp'
|
|
3
|
-
import { useOrder, useLanguage, useEvent, useUtils, useConfig
|
|
3
|
+
import { useOrder, useLanguage, useEvent, useUtils, useConfig } from 'ordering-components-external'
|
|
4
4
|
import { useTheme } from 'styled-components'
|
|
5
5
|
import FiClock from '@meronex/icons/fi/FiClock'
|
|
6
6
|
import {
|
|
@@ -49,7 +49,6 @@ export const BusinessItemAccordion = (props) => {
|
|
|
49
49
|
const [{ parsePrice }] = useUtils()
|
|
50
50
|
const [{ configs }] = useConfig()
|
|
51
51
|
const theme = useTheme()
|
|
52
|
-
const [orderingTheme] = useOrderingTheme()
|
|
53
52
|
const [setActive, setActiveState] = useState('')
|
|
54
53
|
const [setHeight, setHeightState] = useState('0px')
|
|
55
54
|
const [setRotate, setRotateState] = useState('accordion__icon')
|
|
@@ -63,8 +62,8 @@ export const BusinessItemAccordion = (props) => {
|
|
|
63
62
|
const changeStore = useRef(null)
|
|
64
63
|
|
|
65
64
|
const viewString = isStore ? 'business_view' : 'header'
|
|
66
|
-
const
|
|
67
|
-
const
|
|
65
|
+
const hideBusinessLogo = theme?.[viewString]?.components?.cart?.components?.business?.components?.logo?.hidden
|
|
66
|
+
const hideBusinessTime = theme?.[viewString]?.components?.cart?.components?.business?.components?.time?.hidden
|
|
68
67
|
|
|
69
68
|
const toggleAccordion = (e) => {
|
|
70
69
|
const isActionsClick = businessStore.current?.contains(e?.target) || businessDelete.current?.contains(e?.target) || changeStore.current?.contains(e?.target)
|
|
@@ -146,14 +145,14 @@ export const BusinessItemAccordion = (props) => {
|
|
|
146
145
|
onClick={(e) => toggleAccordion(e)}
|
|
147
146
|
>
|
|
148
147
|
<BusinessInfo>
|
|
149
|
-
{!
|
|
148
|
+
{!hideBusinessLogo && (
|
|
150
149
|
<WrapperBusinessLogo>
|
|
151
150
|
<BusinessLogo bgimage={business?.logo || theme.images?.dummies?.businessLogo} />
|
|
152
151
|
</WrapperBusinessLogo>
|
|
153
152
|
)}
|
|
154
153
|
<ContentInfo className='info' isStore={isStore}>
|
|
155
154
|
<h2>{business?.name}</h2>
|
|
156
|
-
{!
|
|
155
|
+
{!hideBusinessTime && (
|
|
157
156
|
<TimeContainer>
|
|
158
157
|
{orderState?.options?.type === 1 ? (
|
|
159
158
|
<span>
|
|
@@ -32,10 +32,11 @@ import {
|
|
|
32
32
|
NoResult,
|
|
33
33
|
PriceFilterWrapper,
|
|
34
34
|
PriceFilterListWrapper,
|
|
35
|
-
PreviouslyOrderedContainer
|
|
35
|
+
PreviouslyOrderedContainer,
|
|
36
|
+
SearchBarContainer
|
|
36
37
|
} from './styles'
|
|
37
38
|
import Skeleton from 'react-loading-skeleton'
|
|
38
|
-
import { Check2, XLg as Close } from 'react-bootstrap-icons'
|
|
39
|
+
import { Check2, XLg as Close, Funnel } from 'react-bootstrap-icons'
|
|
39
40
|
import { SearchBar } from '../SearchBar'
|
|
40
41
|
import { useLanguage, useOrder, useUtils, useSession, BusinessSearchList, useConfig } from 'ordering-components-external'
|
|
41
42
|
import { BusinessController } from '../BusinessController'
|
|
@@ -79,6 +80,7 @@ export const BusinessListingSearchUI = (props) => {
|
|
|
79
80
|
const [, t] = useLanguage()
|
|
80
81
|
const theme = useTheme()
|
|
81
82
|
const [curProduct, setCurProduct] = useState({ business: null, product: null })
|
|
83
|
+
const [openFilter, setOpenFilter] = useState(false)
|
|
82
84
|
const [{ parsePrice, optimizeImage, parseDistance }] = useUtils()
|
|
83
85
|
const [{ auth }] = useSession()
|
|
84
86
|
const { width } = useWindowSize()
|
|
@@ -105,7 +107,6 @@ export const BusinessListingSearchUI = (props) => {
|
|
|
105
107
|
const noResults = (!businessesSearchList.loading && !businessesSearchList.lengthError && businessesSearchList?.businesses?.length === 0)
|
|
106
108
|
const currentCart = Object.values(orderState?.carts).find(cart => cart?.business?.slug === curProduct?.business?.slug) ?? {}
|
|
107
109
|
|
|
108
|
-
|
|
109
110
|
const handleScroll = useCallback(() => {
|
|
110
111
|
const innerHeightScrolltop = window.innerHeight + document.documentElement?.scrollTop + PIXELS_TO_SCROLL
|
|
111
112
|
const badScrollPosition = innerHeightScrolltop < document.documentElement?.offsetHeight
|
|
@@ -144,114 +145,130 @@ export const BusinessListingSearchUI = (props) => {
|
|
|
144
145
|
return () => window.removeEventListener('scroll', handleScroll)
|
|
145
146
|
}, [handleScroll])
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
148
|
+
const filtersComponent = () => {
|
|
149
|
+
return (
|
|
150
|
+
<Filters>
|
|
151
|
+
<SortContainer>
|
|
152
|
+
<FilterAccordion title={t('SORT', 'Sort')}>
|
|
153
|
+
{sortItems?.filter(item => !(orderState?.options?.type === 1 && item?.value === 'pickup_time') && !(orderState?.options?.type === 2 && item?.value === 'delivery_time'))?.map(item => (
|
|
154
|
+
<SortItem
|
|
155
|
+
key={item?.value}
|
|
156
|
+
onClick={() => handleChangeFilters('orderBy', item?.value)}
|
|
157
|
+
active={filters?.orderBy?.includes(item?.value)}
|
|
158
|
+
>
|
|
159
|
+
{item?.text} {(filters?.orderBy?.includes(item?.value)) && <>{filters?.orderBy?.includes('-') ? <BisUpArrow /> : <BisDownArrow />}</>}
|
|
160
|
+
</SortItem>
|
|
161
|
+
))}
|
|
162
|
+
</FilterAccordion>
|
|
163
|
+
</SortContainer>
|
|
164
|
+
<BrandContainer>
|
|
165
|
+
<FilterAccordion title={t('BRANDS', 'Brands')}>
|
|
166
|
+
<BrandListWrapper>
|
|
167
|
+
{brandList?.loading && (
|
|
168
|
+
<>
|
|
169
|
+
{[...Array(5).keys()].map(index => (
|
|
170
|
+
<BrandItem key={index}>
|
|
171
|
+
<Skeleton width={120} height={15} />
|
|
172
|
+
<Skeleton width={16} height={16} />
|
|
173
|
+
</BrandItem>
|
|
174
|
+
))}
|
|
175
|
+
</>
|
|
176
|
+
)}
|
|
177
|
+
{!brandList?.loading && brandList?.brands.map((brand, i) => brand?.enabled && (
|
|
178
|
+
<BrandItem key={i} onClick={() => handleChangeBrandFilter(brand?.id)}>
|
|
179
|
+
<span>{brand?.name}</span>
|
|
180
|
+
{filters?.franchise_ids?.includes(brand?.id) && <Check2 />}
|
|
181
|
+
</BrandItem>
|
|
182
|
+
))}
|
|
183
|
+
{!brandList?.loading && ((brandList?.brands?.filter(brand => brand?.enabled))?.length === 0) && (
|
|
184
|
+
<NoResult>{t('NO_RESULTS_FOUND', 'Sorry, no results found')}</NoResult>
|
|
185
|
+
)}
|
|
186
|
+
</BrandListWrapper>
|
|
187
|
+
</FilterAccordion>
|
|
188
|
+
</BrandContainer>
|
|
189
|
+
<PriceFilterWrapper>
|
|
190
|
+
<FilterAccordion title={t('PRICE_RANGE', 'Price range')}>
|
|
191
|
+
<PriceFilterListWrapper>
|
|
192
|
+
{priceList.map((price, i) => (
|
|
193
|
+
<Button
|
|
194
|
+
key={i}
|
|
195
|
+
color={(filters?.price_level === price?.level) ? 'primary' : 'lightGray'}
|
|
196
|
+
onClick={() => handleChangePriceRange(price?.level)}
|
|
169
197
|
>
|
|
170
|
-
{
|
|
171
|
-
|
|
198
|
+
{price.content}
|
|
199
|
+
{(filters?.price_level === price?.level) && <Close />}
|
|
200
|
+
</Button>
|
|
172
201
|
))}
|
|
173
|
-
</
|
|
174
|
-
</
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
<BrandListWrapper>
|
|
178
|
-
{brandList?.loading && (
|
|
179
|
-
<>
|
|
180
|
-
{[...Array(5).keys()].map(index => (
|
|
181
|
-
<BrandItem key={index}>
|
|
182
|
-
<Skeleton width={120} height={15} />
|
|
183
|
-
<Skeleton width={16} height={16} />
|
|
184
|
-
</BrandItem>
|
|
185
|
-
))}
|
|
186
|
-
</>
|
|
187
|
-
)}
|
|
188
|
-
{!brandList?.loading && brandList?.brands.map((brand, i) => brand?.enabled && (
|
|
189
|
-
<BrandItem key={i} onClick={() => handleChangeBrandFilter(brand?.id)}>
|
|
190
|
-
<span>{brand?.name}</span>
|
|
191
|
-
{filters?.franchise_ids?.includes(brand?.id) && <Check2 />}
|
|
192
|
-
</BrandItem>
|
|
193
|
-
))}
|
|
194
|
-
{!brandList?.loading && ((brandList?.brands?.filter(brand => brand?.enabled))?.length === 0) && (
|
|
195
|
-
<NoResult>{t('NO_RESULTS_FOUND', 'Sorry, no results found')}</NoResult>
|
|
196
|
-
)}
|
|
197
|
-
</BrandListWrapper>
|
|
198
|
-
</FilterAccordion>
|
|
199
|
-
</BrandContainer>
|
|
200
|
-
<PriceFilterWrapper>
|
|
201
|
-
<FilterAccordion title={t('PRICE_RANGE', 'Price range')}>
|
|
202
|
-
<PriceFilterListWrapper>
|
|
203
|
-
{priceList.map((price, i) => (
|
|
204
|
-
<Button
|
|
205
|
-
key={i}
|
|
206
|
-
color={(filters?.price_level === price?.level) ? 'primary' : 'lightGray'}
|
|
207
|
-
onClick={() => handleChangePriceRange(price?.level)}
|
|
208
|
-
>
|
|
209
|
-
{price.content}
|
|
210
|
-
{(filters?.price_level === price?.level) && <Close />}
|
|
211
|
-
</Button>
|
|
212
|
-
))}
|
|
213
|
-
</PriceFilterListWrapper>
|
|
214
|
-
</FilterAccordion>
|
|
215
|
-
</PriceFilterWrapper>
|
|
216
|
-
{orderState?.options?.type === 1 && (
|
|
217
|
-
<MaxSectionItem
|
|
218
|
-
title={t('MAX_DELIVERY_FEE', 'Max delivery fee')}
|
|
219
|
-
options={maxDeliveryFeeOptions}
|
|
220
|
-
filter='max_delivery_price'
|
|
221
|
-
filters={filters}
|
|
222
|
-
handleChangeFilters={handleChangeFilters}
|
|
223
|
-
/>
|
|
224
|
-
)}
|
|
225
|
-
{[1, 2].includes(orderState?.options?.type) && (
|
|
226
|
-
<MaxSectionItem
|
|
227
|
-
title={orderState?.options?.type === 1 ? t('MAX_DELIVERY_TIME', 'Max delivery time') : t('MAX_PICKUP_TIME', 'Max pickup time')}
|
|
228
|
-
options={maxTimeOptions}
|
|
229
|
-
filter='max_eta'
|
|
230
|
-
filters={filters}
|
|
231
|
-
handleChangeFilters={handleChangeFilters}
|
|
232
|
-
/>
|
|
233
|
-
)}
|
|
202
|
+
</PriceFilterListWrapper>
|
|
203
|
+
</FilterAccordion>
|
|
204
|
+
</PriceFilterWrapper>
|
|
205
|
+
{orderState?.options?.type === 1 && (
|
|
234
206
|
<MaxSectionItem
|
|
235
|
-
title={t('
|
|
236
|
-
options={
|
|
237
|
-
filter='
|
|
207
|
+
title={t('MAX_DELIVERY_FEE', 'Max delivery fee')}
|
|
208
|
+
options={maxDeliveryFeeOptions}
|
|
209
|
+
filter='max_delivery_price'
|
|
238
210
|
filters={filters}
|
|
239
211
|
handleChangeFilters={handleChangeFilters}
|
|
240
212
|
/>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
213
|
+
)}
|
|
214
|
+
{[1, 2].includes(orderState?.options?.type) && (
|
|
215
|
+
<MaxSectionItem
|
|
216
|
+
title={orderState?.options?.type === 1 ? t('MAX_DELIVERY_TIME', 'Max delivery time') : t('MAX_PICKUP_TIME', 'Max pickup time')}
|
|
217
|
+
options={maxTimeOptions}
|
|
218
|
+
filter='max_eta'
|
|
219
|
+
filters={filters}
|
|
220
|
+
handleChangeFilters={handleChangeFilters}
|
|
221
|
+
/>
|
|
222
|
+
)}
|
|
223
|
+
<MaxSectionItem
|
|
224
|
+
title={t('MAX_DISTANCE', 'Max distance')}
|
|
225
|
+
options={maxDistanceOptions}
|
|
226
|
+
filter='max_distance'
|
|
227
|
+
filters={filters}
|
|
228
|
+
handleChangeFilters={handleChangeFilters}
|
|
229
|
+
/>
|
|
230
|
+
<TagsContainer>
|
|
231
|
+
<FilterAccordion title={t('BUSINESS_CATEGORIES', 'Business categories')}>
|
|
232
|
+
<BusinessTypeFilter
|
|
233
|
+
isSearchMode
|
|
234
|
+
filters={filters}
|
|
235
|
+
handleChangeFilters={handleChangeFilters}
|
|
236
|
+
/>
|
|
237
|
+
</FilterAccordion>
|
|
238
|
+
</TagsContainer>
|
|
239
|
+
</Filters>
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return (
|
|
244
|
+
<BusinessListingSearchContainer>
|
|
245
|
+
<BusinessesTitle>
|
|
246
|
+
{t('SEARCH', 'Search')}
|
|
247
|
+
</BusinessesTitle>
|
|
248
|
+
<SearchBarContainer>
|
|
249
|
+
<SearchBar
|
|
250
|
+
lazyLoad
|
|
251
|
+
isCustomLayout
|
|
252
|
+
forceFocus
|
|
253
|
+
placeholder={`${t('SEARCH_BUSINESSES', 'Search Businesses')} / ${t('PLEASE_TYPE_AT_LEAST_3_CHARACTERS', 'Please type at least 3 characters')}`}
|
|
254
|
+
onSearch={(val) => handleChangeTermValue(val)}
|
|
255
|
+
search={termValue}
|
|
256
|
+
/>
|
|
257
|
+
{width <= 768 && (
|
|
258
|
+
<Funnel onClick={() => setOpenFilter(true)} />
|
|
259
|
+
)}
|
|
260
|
+
</SearchBarContainer>
|
|
261
|
+
<FiltersContainer>
|
|
262
|
+
{width > 768 && (
|
|
263
|
+
<>
|
|
264
|
+
{filtersComponent()}
|
|
265
|
+
</>
|
|
266
|
+
)}
|
|
251
267
|
<FiltersResultContainer>
|
|
252
268
|
{auth && termValue?.length === 0 && (
|
|
253
269
|
<PreviouslyOrderedContainer>
|
|
254
270
|
<MyOrders
|
|
271
|
+
isFromBusinessListingSearch
|
|
255
272
|
hideOrders
|
|
256
273
|
businessesSearchList={businessesSearchList}
|
|
257
274
|
onRedirectPage={onRedirectPage}
|
|
@@ -431,6 +448,15 @@ export const BusinessListingSearchUI = (props) => {
|
|
|
431
448
|
/>
|
|
432
449
|
)}
|
|
433
450
|
</Modal>
|
|
451
|
+
{width <= 768 && (
|
|
452
|
+
<Modal
|
|
453
|
+
open={openFilter}
|
|
454
|
+
onClose={() => setOpenFilter(false)}
|
|
455
|
+
title={t('FILTERS', 'Filters')}
|
|
456
|
+
>
|
|
457
|
+
{filtersComponent()}
|
|
458
|
+
</Modal>
|
|
459
|
+
)}
|
|
434
460
|
</BusinessListingSearchContainer>
|
|
435
461
|
)
|
|
436
462
|
}
|
|
@@ -48,6 +48,7 @@ export const FiltersContainer = styled.div`
|
|
|
48
48
|
export const Filters = styled.div`
|
|
49
49
|
width: 100%;
|
|
50
50
|
max-width: 100%;
|
|
51
|
+
|
|
51
52
|
@media (min-width: 993px){
|
|
52
53
|
width: 25%;
|
|
53
54
|
max-width: 25%;
|
|
@@ -435,3 +436,17 @@ export const PriceFilterListWrapper = styled.div`
|
|
|
435
436
|
export const PreviouslyOrderedContainer = styled.div`
|
|
436
437
|
|
|
437
438
|
`
|
|
439
|
+
export const SearchBarContainer = styled.div`
|
|
440
|
+
display: flex;
|
|
441
|
+
align-items: center;
|
|
442
|
+
|
|
443
|
+
svg {
|
|
444
|
+
font-size: 26px;
|
|
445
|
+
color: ${props => props.theme.colors.primary};
|
|
446
|
+
${props => props.theme.rtl ? css`
|
|
447
|
+
margin-right: 10px;
|
|
448
|
+
` : css`
|
|
449
|
+
margin-left: 10px;
|
|
450
|
+
`}
|
|
451
|
+
}
|
|
452
|
+
`
|
|
@@ -105,7 +105,12 @@ const BusinessProductsCategoriesUI = (props) => {
|
|
|
105
105
|
const navbar = document.getElementById('category-lists')
|
|
106
106
|
const search = document.getElementById('WrapperSearchAbsolute')
|
|
107
107
|
const wrapperCategories = document.getElementById('wrapper-categories')
|
|
108
|
-
|
|
108
|
+
let limit
|
|
109
|
+
if (windowSize.width >= 993) {
|
|
110
|
+
limit = window.pageYOffset >= wrapperCategories?.offsetTop && window.pageYOffset > 0
|
|
111
|
+
} else {
|
|
112
|
+
limit = window.pageYOffset >= (wrapperCategories?.offsetTop - 56) && window.pageYOffset > 0
|
|
113
|
+
}
|
|
109
114
|
|
|
110
115
|
if (limit) {
|
|
111
116
|
const classAdded = navbar.classList.contains('sticky-prod-cat')
|
|
@@ -130,7 +135,7 @@ const BusinessProductsCategoriesUI = (props) => {
|
|
|
130
135
|
|
|
131
136
|
let style0 = '.sticky-prod-cat {'
|
|
132
137
|
style0 += 'position: fixed !important;'
|
|
133
|
-
style0 +=
|
|
138
|
+
style0 += `top: ${windowSize.width >= 993 ? '0px' : '56px'} !important;`
|
|
134
139
|
style0 += 'left: 0px !important;'
|
|
135
140
|
style0 += 'padding: 5px 5px 0px 5px !important;'
|
|
136
141
|
style0 += `width: calc(100% - ${useKioskApp ? '50px' : windowSize.width >= 993 ? '155px' : '0px'})!important;`
|
|
@@ -87,7 +87,7 @@ const BusinessProductsListUI = (props) => {
|
|
|
87
87
|
onClick={() => onClickSubcategory(null, category)}
|
|
88
88
|
color={allsubcategorySelected ? 'primary' : 'lightGray'}
|
|
89
89
|
>
|
|
90
|
-
{t('ALL', 'All')}
|
|
90
|
+
{t('ALL', 'All')}
|
|
91
91
|
</Button>
|
|
92
92
|
</ContainerButton>
|
|
93
93
|
{category?.subcategories?.map(subcategory => {
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
useUtils,
|
|
15
15
|
useSession,
|
|
16
16
|
useSite,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
useConfig,
|
|
18
|
+
useBusiness
|
|
19
19
|
} from 'ordering-components-external'
|
|
20
20
|
|
|
21
21
|
import {
|
|
@@ -90,14 +90,14 @@ const BusinessProductsListingUI = (props) => {
|
|
|
90
90
|
const [{ configs }] = useConfig()
|
|
91
91
|
const theme = useTheme()
|
|
92
92
|
const [, t] = useLanguage()
|
|
93
|
-
const [{ carts }, { addProduct, updateProduct }] = useOrder()
|
|
93
|
+
const [{ carts, options }, { addProduct, updateProduct }] = useOrder()
|
|
94
94
|
const [{ parsePrice }] = useUtils()
|
|
95
95
|
const [events] = useEvent()
|
|
96
96
|
const location = useLocation()
|
|
97
97
|
const windowSize = useWindowSize()
|
|
98
98
|
const [{ auth }] = useSession()
|
|
99
99
|
const [{ site }] = useSite()
|
|
100
|
-
const [
|
|
100
|
+
const [, { setBusiness }] = useBusiness()
|
|
101
101
|
const [openProduct, setModalIsOpen] = useState(false)
|
|
102
102
|
const [curProduct, setCurProduct] = useState(props.product)
|
|
103
103
|
const [openUpselling, setOpenUpselling] = useState(false)
|
|
@@ -113,7 +113,9 @@ const BusinessProductsListingUI = (props) => {
|
|
|
113
113
|
const checkoutMultiBusinessEnabled = configs?.checkout_multi_business_enabled?.value === '1'
|
|
114
114
|
const currentCart = Object.values(carts).find(cart => cart?.business?.slug === business?.slug) ?? {}
|
|
115
115
|
const isLazy = businessState?.business?.lazy_load_products_recommended
|
|
116
|
-
const showViewOrderButton = !
|
|
116
|
+
const showViewOrderButton = !theme?.business_view?.components?.order_view_button?.hidden
|
|
117
|
+
const cateringTypes = [7, 8]
|
|
118
|
+
const cateringPreorder = cateringTypes.includes(options?.type)
|
|
117
119
|
const sortByOptions = [
|
|
118
120
|
{ value: null, content: t('SORT_BY', theme?.defaultLanguages?.SORT_BY || 'Sort By'), showOnSelected: t('SORT_BY', theme?.defaultLanguages?.SORT_BY || 'Sort By') },
|
|
119
121
|
{ value: 'rank', content: t('RANK', theme?.defaultLanguages?.RANK || 'Rank'), showOnSelected: t('RANK', theme?.defaultLanguages?.RANK || 'Rank') },
|
|
@@ -187,12 +189,23 @@ const BusinessProductsListingUI = (props) => {
|
|
|
187
189
|
}
|
|
188
190
|
|
|
189
191
|
const handleScroll = useCallback(() => {
|
|
192
|
+
const backArrowElement = document.getElementById('back-arrow')
|
|
193
|
+
if (backArrowElement) {
|
|
194
|
+
const limit = window.pageYOffset >= backArrowElement?.offsetTop && window.pageYOffset > 0
|
|
195
|
+
if (limit && windowSize.width < 993) {
|
|
196
|
+
const classAdded = backArrowElement.classList.contains('fixed-arrow')
|
|
197
|
+
!classAdded && backArrowElement.classList.add('fixed-arrow')
|
|
198
|
+
} else {
|
|
199
|
+
backArrowElement && backArrowElement.classList.remove('fixed-arrow')
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
190
203
|
const innerHeightScrolltop = window.innerHeight + document.documentElement?.scrollTop + PIXELS_TO_SCROLL
|
|
191
204
|
const badScrollPosition = innerHeightScrolltop < document.documentElement?.offsetHeight
|
|
192
205
|
const hasMore = !(categoryState.pagination.totalPages === categoryState.pagination.currentPage)
|
|
193
206
|
if (badScrollPosition || categoryState.loading || !hasMore) return
|
|
194
207
|
getNextProducts({ isNextPage: true })
|
|
195
|
-
}, [categoryState])
|
|
208
|
+
}, [categoryState, windowSize.width])
|
|
196
209
|
|
|
197
210
|
const handleChangePage = (data) => {
|
|
198
211
|
if (Object.entries(data.query).length === 0 && openProduct) {
|
|
@@ -300,14 +313,25 @@ const BusinessProductsListingUI = (props) => {
|
|
|
300
313
|
}
|
|
301
314
|
}, [currentCart])
|
|
302
315
|
|
|
316
|
+
useEffect(() => {
|
|
317
|
+
if (cateringPreorder) {
|
|
318
|
+
setBusiness(business)
|
|
319
|
+
}
|
|
320
|
+
return () => {
|
|
321
|
+
setBusiness({})
|
|
322
|
+
}
|
|
323
|
+
}, [cateringPreorder, business])
|
|
324
|
+
|
|
303
325
|
return (
|
|
304
326
|
<>
|
|
305
327
|
<ProductsContainer>
|
|
306
328
|
{!props.useKioskApp && (
|
|
307
329
|
<HeaderContent>
|
|
308
|
-
{!location.pathname.includes('/marketplace') &&
|
|
309
|
-
<
|
|
310
|
-
|
|
330
|
+
{!location.pathname.includes('/marketplace') && (
|
|
331
|
+
<div id='back-arrow'>
|
|
332
|
+
<ArrowLeft className='back-arrow' onClick={() => handleGoToBusinessList()} />
|
|
333
|
+
</div>
|
|
334
|
+
)}
|
|
311
335
|
{windowSize?.width < 576 && (
|
|
312
336
|
<OrderContextUIWrapper>
|
|
313
337
|
<OrderContextUI isCheckOut />
|
|
@@ -432,6 +456,7 @@ const BusinessProductsListingUI = (props) => {
|
|
|
432
456
|
isProducts={currentCart.products.length}
|
|
433
457
|
isCartOnProductsList={isCartOnProductsList}
|
|
434
458
|
handleCartOpen={(val) => setIsCartOpen(val)}
|
|
459
|
+
businessConfigs={business?.configs}
|
|
435
460
|
/>
|
|
436
461
|
</>
|
|
437
462
|
) : (
|
|
@@ -3,6 +3,16 @@ import styled, { css } from 'styled-components'
|
|
|
3
3
|
export const ProductsContainer = styled.div`
|
|
4
4
|
width: 95%;
|
|
5
5
|
margin: 20px auto 0px;
|
|
6
|
+
> svg {
|
|
7
|
+
color: ${props => props.theme.colors.headingColor};
|
|
8
|
+
font-size: 24px;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
margin-bottom: 5px;
|
|
11
|
+
}
|
|
12
|
+
> div {
|
|
13
|
+
background-color: ${({ theme }) => theme?.business_view?.components?.style?.backgroundColor};
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
`
|
|
7
17
|
|
|
8
18
|
export const ProductLoading = styled.div`
|
|
@@ -138,6 +148,22 @@ export const HeaderContent = styled.div`
|
|
|
138
148
|
font-size: 24px;
|
|
139
149
|
cursor: pointer;
|
|
140
150
|
}
|
|
151
|
+
.fixed-arrow {
|
|
152
|
+
position: fixed;
|
|
153
|
+
top: 0;
|
|
154
|
+
left: 0;
|
|
155
|
+
z-index: 1001;
|
|
156
|
+
width: 100vw;
|
|
157
|
+
background-color: ${props => props.theme.colors.backgroundPage};
|
|
158
|
+
height: 56px;
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
${props => props.theme?.rtl ? css`
|
|
162
|
+
padding-right: 10px;
|
|
163
|
+
` : css`
|
|
164
|
+
padding-left: 10px;
|
|
165
|
+
`}
|
|
166
|
+
}
|
|
141
167
|
`
|
|
142
168
|
export const OrderContextUIWrapper = styled.div`
|
|
143
169
|
flex: 1;
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -87,7 +87,8 @@ const BusinessesListingUI = (props) => {
|
|
|
87
87
|
const [hasHighRatedBusiness, setHasHighRatedBusiness] = useState(true)
|
|
88
88
|
const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
|
|
89
89
|
const [favoriteIds, setFavoriteIds] = useState([])
|
|
90
|
-
const
|
|
90
|
+
const allCitiesDisabled = citiesState?.cities?.every(city => !city.enabled)
|
|
91
|
+
const hideCities = (theme?.business_listing_view?.components?.cities?.hidden || orderState?.options?.type !== 2 || allCitiesDisabled) ?? true
|
|
91
92
|
const hideSearch = theme?.business_listing_view?.components?.search?.hidden
|
|
92
93
|
const hideFilter = theme?.business_listing_view?.components?.filter?.hidden || hideSearch
|
|
93
94
|
const hideHero = theme?.business_listing_view?.components?.business_hero?.hidden
|
|
@@ -186,6 +187,12 @@ const BusinessesListingUI = (props) => {
|
|
|
186
187
|
setFavoriteIds([...new Set(ids)])
|
|
187
188
|
}, [businessesList?.businesses?.length])
|
|
188
189
|
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
if (!citiesState?.cities?.length || !orderState?.options?.city_id) return
|
|
192
|
+
const selectedCity = citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)
|
|
193
|
+
if (!selectedCity || !selectedCity?.enabled) changeCityFilter(null)
|
|
194
|
+
}, [citiesState, orderState?.options?.city_id])
|
|
195
|
+
|
|
189
196
|
if (logosLayout) {
|
|
190
197
|
return (
|
|
191
198
|
<BusinessLogosWrapper>
|
|
@@ -218,7 +225,7 @@ const BusinessesListingUI = (props) => {
|
|
|
218
225
|
{(windowSize.width < 576 || (configs?.business_listing_hide_image?.value !== '1' && !isChew)) && (
|
|
219
226
|
<BusinessBanner>
|
|
220
227
|
{windowSize.width < 576 && (
|
|
221
|
-
<OrderContextUI isBusinessList hideHero={!hideHero} />
|
|
228
|
+
<OrderContextUI isBusinessList hideHero={(!!configs?.business_listing_hide_image?.value && !hideHero)} />
|
|
222
229
|
)}
|
|
223
230
|
{(configs?.business_listing_hide_image?.value !== '1' && !isChew) && !hideHero && (
|
|
224
231
|
<BusinessHeroImg
|
|
@@ -135,9 +135,8 @@ const CartUI = (props) => {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
).toFixed(configs.format_number_decimal_length?.value ?? 2), 10)
|
|
138
|
+
const clearAmount = (value) => parseFloat((Math.trunc(value * 100) / 100).toFixed(configs.format_number_decimal_length?.value ?? 2))
|
|
139
|
+
const loyaltyRewardValue = clearAmount((cart?.subtotal + getIncludedTaxes()) * loyaltyRewardRate)
|
|
141
140
|
|
|
142
141
|
const momentFormatted = !orderState?.option?.moment
|
|
143
142
|
? t('RIGHT_NOW', 'Right Now')
|
|
@@ -511,7 +510,7 @@ const CartUI = (props) => {
|
|
|
511
510
|
<td>{t('TOTAL', 'Total')}</td>
|
|
512
511
|
<td>{parsePrice(cart?.total >= 0 ? cart?.total : 0)}</td>
|
|
513
512
|
</tr>
|
|
514
|
-
{!!loyaltyRewardValue && isFinite(loyaltyRewardValue) &&
|
|
513
|
+
{!!loyaltyRewardValue && isFinite(loyaltyRewardValue) && isCheckout && (
|
|
515
514
|
<tr>
|
|
516
515
|
<td> </td>
|
|
517
516
|
<td id='loyalty'>{t('REWARD_LOYALTY_POINT', 'Reward :amount: on loyalty points').replace(':amount:', loyaltyRewardValue)}</td>
|
|
@@ -47,7 +47,9 @@ import {
|
|
|
47
47
|
MobileWrapperPlaceOrderButton,
|
|
48
48
|
OrderContextUIWrapper,
|
|
49
49
|
HeaderContent,
|
|
50
|
-
AuthButtonList
|
|
50
|
+
AuthButtonList,
|
|
51
|
+
Flag,
|
|
52
|
+
SectionTitleContainer
|
|
51
53
|
} from './styles'
|
|
52
54
|
|
|
53
55
|
import { Button } from '../../styles/Buttons'
|
|
@@ -141,6 +143,8 @@ const CheckoutUI = (props) => {
|
|
|
141
143
|
const isGiftCardCart = !cart?.business_id
|
|
142
144
|
// const [hasBusinessPlaces, setHasBusinessPlaces] = useState(null)
|
|
143
145
|
|
|
146
|
+
const validateCommentsCartField = validationFields?.fields?.checkout?.comments?.enabled && validationFields?.fields?.checkout?.comments?.required && (cart?.comment === null || cart?.comment?.trim().length === 0)
|
|
147
|
+
|
|
144
148
|
const isDisablePlaceOrderButton = !cart?.valid ||
|
|
145
149
|
(!paymethodSelected && cart?.balance > 0) ||
|
|
146
150
|
(paymethodSelected?.gateway === 'stripe' && cardList?.cards?.length === 0) ||
|
|
@@ -154,7 +158,8 @@ const CheckoutUI = (props) => {
|
|
|
154
158
|
(options.type === 1 &&
|
|
155
159
|
validationFields?.fields?.checkout?.driver_tip?.enabled &&
|
|
156
160
|
validationFields?.fields?.checkout?.driver_tip?.required &&
|
|
157
|
-
(Number(cart?.driver_tip) <= 0))
|
|
161
|
+
(Number(cart?.driver_tip) <= 0)) ||
|
|
162
|
+
(validateCommentsCartField)
|
|
158
163
|
|
|
159
164
|
const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
|
|
160
165
|
? JSON.parse(configs?.driver_tip_options?.value) || []
|
|
@@ -168,7 +173,7 @@ const CheckoutUI = (props) => {
|
|
|
168
173
|
|
|
169
174
|
const hideBusinessAddress = theme?.checkout?.components?.business?.components?.address?.hidden
|
|
170
175
|
const hideBusinessDetails = theme?.checkout?.components?.business?.hidden
|
|
171
|
-
const hideBusinessMap = theme?.checkout?.components?.
|
|
176
|
+
const hideBusinessMap = theme?.checkout?.components?.map?.hidden
|
|
172
177
|
const hideCustomerDetails = theme?.checkout?.components?.customer?.hidden
|
|
173
178
|
const driverTipsField = !cartState.loading && cart && cart?.business_id && options.type === 1 && cart?.status !== 2 && validationFields?.fields?.checkout?.driver_tip?.enabled && driverTipsOptions.length > 0 && !useKioskApp
|
|
174
179
|
|
|
@@ -474,7 +479,10 @@ const CheckoutUI = (props) => {
|
|
|
474
479
|
|
|
475
480
|
{!cartState.loading && cart && (
|
|
476
481
|
<PaymentMethodContainer className='paymentsContainer'>
|
|
477
|
-
<
|
|
482
|
+
<SectionTitleContainer>
|
|
483
|
+
<h1>{t('PAYMENT_METHODS', 'Payment Methods')}</h1>
|
|
484
|
+
<Flag>{t('REQUIRED', 'Required')}</Flag>
|
|
485
|
+
</SectionTitleContainer>
|
|
478
486
|
{!cartState.loading && cart?.status === 4 && (
|
|
479
487
|
<WarningMessage style={{ marginTop: 20 }}>
|
|
480
488
|
<VscWarning />
|
|
@@ -644,6 +652,12 @@ const CheckoutUI = (props) => {
|
|
|
644
652
|
</WarningText>
|
|
645
653
|
)}
|
|
646
654
|
|
|
655
|
+
{validateCommentsCartField && (
|
|
656
|
+
<WarningText>
|
|
657
|
+
{t('WARNING_INVALID_CART_COMMENTS', 'Cart comments is required.')}
|
|
658
|
+
</WarningText>
|
|
659
|
+
)}
|
|
660
|
+
|
|
647
661
|
{cart?.valid_preorder !== undefined && !cart?.valid_preorder && (
|
|
648
662
|
<WarningText>
|
|
649
663
|
{t('INVALID_CART_MOMENT', 'Selected schedule time is invalid, please select a schedule into the business schedule interval.')}
|