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 cad208e3a..4e7dc1769 100755
--- a/src/views/Event/EventView.vue
+++ b/src/views/Event/EventView.vue
@@ -250,12 +250,12 @@
{{ t("These events may interest you") }}
-
+
import("@/components/Event/Integrations/TwitchIntegration.vue")
@@ -619,6 +620,19 @@ const organizerDomain = computed((): string | undefined => {
return organizer.value?.domain ?? undefined;
});
+const filterNonPassedRelatedEvents = (relatedEvents: IEvent[] | undefined) => {
+ console.log(relatedEvents);
+ return relatedEvents?.filter((relatedEvent) => {
+ let endsOn = relatedEvent.endsOn ? new Date(relatedEvent.endsOn) : new Date(relatedEvent.beginsOn);
+ console.log(endsOn);
+ return endsOn > new Date();
+ })
+};
+
+const nonPassedRelatedEvents = computed((): IEvent[] | undefined => {
+ return filterNonPassedRelatedEvents(event.value?.relatedEvents);
+});
+
useHead({
title: computed(() => eventTitle.value ?? ""),
meta: [{ name: "description", content: eventDescription.value }],