Fix eslint warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-27 19:27:44 +01:00
parent 487ac56b4c
commit da42522073
130 changed files with 702 additions and 734 deletions

View File

@@ -126,8 +126,7 @@
</span>
<div>
<EventListCard
v-for="participation in row[1]"
v-if="isInLessThanSevenDays(row[0])"
v-for="participation in thisWeek(row)"
@event-deleted="eventDeleted"
:key="participation[1].id"
:participation="participation[1]"
@@ -173,7 +172,8 @@
<script lang="ts">
import { Component, Vue, Watch } from "vue-property-decorator";
import { IParticipant, Participant, ParticipantRole } from "../types/participant.model";
import { ParticipantRole } from "@/types/enums";
import { IParticipant, Participant } from "../types/participant.model";
import { FETCH_EVENTS } from "../graphql/event";
import EventListCard from "../components/Event/EventListCard.vue";
import EventCard from "../components/Event/EventCard.vue";
@@ -286,6 +286,13 @@ export default class Home extends Vue {
return window.localStorage.getItem("new-registered-user") === "yes";
}
thisWeek(row: [string, Map<string, IParticipant>]): Map<string, IParticipant> {
if (this.isInLessThanSevenDays(row[0])) {
return row[1];
}
return new Map();
}
// eslint-disable-next-line class-methods-use-this
mounted(): void {
if (window.localStorage.getItem("welcome-back")) {