Simplify budget stats in voting phase

So we only show the total number of participants, and not divided by web
participants and booth participants.
This commit is contained in:
Javi Martín
2019-03-15 07:59:18 +01:00
parent d42454a1a8
commit dc077bb03c
5 changed files with 4 additions and 55 deletions

View File

@@ -6,8 +6,7 @@ class Budget::Stats
super +
%i[total_participants_support_phase total_participants_vote_phase
total_budget_investments total_votes total_selected_investments
total_unfeasible_investments total_supports headings
total_participants_web total_participants_booths]
total_unfeasible_investments headings]
end
def participants
@@ -24,14 +23,6 @@ class Budget::Stats
voters.uniq.count
end
def total_participants_web
(balloters - poll_ballot_voters).uniq.compact.count
end
def total_participants_booths
poll_ballot_voters.uniq.count
end
def total_participants_vote_phase
(balloters + poll_ballot_voters).uniq.count
end
@@ -52,10 +43,6 @@ class Budget::Stats
budget.investments.unfeasible.count
end
def total_supports
supports(budget).count
end
def authors
budget.investments.pluck(:author_id)
end