Mercurial > gemma
diff client/src/components/sections/Sections.vue @ 4745:aecba7e66301
client: sections:improve showing of delete button depending on user rights
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 18 Oct 2019 13:13:24 +0200 |
parents | 2f2dbd3ebaea |
children | 008bc1ae8897 |
line wrap: on
line diff
--- a/client/src/components/sections/Sections.vue Fri Oct 18 13:03:21 2019 +0200 +++ b/client/src/components/sections/Sections.vue Fri Oct 18 13:13:24 2019 +0200 @@ -48,6 +48,10 @@ /> </button> <button + v-if=" + userCountry === 'global' || + section.properties.country === userCountry + " class="btn btn-xs btn-dark" @click="deleteSection(section)" > @@ -114,6 +118,8 @@ }; }, computed: { + ...mapState("user", ["user"]), + ...mapGetters("usermanagement", ["userCountries"]), ...mapState("application", ["searchQuery"]), ...mapGetters("map", ["openLayersMap"]), ...mapState("imports", ["sections"]), @@ -131,6 +137,9 @@ }, reviewTooltip() { return this.$gettext("Review pending import"); + }, + userCountry() { + return this.userCountries[this.user]; } }, methods: {