ordering-ui-external 10.5.2 → 10.6.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.920fc54b3e922667dfb1.js → 0.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{1.ordering-ui.920fc54b3e922667dfb1.js → 1.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{2.ordering-ui.920fc54b3e922667dfb1.js → 2.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{4.ordering-ui.920fc54b3e922667dfb1.js → 4.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{5.ordering-ui.920fc54b3e922667dfb1.js → 5.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{6.ordering-ui.920fc54b3e922667dfb1.js → 6.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{7.ordering-ui.920fc54b3e922667dfb1.js → 7.ordering-ui.8a4a9a1da3d54294518d.js} +2 -2
- package/_bundles/{8.ordering-ui.920fc54b3e922667dfb1.js → 8.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/{9.ordering-ui.920fc54b3e922667dfb1.js → 9.ordering-ui.8a4a9a1da3d54294518d.js} +1 -1
- package/_bundles/ordering-ui.8a4a9a1da3d54294518d.js +2 -0
- package/_modules/components/Header/index.js +3 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/AddressList/index.js +18 -8
- package/_modules/themes/five/src/components/AddressList/styles.js +25 -21
- package/_modules/themes/five/src/components/Header/index.js +4 -2
- package/_modules/themes/five/src/components/MomentControl/index.js +1 -1
- package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +9 -7
- package/_modules/themes/five/src/components/QueryLoginSpoonity/index.js +128 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +3 -3
- package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -3
- package/package.json +2 -2
- package/src/components/Header/index.js +2 -2
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/AddressList/index.js +16 -5
- package/src/themes/five/src/components/AddressList/styles.js +8 -2
- package/src/themes/five/src/components/Header/index.js +4 -2
- package/src/themes/five/src/components/MomentControl/index.js +6 -6
- package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
- package/src/themes/five/src/components/PhoneAutocomplete/styles.js +19 -3
- package/src/themes/five/src/components/QueryLoginSpoonity/index.js +120 -3
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +2 -2
- package/src/themes/five/src/components/UserFormDetails/index.js +3 -3
- package/template/app.js +51 -37
- package/_bundles/ordering-ui.920fc54b3e922667dfb1.js +0 -2
- /package/_bundles/{7.ordering-ui.920fc54b3e922667dfb1.js.LICENSE.txt → 7.ordering-ui.8a4a9a1da3d54294518d.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.920fc54b3e922667dfb1.js.LICENSE.txt → ordering-ui.8a4a9a1da3d54294518d.js.LICENSE.txt} +0 -0
|
@@ -65,7 +65,8 @@ const AddressListUI = (props) => {
|
|
|
65
65
|
setIsAddressFormOpen,
|
|
66
66
|
isProfile,
|
|
67
67
|
isMobile,
|
|
68
|
-
onCancel
|
|
68
|
+
onCancel,
|
|
69
|
+
isOpenUserData
|
|
69
70
|
} = props
|
|
70
71
|
|
|
71
72
|
const [, t] = useLanguage()
|
|
@@ -190,6 +191,12 @@ const AddressListUI = (props) => {
|
|
|
190
191
|
}
|
|
191
192
|
}, [])
|
|
192
193
|
|
|
194
|
+
useEffect(() => {
|
|
195
|
+
if (addressList?.addresses?.length === 0 && !addressList.loading && isCustomerMode) {
|
|
196
|
+
openAddress({})
|
|
197
|
+
}
|
|
198
|
+
}, [addressList.loading, addressList?.addresses?.length])
|
|
199
|
+
|
|
193
200
|
const AddressListCallcenterLayout = ({ children }) => {
|
|
194
201
|
return (
|
|
195
202
|
<AddressHalfContainer>
|
|
@@ -197,7 +204,7 @@ const AddressListUI = (props) => {
|
|
|
197
204
|
{children}
|
|
198
205
|
</List>
|
|
199
206
|
{addressOpen && (
|
|
200
|
-
<AddressFormContainer isCustomerMode={isCustomerMode}>
|
|
207
|
+
<AddressFormContainer isCustomerMode={isCustomerMode} isOpenUserData={isOpenUserData}>
|
|
201
208
|
<TitleFormContainer>
|
|
202
209
|
<CloseIcon>
|
|
203
210
|
<MdClose onClick={() => handleCloseAddressForm()} />
|
|
@@ -318,9 +325,13 @@ const AddressListUI = (props) => {
|
|
|
318
325
|
addressList?.addresses?.length === 0 &&
|
|
319
326
|
!isProductForm &&
|
|
320
327
|
(
|
|
321
|
-
<WrappNotAddresses>
|
|
322
|
-
|
|
323
|
-
|
|
328
|
+
<WrappNotAddresses isCustomerMode={isCustomerMode}>
|
|
329
|
+
{!isCustomerMode && (
|
|
330
|
+
<>
|
|
331
|
+
<img src={theme.images?.general?.notFound} alt='Not Found' width='200px' height='112px' loading='lazy' />
|
|
332
|
+
<h1>{t('NOT_FOUND_ADDRESS', 'Sorry, You don\'t seem to have any addresses.')}</h1>
|
|
333
|
+
</>
|
|
334
|
+
)}
|
|
324
335
|
</WrappNotAddresses>
|
|
325
336
|
)}
|
|
326
337
|
|
|
@@ -127,7 +127,6 @@ export const AddressItemActions = styled.div`
|
|
|
127
127
|
`
|
|
128
128
|
|
|
129
129
|
export const WrappNotAddresses = styled.div`
|
|
130
|
-
height: 350px;
|
|
131
130
|
display: flex;
|
|
132
131
|
flex-direction: column;
|
|
133
132
|
justify-content: center;
|
|
@@ -135,6 +134,13 @@ export const WrappNotAddresses = styled.div`
|
|
|
135
134
|
width: 80%;
|
|
136
135
|
margin: 20px auto 10px;
|
|
137
136
|
|
|
137
|
+
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
138
|
+
min-height: 200px;
|
|
139
|
+
height: 200px
|
|
140
|
+
` : css`
|
|
141
|
+
height: 350px;
|
|
142
|
+
`}
|
|
143
|
+
|
|
138
144
|
img {
|
|
139
145
|
width: 200px;
|
|
140
146
|
height: auto;
|
|
@@ -218,7 +224,7 @@ export const AddressFormContainer = styled.div`
|
|
|
218
224
|
position: sticky;
|
|
219
225
|
right: 0;
|
|
220
226
|
top: 0;
|
|
221
|
-
margin-top: ${({ isCustomerMode }) => isCustomerMode ? '-190px' : '0'};
|
|
227
|
+
margin-top: ${({ isCustomerMode, isOpenUserData }) => isCustomerMode && !isOpenUserData ? '-190px' : '0'};
|
|
222
228
|
height: 100%;
|
|
223
229
|
padding-left: 10px;
|
|
224
230
|
`
|
|
@@ -62,9 +62,11 @@ export const Header = (props) => {
|
|
|
62
62
|
searchValue,
|
|
63
63
|
setSearchValue,
|
|
64
64
|
businessSlug,
|
|
65
|
-
notificationState
|
|
65
|
+
notificationState,
|
|
66
|
+
singleBusinessConfig
|
|
66
67
|
} = props
|
|
67
68
|
|
|
69
|
+
const isSingleBusiness = !!singleBusinessConfig?.isActive
|
|
68
70
|
const { pathname } = useLocation()
|
|
69
71
|
const [events] = useEvent()
|
|
70
72
|
const [{ parseDate }] = useUtils()
|
|
@@ -508,7 +510,7 @@ export const Header = (props) => {
|
|
|
508
510
|
onClose={() => setModalIsOpen(false)}
|
|
509
511
|
cateringPreorder={!!cateringTypeString}
|
|
510
512
|
isHeader
|
|
511
|
-
business={pathname.includes('store') && business}
|
|
513
|
+
business={(pathname.includes('store') && business) || isSingleBusiness}
|
|
512
514
|
{...cateringValues}
|
|
513
515
|
/>
|
|
514
516
|
)}
|
|
@@ -165,11 +165,11 @@ const MomentControlUI = (props) => {
|
|
|
165
165
|
return
|
|
166
166
|
}
|
|
167
167
|
_timeLists = hoursList
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
.filter(hour => (Object.keys(business || {})?.length === 0 || schedule?.lapses?.some(lapse =>
|
|
169
|
+
moment(dateSelected + ` ${hour.startTime}`) >= moment(dateSelected + ` ${lapse.open.hour}:${lapse.open.minute}`).add(preorderLeadTime, 'minutes') && moment(dateSelected + ` ${hour.endTime}`) <= moment(dateSelected + ` ${lapse.close.hour}:${lapse.close.minute}`))) &&
|
|
170
|
+
moment(dateSelected + ` ${hour.startTime}`) < moment(dateSelected + ` ${hour.endTime}`) &&
|
|
171
|
+
(moment().add(preorderLeadTime, 'minutes') < moment(dateSelected + ` ${hour.startTime}`) || !cateringPreorder))
|
|
172
|
+
.map(hour => {
|
|
173
173
|
return {
|
|
174
174
|
value: hour.startTime,
|
|
175
175
|
text: is12hours ? (
|
|
@@ -200,7 +200,7 @@ const MomentControlUI = (props) => {
|
|
|
200
200
|
}, [isAsap])
|
|
201
201
|
|
|
202
202
|
useEffect(() => {
|
|
203
|
-
if (!pathname.includes('store') || isCart) {
|
|
203
|
+
if ((!pathname.includes('store') || isCart) && !props.business) {
|
|
204
204
|
setScheduleList(null)
|
|
205
205
|
return
|
|
206
206
|
}
|
|
@@ -363,7 +363,7 @@ export const PhoneAutocomplete = (props) => {
|
|
|
363
363
|
{
|
|
364
364
|
value: 1,
|
|
365
365
|
text: t('DELIVERY', 'Delivery'),
|
|
366
|
-
description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description')
|
|
366
|
+
description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description')
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
value: 2,
|
|
@@ -80,7 +80,7 @@ export const ContentWrapper = styled.div`
|
|
|
80
80
|
height: 100%;
|
|
81
81
|
padding: 0px 20px 0px;
|
|
82
82
|
width: 70%;
|
|
83
|
-
|
|
83
|
+
position: relative;
|
|
84
84
|
.select__control {
|
|
85
85
|
border-radius: 30px;
|
|
86
86
|
}
|
|
@@ -131,13 +131,16 @@ export const ContentWrapper = styled.div`
|
|
|
131
131
|
|
|
132
132
|
export const WrappBtn = styled.div`
|
|
133
133
|
width: 50%;
|
|
134
|
-
|
|
134
|
+
position: relative;
|
|
135
135
|
button {
|
|
136
|
+
position: absolute;
|
|
137
|
+
top: 55px;
|
|
136
138
|
min-width: 130px;
|
|
137
139
|
max-width: 400px;
|
|
138
140
|
overflow: hidden;
|
|
139
141
|
text-overflow: ellipsis;
|
|
140
142
|
white-space: nowrap;
|
|
143
|
+
z-index: 100;
|
|
141
144
|
}
|
|
142
145
|
`
|
|
143
146
|
|
|
@@ -287,6 +290,9 @@ export const SelectContainer = styled.div`
|
|
|
287
290
|
bottom: 8px;
|
|
288
291
|
position: relative;
|
|
289
292
|
}
|
|
293
|
+
.select__menu{
|
|
294
|
+
top: 45px;
|
|
295
|
+
}
|
|
290
296
|
input {
|
|
291
297
|
position: relative;
|
|
292
298
|
top: -5px;
|
|
@@ -377,9 +383,19 @@ export const AdditionalTypesContainer = styled.div`
|
|
|
377
383
|
`
|
|
378
384
|
|
|
379
385
|
export const PhoneAutocompleteContainer = styled.div`
|
|
380
|
-
|
|
386
|
+
position: relative;
|
|
381
387
|
h2 {
|
|
382
388
|
font-size: 20px;
|
|
383
389
|
margin-bottom: 20px;
|
|
384
390
|
}
|
|
385
391
|
`
|
|
392
|
+
|
|
393
|
+
export const ContinueButton = styled.span`
|
|
394
|
+
position: absolute;
|
|
395
|
+
right: 35px;
|
|
396
|
+
bottom: 5px;
|
|
397
|
+
width:
|
|
398
|
+
button {
|
|
399
|
+
cursor: pointer;
|
|
400
|
+
}
|
|
401
|
+
`
|
|
@@ -1,19 +1,136 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { QueryLoginSpoonity as QueryLoginSpoonityController, useLanguage } from 'ordering-components-external'
|
|
2
|
+
import { QueryLoginSpoonity as QueryLoginSpoonityController, useEvent, useLanguage, useSession, useSite } from 'ordering-components-external'
|
|
3
3
|
import { SpinnerLoader } from '../../../../../components/SpinnerLoader'
|
|
4
|
+
import Modal from '../Modal'
|
|
5
|
+
import { LoginForm } from '../LoginForm'
|
|
6
|
+
import { SignUpForm } from '../SignUpForm'
|
|
7
|
+
import { ForgotPasswordForm } from '../ForgotPasswordForm'
|
|
8
|
+
import { useTheme } from 'styled-components'
|
|
4
9
|
|
|
5
10
|
const QueryLoginSpoonityUI = (props) => {
|
|
6
11
|
const {
|
|
7
|
-
userState
|
|
12
|
+
userState,
|
|
13
|
+
notificationState,
|
|
14
|
+
authModalOpen,
|
|
15
|
+
setAuthModalOpen,
|
|
16
|
+
modalPageToShow,
|
|
17
|
+
setModalPageToShow
|
|
8
18
|
} = props
|
|
9
19
|
|
|
10
20
|
const [, t] = useLanguage()
|
|
21
|
+
const [{ auth }, { login }] = useSession()
|
|
22
|
+
const theme = useTheme()
|
|
23
|
+
const [events] = useEvent()
|
|
24
|
+
const [{ site }] = useSite()
|
|
25
|
+
const businessUrlTemplate = site?.business_url_template || '/store/:business_slug'
|
|
26
|
+
|
|
27
|
+
const closeAuthModal = () => {
|
|
28
|
+
setAuthModalOpen(false)
|
|
29
|
+
setModalPageToShow(null)
|
|
30
|
+
const store = window.location.pathname.split('/')?.filter(text => text !== '' && text !== 'store')?.[0]
|
|
31
|
+
if (store) {
|
|
32
|
+
if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
|
|
33
|
+
events.emit('go_to_page', { page: 'business', params: { business_slug: store } })
|
|
34
|
+
} else {
|
|
35
|
+
events.emit('go_to_page', { page: 'business', search: `?${businessUrlTemplate.split('?')[1].replace(':business_slug', '')}${store}` })
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
events.emit('go_to_page', { page: 'search' })
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const handleSuccessLogin = (user) => {
|
|
43
|
+
if (user) {
|
|
44
|
+
closeAuthModal()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const handleSuccessSignup = (user) => {
|
|
49
|
+
login({
|
|
50
|
+
user,
|
|
51
|
+
token: user?.session?.access_token
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const handleCustomModalClick = (e, { page }) => {
|
|
56
|
+
e.preventDefault()
|
|
57
|
+
setModalPageToShow(page)
|
|
58
|
+
}
|
|
11
59
|
|
|
12
60
|
return (
|
|
13
61
|
<>
|
|
14
62
|
{userState?.loading ? (
|
|
15
63
|
<SpinnerLoader content={t('LOADING_DELICIOUS_FOOD', 'Loading Ordering Dashboard...')} />
|
|
16
|
-
) :
|
|
64
|
+
) : (
|
|
65
|
+
<>
|
|
66
|
+
{authModalOpen && !auth && (
|
|
67
|
+
<Modal
|
|
68
|
+
open={authModalOpen}
|
|
69
|
+
onRemove={() => closeAuthModal()}
|
|
70
|
+
onClose={() => closeAuthModal()}
|
|
71
|
+
width='50%'
|
|
72
|
+
authModal
|
|
73
|
+
closeOnBackdrop
|
|
74
|
+
>
|
|
75
|
+
{modalPageToShow === 'login' && (
|
|
76
|
+
<LoginForm
|
|
77
|
+
notificationState={notificationState}
|
|
78
|
+
handleSuccessLogin={handleSuccessLogin}
|
|
79
|
+
elementLinkToSignup={
|
|
80
|
+
<a
|
|
81
|
+
onClick={
|
|
82
|
+
(e) => handleCustomModalClick(e, { page: 'signup' })
|
|
83
|
+
} href='#'
|
|
84
|
+
>{t('CREATE_ACCOUNT', theme?.defaultLanguages?.CREATE_ACCOUNT || 'Create account')}
|
|
85
|
+
</a>
|
|
86
|
+
}
|
|
87
|
+
elementLinkToForgotPassword={
|
|
88
|
+
<a
|
|
89
|
+
onClick={
|
|
90
|
+
(e) => handleCustomModalClick(e, { page: 'forgotpassword' })
|
|
91
|
+
} href='#'
|
|
92
|
+
>{t('RESET_PASSWORD', theme?.defaultLanguages?.RESET_PASSWORD || 'Reset password')}
|
|
93
|
+
</a>
|
|
94
|
+
}
|
|
95
|
+
useLoginByCellphone
|
|
96
|
+
isPopup
|
|
97
|
+
/>
|
|
98
|
+
)}
|
|
99
|
+
{modalPageToShow === 'signup' && (
|
|
100
|
+
<SignUpForm
|
|
101
|
+
notificationState={notificationState}
|
|
102
|
+
elementLinkToLogin={
|
|
103
|
+
<a
|
|
104
|
+
onClick={
|
|
105
|
+
(e) => handleCustomModalClick(e, { page: 'login' })
|
|
106
|
+
} href='#'
|
|
107
|
+
>{t('LOGIN', theme?.defaultLanguages?.LOGIN || 'Login')}
|
|
108
|
+
</a>
|
|
109
|
+
}
|
|
110
|
+
useLoginByCellphone
|
|
111
|
+
useChekoutFileds
|
|
112
|
+
handleSuccessSignup={handleSuccessSignup}
|
|
113
|
+
isPopup
|
|
114
|
+
closeModal={() => closeAuthModal()}
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
117
|
+
{modalPageToShow === 'forgotpassword' && (
|
|
118
|
+
<ForgotPasswordForm
|
|
119
|
+
elementLinkToLogin={
|
|
120
|
+
<a
|
|
121
|
+
onClick={
|
|
122
|
+
(e) => handleCustomModalClick(e, { page: 'login' })
|
|
123
|
+
} href='#'
|
|
124
|
+
>{t('LOGIN', theme?.defaultLanguages?.LOGIN || 'Login')}
|
|
125
|
+
</a>
|
|
126
|
+
}
|
|
127
|
+
isPopup
|
|
128
|
+
/>
|
|
129
|
+
)}
|
|
130
|
+
</Modal>
|
|
131
|
+
)}
|
|
132
|
+
</>
|
|
133
|
+
)}
|
|
17
134
|
</>
|
|
18
135
|
)
|
|
19
136
|
}
|
|
@@ -161,7 +161,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
161
161
|
<>
|
|
162
162
|
{!isLoading && business?.id && (
|
|
163
163
|
<WrappLayout isCartOnProductsList={isCartOnProductsList}>
|
|
164
|
-
{((!hideBusinessNearCity && !useKioskApp) || props.forceShowNearBusiness) && !isCustomLayout && (
|
|
164
|
+
{((!hideBusinessNearCity && !useKioskApp) || props.forceShowNearBusiness) && !isCustomerMode && !isCustomLayout && (
|
|
165
165
|
<NearBusiness>
|
|
166
166
|
<BusinessesListing
|
|
167
167
|
logosLayout
|
|
@@ -417,7 +417,7 @@ const SignUpFormUI = (props) => {
|
|
|
417
417
|
name={field.code}
|
|
418
418
|
aria-label={field.code}
|
|
419
419
|
className='form'
|
|
420
|
-
placeholder={t(field.code.toUpperCase(), field.name)}
|
|
420
|
+
placeholder={isCustomerMode ? t(field.code.toUpperCase() + '_OPTIONAL', field.name + ' (Optional)') : t(field.code.toUpperCase(), field.name)}
|
|
421
421
|
onChange={handleChangeInputEmail}
|
|
422
422
|
ref={formMethods.register({
|
|
423
423
|
required: !isCustomerMode && isRequiredField(field.code)
|
|
@@ -190,8 +190,8 @@ const UserDetailsUI = (props) => {
|
|
|
190
190
|
<PhoneContainer>
|
|
191
191
|
<CountryFlag>
|
|
192
192
|
{
|
|
193
|
-
userData?.country_phone_code && (
|
|
194
|
-
<PhoneInput onChange={() => { }} defaultCountry={parsePhoneNumber(`+${(userData?.country_phone_code?.replace('+', ''))} ${userData?.cellphone
|
|
193
|
+
userData?.country_phone_code && userData?.cellphone && (
|
|
194
|
+
<PhoneInput onChange={() => { }} defaultCountry={parsePhoneNumber(`+${(userData?.country_phone_code?.replace('+', ''))} ${userData?.cellphone?.replace(`+${userData?.country_phone_code}`, '')}`)?.country} />
|
|
195
195
|
)
|
|
196
196
|
}
|
|
197
197
|
</CountryFlag>
|
|
@@ -407,7 +407,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
407
407
|
/>
|
|
408
408
|
</InputPhoneNumberWrapper>
|
|
409
409
|
)}
|
|
410
|
-
{!isCheckout && showCustomerPassword && !requiredFields && (
|
|
410
|
+
{!isCheckout && showCustomerPassword && !requiredFields && !isCustomerMode && (
|
|
411
411
|
<InputGroup>
|
|
412
412
|
<p>{t('PASSWORD', 'Password')}</p>
|
|
413
413
|
<Input
|
|
@@ -430,7 +430,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
430
430
|
/>
|
|
431
431
|
</InputGroup>
|
|
432
432
|
)}
|
|
433
|
-
{showNotifications && showCustomerPromotions && !requiredFields && (
|
|
433
|
+
{showNotifications && showCustomerPromotions && !requiredFields && !isCustomerMode && (
|
|
434
434
|
<>
|
|
435
435
|
<NotificationsGroupSwitchWrapper>
|
|
436
436
|
<p>{t('MARKETING_NOTIFICATIONS', 'Marketing Notifications')}</p>
|
|
@@ -458,7 +458,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
458
458
|
</NotificationsGroupSwitchWrapper>
|
|
459
459
|
</>
|
|
460
460
|
)}
|
|
461
|
-
{showLangauges && !requiredFields && (
|
|
461
|
+
{showLangauges && !requiredFields && !isCustomerMode && (
|
|
462
462
|
<>
|
|
463
463
|
<LanguageSelectorWrapper>
|
|
464
464
|
<p>{t('LANGUAGE', 'Language')}</p>
|
package/template/app.js
CHANGED
|
@@ -569,7 +569,7 @@ export const App = () => {
|
|
|
569
569
|
isKioskApp
|
|
570
570
|
? <HomePage notificationState={oneSignalState} />
|
|
571
571
|
: queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
572
|
-
? <QueryLoginSpoonity token={queryIntegrationToken} />
|
|
572
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
573
573
|
: (orderStatus.options?.address?.location || isAllowUnaddressOrderType)
|
|
574
574
|
? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/search'} />
|
|
575
575
|
: singleBusinessConfig.isActive
|
|
@@ -672,7 +672,7 @@ export const App = () => {
|
|
|
672
672
|
isKioskApp
|
|
673
673
|
? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
|
|
674
674
|
: queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
675
|
-
? <QueryLoginSpoonity token={queryIntegrationToken} />
|
|
675
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
676
676
|
: (
|
|
677
677
|
orderStatus.loading && !orderStatus.options?.address?.location ? (
|
|
678
678
|
<SpinnerLoader />
|
|
@@ -831,53 +831,67 @@ export const App = () => {
|
|
|
831
831
|
)}
|
|
832
832
|
</Route>
|
|
833
833
|
<Route exact path='/store'>
|
|
834
|
-
{
|
|
835
|
-
<
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
834
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
835
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
836
|
+
: isUserVerifyRequired ? (
|
|
837
|
+
<Redirect to='/verify' />
|
|
838
|
+
) : (
|
|
839
|
+
<BusinessProductsList />
|
|
840
|
+
)}
|
|
839
841
|
</Route>
|
|
840
842
|
<Route exact path='/store/:business_slug'>
|
|
841
|
-
{
|
|
842
|
-
<
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
843
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
844
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
845
|
+
: isUserVerifyRequired ? (
|
|
846
|
+
<Redirect to='/verify' />
|
|
847
|
+
) : (
|
|
848
|
+
<BusinessProductsList />
|
|
849
|
+
)}
|
|
846
850
|
</Route>
|
|
847
851
|
<Route exact path='/store/:business_slug/:category_slug/:product_slug'>
|
|
848
|
-
{
|
|
849
|
-
<
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
852
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
853
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
854
|
+
: isUserVerifyRequired ? (
|
|
855
|
+
<Redirect to='/verify' />
|
|
856
|
+
) : (
|
|
857
|
+
<BusinessProductsList />
|
|
858
|
+
)}
|
|
853
859
|
</Route>
|
|
854
860
|
<Route exact path='/store/:category_slug/:product_slug'>
|
|
855
|
-
{
|
|
856
|
-
<
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
861
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
862
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
863
|
+
: isUserVerifyRequired ? (
|
|
864
|
+
<Redirect to='/verify' />
|
|
865
|
+
) : (
|
|
866
|
+
<BusinessProductsList />
|
|
867
|
+
)}
|
|
860
868
|
</Route>
|
|
861
869
|
<Route exact path='/:business_slug'>
|
|
862
|
-
{
|
|
863
|
-
<
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
870
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
871
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
872
|
+
: isUserVerifyRequired ? (
|
|
873
|
+
<Redirect to='/verify' />
|
|
874
|
+
) : (
|
|
875
|
+
<BusinessProductsList />
|
|
876
|
+
)}
|
|
867
877
|
</Route>
|
|
868
878
|
<Route exact path='/:business_slug/:category_slug/:product_slug'>
|
|
869
|
-
{
|
|
870
|
-
<
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
879
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
880
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
881
|
+
: isUserVerifyRequired ? (
|
|
882
|
+
<Redirect to='/verify' />
|
|
883
|
+
) : (
|
|
884
|
+
<BusinessProductsList />
|
|
885
|
+
)}
|
|
874
886
|
</Route>
|
|
875
887
|
<Route exact path='/:business_slug/:category_slug'>
|
|
876
|
-
{
|
|
877
|
-
<
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
888
|
+
{queryIntegrationToken && queryIntegrationCode === 'spoonity'
|
|
889
|
+
? <QueryLoginSpoonity token={queryIntegrationToken} notificationState={oneSignalState} />
|
|
890
|
+
: isUserVerifyRequired ? (
|
|
891
|
+
<Redirect to='/verify' />
|
|
892
|
+
) : (
|
|
893
|
+
<BusinessProductsList />
|
|
894
|
+
)}
|
|
881
895
|
</Route>
|
|
882
896
|
<Route path='*'>
|
|
883
897
|
<PageNotFound />
|