ordering-ui-admin-external 1.43.20 → 1.43.22
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.93ac710b95858715130d.js → ordering-ui-admin.3f67563d0aa434e9729f.js} +2 -2
- package/_modules/components/Delivery/DriverGroupSelectorHeader/index.js +130 -0
- package/_modules/components/Delivery/DriverGroupSelectorHeader/styles.js +32 -0
- package/_modules/components/Delivery/DriversGroupGeneralForm/index.js +14 -5
- package/_modules/components/Delivery/DriversTimeDisplay/DriverBlockAddForm.js +212 -0
- package/_modules/components/Delivery/DriversTimeDisplay/UserList.js +226 -0
- package/_modules/components/Delivery/DriversTimeDisplay/index.js +485 -0
- package/_modules/components/Delivery/DriversTimeDisplay/styles.js +198 -0
- package/_modules/components/Delivery/index.js +8 -1
- package/_modules/components/Settings/SettingsLogs/index.js +28 -16
- package/_modules/components/SidebarMenu/index.js +30 -24
- package/_modules/components/Stores/BusinessDetails/index.js +2 -0
- package/_modules/components/Stores/BusinessSummary/index.js +16 -1
- package/_modules/index.js +6 -0
- package/_modules/utils/index.js +4 -2
- package/package.json +3 -2
- package/src/components/Delivery/DriverGroupSelectorHeader/index.js +124 -0
- package/src/components/Delivery/DriverGroupSelectorHeader/styles.js +97 -0
- package/src/components/Delivery/DriversGroupGeneralForm/index.js +12 -2
- package/src/components/Delivery/DriversTimeDisplay/DriverBlockAddForm.js +271 -0
- package/src/components/Delivery/DriversTimeDisplay/UserList.js +292 -0
- package/src/components/Delivery/DriversTimeDisplay/index.js +535 -0
- package/src/components/Delivery/DriversTimeDisplay/styles.js +853 -0
- package/src/components/Delivery/index.js +2 -0
- package/src/components/Settings/SettingsLogs/index.js +13 -0
- package/src/components/SidebarMenu/index.js +9 -1
- package/src/components/Stores/BusinessDetails/index.js +2 -0
- package/src/components/Stores/BusinessSummary/index.js +29 -8
- package/src/index.js +2 -0
- package/src/utils/index.js +54 -0
- package/template/app.js +4 -1
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/DriverTimeDisplay/index.js +12 -0
- /package/_bundles/{ordering-ui-admin.93ac710b95858715130d.js.LICENSE.txt → ordering-ui-admin.3f67563d0aa434e9729f.js.LICENSE.txt} +0 -0
|
@@ -23,12 +23,14 @@ import { DriversGroupOrders } from './DriversGroupOrders'
|
|
|
23
23
|
import { DriversGroupAutoassign } from './DriversGroupAutoassign'
|
|
24
24
|
import { DriversMarkAsBusy } from './DriversMarkAsBusy'
|
|
25
25
|
import { GoogleGpsButton } from './GoogleGpsButton'
|
|
26
|
+
import { DriversTimeDisplay } from './DriversTimeDisplay'
|
|
26
27
|
|
|
27
28
|
export {
|
|
28
29
|
AddressList,
|
|
29
30
|
AddressForm,
|
|
30
31
|
DeliveryUsersListing,
|
|
31
32
|
DriversCompaniesListing,
|
|
33
|
+
DriversTimeDisplay,
|
|
32
34
|
DriversGroupsListing,
|
|
33
35
|
WizardDelivery,
|
|
34
36
|
DriverGroupSetting,
|
|
@@ -2,6 +2,10 @@ import React, { useEffect } from 'react'
|
|
|
2
2
|
import { useLanguage, useUtils, useConfig, SettingsLogs as SettingsLogsController } from 'ordering-components-admin-external'
|
|
3
3
|
import Skeleton from 'react-loading-skeleton'
|
|
4
4
|
import { Modal, Pagination } from '../../Shared'
|
|
5
|
+
import { IconButton } from '../../../styles'
|
|
6
|
+
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
7
|
+
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
import {
|
|
7
11
|
DriversGroupLogsContainer,
|
|
@@ -30,6 +34,7 @@ const SettingsLogsUI = (props) => {
|
|
|
30
34
|
|
|
31
35
|
const [, t] = useLanguage()
|
|
32
36
|
const [{ parseDate }] = useUtils()
|
|
37
|
+
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
33
38
|
const [open, setOpen] = React.useState(false)
|
|
34
39
|
const [schedules, setSchedules] = React.useState({
|
|
35
40
|
newSchedule: [],
|
|
@@ -108,6 +113,14 @@ const SettingsLogsUI = (props) => {
|
|
|
108
113
|
return (
|
|
109
114
|
<>
|
|
110
115
|
<DriversGroupLogsContainer>
|
|
116
|
+
{isCollapse && (
|
|
117
|
+
<IconButton
|
|
118
|
+
color='black'
|
|
119
|
+
onClick={() => handleMenuCollapse(false)}
|
|
120
|
+
>
|
|
121
|
+
<MenuIcon />
|
|
122
|
+
</IconButton>
|
|
123
|
+
)}
|
|
111
124
|
<HeaderContainer>
|
|
112
125
|
<HeaderTitleContainer>
|
|
113
126
|
<h1>{t('SETTINGS_LOGS', 'Settings Logs')}</h1>
|
|
@@ -359,6 +359,13 @@ const SidebarMenuUI = (props) => {
|
|
|
359
359
|
pageName: 'drivers_groups',
|
|
360
360
|
url: '/delivery/drivers-groups',
|
|
361
361
|
enabled: sessionState?.user?.level === 5 || sessionState?.user?.level === 0
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
id: 5,
|
|
365
|
+
title: t('DRIVERS_TIME_DISPLAY', 'Drivers time display'),
|
|
366
|
+
pageName: 'drivers_time_display',
|
|
367
|
+
url: '/delivery/drivers-time-display',
|
|
368
|
+
enabled: sessionState?.user?.level === 5 || sessionState?.user?.level === 0
|
|
362
369
|
}
|
|
363
370
|
]
|
|
364
371
|
|
|
@@ -703,7 +710,8 @@ const SidebarMenuUI = (props) => {
|
|
|
703
710
|
location.pathname === '/delivery/drivers-list' ||
|
|
704
711
|
location.pathname === '/delivery/drivers-managers' ||
|
|
705
712
|
location.pathname === '/delivery/drivers-companies' ||
|
|
706
|
-
location.pathname === '/delivery/drivers-groups'
|
|
713
|
+
location.pathname === '/delivery/drivers-groups' ||
|
|
714
|
+
location.pathname === '/delivery/drivers-time-display'
|
|
707
715
|
}
|
|
708
716
|
>
|
|
709
717
|
<Truck />
|
|
@@ -52,6 +52,7 @@ export const BusinessDetailsUI = (props) => {
|
|
|
52
52
|
actionStatus,
|
|
53
53
|
handleUpdatePreorderConfigs,
|
|
54
54
|
handleUpdateSpoonityKey,
|
|
55
|
+
handleSyncEvent,
|
|
55
56
|
spoonityKeyState,
|
|
56
57
|
siteState
|
|
57
58
|
} = props
|
|
@@ -175,6 +176,7 @@ export const BusinessDetailsUI = (props) => {
|
|
|
175
176
|
handleSucessUpdateBusiness={handleSucessUpdateBusiness}
|
|
176
177
|
handleDuplicateBusiness={handleDuplicateBusiness}
|
|
177
178
|
handleDeleteBusiness={handleDeleteBusiness}
|
|
179
|
+
handleSyncEvent={handleSyncEvent}
|
|
178
180
|
extraOpen={extraOpen}
|
|
179
181
|
spoonityConfig={spoonityConfig}
|
|
180
182
|
siteState={siteState}
|
|
@@ -38,6 +38,7 @@ export const BusinessSummary = (props) => {
|
|
|
38
38
|
handleSelectedItem,
|
|
39
39
|
handleDuplicateBusiness,
|
|
40
40
|
handleDeleteBusiness,
|
|
41
|
+
handleSyncEvent,
|
|
41
42
|
extraOpen,
|
|
42
43
|
spoonityConfig,
|
|
43
44
|
siteState,
|
|
@@ -58,7 +59,8 @@ export const BusinessSummary = (props) => {
|
|
|
58
59
|
|
|
59
60
|
const isEnabledWhiteLabelModule = configs?.white_label_module?.value
|
|
60
61
|
const isAllowRegisteredBusiness = ((sessionState?.user?.level === 0) || (sessionState?.user?.level === 2 && configs?.allow_business_owner_register_business?.value === '1'))
|
|
61
|
-
|
|
62
|
+
const projectsForEnableSync = ['dominosordering']
|
|
63
|
+
const enableSyncFunctions = projectsForEnableSync.includes(ordering.project)
|
|
62
64
|
const handleOpenCategory = () => {
|
|
63
65
|
events.emit('go_to_page', { page: 'store', params: { store: businessState?.business?.slug } })
|
|
64
66
|
}
|
|
@@ -218,13 +220,13 @@ export const BusinessSummary = (props) => {
|
|
|
218
220
|
>
|
|
219
221
|
{t('PREVIEW', 'Preview')}
|
|
220
222
|
</Dropdown.Item>
|
|
221
|
-
{isAllowRegisteredBusiness &&
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
223
|
+
{isAllowRegisteredBusiness && (
|
|
224
|
+
<Dropdown.Item
|
|
225
|
+
onClick={() => handleDuplicateBusiness()}
|
|
226
|
+
>
|
|
227
|
+
{t('DUPLICATE', 'Duplicate')}
|
|
228
|
+
</Dropdown.Item>
|
|
229
|
+
)}
|
|
228
230
|
{!isEnabledWhiteLabelModule && (
|
|
229
231
|
<Dropdown.Item
|
|
230
232
|
onClick={() => handleSelectedItem('personalization')}
|
|
@@ -237,6 +239,25 @@ export const BusinessSummary = (props) => {
|
|
|
237
239
|
>
|
|
238
240
|
{t('CUSTOM_FIELDS', 'Custom fields')}
|
|
239
241
|
</Dropdown.Item>
|
|
242
|
+
{enableSyncFunctions && (
|
|
243
|
+
<>
|
|
244
|
+
<Dropdown.Item
|
|
245
|
+
onClick={() => handleSyncEvent('business')}
|
|
246
|
+
>
|
|
247
|
+
{t('SYNC_BUSINESS', 'Sync Business')}
|
|
248
|
+
</Dropdown.Item>
|
|
249
|
+
<Dropdown.Item
|
|
250
|
+
onClick={() => handleSyncEvent('menu')}
|
|
251
|
+
>
|
|
252
|
+
{t('SYNC_PRODUCTS', 'Sync Products')}
|
|
253
|
+
</Dropdown.Item>
|
|
254
|
+
<Dropdown.Item
|
|
255
|
+
onClick={() => handleSyncEvent('coupons')}
|
|
256
|
+
>
|
|
257
|
+
{t('SYNC_COUPONS', 'Sync Coupons')}
|
|
258
|
+
</Dropdown.Item>
|
|
259
|
+
</>
|
|
260
|
+
)}
|
|
240
261
|
<Dropdown.Item
|
|
241
262
|
onClick={() => onClickDeleteBusiness()}
|
|
242
263
|
>
|
package/src/index.js
CHANGED
|
@@ -120,6 +120,7 @@ import {
|
|
|
120
120
|
DeliveryUsersListing,
|
|
121
121
|
DriversCompaniesListing,
|
|
122
122
|
DriversGroupsListing,
|
|
123
|
+
DriversTimeDisplay,
|
|
123
124
|
WizardDelivery,
|
|
124
125
|
DriverGroupSetting,
|
|
125
126
|
DriversCompaniesList,
|
|
@@ -540,6 +541,7 @@ export {
|
|
|
540
541
|
DeliveryUsersListing,
|
|
541
542
|
DriversCompaniesListing,
|
|
542
543
|
DriversGroupsListing,
|
|
544
|
+
DriversTimeDisplay,
|
|
543
545
|
WizardDelivery,
|
|
544
546
|
DriverGroupSetting,
|
|
545
547
|
DriversCompaniesList,
|
package/src/utils/index.js
CHANGED
|
@@ -622,3 +622,57 @@ export const disableReasons = () => {
|
|
|
622
622
|
}
|
|
623
623
|
return disableReasonDictionary
|
|
624
624
|
}
|
|
625
|
+
|
|
626
|
+
export const TwelveHours = [
|
|
627
|
+
'12:00 AM',
|
|
628
|
+
'01:00 AM',
|
|
629
|
+
'02:00 AM',
|
|
630
|
+
'03:00 AM',
|
|
631
|
+
'04:00 AM',
|
|
632
|
+
'05:00 AM',
|
|
633
|
+
'06:00 AM',
|
|
634
|
+
'07:00 AM',
|
|
635
|
+
'08:00 AM',
|
|
636
|
+
'09:00 AM',
|
|
637
|
+
'10:00 AM',
|
|
638
|
+
'11:00 AM',
|
|
639
|
+
'12:00 PM',
|
|
640
|
+
'01:00 PM',
|
|
641
|
+
'02:00 PM',
|
|
642
|
+
'03:00 PM',
|
|
643
|
+
'04:00 PM',
|
|
644
|
+
'05:00 PM',
|
|
645
|
+
'06:00 PM',
|
|
646
|
+
'07:00 PM',
|
|
647
|
+
'08:00 PM',
|
|
648
|
+
'09:00 PM',
|
|
649
|
+
'10:00 PM',
|
|
650
|
+
'11:00 PM'
|
|
651
|
+
]
|
|
652
|
+
|
|
653
|
+
export const TwentyFourHours = [
|
|
654
|
+
'00:00',
|
|
655
|
+
'01:00',
|
|
656
|
+
'02:00',
|
|
657
|
+
'03:00',
|
|
658
|
+
'04:00',
|
|
659
|
+
'05:00',
|
|
660
|
+
'06:00',
|
|
661
|
+
'07:00',
|
|
662
|
+
'08:00',
|
|
663
|
+
'09:00',
|
|
664
|
+
'10:00',
|
|
665
|
+
'11:00',
|
|
666
|
+
'12:00',
|
|
667
|
+
'13:00',
|
|
668
|
+
'14:00',
|
|
669
|
+
'15:00',
|
|
670
|
+
'16:00',
|
|
671
|
+
'17:00',
|
|
672
|
+
'18:00',
|
|
673
|
+
'19:00',
|
|
674
|
+
'20:00',
|
|
675
|
+
'21:00',
|
|
676
|
+
'22:00',
|
|
677
|
+
'23:00'
|
|
678
|
+
]
|
package/template/app.js
CHANGED
|
@@ -88,6 +88,7 @@ import { BusinessDevicesList } from './pages/BusinessDevicesList'
|
|
|
88
88
|
import { SettingsLogs } from './pages/SettingsLogs'
|
|
89
89
|
import { Banners } from '../src/components/Banners'
|
|
90
90
|
import { useProjectState } from '../src/contexts/ProjectContext'
|
|
91
|
+
import { DriversTimeDisplay } from './pages/DriverTimeDisplay'
|
|
91
92
|
|
|
92
93
|
export const App = () => {
|
|
93
94
|
const history = useHistory()
|
|
@@ -374,7 +375,9 @@ export const App = () => {
|
|
|
374
375
|
<ProtectedRoute path='/delivery/drivers-groups' allowedLevels={[0, 5]}>
|
|
375
376
|
<DriversGroupsList />
|
|
376
377
|
</ProtectedRoute>
|
|
377
|
-
|
|
378
|
+
<ProtectedRoute path='/delivery/drivers-time-display' allowedLevels={[0, 5]}>
|
|
379
|
+
<DriversTimeDisplay />
|
|
380
|
+
</ProtectedRoute>
|
|
378
381
|
<ProtectedRoute path='/marketing/promotions-enterprise' allowedLevels={[0]}>
|
|
379
382
|
<EnterprisePromotionList />
|
|
380
383
|
</ProtectedRoute>
|
|
@@ -55,6 +55,7 @@ export const ListenPageChanges = ({ children }) => {
|
|
|
55
55
|
drivers_managers: '/delivery/drivers-managers',
|
|
56
56
|
drivers_companies: '/delivery/drivers-companies',
|
|
57
57
|
drivers_groups: '/delivery/drivers-groups',
|
|
58
|
+
drivers_time_display: '/delivery/drivers-time-display',
|
|
58
59
|
enterprise_promotions: '/marketing/promotions-enterprise',
|
|
59
60
|
campaign: '/marketing/campaign',
|
|
60
61
|
ad_banners: '/marketing/ad-banners',
|
package/template/helmetdata.json
CHANGED
|
@@ -237,6 +237,13 @@
|
|
|
237
237
|
"robots": "index, follow",
|
|
238
238
|
"canonicalUrl": ""
|
|
239
239
|
},
|
|
240
|
+
"drivers_time_display": {
|
|
241
|
+
"title": "Driver time display",
|
|
242
|
+
"description": "a dummy description about this page",
|
|
243
|
+
"keywords": "test, dummy, data",
|
|
244
|
+
"robots": "index, follow",
|
|
245
|
+
"canonicalUrl": ""
|
|
246
|
+
},
|
|
240
247
|
"ordering_products": {
|
|
241
248
|
"title": "Ordering Products",
|
|
242
249
|
"description": "a dummy description about this page",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { HelmetTags } from '../../components/HelmetTags'
|
|
3
|
+
import {DriversTimeDisplay as DriversTimeDisplayController} from '../../../src/components/Delivery/DriversTimeDisplay'
|
|
4
|
+
|
|
5
|
+
export const DriversTimeDisplay = (props) => {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<HelmetTags page='drivers_time_display' />
|
|
9
|
+
<DriversTimeDisplayController {...props} />
|
|
10
|
+
</>
|
|
11
|
+
)
|
|
12
|
+
}
|