ordering-ui-external 10.6.2 → 10.7.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.fd929d6879c63ef1ff62.js → 0.ordering-ui.69ebaa12d869719caa38.js} +1 -1
- package/_bundles/{4.ordering-ui.fd929d6879c63ef1ff62.js → 4.ordering-ui.69ebaa12d869719caa38.js} +1 -1
- package/_bundles/{7.ordering-ui.fd929d6879c63ef1ff62.js → 7.ordering-ui.69ebaa12d869719caa38.js} +1 -1
- package/_bundles/ordering-ui.69ebaa12d869719caa38.js +2 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +31 -17
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +21 -11
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +15 -5
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +183 -59
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +55 -9
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +25 -3
- package/_modules/themes/five/src/components/MyOrders/index.js +11 -2
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +21 -18
- package/_modules/themes/five/src/components/PageBanner/index.js +23 -9
- package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +5 -2
- package/_modules/themes/five/src/components/UserDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/WebsocketStatus/index.js +6 -3
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -13
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +20 -7
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +26 -14
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +13 -5
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +210 -68
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +127 -11
- package/src/themes/five/src/components/BusinessProductsListing/index.js +21 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
- package/src/themes/five/src/components/MyOrders/index.js +5 -1
- package/src/themes/five/src/components/OrderDetails/index.js +2 -0
- package/src/themes/five/src/components/OrdersOption/index.js +5 -3
- package/src/themes/five/src/components/PageBanner/index.js +14 -4
- package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -2
- package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -0
- package/src/themes/five/src/components/RenderProductsLayout/index.js +4 -1
- package/src/themes/five/src/components/UserDetails/styles.js +2 -2
- package/src/themes/five/src/components/WebsocketStatus/index.js +4 -4
- package/_bundles/ordering-ui.fd929d6879c63ef1ff62.js +0 -2
- /package/_bundles/{1.ordering-ui.fd929d6879c63ef1ff62.js → 1.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{2.ordering-ui.fd929d6879c63ef1ff62.js → 2.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{5.ordering-ui.fd929d6879c63ef1ff62.js → 5.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{6.ordering-ui.fd929d6879c63ef1ff62.js → 6.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{7.ordering-ui.fd929d6879c63ef1ff62.js.LICENSE.txt → 7.ordering-ui.69ebaa12d869719caa38.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.fd929d6879c63ef1ff62.js → 8.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{9.ordering-ui.fd929d6879c63ef1ff62.js → 9.ordering-ui.69ebaa12d869719caa38.js} +0 -0
- /package/_bundles/{ordering-ui.fd929d6879c63ef1ff62.js.LICENSE.txt → ordering-ui.69ebaa12d869719caa38.js.LICENSE.txt} +0 -0
|
@@ -114,9 +114,11 @@ const OrdersOptionUI = (props) => {
|
|
|
114
114
|
const outsideModal = !window.document.getElementById('app-modals') ||
|
|
115
115
|
!window.document.getElementById('app-modals').contains(e.target)
|
|
116
116
|
if (outsideModal) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
if (reorderState?.result?.business?.slug) {
|
|
118
|
+
const _businessId = 'businessId:' + reorderState?.result?.business_id
|
|
119
|
+
sessionStorage.setItem('adjust-cart-products', _businessId)
|
|
120
|
+
onRedirectPage && onRedirectPage({ page: 'business', params: { store: reorderState?.result?.business?.slug } })
|
|
121
|
+
}
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
|
|
@@ -23,7 +23,9 @@ SwiperCore.use([Navigation])
|
|
|
23
23
|
const PageBannerUI = (props) => {
|
|
24
24
|
const {
|
|
25
25
|
pageBannerState,
|
|
26
|
-
isCustomerMode
|
|
26
|
+
isCustomerMode,
|
|
27
|
+
handleCustomProductBannerClick,
|
|
28
|
+
business
|
|
27
29
|
} = props
|
|
28
30
|
|
|
29
31
|
const [{ site }] = useSite()
|
|
@@ -116,9 +118,15 @@ const PageBannerUI = (props) => {
|
|
|
116
118
|
slug = action.url.split('store/')[1]?.split('?')[0]
|
|
117
119
|
const paramString = action.url.split('?')[1]
|
|
118
120
|
const urlParams = new URLSearchParams(paramString)
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
|
|
121
|
+
const productId = urlParams.get('product')
|
|
122
|
+
const categoryId = urlParams.get('category')
|
|
123
|
+
const foundCategory = business?.categories?.find(category => category.id === Number(categoryId))
|
|
124
|
+
const foundProduct = foundCategory?.products?.find(product => product.id === Number(productId))
|
|
125
|
+
if (business?.slug === slug && foundProduct) {
|
|
126
|
+
handleCustomProductBannerClick(foundProduct)
|
|
127
|
+
} else {
|
|
128
|
+
onProductRedirect({ slug, category: categoryId, product: productId })
|
|
129
|
+
}
|
|
122
130
|
}
|
|
123
131
|
}
|
|
124
132
|
|
|
@@ -136,6 +144,8 @@ const PageBannerUI = (props) => {
|
|
|
136
144
|
spaceBetween={0}
|
|
137
145
|
shortSwipes={false}
|
|
138
146
|
loop={pageBannerState.banner?.items.length > 1}
|
|
147
|
+
touchStartPreventDefault={false}
|
|
148
|
+
slidesPerView={1}
|
|
139
149
|
>
|
|
140
150
|
{pageBannerState.banner?.items.map((img, i) => (
|
|
141
151
|
<SwiperSlide
|
|
@@ -13,9 +13,8 @@ import { Modal } from '../Modal'
|
|
|
13
13
|
import { SignUpForm } from '../SignUpForm'
|
|
14
14
|
import { Button } from '../../styles/Buttons'
|
|
15
15
|
import { Alert } from '../Confirm'
|
|
16
|
-
import { UserDetails } from '../UserDetails'
|
|
17
16
|
import { AddressList } from '../AddressList'
|
|
18
|
-
|
|
17
|
+
import { UserDetails } from '../UserDetails'
|
|
19
18
|
import {
|
|
20
19
|
PhoneContainer,
|
|
21
20
|
ContentWrapper,
|
|
@@ -82,6 +82,8 @@ export const ProductItemAccordion = (props) => {
|
|
|
82
82
|
return product
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
const showArrowIcon = props.showArrowIcon && (productInfo()?.ingredients?.length > 0 || productInfo()?.options?.length > 0 || product?.comment)
|
|
86
|
+
|
|
85
87
|
const toggleAccordion = (e) => {
|
|
86
88
|
const isActionsClick = productSelect.current?.contains(e.target) || productActionsEdit.current?.contains(e.target) || productActionsDelete.current?.contains(e.target)
|
|
87
89
|
if ((!product?.valid_menu && isCartProduct) || isActionsClick) return
|
|
@@ -206,6 +208,8 @@ export const ProductItemAccordion = (props) => {
|
|
|
206
208
|
)}
|
|
207
209
|
</ProductInfo>
|
|
208
210
|
|
|
211
|
+
{showArrowIcon && <IosArrowDown className={`${setRotate}`} />}
|
|
212
|
+
|
|
209
213
|
{product.valid && (
|
|
210
214
|
<>
|
|
211
215
|
{(product?.valid || !isCartProduct) && windowSize.width > 410 && (
|
|
@@ -88,7 +88,8 @@ export const RenderProductsLayout = (props) => {
|
|
|
88
88
|
handleChangePriceFilterValues,
|
|
89
89
|
priceFilterValues,
|
|
90
90
|
handleUpdateProfessionals,
|
|
91
|
-
isCustomerMode
|
|
91
|
+
isCustomerMode,
|
|
92
|
+
handleCustomProductBannerClick
|
|
92
93
|
} = props
|
|
93
94
|
|
|
94
95
|
const theme = useTheme()
|
|
@@ -198,6 +199,8 @@ export const RenderProductsLayout = (props) => {
|
|
|
198
199
|
position='web_business_page'
|
|
199
200
|
businessId={businessState?.business?.id}
|
|
200
201
|
isCustomerMode={isCustomerMode}
|
|
202
|
+
handleCustomProductBannerClick={handleCustomProductBannerClick}
|
|
203
|
+
business={businessState?.business}
|
|
201
204
|
/>
|
|
202
205
|
</PageBannerWrapper>
|
|
203
206
|
)}
|
|
@@ -11,7 +11,7 @@ export const Header = styled.div`
|
|
|
11
11
|
h1 {
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
font-size: 20px;
|
|
14
|
-
color: ${props => props.theme.colors.darkTextColor};
|
|
14
|
+
color: ${props => props.theme.colors.darkTextColor};
|
|
15
15
|
margin: 0px 10px 0px 0px;
|
|
16
16
|
${props => props.theme?.rtl && css`
|
|
17
17
|
margin: 0px 0px 0px 10px;
|
|
@@ -91,7 +91,7 @@ export const TitleContainer = styled.div`
|
|
|
91
91
|
font-size: 24px;
|
|
92
92
|
}
|
|
93
93
|
${({ isAddressFormOpen }) => isAddressFormOpen && css`
|
|
94
|
-
h1{
|
|
94
|
+
h1{
|
|
95
95
|
width: 75%;
|
|
96
96
|
}
|
|
97
97
|
`}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { useLanguage, useUtils, WebsocketStatus as WebsocketStatusController } from 'ordering-components-external'
|
|
2
|
+
import { useLanguage, useUtils, WebsocketStatus as WebsocketStatusController, useConfig } from 'ordering-components-external'
|
|
3
3
|
import { InfoCircle } from 'react-bootstrap-icons'
|
|
4
4
|
import { Alert } from '../../../src/components/Confirm'
|
|
5
5
|
import { Modal } from '../Modal'
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
ButtonsContainer,
|
|
16
16
|
ButtonWrapper
|
|
17
17
|
} from './styles'
|
|
18
|
-
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
19
18
|
|
|
20
19
|
const SocketStatusUI = (props) => {
|
|
21
20
|
const {
|
|
@@ -28,7 +27,8 @@ const SocketStatusUI = (props) => {
|
|
|
28
27
|
const [{ parseDate }] = useUtils()
|
|
29
28
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
30
29
|
const [openModal, setOpenModal] = useState(false)
|
|
31
|
-
const
|
|
30
|
+
const [{ configs }] = useConfig()
|
|
31
|
+
const isEnabledBtn = configs?.white_label_module?.value
|
|
32
32
|
|
|
33
33
|
const closeAlert = () => {
|
|
34
34
|
setAlertState({
|
|
@@ -57,7 +57,7 @@ const SocketStatusUI = (props) => {
|
|
|
57
57
|
</IconButton>
|
|
58
58
|
<InfoContent>
|
|
59
59
|
{t('WEBSOCKET_STATUS_APP_INFO', 'Verify the server connection by date and time using the Connection status button. Press update to refresh your app and update the status as well. Need help? Contact our Customer support team here:')}
|
|
60
|
-
<a href='https://www.ordering.co/contact-ordering' target='_blank' rel='noopener noreferrer'>{t('CUSTOMER_SUPPORT', 'Customer support')}</a>
|
|
60
|
+
{!isEnabledBtn && <a href='https://www.ordering.co/contact-ordering' target='_blank' rel='noopener noreferrer'>{t('CUSTOMER_SUPPORT', 'Customer support')}</a>}
|
|
61
61
|
</InfoContent>
|
|
62
62
|
</InfoWrapper>
|
|
63
63
|
<ButtonWrapper>
|