|
|
@ -24,13 +24,15 @@ class EntriesController < ApplicationController |
|
|
|
|
|
|
|
|
# Verbleibende Minuten je Kombination |
|
|
# Verbleibende Minuten je Kombination |
|
|
@remaining_minutes_matrix = {} |
|
|
@remaining_minutes_matrix = {} |
|
|
|
|
|
@spent_minutes_matrix = {} |
|
|
@time_by_typ_art.each do |typ, arts| |
|
|
@time_by_typ_art.each do |typ, arts| |
|
|
@remaining_minutes_matrix[typ] ||= {} |
|
|
@remaining_minutes_matrix[typ] ||= {} |
|
|
|
|
|
|
|
|
|
|
|
@spent_minutes_matrix[typ] ||= {} |
|
|
arts.each do |art, spent_minutes| |
|
|
arts.each do |art, spent_minutes| |
|
|
target = current_user.required_hours_matrix.dig(typ, art).to_i * 60 |
|
|
target = current_user.required_hours_matrix.dig(typ, art).to_i * 60 |
|
|
remaining = [target - spent_minutes, 0].max |
|
|
remaining = [target - spent_minutes, 0].max |
|
|
@remaining_minutes_matrix[typ][art] = remaining |
|
|
@remaining_minutes_matrix[typ][art] = remaining |
|
|
|
|
|
@spent_minutes_matrix[typ][art] = spent_minutes |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
@ -64,23 +66,14 @@ class EntriesController < ApplicationController |
|
|
else |
|
|
else |
|
|
'#dc3545' # Rot |
|
|
'#dc3545' # Rot |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@total_kilometer_costs_by_year = Entry.total_kilometer_cost_by_year(current_user) |
|
|
@total_kilometer_costs_by_year = Entry.total_kilometer_cost_by_year(current_user) |
|
|
@fortbildungskosten_by_year = Entry.total_fortbildungskosten_by_year(current_user) |
|
|
@fortbildungskosten_by_year = Entry.total_fortbildungskosten_by_year(current_user) |
|
|
@selbstsupervision_by_year = Entry.total_supervision_by_year(current_user) |
|
|
@selbstsupervision_by_year = Entry.total_supervision_by_year(current_user) |
|
|
@selbsterfahrungskosten_by_year = Entry.total_selbsterfahrungskosten_by_year(current_user) |
|
|
@selbsterfahrungskosten_by_year = Entry.total_selbsterfahrungskosten_by_year(current_user) |
|
|
@allekosten_by_year = Entry.total_semesterkosten_by_year(current_user) |
|
|
@allekosten_by_year = Entry.total_semesterkosten_by_year(current_user) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Voraussichtliches Ende je Kombination basierend auf weekly_target_matrix |
|
|
# Voraussichtliches Ende je Kombination basierend auf weekly_target_matrix |
|
|
# |
|
|
# |
|
|
@estimated_end_by_typ_art = {} |
|
|
@estimated_end_by_typ_art = {} |
|
|
|