Skip to content

Commit

Permalink
Hide confirmed/unconfirmed from single opt-in lists on the UI. Ref #741
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Mar 19, 2022
1 parent a7ac8ce commit bfce146
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion frontend/src/views/Lists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit bfce146

Please sign in to comment.