From 19ba095e07f07f70f0c4b8f15862304dfebdf49e Mon Sep 17 00:00:00 2001 From: Massedil Date: Mon, 4 Nov 2024 22:35:01 +0100 Subject: [PATCH] Issue #1571: Fixes the switches for displaying hours not working. --- src/views/Event/EditView.vue | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/views/Event/EditView.vue b/src/views/Event/EditView.vue index 0896ecf36..341664ca2 100644 --- a/src/views/Event/EditView.vue +++ b/src/views/Event/EditView.vue @@ -67,12 +67,12 @@ label-for="begins-on-field" > - {{ + {{ t("Show the time when the event begins") }} @@ -84,12 +84,12 @@ class="items-center" > - {{ + {{ t("Show the time when the event ends") }} @@ -1201,6 +1201,30 @@ const isEventModified = computed((): boolean => { ); }); +const showStartTime = computed({ + get(): boolean { + return event.value.options.showStartTime; + }, + set(newShowStartTime: boolean) { + event.value.options = { + ...event.value.options, + showStartTime: newShowStartTime, + }; + }, +}); + +const showEndTime = computed({ + get(): boolean { + return event.value.options.showEndTime; + }, + set(newshowEndTime: boolean) { + event.value.options = { + ...event.value.options, + showEndTime: newshowEndTime, + }; + }, +}); + const beginsOn = ref(new Date()); const endsOn = ref(new Date());