|
|
|
@ -35,6 +35,7 @@ class EntriesController < ApplicationController |
|
|
|
end |
|
|
|
|
|
|
|
@completion_percent_by_typ_art = {} |
|
|
|
@progress_chart_data = {} |
|
|
|
|
|
|
|
User::PRAKTIKUMSTYPEN.product(User::ENTRY_ARTEN).each do |typ, art| |
|
|
|
total_required = current_user.required_hours_matrix.to_h.dig(typ, art).to_f |
|
|
|
@ -47,12 +48,18 @@ class EntriesController < ApplicationController |
|
|
|
percent = (done_minutes / required_minutes.to_f * 100).round |
|
|
|
percent = 100 if percent > 100 |
|
|
|
@completion_percent_by_typ_art[[typ, art]] = percent |
|
|
|
@progress_chart_data["#{typ.capitalize} – #{art}"] = percent |
|
|
|
else |
|
|
|
@completion_percent_by_typ_art[[typ, art]] = 0 |
|
|
|
@progress_chart_data["#{typ.capitalize} – #{art}"] = 0 |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@total_kilometer_costs_by_year = Entry.total_kilometer_cost_by_year(current_user) |
|
|
|
@fortbildungskosten_by_year = Entry.total_fortbildungskosten_by_year(current_user) |
|
|
|
@selbstsupervision_by_year = Entry.total_supervision_by_year(current_user) |
|
|
|
|