ordering-ui-admin-external 1.43.72 → 1.43.74
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/{ordering-ui-admin.8f7f71efc4dc5b7e8f53.js → ordering-ui-admin.8fc588676b4427703151.js} +2 -2
- package/_modules/components/Home/HomePage/styles.js +71 -77
- package/_modules/components/Login/ForgotPasswordForm/styles.js +19 -16
- package/_modules/components/Login/LoginForm/styles.js +35 -32
- package/_modules/components/Login/ResetPassword/styles.js +17 -14
- package/_modules/components/Settings/NotificationSetting/index.js +2 -2
- package/_modules/components/Shared/Modal/index.js +2 -1
- package/_modules/components/Shared/Modal/styles.js +20 -17
- package/_modules/components/SidebarMenu/styles.js +36 -30
- package/_modules/components/Stores/BusinessDeliveryZoneDetails/index.js +36 -7
- package/_modules/components/Stores/BusinessDeliveryZoneDetails/styles.js +4 -2
- package/_modules/components/Stores/BusinessDetails/index.js +4 -1
- package/_modules/components/Stores/BusinessMenuOptions/index.js +44 -3
- package/_modules/components/Stores/BusinessMenuOptions/styles.js +4 -2
- package/_modules/components/Stores/BusinessProductsCategoyDetails/index.js +30 -2
- package/_modules/components/Stores/BusinessProductsCategoyDetails/styles.js +3 -1
- package/_modules/components/Stores/BusinessSummary/index.js +42 -11
- package/_modules/components/Stores/BusinessSummary/styles.js +7 -6
- package/_modules/components/Stores/ProductDetails/index.js +4 -1
- package/_modules/components/Stores/ProductExtraSuboption/index.js +32 -0
- package/_modules/components/Stores/ProductExtras/index.js +37 -2
- package/_modules/components/Stores/ProductExtras/styles.js +1 -1
- package/_modules/components/Stores/SnoozeComponent/index.js +222 -0
- package/_modules/components/Stores/SnoozeComponent/styles.js +141 -0
- package/_modules/styles/Buttons/index.js +37 -26
- package/package.json +2 -2
- package/src/components/Home/HomePage/styles.js +2 -10
- package/src/components/Login/ForgotPasswordForm/styles.js +10 -4
- package/src/components/Login/LoginForm/styles.js +7 -1
- package/src/components/Login/ResetPassword/styles.js +8 -2
- package/src/components/Settings/NotificationSetting/index.js +2 -19
- package/src/components/Shared/Modal/index.js +1 -0
- package/src/components/Shared/Modal/styles.js +5 -0
- package/src/components/SidebarMenu/styles.js +6 -2
- package/src/components/Stores/BusinessDeliveryZoneDetails/index.js +27 -1
- package/src/components/Stores/BusinessDeliveryZoneDetails/styles.js +11 -2
- package/src/components/Stores/BusinessDetails/index.js +3 -0
- package/src/components/Stores/BusinessMenuOptions/index.js +62 -20
- package/src/components/Stores/BusinessMenuOptions/styles.js +10 -2
- package/src/components/Stores/BusinessProductsCategoyDetails/index.js +29 -2
- package/src/components/Stores/BusinessProductsCategoyDetails/styles.js +6 -0
- package/src/components/Stores/BusinessSummary/index.js +52 -19
- package/src/components/Stores/BusinessSummary/styles.js +8 -3
- package/src/components/Stores/ProductDetails/index.js +3 -0
- package/src/components/Stores/ProductExtraSuboption/index.js +22 -0
- package/src/components/Stores/ProductExtras/index.js +29 -1
- package/src/components/Stores/ProductExtras/styles.js +8 -1
- package/src/components/Stores/SnoozeComponent/index.js +228 -0
- package/src/components/Stores/SnoozeComponent/styles.js +242 -0
- package/src/styles/Buttons/index.js +11 -0
- package/template/pages/BusinessProductsList/index.js +1 -1
- /package/_bundles/{ordering-ui-admin.8f7f71efc4dc5b7e8f53.js.LICENSE.txt → ordering-ui-admin.8fc588676b4427703151.js.LICENSE.txt} +0 -0
|
@@ -8,13 +8,14 @@ import { DropdownButton, Dropdown } from 'react-bootstrap'
|
|
|
8
8
|
import { XLg, ThreeDots } from 'react-bootstrap-icons'
|
|
9
9
|
import { useTheme } from 'styled-components'
|
|
10
10
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
11
|
-
import { IconButton } from '../../../styles'
|
|
11
|
+
import { IconButton, Button } from '../../../styles'
|
|
12
12
|
import { AutoScroll, Confirm, Modal } from '../../Shared'
|
|
13
13
|
import { BusinessMenuShare } from '../BusinessMenuShare'
|
|
14
14
|
import { BusinessMenuBasicOptions } from '../BusinessMenuBasicOptions'
|
|
15
15
|
import { BusinessMenuCustomFields } from '../BusinessMenuCustomFields'
|
|
16
16
|
import { BusinessSharedMenuProducts } from '../BusinessSharedMenuProducts'
|
|
17
17
|
import { BusinessMenuChannels } from '../BusinessMenuChannels'
|
|
18
|
+
import { SnoozeComponent } from '../SnoozeComponent'
|
|
18
19
|
import { addQueryToUrl } from '../../../utils'
|
|
19
20
|
|
|
20
21
|
import {
|
|
@@ -36,10 +37,14 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
36
37
|
handleUpdateBusinessState,
|
|
37
38
|
isSelectedSharedMenus,
|
|
38
39
|
handleDeleteMenu,
|
|
40
|
+
handleUpdateBusinessMenuOption,
|
|
41
|
+
handleChangeInput,
|
|
39
42
|
setIsOpenSharedProduct,
|
|
40
43
|
sitesState,
|
|
41
44
|
setMenuList,
|
|
42
|
-
menuList
|
|
45
|
+
menuList,
|
|
46
|
+
formState,
|
|
47
|
+
businessMenuState
|
|
43
48
|
} = props
|
|
44
49
|
|
|
45
50
|
const query = new URLSearchParams(useLocation().search)
|
|
@@ -50,6 +55,7 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
50
55
|
const [selectedMenuOption, setSelectedMenuOption] = useState('basic')
|
|
51
56
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
52
57
|
const [isCustomFieldsOpen, setIsCustomFieldsOpen] = useState(false)
|
|
58
|
+
const [isMenuSnooze, setIsMenuSnooze] = useState(false)
|
|
53
59
|
|
|
54
60
|
const actionSidebar = (value) => {
|
|
55
61
|
if (!value) {
|
|
@@ -71,6 +77,15 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
71
77
|
}
|
|
72
78
|
})
|
|
73
79
|
}
|
|
80
|
+
const handleChangeSnooze = (changes) => {
|
|
81
|
+
const _changes = {
|
|
82
|
+
target: {
|
|
83
|
+
name: 'snooze_until',
|
|
84
|
+
value: changes.snooze_until
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
handleChangeInput(_changes)
|
|
88
|
+
}
|
|
74
89
|
|
|
75
90
|
useEffect(() => {
|
|
76
91
|
if (isMenuOpen) {
|
|
@@ -118,27 +133,39 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
118
133
|
<h1>{t('MENU_SETTINGS', 'Menu settings')}</h1>
|
|
119
134
|
<ActionBlock>
|
|
120
135
|
{Object.keys(menu)?.length > 0 && (
|
|
121
|
-
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
<>
|
|
137
|
+
<ActionSelectorWrapper>
|
|
138
|
+
<Button
|
|
139
|
+
className='snooze'
|
|
140
|
+
color='lightGreen'
|
|
141
|
+
borderRadius='8px'
|
|
142
|
+
onClick={() => setIsMenuSnooze(true)}
|
|
143
|
+
>
|
|
144
|
+
{t('SNOOZE', 'Snooze')}
|
|
145
|
+
</Button>
|
|
146
|
+
</ActionSelectorWrapper>
|
|
147
|
+
<ActionSelectorWrapper>
|
|
148
|
+
<DropdownButton
|
|
149
|
+
className='product_actions'
|
|
150
|
+
menuAlign={theme?.rtl ? 'left' : 'right'}
|
|
151
|
+
title={<ThreeDots />}
|
|
152
|
+
id={theme?.rtl ? 'dropdown-menu-align-left' : 'dropdown-menu-align-right'}
|
|
153
|
+
>
|
|
154
|
+
{!isSelectedSharedMenus && (
|
|
155
|
+
<Dropdown.Item
|
|
156
|
+
onClick={() => setIsCustomFieldsOpen(true)}
|
|
157
|
+
>
|
|
158
|
+
{t('CUSTOM_FIELDS', 'Custom fields')}
|
|
159
|
+
</Dropdown.Item>
|
|
160
|
+
)}
|
|
129
161
|
<Dropdown.Item
|
|
130
|
-
onClick={() =>
|
|
162
|
+
onClick={() => handleDeleteClick()}
|
|
131
163
|
>
|
|
132
|
-
{t('
|
|
164
|
+
{t('DELETE', 'Delete')}
|
|
133
165
|
</Dropdown.Item>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
>
|
|
138
|
-
{t('DELETE', 'Delete')}
|
|
139
|
-
</Dropdown.Item>
|
|
140
|
-
</DropdownButton>
|
|
141
|
-
</ActionSelectorWrapper>
|
|
166
|
+
</DropdownButton>
|
|
167
|
+
</ActionSelectorWrapper>
|
|
168
|
+
</>
|
|
142
169
|
)}
|
|
143
170
|
<IconButton
|
|
144
171
|
color='black'
|
|
@@ -223,6 +250,21 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
223
250
|
menuId={menu.id}
|
|
224
251
|
/>
|
|
225
252
|
</Modal>
|
|
253
|
+
<Modal
|
|
254
|
+
width='85%'
|
|
255
|
+
maxWidth='1000px'
|
|
256
|
+
open={isMenuSnooze}
|
|
257
|
+
onClose={() => setIsMenuSnooze(false)}
|
|
258
|
+
closeOnBackdrop={false}
|
|
259
|
+
>
|
|
260
|
+
<SnoozeComponent
|
|
261
|
+
dataState={businessMenuState?.menu}
|
|
262
|
+
handleUpdate={handleUpdateBusinessMenuOption}
|
|
263
|
+
handleChangeFormState={handleChangeSnooze}
|
|
264
|
+
formState={formState}
|
|
265
|
+
onClose={() => setIsMenuSnooze(false)}
|
|
266
|
+
/>
|
|
267
|
+
</Modal>
|
|
226
268
|
<Confirm
|
|
227
269
|
title={t('WEB_APPNAME', 'Ordering')}
|
|
228
270
|
width='700px'
|
|
@@ -5,13 +5,13 @@ export const Container = styled.div`
|
|
|
5
5
|
padding: 20px;
|
|
6
6
|
overflow: auto;
|
|
7
7
|
transition: 0.3s;
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
> button {
|
|
10
10
|
height: 42px;
|
|
11
11
|
width: 100%;
|
|
12
12
|
margin-top: 20px;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
@media (min-width: 1000px) {
|
|
16
16
|
max-width: 500px;
|
|
17
17
|
width: 0;
|
|
@@ -71,6 +71,8 @@ export const ActionBlock = styled.div`
|
|
|
71
71
|
`
|
|
72
72
|
|
|
73
73
|
export const ActionSelectorWrapper = styled.div`
|
|
74
|
+
display: flex;
|
|
75
|
+
|
|
74
76
|
button {
|
|
75
77
|
display: flex;
|
|
76
78
|
background: transparent !important;
|
|
@@ -123,6 +125,12 @@ export const ActionSelectorWrapper = styled.div`
|
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
}
|
|
128
|
+
.snooze {
|
|
129
|
+
background: ${props => props.theme.colors.lightGreen} !important;
|
|
130
|
+
padding-left: 15px;
|
|
131
|
+
padding-right: 15px;
|
|
132
|
+
margin-right: 5px;
|
|
133
|
+
}
|
|
126
134
|
`
|
|
127
135
|
|
|
128
136
|
export const TabContainer = styled.div`
|
|
@@ -5,13 +5,14 @@ import { useLanguage, BusinessProductsCategoyDetails as BusinessProductsCategoyD
|
|
|
5
5
|
import { ArrowsAngleContract, ArrowsAngleExpand, ThreeDots } from 'react-bootstrap-icons'
|
|
6
6
|
import { DropdownButton, Dropdown } from 'react-bootstrap'
|
|
7
7
|
import { useTheme } from 'styled-components'
|
|
8
|
-
import { Alert, Confirm } from '../../Shared'
|
|
9
|
-
import { IconButton, Switch } from '../../../styles'
|
|
8
|
+
import { Alert, Confirm, Modal } from '../../Shared'
|
|
9
|
+
import { IconButton, Switch, Button } from '../../../styles'
|
|
10
10
|
import { SeoOptions } from '../SeoOptions'
|
|
11
11
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
12
12
|
import { addQueryToUrl } from '../../../utils'
|
|
13
13
|
import { BusinessCategoryInfoSettingList } from '../BusinessCategoryInfoSettingList'
|
|
14
14
|
import { BusinessProductsCategoyInfo } from '../BusinessProductsCategoyInfo'
|
|
15
|
+
import { SnoozeComponent } from '../SnoozeComponent'
|
|
15
16
|
|
|
16
17
|
import {
|
|
17
18
|
Container,
|
|
@@ -53,6 +54,7 @@ const BusinessProductsCategoyDetailsUI = (props) => {
|
|
|
53
54
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
54
55
|
const [selectedInfoItem, setSelctedInfoItem] = useState('information')
|
|
55
56
|
const [isExpand, setIsExpand] = useState(false)
|
|
57
|
+
const [isCategorySnooze, setIsCategorySnooze] = useState(false)
|
|
56
58
|
|
|
57
59
|
const closeAlert = () => {
|
|
58
60
|
setAlertState({
|
|
@@ -152,6 +154,16 @@ const BusinessProductsCategoyDetailsUI = (props) => {
|
|
|
152
154
|
)}
|
|
153
155
|
</BusinessEnableWrapper>
|
|
154
156
|
<RightHeader>
|
|
157
|
+
<ActionSelectorWrapper>
|
|
158
|
+
<Button
|
|
159
|
+
className='snooze'
|
|
160
|
+
color='lightGreen'
|
|
161
|
+
borderRadius='8px'
|
|
162
|
+
onClick={() => setIsCategorySnooze(true)}
|
|
163
|
+
>
|
|
164
|
+
{t('SNOOZE', 'Snooze')}
|
|
165
|
+
</Button>
|
|
166
|
+
</ActionSelectorWrapper>
|
|
155
167
|
{width > 576 && (
|
|
156
168
|
<IconButton
|
|
157
169
|
color='black'
|
|
@@ -217,6 +229,21 @@ const BusinessProductsCategoyDetailsUI = (props) => {
|
|
|
217
229
|
}
|
|
218
230
|
</EditCategoryContent>
|
|
219
231
|
</Container>
|
|
232
|
+
<Modal
|
|
233
|
+
width='85%'
|
|
234
|
+
maxWidth='1000px'
|
|
235
|
+
open={isCategorySnooze}
|
|
236
|
+
onClose={() => setIsCategorySnooze(false)}
|
|
237
|
+
closeOnBackdrop={false}
|
|
238
|
+
>
|
|
239
|
+
<SnoozeComponent
|
|
240
|
+
dataState={categorySelected}
|
|
241
|
+
handleUpdate={handleUpdateClick}
|
|
242
|
+
handleChangeFormState={handleChangeItem}
|
|
243
|
+
formState={formState}
|
|
244
|
+
onClose={() => setIsCategorySnooze(false)}
|
|
245
|
+
/>
|
|
246
|
+
</Modal>
|
|
220
247
|
<Alert
|
|
221
248
|
title={t('BUSINESS_TYPE', 'Business type')}
|
|
222
249
|
content={alertState.content}
|
|
@@ -8,6 +8,7 @@ import { XLg, LifePreserver, ThreeDots, Laptop, Phone, ArrowsAngleExpand, Arrows
|
|
|
8
8
|
import { Button, IconButton, Switch } from '../../../styles'
|
|
9
9
|
import { Confirm, Modal } from '../../Shared'
|
|
10
10
|
import { BusinessPreview } from '../BusinessPreview'
|
|
11
|
+
import { SnoozeComponent } from '../SnoozeComponent'
|
|
11
12
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
12
13
|
|
|
13
14
|
import {
|
|
@@ -24,7 +25,8 @@ import {
|
|
|
24
25
|
BusinessConfigItem,
|
|
25
26
|
ActionSelectorWrapper,
|
|
26
27
|
BusinessPreviewHeader,
|
|
27
|
-
ButtonWrapper
|
|
28
|
+
ButtonWrapper,
|
|
29
|
+
ButtonsContainer
|
|
28
30
|
} from './styles'
|
|
29
31
|
import { checkSiteUrl } from '../../../utils'
|
|
30
32
|
|
|
@@ -39,11 +41,14 @@ export const BusinessSummary = (props) => {
|
|
|
39
41
|
handleDuplicateBusiness,
|
|
40
42
|
handleDeleteBusiness,
|
|
41
43
|
handleSyncEvent,
|
|
44
|
+
handleUpdateBusinessClick,
|
|
42
45
|
extraOpen,
|
|
43
46
|
spoonityConfig,
|
|
44
47
|
siteState,
|
|
45
48
|
isExpand,
|
|
46
|
-
setIsExpand
|
|
49
|
+
setIsExpand,
|
|
50
|
+
formState,
|
|
51
|
+
setFormState
|
|
47
52
|
} = props
|
|
48
53
|
const [, t] = useLanguage()
|
|
49
54
|
const [{ optimizeImage }] = useUtils()
|
|
@@ -53,6 +58,7 @@ export const BusinessSummary = (props) => {
|
|
|
53
58
|
const [ordering] = useApi()
|
|
54
59
|
const { width } = useWindowSize()
|
|
55
60
|
const [isBusinessPreview, setIsBusinessPreview] = useState(false)
|
|
61
|
+
const [isBusinessSnooze, setIsBusinessSnooze] = useState(false)
|
|
56
62
|
const [selectedView, setSelectedView] = useState('desktop')
|
|
57
63
|
const [sessionState] = useSession()
|
|
58
64
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
@@ -288,27 +294,39 @@ export const BusinessSummary = (props) => {
|
|
|
288
294
|
)}
|
|
289
295
|
|
|
290
296
|
<BusinessDetailsContent>
|
|
291
|
-
<
|
|
292
|
-
<
|
|
293
|
-
color='lightPrimary'
|
|
294
|
-
borderRadius='8px'
|
|
295
|
-
onClick={handleOpenCategory}
|
|
296
|
-
disabled={businessState?.loading}
|
|
297
|
-
>
|
|
298
|
-
{t('CATEGORIES_AND_PRODUCTS', 'Categories & products')}
|
|
299
|
-
</Button>
|
|
300
|
-
{!isEnabledWhiteLabelModule && (
|
|
297
|
+
<ButtonsContainer>
|
|
298
|
+
<ButtonWrapper>
|
|
301
299
|
<Button
|
|
302
|
-
color='
|
|
303
|
-
outline
|
|
300
|
+
color='lightPrimary'
|
|
304
301
|
borderRadius='8px'
|
|
305
|
-
onClick={
|
|
302
|
+
onClick={handleOpenCategory}
|
|
306
303
|
disabled={businessState?.loading}
|
|
307
304
|
>
|
|
308
|
-
{t('
|
|
305
|
+
{t('CATEGORIES_AND_PRODUCTS', 'Categories & products')}
|
|
309
306
|
</Button>
|
|
310
|
-
|
|
311
|
-
|
|
307
|
+
{!isEnabledWhiteLabelModule && (
|
|
308
|
+
<Button
|
|
309
|
+
color='primary'
|
|
310
|
+
outline
|
|
311
|
+
borderRadius='8px'
|
|
312
|
+
onClick={handleOpenSite}
|
|
313
|
+
disabled={businessState?.loading}
|
|
314
|
+
>
|
|
315
|
+
{t('STORE_WEBSITE', 'Store website')}
|
|
316
|
+
</Button>
|
|
317
|
+
)}
|
|
318
|
+
</ButtonWrapper>
|
|
319
|
+
<ButtonWrapper>
|
|
320
|
+
<Button
|
|
321
|
+
color='lightGreen'
|
|
322
|
+
borderRadius='8px'
|
|
323
|
+
onClick={() => setIsBusinessSnooze(true)}
|
|
324
|
+
disabled={businessState?.loading}
|
|
325
|
+
>
|
|
326
|
+
{t('SNOOZE', 'Snooze')}
|
|
327
|
+
</Button>
|
|
328
|
+
</ButtonWrapper>
|
|
329
|
+
</ButtonsContainer>
|
|
312
330
|
<BusinessDescription>
|
|
313
331
|
{businessState?.loading ? (
|
|
314
332
|
<Skeleton width={300} />
|
|
@@ -318,7 +336,7 @@ export const BusinessSummary = (props) => {
|
|
|
318
336
|
</BusinessDescription>
|
|
319
337
|
<BusinessConfigsContainer isLoading={businessState?.loading}>
|
|
320
338
|
{(isAdmin
|
|
321
|
-
?
|
|
339
|
+
? spoonityConfig
|
|
322
340
|
? businessConfigs
|
|
323
341
|
: businessConfigs.filter(configs => configs.key !== 'spoonity_key')
|
|
324
342
|
: businessConfigs.filter(c => !itemsExcluded.includes(c.key))
|
|
@@ -377,6 +395,21 @@ export const BusinessSummary = (props) => {
|
|
|
377
395
|
business={businessState?.business}
|
|
378
396
|
/>
|
|
379
397
|
</Modal>
|
|
398
|
+
<Modal
|
|
399
|
+
width='85%'
|
|
400
|
+
maxWidth='1000px'
|
|
401
|
+
open={isBusinessSnooze}
|
|
402
|
+
onClose={() => setIsBusinessSnooze(false)}
|
|
403
|
+
closeOnBackdrop={false}
|
|
404
|
+
>
|
|
405
|
+
<SnoozeComponent
|
|
406
|
+
dataState={businessState?.business}
|
|
407
|
+
handleUpdate={handleUpdateBusinessClick}
|
|
408
|
+
setFormState={setFormState}
|
|
409
|
+
formState={formState}
|
|
410
|
+
onClose={() => setIsBusinessSnooze(false)}
|
|
411
|
+
/>
|
|
412
|
+
</Modal>
|
|
380
413
|
</>
|
|
381
414
|
)
|
|
382
415
|
}
|
|
@@ -8,6 +8,7 @@ export const BusinessDetailsContainer = styled.div`
|
|
|
8
8
|
padding: 20px;
|
|
9
9
|
position: relative;
|
|
10
10
|
overflow-x: hidden;
|
|
11
|
+
|
|
11
12
|
@media (min-width: 768px) {
|
|
12
13
|
min-width: 500px;
|
|
13
14
|
}
|
|
@@ -137,7 +138,7 @@ export const BusinessConfigsContainer = styled.div`
|
|
|
137
138
|
|
|
138
139
|
> div:last-child {
|
|
139
140
|
border-bottom: none !important;
|
|
140
|
-
}
|
|
141
|
+
}
|
|
141
142
|
`
|
|
142
143
|
|
|
143
144
|
export const BusinessConfigItem = styled.div`
|
|
@@ -161,7 +162,7 @@ export const BusinessConfigItem = styled.div`
|
|
|
161
162
|
border-bottom: 1px solid ${props => props.theme.colors.primary} !important;
|
|
162
163
|
background-color: ${props => props.theme.colors.lightPrimary};
|
|
163
164
|
`}
|
|
164
|
-
|
|
165
|
+
|
|
165
166
|
svg {
|
|
166
167
|
font-size: 20px;
|
|
167
168
|
}
|
|
@@ -246,7 +247,11 @@ export const BusinessPreviewHeader = styled.div`
|
|
|
246
247
|
|
|
247
248
|
export const ButtonWrapper = styled.div`
|
|
248
249
|
display: flex;
|
|
249
|
-
> button
|
|
250
|
+
> button {
|
|
250
251
|
margin-right: 15px;
|
|
251
252
|
}
|
|
252
253
|
`
|
|
254
|
+
export const ButtonsContainer = styled.div`
|
|
255
|
+
display: flex;
|
|
256
|
+
justify-content: space-between;
|
|
257
|
+
`
|
|
@@ -135,6 +135,9 @@ const ProductDetailsUI = (props) => {
|
|
|
135
135
|
extraOpen={extraOpen}
|
|
136
136
|
isExpand={isExpand}
|
|
137
137
|
setIsExpand={setIsExpand}
|
|
138
|
+
formState={formState}
|
|
139
|
+
handleChangeFormState={handleChangeFormState}
|
|
140
|
+
handleUpdateClick={handleUpdateClick}
|
|
138
141
|
/>
|
|
139
142
|
)}
|
|
140
143
|
{extraOpen && (
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
DragImageWrapper
|
|
23
23
|
} from './styles'
|
|
24
24
|
import { ProductOptionExternalId } from '../ProductOptionExternalId'
|
|
25
|
+
import { SnoozeComponent } from '../SnoozeComponent'
|
|
25
26
|
|
|
26
27
|
export const ProductExtraSuboption = (props) => {
|
|
27
28
|
const {
|
|
@@ -58,6 +59,7 @@ export const ProductExtraSuboption = (props) => {
|
|
|
58
59
|
const [formState, setFormState] = useState({ })
|
|
59
60
|
const [externalIdOpen, setExternalIdOpen] = useState(false)
|
|
60
61
|
const [externalId, setExternalId] = useState()
|
|
62
|
+
const [isProductExtraSuboptionSnooze, setProductExtraSuboptionSnooze] = useState(false)
|
|
61
63
|
|
|
62
64
|
const handleClickSubOptionImage = (id) => {
|
|
63
65
|
document.getElementById(id).click()
|
|
@@ -341,6 +343,11 @@ export const ProductExtraSuboption = (props) => {
|
|
|
341
343
|
title={<ThreeDots />}
|
|
342
344
|
id={theme?.rtl ? 'dropdown-menu-align-left' : 'dropdown-menu-align-right'}
|
|
343
345
|
>
|
|
346
|
+
<Dropdown.Item
|
|
347
|
+
onClick={() => setProductExtraSuboptionSnooze(true)}
|
|
348
|
+
>
|
|
349
|
+
{t('SNOOZE', 'Snooze')}
|
|
350
|
+
</Dropdown.Item>
|
|
344
351
|
<Dropdown.Item
|
|
345
352
|
onClick={() => {
|
|
346
353
|
setSelectedSubOptionId(subOption?.id)
|
|
@@ -412,6 +419,21 @@ export const ProductExtraSuboption = (props) => {
|
|
|
412
419
|
handleUpdate={handleUpdateExternalId}
|
|
413
420
|
/>
|
|
414
421
|
</Modal>
|
|
422
|
+
<Modal
|
|
423
|
+
width='85%'
|
|
424
|
+
maxWidth='1000px'
|
|
425
|
+
open={isProductExtraSuboptionSnooze}
|
|
426
|
+
onClose={() => setProductExtraSuboptionSnooze(false)}
|
|
427
|
+
closeOnBackdrop={false}
|
|
428
|
+
>
|
|
429
|
+
<SnoozeComponent
|
|
430
|
+
hideButtons
|
|
431
|
+
dataState={subOption}
|
|
432
|
+
handleChangeFormState={(data) => handleChangeInput({ target: { name: 'snooze_until', value: data.snooze_until } })}
|
|
433
|
+
formState={formState}
|
|
434
|
+
onClose={() => setProductExtraSuboptionSnooze(false)}
|
|
435
|
+
/>
|
|
436
|
+
</Modal>
|
|
415
437
|
</SubOptionContainer>
|
|
416
438
|
)
|
|
417
439
|
}
|
|
@@ -8,6 +8,7 @@ import { ProductExtraOptions } from '../ProductExtraOptions'
|
|
|
8
8
|
import { ChevronRight, Pencil } from 'react-bootstrap-icons'
|
|
9
9
|
import { useTheme } from 'styled-components'
|
|
10
10
|
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
11
|
+
import { SnoozeComponent } from '../SnoozeComponent'
|
|
11
12
|
|
|
12
13
|
import {
|
|
13
14
|
MainContainer,
|
|
@@ -61,6 +62,7 @@ const ProductExtrasUI = (props) => {
|
|
|
61
62
|
const [isCheckboxClicked, setIsCheckboxClicked] = useState(false)
|
|
62
63
|
const [timer, setTimer] = useState(null)
|
|
63
64
|
const [extraSelected, setExtraSelected] = useState(null)
|
|
65
|
+
const [isProductExtraSnooze, setProductExtraSnooze] = useState(false)
|
|
64
66
|
|
|
65
67
|
const extraInputRef = useRef()
|
|
66
68
|
|
|
@@ -296,9 +298,35 @@ const ProductExtrasUI = (props) => {
|
|
|
296
298
|
ref={extraInputRef}
|
|
297
299
|
/>
|
|
298
300
|
</FormControl>
|
|
299
|
-
<
|
|
301
|
+
<div className='buttons-container'>
|
|
302
|
+
<Button
|
|
303
|
+
className='snooze'
|
|
304
|
+
color='lightGreen'
|
|
305
|
+
borderRadius='8px'
|
|
306
|
+
onClick={() => setProductExtraSnooze(true)}
|
|
307
|
+
>
|
|
308
|
+
{t('SNOOZE', 'Snooze')}
|
|
309
|
+
</Button>
|
|
310
|
+
<Button color='primary' onClick={() => handleChangeExtra(extraSelected?.id, { name: extraInputRef?.current?.value })}>{t('SAVE', 'Save')}</Button>
|
|
311
|
+
</div>
|
|
300
312
|
</ExtraOptionEditContainer>
|
|
301
313
|
</Modal>
|
|
314
|
+
<Modal
|
|
315
|
+
width='85%'
|
|
316
|
+
maxWidth='1000px'
|
|
317
|
+
open={isProductExtraSnooze}
|
|
318
|
+
onClose={() => setProductExtraSnooze(false)}
|
|
319
|
+
closeOnBackdrop={false}
|
|
320
|
+
>
|
|
321
|
+
<SnoozeComponent
|
|
322
|
+
isAutomaticUpdate
|
|
323
|
+
dataState={extraSelected}
|
|
324
|
+
handleUpdate={(data) => handleChangeExtra(extraSelected?.id, { snooze_until: data.snooze_until })}
|
|
325
|
+
setFormState={setExtrasState}
|
|
326
|
+
formState={extrasState}
|
|
327
|
+
onClose={() => setProductExtraSnooze(false)}
|
|
328
|
+
/>
|
|
329
|
+
</Modal>
|
|
302
330
|
<Alert
|
|
303
331
|
title={t('WEB_APPNAME', 'Ordering')}
|
|
304
332
|
content={alertState.content}
|
|
@@ -102,6 +102,8 @@ export const OptionNameWrapper = styled.div`
|
|
|
102
102
|
|
|
103
103
|
export const ExtraOptionEditContainer = styled.div`
|
|
104
104
|
padding: 20px;
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
105
107
|
|
|
106
108
|
> h2 {
|
|
107
109
|
font-size: 20px;
|
|
@@ -113,7 +115,12 @@ export const ExtraOptionEditContainer = styled.div`
|
|
|
113
115
|
margin-top: 30px;
|
|
114
116
|
height: 44px;
|
|
115
117
|
border-radius: 8px;
|
|
116
|
-
margin-left:
|
|
118
|
+
margin-left: 30px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.buttons-container {
|
|
122
|
+
display: flex;
|
|
123
|
+
justify-content: flex-end;
|
|
117
124
|
}
|
|
118
125
|
`
|
|
119
126
|
|