Contribute Calendar to Quick Access
This commit is contained in:
+26
-1
@@ -3,6 +3,7 @@ import type {
|
||||
CalendarPickerUiCapability,
|
||||
DashboardWidgetsUiCapability,
|
||||
PlatformWebModule,
|
||||
QuickAccessToolsUiCapability,
|
||||
SettingsSectionsUiCapability
|
||||
} from "@govoplan/core-webui";
|
||||
import "./styles/calendar.css";
|
||||
@@ -90,6 +91,22 @@ const calendarDashboardWidgets: DashboardWidgetsUiCapability = {
|
||||
}
|
||||
]
|
||||
};
|
||||
const calendarQuickAccessTools: QuickAccessToolsUiCapability = {
|
||||
tools: [
|
||||
{
|
||||
id: "calendar.agenda",
|
||||
render: ({ settings }) => createElement(UpcomingEventsWidget, {
|
||||
settings,
|
||||
refreshKey: 0,
|
||||
configuration: {
|
||||
maxItems: 7,
|
||||
daysAhead: 21,
|
||||
showLocation: true
|
||||
}
|
||||
})
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const calendarModule: PlatformWebModule = {
|
||||
id: "calendar",
|
||||
@@ -122,6 +139,13 @@ export const calendarModule: PlatformWebModule = {
|
||||
kind: "section",
|
||||
label: "Calendar preferences",
|
||||
order: 45
|
||||
},
|
||||
{
|
||||
id: "calendar.quick_access.agenda",
|
||||
moduleId: "calendar",
|
||||
kind: "quick_access",
|
||||
label: "Calendar Quick Access",
|
||||
order: 50
|
||||
}
|
||||
],
|
||||
navItems: [{ to: "/calendar", label: "i18n:govoplan-calendar.calendar.adab5090", iconName: "calendar", anyOf: eventRead, order: 55, surfaceId: "calendar.navigation" }],
|
||||
@@ -130,7 +154,8 @@ export const calendarModule: PlatformWebModule = {
|
||||
uiCapabilities: {
|
||||
"calendar.picker": calendarPicker,
|
||||
"dashboard.widgets": calendarDashboardWidgets,
|
||||
"settings.sections": calendarSettingsSections
|
||||
"settings.sections": calendarSettingsSections,
|
||||
"quickAccess.tools": calendarQuickAccessTools
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user