[neutratywy] info dla moderatorów o liczbie wpisów

This commit is contained in:
Andrea Vos 2020-08-05 22:24:59 +02:00
parent 0d7c284211
commit f0a59b26f0

View File

@ -68,6 +68,13 @@
<Separator icon="book-open" colour="nouns"/>
<section v-if="secret">
<div class="alert alert-info">
<strong>{{ nounsCountApproved }}</strong> wpisów zatwierdzonych,
<strong>{{ nounsCountPending }}</strong> oczekuje na moderację.
</div>
</section>
<section>
<input class="form-control border-nouns" v-model="filter" placeholder="Filtruj listę…" ref="filter"/>
</section>
@ -253,6 +260,12 @@
}
}, this);
},
nounsCountApproved() {
return Object.values(this.nouns).filter(n => n.approved).length;
},
nounsCountPending() {
return Object.values(this.nouns).filter(n => !n.approved).length;
},
},
watch: {
filter() {