Hide confirmed/unconfirmed from single opt-in lists on the UI. Ref #741

This commit is contained in:
Kailash Nadh 2022-03-19 11:14:02 +05:30
parent a7ac8ce527
commit bfce146895

View file

@ -97,7 +97,7 @@
<b-table-column v-slot="props" field="subscriber_counts"
header-class="cy-subscribers" width="10%">
<div class="fields stats">
<p v-for="(count, status) in props.row.subscriberStatuses" :key="status">
<p v-for="(count, status) in filterStatuses(props.row)" :key="status">
<label>{{ $tc(`subscribers.status.${status}`, count) }}</label>
<span :class="status">{{ $utils.formatNumber(count) }}</span>
</p>
@ -219,6 +219,15 @@ export default Vue.extend({
}
},
filterStatuses(list) {
const out = { ...list.subscriberStatuses };
if (list.optin === 'single') {
delete out.unconfirmed;
delete out.confirmed;
}
return out;
},
getLists() {
this.$api.getLists({
page: this.queryParams.page,