Browse Source

sort by year

main
Christoph Marzell 1 month ago
parent
commit
b759cd8bc3
  1. 15
      app/controllers/entries_controller.rb

15
app/controllers/entries_controller.rb

@ -30,17 +30,15 @@ class EntriesController < ApplicationController
end
end
@total_kilometer_costs_by_year = current_user.entries
.group_by { |e| e.date.year }
.transform_values do |entries|
entries.sum(&:kilometer_pauschale)
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_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)
# Voraussichtliches Ende je Kombination basierend auf weekly_target_matrix
#
@estimated_end_by_typ_art = {}
@remaining_minutes_matrix.each do |typ, arts|
@estimated_end_by_typ_art[typ] ||= {}
@ -58,7 +56,6 @@ class EntriesController < ApplicationController
end
end
def new
@entry = current_user.entries.build
end
@ -72,7 +69,7 @@ class EntriesController < ApplicationController
end
end
def edit;
def edit
@entry
end
@ -116,6 +113,4 @@ class EntriesController < ApplicationController
)
end
end
Loading…
Cancel
Save