From 67393ba2f0738e3f81192eda3662fef948c02779 Mon Sep 17 00:00:00 2001 From: Massedil Date: Thu, 7 Nov 2024 14:22:48 +0100 Subject: [PATCH] Issue #1569 : New event times and participants are hidden by default --- src/views/Event/EditView.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/Event/EditView.vue b/src/views/Event/EditView.vue index 4fbe885fb..091e39bc9 100644 --- a/src/views/Event/EditView.vue +++ b/src/views/Event/EditView.vue @@ -716,10 +716,12 @@ const setEventTimezoneToUserTimezoneIfUnset = () => { // usefull if the page is loaded from scratch watch(loggedUser, setEventTimezoneToUserTimezoneIfUnset); -const initializeEvent = () => { +const initializeNewEvent = () => { // usefull if the data is already cached setEventTimezoneToUserTimezoneIfUnset(); + // Default values for beginsOn and endsOn + const roundUpTo15Minutes = (time: Date) => { time.setUTCMilliseconds( Math.round(time.getUTCMilliseconds() / 1000) * 1000 @@ -736,6 +738,13 @@ const initializeEvent = () => { beginsOn.value = now; endsOn.value = end; + + // Default values for showStartTime and showEndTime + showStartTime.value = false; + showEndTime.value = false; + + // Default values for hideParticipants + hideParticipants.value = true; }; const organizerActor = computed({ @@ -793,7 +802,7 @@ onMounted(async () => { pictureFile.value = await buildFileFromIMedia(event.value.picture); limitedPlaces.value = eventOptions.value.maximumAttendeeCapacity > 0; if (!(props.isUpdate || props.isDuplicate)) { - initializeEvent(); + initializeNewEvent(); } else { event.value = new EventModel({ ...event.value,