From 39f11549e62993cebb7863b399b7db89baa4a9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Fri, 4 Feb 2022 12:37:38 +0100 Subject: [PATCH] hide last events in my_account if shared project --- src/views/My_account.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/My_account.vue b/src/views/My_account.vue index 0ee43939..3d7b105b 100644 --- a/src/views/My_account.vue +++ b/src/views/My_account.vue @@ -137,7 +137,10 @@ </div> </div> - <div class="row"> + <div + v-if="!isSharedProject" + class="row" + > <div class="fourteen wide column"> <div class="ui three stackable cards"> <div class="red card"> @@ -335,9 +338,12 @@ export default { return null; }, + isSharedProject() { + return this.$route.path.includes('projet-partage'); + }, + availableProjects() { - console.log(this.$route.path); - if (this.$route.path.includes('projet-partage')) { + if (this.isSharedProject) { return this.projects.filter((el) => el.slug === this.$route.params.slug); } return this.projects; @@ -368,7 +374,7 @@ export default { }, modifyUrl(url) { - if (this.$route.path.includes('projet-partage')) { + if (this.isSharedProject) { return url.replace('projet', 'projet-partage'); } return url; -- GitLab