ordering-ui-admin-external 1.5.0 → 1.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/{ordering-ui-admin.d4ee01fd9abda5a6348f.js → ordering-ui-admin.0fd83f227d29409cb170.js} +2 -2
- package/_bundles/{ordering-ui-admin.d4ee01fd9abda5a6348f.js.LICENSE.txt → ordering-ui-admin.0fd83f227d29409cb170.js.LICENSE.txt} +1 -1
- package/_modules/components/Delivery/UserFormDetails/index.js +10 -3
- package/_modules/components/Login/LoginForm/index.js +4 -3
- package/_modules/components/Login/ResetPassword/index.js +251 -0
- package/_modules/components/Login/ResetPassword/styles.js +64 -0
- package/_modules/components/Login/index.js +8 -1
- package/_modules/components/Marketing/CampaignDetailContent/index.js +41 -5
- package/_modules/components/Marketing/CampaignDetailGeneral/index.js +2 -2
- package/_modules/components/Marketing/CampaignEmail/index.js +155 -12
- package/_modules/components/Marketing/CampaignEmail/styles.js +18 -4
- package/_modules/components/Marketing/CampaignHeader/index.js +11 -1
- package/_modules/components/Marketing/CampaignHeader/styles.js +25 -6
- package/_modules/components/Marketing/CampaignList/index.js +41 -25
- package/_modules/components/Marketing/CampaignNotification/index.js +14 -1
- package/_modules/components/Marketing/CampaignNotification/styles.js +7 -3
- package/_modules/components/Marketing/CampaignSMS/index.js +14 -1
- package/_modules/components/Marketing/CampaignSMS/styles.js +7 -3
- package/_modules/components/Marketing/CampaignWebHook/index.js +13 -1
- package/_modules/components/Marketing/CampaignWebHook/styles.js +7 -3
- package/_modules/components/MyProducts/BoxLayout/index.js +20 -0
- package/_modules/components/MyProducts/BoxLayout/styles.js +22 -0
- package/_modules/components/MyProducts/CustomerApp/index.js +48 -0
- package/_modules/components/MyProducts/CustomerApp/styles.js +25 -0
- package/_modules/components/MyProducts/DriverApp/index.js +69 -0
- package/_modules/components/MyProducts/DriverApp/styles.js +29 -0
- package/_modules/components/MyProducts/OrderingWebsite/index.js +40 -0
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +29 -0
- package/_modules/components/MyProducts/StoreApp/index.js +69 -0
- package/_modules/components/MyProducts/StoreApp/styles.js +29 -0
- package/_modules/components/MyProducts/index.js +33 -0
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +4 -4
- package/_modules/components/Orders/OrdersTable/index.js +8 -9
- package/_modules/components/Profile/ProfilePage/index.js +70 -0
- package/_modules/components/Profile/ProfilePage/styles.js +22 -0
- package/_modules/components/Profile/index.js +12 -0
- package/_modules/components/Settings/InsertLink/index.js +3 -2
- package/_modules/components/Settings/PluginList/index.js +31 -1
- package/_modules/components/Settings/SettingsSelectUI/index.js +1 -1
- package/_modules/components/Shared/ColumnAllowSettingPopover/index.js +4 -3
- package/_modules/components/SidebarMenu/index.js +82 -55
- package/_modules/components/SidebarMenu/styles.js +3 -1
- package/_modules/components/Stores/BusinessLocation/index.js +1 -1
- package/_modules/components/Stores/BusinessProductAddForm/index.js +4 -4
- package/_modules/components/Stores/BusinessProductsListing/index.js +7 -0
- package/_modules/components/Stores/BusinessWebhooks/index.js +2 -2
- package/_modules/components/Stores/PaymentOption/index.js +23 -4
- package/_modules/components/Stores/PaymentOptionMethods/index.js +23 -4
- package/_modules/components/Stores/PaymentOptionPaypal/index.js +23 -4
- package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +23 -4
- package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +23 -4
- package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +23 -4
- package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +23 -4
- package/_modules/components/Users/CustomerDetails/index.js +8 -10
- package/_modules/components/Users/CustomersListing/index.js +4 -2
- package/_modules/components/Users/OccupationSelector/index.js +48 -0
- package/_modules/components/Users/OccupationSelector/styles.js +16 -0
- package/_modules/components/Users/OccupationsFilter/index.js +49 -0
- package/_modules/components/Users/OccupationsFilter/styles.js +22 -0
- package/_modules/components/Users/ProfessionalDetail/index.js +47 -8
- package/_modules/components/Users/ProfessionalDetail/styles.js +10 -5
- package/_modules/components/Users/ProfessionalList/index.js +43 -6
- package/_modules/components/Users/ProfessionalList/styles.js +5 -3
- package/_modules/components/Users/ProfessionalListing/index.js +14 -3
- package/_modules/components/Users/ProfessionalSchedule/styles.js +1 -1
- package/_modules/components/Users/UserDetails/index.js +11 -13
- package/_modules/components/Users/UserFormDetails/index.js +8 -1
- package/_modules/components/Users/UserTypeSelector/index.js +7 -0
- package/_modules/components/Users/UsersList/index.js +40 -5
- package/_modules/components/Users/UsersList/styles.js +7 -5
- package/_modules/components/Users/UsersListing/index.js +4 -2
- package/_modules/contexts/ThemeContext/index.js +1 -1
- package/_modules/index.js +38 -0
- package/index-template.js +22 -4
- package/package.json +2 -2
- package/src/components/Delivery/UserFormDetails/index.js +8 -10
- package/src/components/Login/LoginForm/index.js +23 -20
- package/src/components/Login/ResetPassword/index.js +283 -0
- package/src/components/Login/ResetPassword/styles.js +215 -0
- package/src/components/Login/index.js +3 -1
- package/src/components/Marketing/CampaignDetail/index.js +0 -1
- package/src/components/Marketing/CampaignDetailContent/index.js +54 -24
- package/src/components/Marketing/CampaignDetailGeneral/index.js +1 -1
- package/src/components/Marketing/CampaignEmail/index.js +152 -15
- package/src/components/Marketing/CampaignEmail/styles.js +64 -3
- package/src/components/Marketing/CampaignHeader/index.js +19 -3
- package/src/components/Marketing/CampaignHeader/styles.js +77 -0
- package/src/components/Marketing/CampaignList/index.js +75 -65
- package/src/components/Marketing/CampaignNotification/index.js +11 -3
- package/src/components/Marketing/CampaignNotification/styles.js +13 -0
- package/src/components/Marketing/CampaignSMS/index.js +11 -2
- package/src/components/Marketing/CampaignSMS/styles.js +13 -0
- package/src/components/Marketing/CampaignWebHook/index.js +11 -2
- package/src/components/Marketing/CampaignWebHook/styles.js +13 -0
- package/src/components/MyProducts/BoxLayout/index.js +25 -0
- package/src/components/MyProducts/BoxLayout/styles.js +78 -0
- package/src/components/MyProducts/CustomerApp/index.js +52 -0
- package/src/components/MyProducts/CustomerApp/styles.js +59 -0
- package/src/components/MyProducts/DriverApp/index.js +83 -0
- package/src/components/MyProducts/DriverApp/styles.js +104 -0
- package/src/components/MyProducts/OrderingWebsite/index.js +41 -0
- package/src/components/MyProducts/OrderingWebsite/styles.js +104 -0
- package/src/components/MyProducts/StoreApp/index.js +83 -0
- package/src/components/MyProducts/StoreApp/styles.js +104 -0
- package/src/components/MyProducts/index.js +11 -0
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +1 -1
- package/src/components/Orders/OrdersTable/index.js +3 -6
- package/src/components/Profile/ProfilePage/index.js +81 -0
- package/src/components/Profile/ProfilePage/styles.js +64 -0
- package/src/components/Profile/index.js +5 -0
- package/src/components/Settings/InsertLink/index.js +6 -2
- package/src/components/Settings/PluginList/index.js +2 -2
- package/src/components/Settings/SettingsSelectUI/index.js +1 -1
- package/src/components/Shared/ColumnAllowSettingPopover/index.js +11 -7
- package/src/components/SidebarMenu/index.js +120 -58
- package/src/components/SidebarMenu/styles.js +7 -0
- package/src/components/Stores/BusinessLocation/index.js +1 -1
- package/src/components/Stores/BusinessProductAddForm/index.js +2 -2
- package/src/components/Stores/BusinessProductsListing/index.js +8 -0
- package/src/components/Stores/BusinessWebhooks/index.js +2 -2
- package/src/components/Stores/PaymentOption/index.js +12 -2
- package/src/components/Stores/PaymentOptionMethods/index.js +12 -2
- package/src/components/Stores/PaymentOptionPaypal/index.js +12 -2
- package/src/components/Stores/PaymentOptionStripeDirect/index.js +12 -2
- package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +12 -2
- package/src/components/Stores/PaymethodOptionStripeConnect/index.js +12 -2
- package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +12 -2
- package/src/components/Users/CustomerDetails/index.js +1 -1
- package/src/components/Users/CustomersListing/index.js +3 -1
- package/src/components/Users/OccupationSelector/index.js +37 -0
- package/src/components/Users/OccupationSelector/styles.js +18 -0
- package/src/components/Users/OccupationsFilter/index.js +50 -0
- package/src/components/Users/OccupationsFilter/styles.js +32 -0
- package/src/components/Users/ProfessionalDetail/index.js +42 -7
- package/src/components/Users/ProfessionalDetail/styles.js +16 -2
- package/src/components/Users/ProfessionalList/index.js +41 -3
- package/src/components/Users/ProfessionalList/styles.js +5 -0
- package/src/components/Users/ProfessionalListing/index.js +14 -1
- package/src/components/Users/ProfessionalSchedule/styles.js +1 -0
- package/src/components/Users/UserDetails/index.js +1 -1
- package/src/components/Users/UserFormDetails/index.js +11 -2
- package/src/components/Users/UserTypeSelector/index.js +6 -0
- package/src/components/Users/UsersList/index.js +44 -8
- package/src/components/Users/UsersList/styles.js +7 -2
- package/src/components/Users/UsersListing/index.js +4 -2
- package/src/contexts/ThemeContext/index.js +4 -0
- package/src/index.js +17 -1
- package/template/app.js +55 -3
- package/template/assets/images/myProducts/customer-app.png +0 -0
- package/template/assets/images/myProducts/driver-app.png +0 -0
- package/template/assets/images/myProducts/ordering-website.png +0 -0
- package/template/assets/images/myProducts/store-app.png +0 -0
- package/template/components/ListenPageChanges/index.js +7 -1
- package/template/config.json +2 -1
- package/template/helmetdata.json +49 -0
- package/template/pages/CustomerApp/index.js +12 -0
- package/template/pages/DriverApp/index.js +12 -0
- package/template/pages/Login/index.js +7 -1
- package/template/pages/OrderingWebsite/index.js +12 -0
- package/template/pages/Professionals/index.js +2 -1
- package/template/pages/Profile/index.js +12 -0
- package/template/pages/ResetPassword/index.js +42 -0
- package/template/pages/StoreApp/index.js +12 -0
|
@@ -17,7 +17,9 @@ import {
|
|
|
17
17
|
Award,
|
|
18
18
|
BoxArrowUpRight,
|
|
19
19
|
Cart3,
|
|
20
|
-
|
|
20
|
+
Cash,
|
|
21
|
+
CloudDownload,
|
|
22
|
+
BagCheck
|
|
21
23
|
} from 'react-bootstrap-icons'
|
|
22
24
|
import { useTheme } from 'styled-components'
|
|
23
25
|
import { useEvent, useLanguage, useSession, useConfig } from 'ordering-components-admin-external'
|
|
@@ -64,12 +66,12 @@ export const SidebarMenu = (props) => {
|
|
|
64
66
|
id: 3,
|
|
65
67
|
title: t('DRIVERS_DASHBOARD', 'Drivers Dashboard'),
|
|
66
68
|
pageName: 'drivers'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 4,
|
|
72
|
+
title: t('APPOINTMENTS', 'Appointments'),
|
|
73
|
+
pageName: 'appointments'
|
|
67
74
|
}
|
|
68
|
-
// {
|
|
69
|
-
// id: 4,
|
|
70
|
-
// title: t('APPOINTMENTS', 'Appointments'),
|
|
71
|
-
// pageName: 'appointments'
|
|
72
|
-
// }
|
|
73
75
|
]
|
|
74
76
|
|
|
75
77
|
const loyaltySubMenus = [
|
|
@@ -108,6 +110,33 @@ export const SidebarMenu = (props) => {
|
|
|
108
110
|
}
|
|
109
111
|
]
|
|
110
112
|
|
|
113
|
+
const myProductMenus = [
|
|
114
|
+
{
|
|
115
|
+
id: 1,
|
|
116
|
+
title: t('ORDERING_WEBSITE', 'Ordering website'),
|
|
117
|
+
pageName: 'ordering_website',
|
|
118
|
+
url: '/my-products/ordering-website'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 2,
|
|
122
|
+
title: t('CUSTOMER_APP', 'Customer app'),
|
|
123
|
+
pageName: 'customer_app',
|
|
124
|
+
url: '/my-products/customer-app'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 3,
|
|
128
|
+
title: t('STORE_APP', 'Store app'),
|
|
129
|
+
pageName: 'store_app',
|
|
130
|
+
url: '/my-products/store-app'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 4,
|
|
134
|
+
title: t('DRIVER_APP', 'Driver app'),
|
|
135
|
+
pageName: 'driver_app',
|
|
136
|
+
url: '/my-products/driver-app'
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
|
|
111
140
|
const storesSubMenus = [
|
|
112
141
|
{
|
|
113
142
|
id: 1,
|
|
@@ -141,13 +170,13 @@ export const SidebarMenu = (props) => {
|
|
|
141
170
|
title: t('MANAGERS', 'Managers'),
|
|
142
171
|
pageName: 'managers',
|
|
143
172
|
url: '/users/managers'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 3,
|
|
176
|
+
title: t('PROFESSIONALS', 'Professionals'),
|
|
177
|
+
pageName: 'professionals',
|
|
178
|
+
url: '/users/professionals'
|
|
144
179
|
}
|
|
145
|
-
// {
|
|
146
|
-
// id: 3,
|
|
147
|
-
// title: t('PROFESSIONALS', 'Professionals'),
|
|
148
|
-
// pageName: 'professionals',
|
|
149
|
-
// url: '/users/professionals'
|
|
150
|
-
// }
|
|
151
180
|
]
|
|
152
181
|
|
|
153
182
|
const settingsSubMenus = [
|
|
@@ -267,13 +296,13 @@ export const SidebarMenu = (props) => {
|
|
|
267
296
|
title: t('PROMOTIONS_ENTERPRISE', 'Promotions enterprise'),
|
|
268
297
|
pageName: 'enterprise_promotions',
|
|
269
298
|
url: '/marketing/promotions-enterprise'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
id: 2,
|
|
302
|
+
title: t('CAMPAIGN', 'Campaign'),
|
|
303
|
+
pageName: 'campaign',
|
|
304
|
+
url: '/marketing/campaign'
|
|
270
305
|
}
|
|
271
|
-
// {
|
|
272
|
-
// id: 2,
|
|
273
|
-
// title: t('CAMPAIGN', 'Campaign'),
|
|
274
|
-
// pageName: 'campaign',
|
|
275
|
-
// url: '/marketing/campaign'
|
|
276
|
-
// }
|
|
277
306
|
]
|
|
278
307
|
|
|
279
308
|
const downloadsSubMenus = [
|
|
@@ -337,7 +366,7 @@ export const SidebarMenu = (props) => {
|
|
|
337
366
|
<SidebarContent className='d-flex flex-column justify-content-between p-1 pt-0'>
|
|
338
367
|
<div className='d-flex flex-column'>
|
|
339
368
|
<Accordion>
|
|
340
|
-
{sessionState?.user?.level !== 5 && (
|
|
369
|
+
{sessionState?.user?.level !== 5 && sessionState?.user?.level !== 8 && (
|
|
341
370
|
<MenuContainer>
|
|
342
371
|
<ContextAwareToggle
|
|
343
372
|
eventKey='0'
|
|
@@ -353,38 +382,41 @@ export const SidebarMenu = (props) => {
|
|
|
353
382
|
</MenuContainer>
|
|
354
383
|
)}
|
|
355
384
|
|
|
356
|
-
|
|
357
|
-
<
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
385
|
+
{sessionState?.user?.level !== 8 && (
|
|
386
|
+
<MenuContainer>
|
|
387
|
+
<ContextAwareToggle
|
|
388
|
+
eventKey='1'
|
|
389
|
+
active={
|
|
390
|
+
location.pathname === '/orders' ||
|
|
391
|
+
location.pathname === '/deliveries' ||
|
|
392
|
+
location.pathname === '/drivers' ||
|
|
393
|
+
location.pathname === '/appointments' ||
|
|
394
|
+
location.pathname === '/gift-cards'
|
|
395
|
+
}
|
|
396
|
+
>
|
|
397
|
+
<ListCheck />
|
|
398
|
+
<span>{t('ORDERS', 'Orders')}</span>
|
|
399
|
+
</ContextAwareToggle>
|
|
400
|
+
<Accordion.Collapse eventKey='1'>
|
|
401
|
+
<MenuContent>
|
|
402
|
+
{ordersSubMenus.map(item => (
|
|
403
|
+
!(sessionState?.user?.level === 2 && item.pageName === 'drivers') &&
|
|
404
|
+
!(sessionState?.user?.level === 5 && item.pageName === 'appointments') && (
|
|
405
|
+
<SubMenu
|
|
406
|
+
key={item.id}
|
|
407
|
+
active={location.pathname.includes(item.url)}
|
|
408
|
+
onClick={() => handleGoToPage({ page: item.pageName })}
|
|
409
|
+
>
|
|
410
|
+
{item.title}
|
|
411
|
+
</SubMenu>
|
|
412
|
+
)
|
|
413
|
+
))}
|
|
414
|
+
</MenuContent>
|
|
415
|
+
</Accordion.Collapse>
|
|
416
|
+
</MenuContainer>
|
|
417
|
+
)}
|
|
386
418
|
|
|
387
|
-
{sessionState?.user?.level !== 5 && (
|
|
419
|
+
{(sessionState?.user?.level !== 5 && sessionState?.user?.level !== 8) && (
|
|
388
420
|
<MenuContainer>
|
|
389
421
|
<ContextAwareToggle
|
|
390
422
|
eventKey='2'
|
|
@@ -398,7 +430,7 @@ export const SidebarMenu = (props) => {
|
|
|
398
430
|
</MenuContainer>
|
|
399
431
|
)}
|
|
400
432
|
|
|
401
|
-
{sessionState?.user?.level !== 5 && (
|
|
433
|
+
{(sessionState?.user?.level !== 5 && sessionState?.user?.level !== 8) && (
|
|
402
434
|
<MenuContainer>
|
|
403
435
|
<ContextAwareToggle
|
|
404
436
|
eventKey='3'
|
|
@@ -457,7 +489,7 @@ export const SidebarMenu = (props) => {
|
|
|
457
489
|
</MenuContainer>
|
|
458
490
|
)}
|
|
459
491
|
|
|
460
|
-
{sessionState?.user?.level !== 5 && (
|
|
492
|
+
{(sessionState?.user?.level !== 5 && sessionState?.user?.level !== 8) && (
|
|
461
493
|
<MenuContainer>
|
|
462
494
|
<ContextAwareToggle
|
|
463
495
|
eventKey='5'
|
|
@@ -525,7 +557,7 @@ export const SidebarMenu = (props) => {
|
|
|
525
557
|
</MenuContainer>
|
|
526
558
|
)}
|
|
527
559
|
|
|
528
|
-
{sessionState?.user?.level
|
|
560
|
+
{sessionState?.user?.level === 0 && (
|
|
529
561
|
<MenuContainer>
|
|
530
562
|
<ContextAwareToggle
|
|
531
563
|
eventKey='8'
|
|
@@ -553,7 +585,7 @@ export const SidebarMenu = (props) => {
|
|
|
553
585
|
</MenuContainer>
|
|
554
586
|
)}
|
|
555
587
|
|
|
556
|
-
{sessionState?.user?.level
|
|
588
|
+
{sessionState?.user?.level === 0 && (
|
|
557
589
|
<MenuContainer>
|
|
558
590
|
<ContextAwareToggle
|
|
559
591
|
eventKey='9'
|
|
@@ -582,7 +614,7 @@ export const SidebarMenu = (props) => {
|
|
|
582
614
|
</MenuContainer>
|
|
583
615
|
)}
|
|
584
616
|
|
|
585
|
-
{sessionState?.user?.level
|
|
617
|
+
{sessionState?.user?.level === 0 && (
|
|
586
618
|
<MenuContainer>
|
|
587
619
|
<ContextAwareToggle
|
|
588
620
|
eventKey='10'
|
|
@@ -609,6 +641,36 @@ export const SidebarMenu = (props) => {
|
|
|
609
641
|
</Accordion.Collapse>
|
|
610
642
|
</MenuContainer>
|
|
611
643
|
)}
|
|
644
|
+
{sessionState?.user?.level === 0 && (
|
|
645
|
+
<MenuContainer>
|
|
646
|
+
<span>{t('SALES_CHANNELS_AND_PRODUCTS', 'Sales channels and products')}</span>
|
|
647
|
+
<ContextAwareToggle
|
|
648
|
+
eventKey='12'
|
|
649
|
+
active={
|
|
650
|
+
location.pathname === '/my-products/ordering-website' ||
|
|
651
|
+
location.pathname === '/my-products/customer-app' ||
|
|
652
|
+
location.pathname === '/my-products/store-app' ||
|
|
653
|
+
location.pathname === '/my-products/driver-app'
|
|
654
|
+
}
|
|
655
|
+
>
|
|
656
|
+
<BagCheck />
|
|
657
|
+
<span>{t('MY_PRODUCTS', 'My products')}</span>
|
|
658
|
+
</ContextAwareToggle>
|
|
659
|
+
<Accordion.Collapse eventKey='12'>
|
|
660
|
+
<MenuContent>
|
|
661
|
+
{myProductMenus.map(item => (
|
|
662
|
+
<SubMenu
|
|
663
|
+
key={item.id}
|
|
664
|
+
active={location.pathname.includes(item.url)}
|
|
665
|
+
onClick={() => handleGoToPage({ page: item.pageName })}
|
|
666
|
+
>
|
|
667
|
+
{item.title}
|
|
668
|
+
</SubMenu>
|
|
669
|
+
))}
|
|
670
|
+
</MenuContent>
|
|
671
|
+
</Accordion.Collapse>
|
|
672
|
+
</MenuContainer>
|
|
673
|
+
)}
|
|
612
674
|
</Accordion>
|
|
613
675
|
</div>
|
|
614
676
|
<div className='d-flex flex-column mt-4'>
|
|
@@ -649,7 +711,7 @@ export const SidebarMenu = (props) => {
|
|
|
649
711
|
</MenuContainer>
|
|
650
712
|
</Accordion>
|
|
651
713
|
)}
|
|
652
|
-
{sessionState?.user?.level
|
|
714
|
+
{sessionState?.user?.level === 0 && (
|
|
653
715
|
<Button
|
|
654
716
|
className='d-flex align-items-center'
|
|
655
717
|
variant={location.pathname === '/ordering-products' && 'primary'}
|
|
@@ -715,9 +777,9 @@ export const SidebarMenu = (props) => {
|
|
|
715
777
|
className='d-flex flex-column px-1'
|
|
716
778
|
>
|
|
717
779
|
<Button
|
|
718
|
-
className='d-
|
|
719
|
-
onClick={() => handleGoToPage({ page: 'profile' })}
|
|
780
|
+
className='d-000flex align-items-center'
|
|
720
781
|
variant={location.pathname === '/profile' && 'primary'}
|
|
782
|
+
onClick={() => handleGoToPage({ page: 'profile' })}
|
|
721
783
|
>
|
|
722
784
|
{sessionState?.user?.photo ? (
|
|
723
785
|
<Image src={sessionState?.user?.photo} width='30px' height='30px' roundedCircle />
|
|
@@ -156,6 +156,13 @@ export const UserInfo = styled.div`
|
|
|
156
156
|
`
|
|
157
157
|
export const MenuContainer = styled.div`
|
|
158
158
|
margin: 5px 0;
|
|
159
|
+
> span {
|
|
160
|
+
font-weight: 500;
|
|
161
|
+
font-size: 10px;
|
|
162
|
+
line-height: 15px;
|
|
163
|
+
padding: 0px 13px;
|
|
164
|
+
color: ${props => props.theme.colors.lightGray};
|
|
165
|
+
}
|
|
159
166
|
> button {
|
|
160
167
|
width: 100%;
|
|
161
168
|
text-align: initial;
|
|
@@ -138,7 +138,7 @@ export const BusinessLocation = (props) => {
|
|
|
138
138
|
? formState?.result?.result?.address
|
|
139
139
|
: formState?.changes?.address ?? business?.address ?? ''
|
|
140
140
|
}
|
|
141
|
-
autoComplete='new-
|
|
141
|
+
autoComplete='new-password'
|
|
142
142
|
countryCode={configs?.country_autocomplete?.value || '*'}
|
|
143
143
|
/>
|
|
144
144
|
</WrapperGoogleAutoCompleteInput>
|
|
@@ -51,8 +51,8 @@ const BusinessProductAddFormUI = (props) => {
|
|
|
51
51
|
const [isCustom, setIsCustom] = useState(false)
|
|
52
52
|
|
|
53
53
|
const typeList = [
|
|
54
|
-
{ value: 'item', content: <Option>{t('ITEM', 'Item')}</Option> }
|
|
55
|
-
|
|
54
|
+
{ value: 'item', content: <Option>{t('ITEM', 'Item')}</Option> },
|
|
55
|
+
{ value: 'service', content: <Option>{t('SERVICE', 'Service')}</Option> }
|
|
56
56
|
]
|
|
57
57
|
|
|
58
58
|
const durationList = [
|
|
@@ -190,6 +190,14 @@ const BusinessProductsListingUI = (props) => {
|
|
|
190
190
|
setBatchImageFormOpen(true)
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
useEffect(() => {
|
|
194
|
+
if (slug && !isInitialRender) {
|
|
195
|
+
setOpenSidebar(null)
|
|
196
|
+
setSelectedProduct(null)
|
|
197
|
+
handleUpdateInitialRender(false)
|
|
198
|
+
}
|
|
199
|
+
}, [slug, isInitialRender])
|
|
200
|
+
|
|
193
201
|
useEffect(() => {
|
|
194
202
|
if (!slug) {
|
|
195
203
|
setSelectedBusiness(null)
|
|
@@ -96,8 +96,8 @@ const BusinessWebhooksUI = (props) => {
|
|
|
96
96
|
<WebhooksContainer>
|
|
97
97
|
<Title>{t('WEBHOOKS', 'WEbhooks')}</Title>
|
|
98
98
|
{
|
|
99
|
-
business?.webhooks?.length > 0 && business?.webhooks.map(
|
|
100
|
-
<WebhookAddContainer key={
|
|
99
|
+
business?.webhooks?.length > 0 && business?.webhooks.map(webhook => (
|
|
100
|
+
<WebhookAddContainer key={webhook.id}>
|
|
101
101
|
<HookSelectWrapper inActive>
|
|
102
102
|
<Select
|
|
103
103
|
defaultValue={webhook?.hook}
|
|
@@ -40,6 +40,7 @@ export const PaymentOption = (props) => {
|
|
|
40
40
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
41
41
|
const [paymentTabs, setPaymentTabs] = useState(sitesState?.sites?.length > 0 ? 0 : 1)
|
|
42
42
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
43
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
43
44
|
|
|
44
45
|
const setPaymethodInfo = (values) => {
|
|
45
46
|
const data = {}
|
|
@@ -102,6 +103,15 @@ export const PaymentOption = (props) => {
|
|
|
102
103
|
})
|
|
103
104
|
}, [businessPaymethod?.id, businessPaymethod?.sandbox, businessPaymethod?.allowed_order_types])
|
|
104
105
|
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (changesState?.allowed_order_types) {
|
|
108
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
109
|
+
}
|
|
110
|
+
if (changesState?.sites) {
|
|
111
|
+
setLocalState({sites: changesState?.sites})
|
|
112
|
+
}
|
|
113
|
+
}, [changesState?.allowed_order_types, changesState?.sites])
|
|
114
|
+
|
|
105
115
|
return (
|
|
106
116
|
<>
|
|
107
117
|
<Container id='payment_method_option'>
|
|
@@ -153,7 +163,7 @@ export const PaymentOption = (props) => {
|
|
|
153
163
|
key={site.id}
|
|
154
164
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
155
165
|
>
|
|
156
|
-
{(
|
|
166
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
157
167
|
<RiCheckboxFill className='fill' />
|
|
158
168
|
) : (
|
|
159
169
|
<RiCheckboxBlankLine />
|
|
@@ -169,7 +179,7 @@ export const PaymentOption = (props) => {
|
|
|
169
179
|
key={type.value}
|
|
170
180
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
171
181
|
>
|
|
172
|
-
{(
|
|
182
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
173
183
|
<RiCheckboxFill className='fill' />
|
|
174
184
|
) : (
|
|
175
185
|
<RiCheckboxBlankLine />
|
|
@@ -46,6 +46,7 @@ export const PaymentOptionMethods = (props) => {
|
|
|
46
46
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
47
47
|
const [paymentTabs, setPaymentTabs] = useState(0)
|
|
48
48
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
49
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
49
50
|
|
|
50
51
|
const setPaymethodInfo = (values) => {
|
|
51
52
|
const data = {}
|
|
@@ -109,6 +110,15 @@ export const PaymentOptionMethods = (props) => {
|
|
|
109
110
|
cleanChangesState(initState)
|
|
110
111
|
}, [])
|
|
111
112
|
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (changesState?.allowed_order_types) {
|
|
115
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
116
|
+
}
|
|
117
|
+
if (changesState?.sites) {
|
|
118
|
+
setLocalState({sites: changesState?.sites})
|
|
119
|
+
}
|
|
120
|
+
}, [changesState?.sites, changesState?.allowed_order_types])
|
|
121
|
+
|
|
112
122
|
return (
|
|
113
123
|
<>
|
|
114
124
|
<Container id={id}>
|
|
@@ -225,7 +235,7 @@ export const PaymentOptionMethods = (props) => {
|
|
|
225
235
|
key={site.id}
|
|
226
236
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
227
237
|
>
|
|
228
|
-
{(
|
|
238
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
229
239
|
<RiCheckboxFill className='fill' />
|
|
230
240
|
) : (
|
|
231
241
|
<RiCheckboxBlankLine />
|
|
@@ -241,7 +251,7 @@ export const PaymentOptionMethods = (props) => {
|
|
|
241
251
|
key={type.value}
|
|
242
252
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
243
253
|
>
|
|
244
|
-
{(
|
|
254
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
245
255
|
<RiCheckboxFill className='fill' />
|
|
246
256
|
) : (
|
|
247
257
|
<RiCheckboxBlankLine />
|
|
@@ -44,6 +44,7 @@ export const PaymentOptionPaypal = (props) => {
|
|
|
44
44
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
45
45
|
const [paymentTabs, setPaymentTabs] = useState(0)
|
|
46
46
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
47
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
47
48
|
|
|
48
49
|
const actionSidebar = (value) => {
|
|
49
50
|
if (!value) {
|
|
@@ -109,6 +110,15 @@ export const PaymentOptionPaypal = (props) => {
|
|
|
109
110
|
cleanChangesState(initState)
|
|
110
111
|
}, [])
|
|
111
112
|
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (changesState?.allowed_order_types) {
|
|
115
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
116
|
+
}
|
|
117
|
+
if (changesState?.sites) {
|
|
118
|
+
setLocalState({sites: changesState?.sites})
|
|
119
|
+
}
|
|
120
|
+
}, [changesState?.sites, changesState?.allowed_order_types])
|
|
121
|
+
|
|
112
122
|
return (
|
|
113
123
|
<>
|
|
114
124
|
<Container id='paypal'>
|
|
@@ -225,7 +235,7 @@ export const PaymentOptionPaypal = (props) => {
|
|
|
225
235
|
key={site.id}
|
|
226
236
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
227
237
|
>
|
|
228
|
-
{(
|
|
238
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
229
239
|
<RiCheckboxFill className='fill' />
|
|
230
240
|
) : (
|
|
231
241
|
<RiCheckboxBlankLine />
|
|
@@ -241,7 +251,7 @@ export const PaymentOptionPaypal = (props) => {
|
|
|
241
251
|
key={type.value}
|
|
242
252
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
243
253
|
>
|
|
244
|
-
{(
|
|
254
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
245
255
|
<RiCheckboxFill className='fill' />
|
|
246
256
|
) : (
|
|
247
257
|
<RiCheckboxBlankLine />
|
|
@@ -44,6 +44,7 @@ export const PaymentOptionStripeDirect = (props) => {
|
|
|
44
44
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
45
45
|
const [paymentTabs, setPaymentTabs] = useState(0)
|
|
46
46
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
47
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
47
48
|
|
|
48
49
|
const setPaymethodInfo = (values) => {
|
|
49
50
|
const data = {}
|
|
@@ -107,6 +108,15 @@ export const PaymentOptionStripeDirect = (props) => {
|
|
|
107
108
|
cleanChangesState(initState)
|
|
108
109
|
}, [])
|
|
109
110
|
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
if (changesState?.allowed_order_types) {
|
|
113
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
114
|
+
}
|
|
115
|
+
if (changesState?.sites) {
|
|
116
|
+
setLocalState({sites: changesState?.sites})
|
|
117
|
+
}
|
|
118
|
+
}, [changesState?.sites, changesState?.allowed_order_types])
|
|
119
|
+
|
|
110
120
|
return (
|
|
111
121
|
<>
|
|
112
122
|
<Container id='stripe_direct'>
|
|
@@ -223,7 +233,7 @@ export const PaymentOptionStripeDirect = (props) => {
|
|
|
223
233
|
key={site.id}
|
|
224
234
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
225
235
|
>
|
|
226
|
-
{(
|
|
236
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
227
237
|
<RiCheckboxFill className='fill' />
|
|
228
238
|
) : (
|
|
229
239
|
<RiCheckboxBlankLine />
|
|
@@ -239,7 +249,7 @@ export const PaymentOptionStripeDirect = (props) => {
|
|
|
239
249
|
key={type.value}
|
|
240
250
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
241
251
|
>
|
|
242
|
-
{(
|
|
252
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
243
253
|
<RiCheckboxFill className='fill' />
|
|
244
254
|
) : (
|
|
245
255
|
<RiCheckboxBlankLine />
|
|
@@ -44,6 +44,7 @@ export const PaymethodOptionPaypalExpress = (props) => {
|
|
|
44
44
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
45
45
|
const [paymentTabs, setPaymentTabs] = useState(0)
|
|
46
46
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
47
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
47
48
|
|
|
48
49
|
const setPaymethodInfo = (values) => {
|
|
49
50
|
const data = {}
|
|
@@ -111,6 +112,15 @@ export const PaymethodOptionPaypalExpress = (props) => {
|
|
|
111
112
|
cleanChangesState(initState)
|
|
112
113
|
}, [])
|
|
113
114
|
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (changesState?.allowed_order_types) {
|
|
117
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
118
|
+
}
|
|
119
|
+
if (changesState?.sites) {
|
|
120
|
+
setLocalState({sites: changesState?.sites})
|
|
121
|
+
}
|
|
122
|
+
}, [changesState?.sites, changesState?.allowed_order_types])
|
|
123
|
+
|
|
114
124
|
return (
|
|
115
125
|
<>
|
|
116
126
|
<Container id='paypal_express'>
|
|
@@ -205,7 +215,7 @@ export const PaymethodOptionPaypalExpress = (props) => {
|
|
|
205
215
|
key={site.id}
|
|
206
216
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
207
217
|
>
|
|
208
|
-
{(
|
|
218
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
209
219
|
<RiCheckboxFill className='fill' />
|
|
210
220
|
) : (
|
|
211
221
|
<RiCheckboxBlankLine />
|
|
@@ -221,7 +231,7 @@ export const PaymethodOptionPaypalExpress = (props) => {
|
|
|
221
231
|
key={type.value}
|
|
222
232
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
223
233
|
>
|
|
224
|
-
{(
|
|
234
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
225
235
|
<RiCheckboxFill className='fill' />
|
|
226
236
|
) : (
|
|
227
237
|
<RiCheckboxBlankLine />
|
|
@@ -47,6 +47,7 @@ export const PaymethodOptionStripeConnect = (props) => {
|
|
|
47
47
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
48
48
|
const [paymentTabs, setPaymentTabs] = useState(0)
|
|
49
49
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
50
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
50
51
|
|
|
51
52
|
const setPaymethodInfo = (values) => {
|
|
52
53
|
const data = {}
|
|
@@ -102,6 +103,15 @@ export const PaymethodOptionStripeConnect = (props) => {
|
|
|
102
103
|
})
|
|
103
104
|
}, [businessPaymethod?.allowed_order_types])
|
|
104
105
|
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (changesState?.allowed_order_types) {
|
|
108
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
109
|
+
}
|
|
110
|
+
if (changesState?.sites) {
|
|
111
|
+
setLocalState({sites: changesState?.sites})
|
|
112
|
+
}
|
|
113
|
+
}, [changesState?.sites, changesState?.allowed_order_types])
|
|
114
|
+
|
|
105
115
|
return (
|
|
106
116
|
<>
|
|
107
117
|
<Container id='stripe_connect'>
|
|
@@ -249,7 +259,7 @@ export const PaymethodOptionStripeConnect = (props) => {
|
|
|
249
259
|
key={site.id}
|
|
250
260
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
251
261
|
>
|
|
252
|
-
{(
|
|
262
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
253
263
|
<RiCheckboxFill className='fill' />
|
|
254
264
|
) : (
|
|
255
265
|
<RiCheckboxBlankLine />
|
|
@@ -265,7 +275,7 @@ export const PaymethodOptionStripeConnect = (props) => {
|
|
|
265
275
|
key={type.value}
|
|
266
276
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
267
277
|
>
|
|
268
|
-
{(
|
|
278
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
269
279
|
<RiCheckboxFill className='fill' />
|
|
270
280
|
) : (
|
|
271
281
|
<RiCheckboxBlankLine />
|
|
@@ -44,6 +44,7 @@ export const PaymethodOptionStripeRedirect = (props) => {
|
|
|
44
44
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
45
45
|
const [paymentTabs, setPaymentTabs] = useState(0)
|
|
46
46
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
47
|
+
const [localState, setLocalState] = useState({allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites})
|
|
47
48
|
|
|
48
49
|
const setPaymethodInfo = (values) => {
|
|
49
50
|
const data = {}
|
|
@@ -107,6 +108,15 @@ export const PaymethodOptionStripeRedirect = (props) => {
|
|
|
107
108
|
cleanChangesState(initState)
|
|
108
109
|
}, [])
|
|
109
110
|
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
if (changesState?.allowed_order_types) {
|
|
113
|
+
setLocalState({allowed_order_types: changesState?.allowed_order_types})
|
|
114
|
+
}
|
|
115
|
+
if (changesState?.sites) {
|
|
116
|
+
setLocalState({sites: changesState?.sites})
|
|
117
|
+
}
|
|
118
|
+
}, [changesState?.sites, changesState?.allowed_order_types])
|
|
119
|
+
|
|
110
120
|
return (
|
|
111
121
|
<>
|
|
112
122
|
<Container id='stripe_redirect'>
|
|
@@ -223,7 +233,7 @@ export const PaymethodOptionStripeRedirect = (props) => {
|
|
|
223
233
|
key={site.id}
|
|
224
234
|
onClick={() => setPaymethodInfo({ key: 'sites', value: site.id })}
|
|
225
235
|
>
|
|
226
|
-
{(
|
|
236
|
+
{(localState?.sites ?? businessPaymethod?.sites?.map(s => s.id))?.includes(site.id) ? (
|
|
227
237
|
<RiCheckboxFill className='fill' />
|
|
228
238
|
) : (
|
|
229
239
|
<RiCheckboxBlankLine />
|
|
@@ -239,7 +249,7 @@ export const PaymethodOptionStripeRedirect = (props) => {
|
|
|
239
249
|
key={type.value}
|
|
240
250
|
onClick={() => setPaymethodInfo({ key: 'allowed_order_types', value: type.value })}
|
|
241
251
|
>
|
|
242
|
-
{(
|
|
252
|
+
{(localState?.allowed_order_types ?? businessPaymethod?.allowed_order_types)?.includes(type.value) ? (
|
|
243
253
|
<RiCheckboxFill className='fill' />
|
|
244
254
|
) : (
|
|
245
255
|
<RiCheckboxBlankLine />
|
|
@@ -100,7 +100,7 @@ const CustomerDetailsUI = (props) => {
|
|
|
100
100
|
{handleChangeActiveUser && (
|
|
101
101
|
<Switch
|
|
102
102
|
defaultChecked={userState?.user?.enabled || false}
|
|
103
|
-
onChange={enabled => handleChangeActiveUser({
|
|
103
|
+
onChange={enabled => handleChangeActiveUser({ ...userState?.user, enabled: enabled })}
|
|
104
104
|
/>
|
|
105
105
|
)}
|
|
106
106
|
</>
|