Fixed bug in stats on a fresh installation.
This commit is contained in:
parent
d9d800b41f
commit
68f8d00930
1 changed files with 17 additions and 15 deletions
|
@ -4,6 +4,7 @@ max_width = 600
|
||||||
global_avg = Ordergroup.avg_jobs_per_euro
|
global_avg = Ordergroup.avg_jobs_per_euro
|
||||||
group_avg = @ordergroup.avg_jobs_per_euro.to_f
|
group_avg = @ordergroup.avg_jobs_per_euro.to_f
|
||||||
|
|
||||||
|
unless global_avg == 0 or global_avg.nan?
|
||||||
length_of_global_bar = max_width / 2.0
|
length_of_global_bar = max_width / 2.0
|
||||||
length_of_group_bar = (group_avg / global_avg) * length_of_global_bar
|
length_of_group_bar = (group_avg / global_avg) * length_of_global_bar
|
||||||
|
|
||||||
|
@ -22,3 +23,4 @@ Durchschnittsengagement
|
||||||
<span class="description">
|
<span class="description">
|
||||||
Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop.
|
Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop.
|
||||||
</span>
|
</span>
|
||||||
|
<%- end -%>
|
||||||
|
|
Loading…
Reference in a new issue