From c1997c363110132c86732cfee25e1016a8578848 Mon Sep 17 00:00:00 2001 From: Michael Bauer <michael-bauer@posteo.de> Date: Thu, 17 Apr 2025 20:58:39 +0200 Subject: [PATCH] Do not show until if not available in AvailabilityEventList It was shown as the beginning of the epoch. --- .../AvailabilityEventList.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/aleksis/core/frontend/components/availability_event/AvailabilityEventList.vue b/aleksis/core/frontend/components/availability_event/AvailabilityEventList.vue index e36f416b7..3ff485aed 100644 --- a/aleksis/core/frontend/components/availability_event/AvailabilityEventList.vue +++ b/aleksis/core/frontend/components/availability_event/AvailabilityEventList.vue @@ -166,13 +166,16 @@ export default { rRuleToText(rfcString) { if (rfcString) { const rRule = RRule.fromString(rfcString); - return `${ - this.rruleFrequencies.find((r) => r.freq === rRule.options.interval) - .text - }, ${this.$t("availability_events.recurrences.until")} ${this.$d( - rRule.options.until, - "short", - )}`; + let recurrence = this.rruleFrequencies.find( + (r) => r.freq === rRule.options.interval, + ).text; + if (rRule.options.until) { + recurrence += `, ${this.$t("availability_events.recurrences.until")} ${this.$d( + rRule.options.until, + "short", + )}`; + } + return recurrence; } return this.$t("availability_events.recurrences.none"); }, -- GitLab