diff --git a/src/plugins/schedule/components/overview/AgendaView.vue b/src/plugins/schedule/components/overview/AgendaView.vue
index 9fee7b3..2beb5f0 100644
--- a/src/plugins/schedule/components/overview/AgendaView.vue
+++ b/src/plugins/schedule/components/overview/AgendaView.vue
@@ -15,7 +15,7 @@
-
+
@@ -74,6 +74,27 @@
locale="de-de"
style="height: 100%; min-height: 400px"
>
+
+
+
+
+
+ Anzeigen
+
+
+ Neue Veranstaltung
+
+
+
+
+
('week');
const calendarRealView = computed(() => (calendarDays.value != 7 ? 'day' : 'week'));
const calendarDays = computed(() =>
@@ -115,7 +137,7 @@ export default defineComponent({
calendarView.value == 'day' ? 1 : windowWidth.value <= 1023 ? 3 : 7
);
const events = ref({});
- const editor = ref(undefined);
+ const editor = ref(undefined);
interface Agendas {
[index: number]: FG.Event[];
@@ -195,6 +217,11 @@ export default defineComponent({
}
}
+ function showDay(date: string) {
+ calendarView.value = 'day';
+ selectedDate.value = date;
+ }
+
function updateProxy() {
proxyDate.value = selectedDate.value;
}
@@ -228,6 +255,15 @@ export default defineComponent({
}
}
+ function formatDayColor(today: boolean, selected: boolean) {
+ if (today) return 'primary';
+ if (selected) return 'secondary';
+ }
+
+ function newEvent(start: Date | string | number) {
+ editor.value = Object.assign({}, emptyEvent, { start: start });
+ }
+
return {
asYear,
asMonth,
@@ -241,10 +277,13 @@ export default defineComponent({
editor,
editDone,
events,
+ formatDayColor,
+ newEvent,
proxyDate,
remove,
saveSelectedDate,
selectedDate,
+ showDay,
updateProxy,
};
},