diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index 6e55b6e22..e51683b7d 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -243,26 +243,7 @@ - -
-

{{ $t("Last week") }}

- -
- -
-
-
@@ -301,9 +282,7 @@

@@ -334,7 +313,7 @@ {{ $t("No events found") }}
-
+
{{ $t("The events you created are not shown here.") @@ -400,10 +379,8 @@ import Subtitle from "../components/Utils/Subtitle.vue"; query: LOGGED_USER_PARTICIPATIONS, fetchPolicy: "cache-and-network", variables() { - const lastWeek = new Date(); - lastWeek.setDate(new Date().getDate() - 7); return { - afterDateTime: lastWeek.toISOString(), + afterDateTime: new Date().toISOString(), }; }, update: (data) => @@ -584,20 +561,6 @@ export default class Home extends Vue { ); } - get lastWeekEvents(): IParticipant[] { - const res = this.currentUserParticipations.filter( - ({ event, role }) => - event.beginsOn != null && - this.isBefore(event.beginsOn.toDateString(), 0) && - role !== ParticipantRole.REJECTED - ); - res.sort( - (a: IParticipant, b: IParticipant) => - a.event.beginsOn.getTime() - b.event.beginsOn.getTime() - ); - return res; - } - eventDeleted(eventid: string): void { this.currentUserParticipations = this.currentUserParticipations.filter( (participation) => participation.event.id !== eventid @@ -622,10 +585,6 @@ export default class Home extends Vue { return this.currentActor.id != undefined && this.goingToEvents.size > 0; } - get canShowLastWeekEvents(): boolean { - return this.currentActor && this.lastWeekEvents.length > 0; - } - get canShowCloseEvents(): boolean { return this.closeEvents.total > 0; }