From b856ed3ba442d398f1328f785727b0a65e16a110 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Thu, 4 Aug 2022 17:44:30 +0200 Subject: [PATCH] [pl][names] publish --- components/Header.vue | 10 +--------- locale/pl/config.suml | 2 +- routes/names.vue | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/components/Header.vue b/components/Header.vue index 8ddabec7d..65d7d50e0 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -200,15 +200,6 @@ }); } - if (this.config.names && this.config.names.enabled && this.config.names.published) { - links.push({ - link: '/' + this.config.names.route, - icon: 'signature', - text: this.$t('names.header'), - textLong: this.$t('names.headerLong'), - }); - } - if (this.config.faq.enabled && !this.config.links.split) { links.push({ link: '/' + this.config.faq.route, @@ -248,6 +239,7 @@ this.config.calendar && this.config.calendar.enabled ? '/' + this.config.calendar.route : '', this.config.census && this.config.census.enabled ? '/' + this.config.census.route : '', this.config.inclusive && this.config.inclusive.enabled ? '/' + this.config.inclusive.route : '', + this.config.names && this.config.names.enabled && this.config.names.published ? '/' + this.config.names.route : '', this.config.people && this.config.people.enabled ? '/' + this.config.people.route : '', '/' + this.config.contact.team.route, ]; diff --git a/locale/pl/config.suml b/locale/pl/config.suml index e25de773c..d08ce259b 100644 --- a/locale/pl/config.suml +++ b/locale/pl/config.suml @@ -249,7 +249,7 @@ terminology: names: enabled: true - published: false + published: true route: 'imiona' legally: true count: true diff --git a/routes/names.vue b/routes/names.vue index 74bfdbf42..69eb9b42b 100644 --- a/routes/names.vue +++ b/routes/names.vue @@ -13,6 +13,13 @@ +
+
+ {{ namesCountApproved() }} nouns.approved, + {{ namesCountPending() }} nouns.pending. +
+
+
@@ -182,6 +189,14 @@ delete this.names[name.id]; this.$forceUpdate(); }, + + // those must be methods, not computed, because when modified, they don't get updated in the view for some reason + namesCountApproved() { + return Object.values(this.names).filter(n => n.approved).length; + }, + namesCountPending() { + return Object.values(this.names).filter(n => !n.approved).length; + }, }, watch: { filter() {