diff --git a/src/graphql/event.ts b/src/graphql/event.ts
index ee2f7ed9d..3e0781cea 100644
--- a/src/graphql/event.ts
+++ b/src/graphql/event.ts
@@ -64,6 +64,7 @@ const FULL_EVENT_FRAGMENT = gql`
uuid
title
beginsOn
+ endsOn
status
language
picture {
diff --git a/src/views/Event/EventView.vue b/src/views/Event/EventView.vue
index 9f79acdbf..ab32c301e 100755
--- a/src/views/Event/EventView.vue
+++ b/src/views/Event/EventView.vue
@@ -243,12 +243,12 @@
{{ t("These events may interest you") }}
-
+
import("@/components/Event/Integrations/TwitchIntegration.vue")
@@ -611,6 +612,17 @@ const organizerDomain = computed((): string | undefined => {
return organizer.value?.domain ?? undefined;
});
+const nonPassedRelatedEvents = computed((): IEvent[] | undefined => {
+ let relatedEvents = event.value?.relatedEvents;
+
+ return relatedEvents?.filter((relatedEvent: IEvent) => {
+ const endsOn = relatedEvent.endsOn
+ ? new Date(relatedEvent.endsOn)
+ : new Date(relatedEvent.beginsOn);
+ return endsOn > new Date();
+ });
+});
+
useHead({
title: computed(() => eventTitle.value ?? ""),
meta: [{ name: "description", content: eventDescription.value }],