|
|
|
@ -51,14 +51,17 @@ class EntriesController < ApplicationController |
|
|
|
done_minutes = required_minutes - remaining_minutes |
|
|
|
percent = (done_minutes / required_minutes.to_f * 100).round |
|
|
|
percent = 100 if percent > 100 |
|
|
|
next if percent.zero? |
|
|
|
@completion_percent_by_typ_art[[typ, art]] = percent |
|
|
|
@progress_chart_data["#{typ.capitalize} – #{art}"] = percent |
|
|
|
else |
|
|
|
percent = 0 |
|
|
|
next if percent.zero? |
|
|
|
@completion_percent_by_typ_art[[typ, art]] = percent |
|
|
|
@progress_chart_data["#{typ.capitalize} – #{art}"] = percent |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
@progress_colors["#{typ.capitalize} – #{art}"] = if percent < 50 |
|
|
|
'#007bff' # Blau |
|
|
|
elsif percent < 90 |
|
|
|
|