ordering-ui-external 2.4.6 → 2.5.1
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.5488030edb520175432d.js} +1 -1
- package/_bundles/{1.ordering-ui.038c4b4d536032472bc7.js → 1.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{2.ordering-ui.038c4b4d536032472bc7.js → 2.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{4.ordering-ui.038c4b4d536032472bc7.js → 4.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{5.ordering-ui.038c4b4d536032472bc7.js → 5.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{6.ordering-ui.038c4b4d536032472bc7.js → 6.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js → 7.ordering-ui.5488030edb520175432d.js} +2 -2
- package/_bundles/{8.ordering-ui.038c4b4d536032472bc7.js → 8.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{9.ordering-ui.038c4b4d536032472bc7.js → 9.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/ordering-ui.5488030edb520175432d.js +2 -0
- package/_modules/components/OrdersOption/styles.js +1 -1
- package/_modules/components/StripeMethodForm/index.js +26 -11
- 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/CitiesControl/index.js +1 -1
- 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/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
- package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +36 -5
- package/_modules/themes/five/src/components/MultiCheckout/index.js +35 -6
- 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 +4 -3
- 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/PaymentOptions/index.js +8 -5
- 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/StripeElementsForm/index.js +3 -1
- 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/StripeMethodForm/index.js +22 -10
- 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/CitiesControl/index.js +1 -1
- 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/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
- package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +83 -51
- package/src/themes/five/src/components/MultiCheckout/index.js +21 -6
- 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 +6 -3
- 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/PaymentOptions/index.js +7 -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/StripeElementsForm/index.js +3 -1
- 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.5488030edb520175432d.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
|
@@ -47,10 +47,18 @@ const SingleOrderCardUI = (props) => {
|
|
|
47
47
|
onRedirectPage({ page, params })
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
const hideBusinessLogo = theme?.orders?.components?.business_logo?.hidden
|
|
51
|
+
const hideDate = theme?.orders?.components?.date?.hidden
|
|
52
|
+
const hideBusinessName = theme?.orders?.components?.business_name?.hidden
|
|
53
|
+
const hideOrderNumber = theme?.orders?.components?.order_number?.hidden
|
|
54
|
+
const hideReviewOrderButton = theme?.orders?.components?.review_order_button?.hidden
|
|
55
|
+
const hideReorderButton = theme?.orders?.components?.reorder_button?.hidden
|
|
56
|
+
const hideOrderStatus = theme?.orders?.components?.order_status?.hidden
|
|
57
|
+
|
|
50
58
|
return (
|
|
51
59
|
<SingleCard key={order.id} id='order-card' onClick={(e) => handleClickCard(e, order)}>
|
|
52
60
|
<OrderPastContent>
|
|
53
|
-
{(order.business?.logo || theme.images?.dummies?.businessLogo) && (
|
|
61
|
+
{!hideBusinessLogo && (order.business?.logo || theme.images?.dummies?.businessLogo) && (
|
|
54
62
|
<>
|
|
55
63
|
{order?.business?.length > 1 ? (
|
|
56
64
|
<MultiLogosContainer>
|
|
@@ -77,7 +85,9 @@ const SingleOrderCardUI = (props) => {
|
|
|
77
85
|
)}
|
|
78
86
|
<BusinessInformation>
|
|
79
87
|
<WrapperBusinessTitle>
|
|
80
|
-
|
|
88
|
+
{!hideBusinessName && (
|
|
89
|
+
<h2>{order?.business?.length > 1 ? `${t('GROUP_ORDER', 'Group Order')} ${t('No', 'No')}. ${order?.cart_group_id}` : order.business?.name}</h2>
|
|
90
|
+
)}
|
|
81
91
|
{!order?.business?.length && (
|
|
82
92
|
<FavoriteWrapper onClick={() => handleChangeFavorite(order)} className='favorite'>
|
|
83
93
|
{order?.favorite ? <Like /> : <DisLike />}
|
|
@@ -85,30 +95,38 @@ const SingleOrderCardUI = (props) => {
|
|
|
85
95
|
)}
|
|
86
96
|
</WrapperBusinessTitle>
|
|
87
97
|
<OrderInfo>
|
|
88
|
-
{order?.id && (
|
|
98
|
+
{!hideOrderNumber && order?.id && (
|
|
89
99
|
<>
|
|
90
100
|
<p name='order_number'>{order?.business?.length > 1 ? `${order?.business?.length} ${t('ORDERS', 'orders')}` : `${t('ORDER_NUM', 'Order No.')} ${order.id}`}</p>
|
|
91
101
|
<BsDot className='dot' />
|
|
92
102
|
</>
|
|
93
103
|
)}
|
|
94
|
-
|
|
104
|
+
{!hideDate && (
|
|
105
|
+
<p>{order?.delivery_datetime_utc ? parseDate(order?.delivery_datetime_utc) : parseDate(order?.delivery_datetime, { utc: false })}</p>
|
|
106
|
+
)}
|
|
95
107
|
</OrderInfo>
|
|
96
|
-
|
|
108
|
+
{!hideOrderStatus && (
|
|
109
|
+
<p className='status'>{getOrderStatus(order.status)?.value}</p>
|
|
110
|
+
)}
|
|
97
111
|
</BusinessInformation>
|
|
98
112
|
</OrderPastContent>
|
|
99
113
|
<Reorder>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
{!hideReviewOrderButton && (
|
|
115
|
+
<Button
|
|
116
|
+
outline
|
|
117
|
+
disabled={!!order?.review}
|
|
118
|
+
color='primary'
|
|
119
|
+
className='review'
|
|
120
|
+
onClick={() => setOrderSelected(order)}
|
|
121
|
+
>
|
|
122
|
+
{!!order?.review ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')}
|
|
123
|
+
</Button>
|
|
124
|
+
)}
|
|
125
|
+
{!hideReorderButton && typeof order?.id === 'number' && (
|
|
126
|
+
<Button color='primary' className='reorder' outline onClick={() => handleReorder(order.id)}>
|
|
127
|
+
{orderID === order.id && reorderLoading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder')}
|
|
128
|
+
</Button>
|
|
129
|
+
)}
|
|
112
130
|
</Reorder>
|
|
113
131
|
</SingleCard>
|
|
114
132
|
)
|
|
@@ -76,12 +76,21 @@ export const PastLogo = styled.div`
|
|
|
76
76
|
object-fit: contain;
|
|
77
77
|
}
|
|
78
78
|
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 10px;
|
|
79
|
+
display: none;
|
|
80
|
+
|
|
81
|
+
@media (min-width: 480px) {
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
79
84
|
`
|
|
80
85
|
|
|
81
86
|
export const WrapperBusinessTitle = styled.div`
|
|
82
87
|
width: 95%;
|
|
83
88
|
display: flex;
|
|
84
89
|
gap: 10px;
|
|
90
|
+
|
|
91
|
+
@media (min-width: 480px) {
|
|
92
|
+
width: 80%;
|
|
93
|
+
}
|
|
85
94
|
`
|
|
86
95
|
|
|
87
96
|
export const Reorder = styled.div`
|
|
@@ -101,6 +101,7 @@ export const ThemeProvider = ({ children, ...props }) => {
|
|
|
101
101
|
font.rel = 'stylesheet'
|
|
102
102
|
font.async = true
|
|
103
103
|
font.defer = true
|
|
104
|
+
font.name = fontFamily.name
|
|
104
105
|
font.href = `https://fonts.googleapis.com/css2?family=${fontFamily.name}:wght@${fontFamily.weights.join(';')}&display=swap`
|
|
105
106
|
|
|
106
107
|
window.document.body.appendChild(font)
|
|
@@ -88,11 +88,11 @@ const AddressListUI = (props) => {
|
|
|
88
88
|
address.internal_number === obj.internal_number
|
|
89
89
|
)))) || []
|
|
90
90
|
|
|
91
|
-
const showAddress = !
|
|
92
|
-
const showIcons = !
|
|
93
|
-
const showZipcode = !
|
|
94
|
-
const showInternalNumber = !
|
|
95
|
-
const notFoundImage =
|
|
91
|
+
const showAddress = !theme?.profile?.components?.address_list?.components?.address?.hidden
|
|
92
|
+
const showIcons = !theme?.profile?.components?.address_list?.components?.icons?.hidden
|
|
93
|
+
const showZipcode = !theme?.profile?.components?.address_list?.components?.zipcode?.hidden
|
|
94
|
+
const showInternalNumber = !theme?.profile?.components?.address_list?.components?.internal_number?.hidden
|
|
95
|
+
const notFoundImage = theme?.profile?.components?.address_list?.components?.image
|
|
96
96
|
const openAddress = (address) => {
|
|
97
97
|
setCurAddress(address)
|
|
98
98
|
setAddressOpen(true)
|
|
@@ -193,7 +193,7 @@ const AddressListUI = (props) => {
|
|
|
193
193
|
const AddressListCallcenterLayout = ({ children }) => {
|
|
194
194
|
return (
|
|
195
195
|
<AddressHalfContainer>
|
|
196
|
-
<List halfWidth={addressOpen}>
|
|
196
|
+
<List halfWidth={addressOpen} id='address_list'>
|
|
197
197
|
{children}
|
|
198
198
|
</List>
|
|
199
199
|
{addressOpen && (
|
|
@@ -36,7 +36,6 @@ import {
|
|
|
36
36
|
IconWrapper,
|
|
37
37
|
BusinessInfoWrapper,
|
|
38
38
|
WrapperFloatingSearch,
|
|
39
|
-
CategorySelectedContainer,
|
|
40
39
|
SearchWrapper
|
|
41
40
|
} from './styles'
|
|
42
41
|
import { BusinessPreorder } from '../BusinessPreorder'
|
|
@@ -45,7 +44,6 @@ import dayjs from 'dayjs'
|
|
|
45
44
|
import timezone from 'dayjs/plugin/timezone'
|
|
46
45
|
import isBetween from 'dayjs/plugin/isBetween'
|
|
47
46
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
48
|
-
import BsCaretLeftFill from '@meronex/icons/bs/BsCaretLeftFill'
|
|
49
47
|
|
|
50
48
|
dayjs.extend(timezone)
|
|
51
49
|
dayjs.extend(isBetween)
|
|
@@ -65,10 +63,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
65
63
|
handleChangeSortBy,
|
|
66
64
|
categoryState,
|
|
67
65
|
errorQuantityProducts,
|
|
68
|
-
isCustomerMode
|
|
69
|
-
categoryClicked,
|
|
70
|
-
categorySelected,
|
|
71
|
-
setCategoryClicked
|
|
66
|
+
isCustomerMode
|
|
72
67
|
} = props
|
|
73
68
|
const { business, loading } = businessState
|
|
74
69
|
|
|
@@ -137,20 +132,32 @@ export const BusinessBasicInformation = (props) => {
|
|
|
137
132
|
|
|
138
133
|
const handleScroll = () => {
|
|
139
134
|
const searchElement = document.getElementById('search-component')
|
|
140
|
-
if (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
135
|
+
if (searchElement) {
|
|
136
|
+
const limit = window.pageYOffset >= searchElement?.offsetTop && window.pageYOffset > 0
|
|
137
|
+
if (limit) {
|
|
138
|
+
const classAdded = searchElement.classList.contains('fixed-search')
|
|
139
|
+
!classAdded && searchElement.classList.add('fixed-search')
|
|
140
|
+
} else {
|
|
141
|
+
searchElement && searchElement.classList.remove('fixed-search')
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const businessNameElement = document.getElementById('business_name')
|
|
146
|
+
if (businessNameElement) {
|
|
147
|
+
const limit = window.pageYOffset >= (businessNameElement?.offsetTop - 55) && window.pageYOffset > 0
|
|
148
|
+
if (limit && windowSize.width < 993) {
|
|
149
|
+
const classAdded = businessNameElement.classList.contains('fixed-name')
|
|
150
|
+
!classAdded && businessNameElement.classList.add('fixed-name')
|
|
151
|
+
} else {
|
|
152
|
+
businessNameElement && businessNameElement.classList.remove('fixed-name')
|
|
153
|
+
}
|
|
147
154
|
}
|
|
148
155
|
}
|
|
149
156
|
|
|
150
157
|
useEffect(() => {
|
|
151
158
|
window.addEventListener('scroll', handleScroll)
|
|
152
159
|
return () => window.removeEventListener('scroll', handleScroll)
|
|
153
|
-
}, [])
|
|
160
|
+
}, [windowSize?.width])
|
|
154
161
|
|
|
155
162
|
useEffect(() => {
|
|
156
163
|
window.scroll({
|
|
@@ -161,12 +168,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
161
168
|
|
|
162
169
|
const SearchComponent = () => {
|
|
163
170
|
return (
|
|
164
|
-
<WrapperSearch id='search-component'
|
|
165
|
-
{categorySelected?.name && windowSize.width < 768 && (
|
|
166
|
-
<CategorySelectedContainer onClick={() => setCategoryClicked(false)}>
|
|
167
|
-
<BsCaretLeftFill /> {categorySelected?.name}
|
|
168
|
-
</CategorySelectedContainer>
|
|
169
|
-
)}
|
|
171
|
+
<WrapperSearch id='search-component'>
|
|
170
172
|
<SearchWrapper>
|
|
171
173
|
<SearchIconWrapper
|
|
172
174
|
onClick={() => setOpenSearchProducts(true)}
|
|
@@ -203,7 +205,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
203
205
|
<BusinessInfoItem isInfoShrunken={isInfoShrunken}>
|
|
204
206
|
{!loading ? (
|
|
205
207
|
<TitleWrapper>
|
|
206
|
-
<h2 className='bold'>{business?.name}</h2>
|
|
208
|
+
<h2 className='bold' id='business_name'>{business?.name}</h2>
|
|
207
209
|
{business?.ribbon?.enabled && (
|
|
208
210
|
<RibbonBox
|
|
209
211
|
bgColor={business?.ribbon?.color}
|
|
@@ -367,7 +369,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
367
369
|
!errorQuantityProducts &&
|
|
368
370
|
!isInfoShrunken &&
|
|
369
371
|
!business?.professionals?.length &&
|
|
370
|
-
(categoryClicked || windowSize.width >= 993) &&
|
|
372
|
+
// (categoryClicked || windowSize.width >= 993) &&
|
|
371
373
|
(
|
|
372
374
|
<SearchComponent />
|
|
373
375
|
)}
|
|
@@ -203,8 +203,9 @@ export const WrapperSearch = styled.div`
|
|
|
203
203
|
margin: 15px 0px 0px;
|
|
204
204
|
display: flex;
|
|
205
205
|
align-items: center;
|
|
206
|
-
justify-content:
|
|
206
|
+
justify-content: flex-end;
|
|
207
207
|
box-sizing: border-box;
|
|
208
|
+
z-index: 1002;
|
|
208
209
|
|
|
209
210
|
.search-bar {
|
|
210
211
|
margin-right: 10px;
|
|
@@ -241,13 +242,20 @@ export const WrapperSearch = styled.div`
|
|
|
241
242
|
&.fixed-search {
|
|
242
243
|
position: fixed;
|
|
243
244
|
top: 0;
|
|
244
|
-
|
|
245
|
+
right: 0;
|
|
245
246
|
z-index: 1002;
|
|
246
|
-
width:
|
|
247
|
+
width: fit-content;
|
|
247
248
|
margin-top: 0px;
|
|
248
249
|
background-color: ${props => props.theme.colors.backgroundPage};
|
|
249
250
|
padding: 10px;
|
|
250
251
|
}
|
|
252
|
+
|
|
253
|
+
@media (min-width: 993px) {
|
|
254
|
+
&.fixed-search {
|
|
255
|
+
left: 0;
|
|
256
|
+
width: 100vw;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
251
259
|
`
|
|
252
260
|
|
|
253
261
|
export const BusinessDetail = styled.div`
|
|
@@ -356,6 +364,19 @@ export const TitleWrapper = styled.div`
|
|
|
356
364
|
overflow: hidden;
|
|
357
365
|
white-space: nowrap;
|
|
358
366
|
text-overflow: ellipsis;
|
|
367
|
+
&.fixed-name {
|
|
368
|
+
z-index: 1002;
|
|
369
|
+
position: fixed;
|
|
370
|
+
top: 0;
|
|
371
|
+
width: calc(100vw - 190px);
|
|
372
|
+
padding: 10px 0;
|
|
373
|
+
font-size: 18px;
|
|
374
|
+
${props => props.theme?.rtl ? css`
|
|
375
|
+
right: 50px;
|
|
376
|
+
` : css`
|
|
377
|
+
left: 50px;
|
|
378
|
+
`}
|
|
379
|
+
}
|
|
359
380
|
@media (min-width: 768px) {
|
|
360
381
|
font-size: 32px;
|
|
361
382
|
}
|
|
@@ -86,6 +86,8 @@ const BusinessControllerUI = (props) => {
|
|
|
86
86
|
const hideBusinessReviews = theme?.business_listing_view?.components?.business?.components?.reviews?.hidden
|
|
87
87
|
const hideBusinessFavorite = theme?.business_listing_view?.components?.business?.components?.favorite?.hidden
|
|
88
88
|
const hideBusinessOffer = theme?.business_listing_view?.components?.business?.components?.offer?.hidden
|
|
89
|
+
const hideBusinessHeader = theme?.business_listing_view?.components?.business?.components?.header?.hidden
|
|
90
|
+
const hideBusinessFavoriteBadge = theme?.business_listing_view?.components?.business?.components?.featured_badge?.hidden
|
|
89
91
|
|
|
90
92
|
// const handleShowAlert = () => {
|
|
91
93
|
// setAlertState({ open: true, content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')] })
|
|
@@ -165,9 +167,9 @@ const BusinessControllerUI = (props) => {
|
|
|
165
167
|
{isSkeleton ? (
|
|
166
168
|
<Skeleton height={isCustomerMode ? 100 : 140} />
|
|
167
169
|
) : (
|
|
168
|
-
<BusinessHeader bgimage={optimizeImage((businessHeader || business?.header || theme.images?.dummies?.businessHeader), 'h_400,c_limit')} isClosed={!isBusinessOpen}>
|
|
170
|
+
<BusinessHeader bgimage={!hideBusinessHeader ? optimizeImage((businessHeader || business?.header || theme.images?.dummies?.businessHeader), 'h_400,c_limit') : ''} isClosed={!isBusinessOpen}>
|
|
169
171
|
<BusinessTags>
|
|
170
|
-
{(businessFeatured ?? business?.featured) &&
|
|
172
|
+
{(businessFeatured ?? business?.featured) && !hideBusinessFavoriteBadge &&
|
|
171
173
|
<span className='crown'>
|
|
172
174
|
<FaCrown />
|
|
173
175
|
</span>}
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from './styles'
|
|
27
27
|
import MdClose from '@meronex/icons/md/MdClose'
|
|
28
28
|
import { ScheduleAccordion } from '../ScheduleAccordion'
|
|
29
|
+
import { useTheme } from 'styled-components'
|
|
29
30
|
|
|
30
31
|
export const BusinessInformationUI = (props) => {
|
|
31
32
|
const {
|
|
@@ -41,10 +42,17 @@ export const BusinessInformationUI = (props) => {
|
|
|
41
42
|
const [{ configs }] = useConfig()
|
|
42
43
|
const [modalImage, setModalImage] = useState(false)
|
|
43
44
|
const [image, setImage] = useState('')
|
|
44
|
-
const
|
|
45
|
+
const theme = useTheme()
|
|
45
46
|
|
|
46
|
-
const
|
|
47
|
-
const
|
|
47
|
+
const hideLocation = theme?.business_view?.components?.information?.components?.location?.hidden
|
|
48
|
+
const hideSchedule = theme?.business_view?.components?.information?.components?.schedule?.hidden
|
|
49
|
+
const hideDescription = theme?.business_view?.components?.information?.components?.description?.hidden
|
|
50
|
+
const hideAbout = theme?.business_view?.components?.information?.components?.about?.hidden
|
|
51
|
+
const hideVideos = theme?.business_view?.components?.information?.components?.videos?.hidden
|
|
52
|
+
const hideDeliveryTime = theme?.business_view?.components?.information?.components?.delivery_time?.hidden
|
|
53
|
+
const hidePickupTime = theme?.business_view?.components?.information?.components?.pickup_time?.hidden
|
|
54
|
+
const hideImages = theme?.business_view?.components?.information?.components?.images?.hidden
|
|
55
|
+
const hideAddress = theme?.business_view?.components?.information?.components?.address?.hidden
|
|
48
56
|
|
|
49
57
|
const scheduleFormatted = ({ hour, minute }) => {
|
|
50
58
|
const checkTime = (val) => val < 10 ? `0${val}` : val
|
|
@@ -70,20 +78,20 @@ export const BusinessInformationUI = (props) => {
|
|
|
70
78
|
</ModalIcon>
|
|
71
79
|
<BusinessContent>
|
|
72
80
|
<BusinessTitle>{business?.name}</BusinessTitle>
|
|
73
|
-
{business.about && (
|
|
81
|
+
{!hideAbout && business.about && (
|
|
74
82
|
<>
|
|
75
83
|
<SectionTitle>{t('BUSINESS_ABOUT', 'Business short description')}</SectionTitle>
|
|
76
84
|
<Description>{business.about}</Description>
|
|
77
85
|
</>
|
|
78
86
|
)}
|
|
79
|
-
{business.description && (
|
|
87
|
+
{!hideDescription && business.description && (
|
|
80
88
|
<>
|
|
81
89
|
<SectionTitle>{t('BUSINESS_DESCRIPTION', 'Business description')}</SectionTitle>
|
|
82
90
|
<Description>{business.description}</Description>
|
|
83
91
|
</>
|
|
84
92
|
)}
|
|
85
93
|
{
|
|
86
|
-
|
|
94
|
+
!hideLocation && (
|
|
87
95
|
<>
|
|
88
96
|
{businessLocation.location && (
|
|
89
97
|
<>
|
|
@@ -100,7 +108,7 @@ export const BusinessInformationUI = (props) => {
|
|
|
100
108
|
</>
|
|
101
109
|
)}
|
|
102
110
|
{
|
|
103
|
-
business?.address && <BusinessAddress>{business?.address}</BusinessAddress>
|
|
111
|
+
!hideAddress && business?.address && <BusinessAddress>{business?.address}</BusinessAddress>
|
|
104
112
|
}
|
|
105
113
|
<Divider />
|
|
106
114
|
</>
|
|
@@ -108,7 +116,7 @@ export const BusinessInformationUI = (props) => {
|
|
|
108
116
|
}
|
|
109
117
|
{businessSchedule?.length > 0 && (
|
|
110
118
|
<>
|
|
111
|
-
{
|
|
119
|
+
{!hideSchedule && (
|
|
112
120
|
<>
|
|
113
121
|
<SectionTitle>{t('OPENING_TIME', 'Opening time')}</SectionTitle>
|
|
114
122
|
<ScheduleSection>
|
|
@@ -128,14 +136,18 @@ export const BusinessInformationUI = (props) => {
|
|
|
128
136
|
)}
|
|
129
137
|
<DeliveryInfo>
|
|
130
138
|
<div>
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
{!hideDeliveryTime && (
|
|
140
|
+
<h5>{t('DELIVERY_TIME', 'Delivery Time')}: {convertHoursToMinutes(business?.delivery_time)}</h5>
|
|
141
|
+
)}
|
|
142
|
+
{!hidePickupTime && (
|
|
143
|
+
<h5>{t('PICKUP_TIME', 'Pickup Time')}: {convertHoursToMinutes(business?.pickup_time)}</h5>
|
|
144
|
+
)}
|
|
133
145
|
</div>
|
|
134
146
|
</DeliveryInfo>
|
|
135
147
|
<Divider />
|
|
136
148
|
</>
|
|
137
149
|
)}
|
|
138
|
-
{businessVideos?.length > 0 && (
|
|
150
|
+
{!hideVideos && businessVideos?.length > 0 && (
|
|
139
151
|
<BusinessMediaContent>
|
|
140
152
|
<SectionTitle>{t('VIDEOS', 'Videos')}</SectionTitle>
|
|
141
153
|
<div>
|
|
@@ -146,7 +158,7 @@ export const BusinessInformationUI = (props) => {
|
|
|
146
158
|
</BusinessMediaContent>
|
|
147
159
|
)}
|
|
148
160
|
<Divider />
|
|
149
|
-
{businessPhotos?.length > 0 && (
|
|
161
|
+
{!hideImages && businessPhotos?.length > 0 && (
|
|
150
162
|
<BusinessMediaContent>
|
|
151
163
|
<SectionTitle>{t('IMAGES', 'Images')}</SectionTitle>
|
|
152
164
|
<div>
|
|
@@ -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>
|