Meine Einträge

🚗 Fahrtkosten (Kilometergeld)
<% @total_kilometer_costs_by_year.each do |year, sum| %>

<%= year %>: <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %>

<% end %>
💶 Fortbildungskosten
<% @fortbildungskosten_by_year.each do |year, sum| %>

<%= year %>: <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %>

<% end %>
🧠 Selbsterfahrungskosten
<% @selbsterfahrungskosten_by_year.each do |year, sum| %>

<%= year %>: <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %>

<% end %>
👨‍🏫 Supervision
<% @selbstsupervision_by_year.each do |year, sum| %>

<%= year %>: <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %>

<% end %>
📊 Gesamtkosten
<% @allekosten_by_year.each do |year, sum| %>

<%= year %>: <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %>

<% end %>
🕒 Gesamtzeit

<%= @total_minutes / 60 %> h <%= @total_minutes % 60 %> min

📊 Übersicht je Kombination

<% ["propädeutikum", "fachspezifikum"].each do |typ| %> <% ["Praktikum", "Selbsterfahrung", "Supervision"].each do |art| %> <% remaining = @remaining_minutes_matrix.dig(typ, art) %> <% soll = current_user.required_hours_matrix.dig(typ, art) %> <% weekly = current_user.weekly_target_matrix.dig(typ, art) %> <% ende = @estimated_end_by_typ_art.dig(typ, art) %> <% if remaining.present? || soll.present? || weekly.present? %> <% end %> <% end %> <% end %>
Typ Art Verbleibend Soll (h) Wöchentlich Vorauss. Ende
<%= typ.capitalize %> <%= art.capitalize %> <%= remaining ? "#{remaining / 60} h #{remaining % 60} min" : "—" %> <%= soll || "—" %> h <%= weekly || "—" %> h/Woche <%= ende.present? ? ende.strftime("%d.%m.%Y") : "—" %>

⏱ Timer

<% if @running_entry.present? %>
Laufender Eintrag: <%= @running_entry.praktikums_typ %> – <%= @running_entry.entry_art %>
Gestartet: <%= l(@running_entry.start_time, format: :short) %>
Dauer: Berechne …
<%= form_with url: stop_timer_entry_path(@running_entry), method: :post, local: true do |f| %>
<%= f.check_box :lunch_break, class: 'form-check-input', id: 'lunch_break' %> <%= f.label :lunch_break, '30 Min Mittagspause abziehen', class: 'form-check-label' %>
<%= f.submit '⏹️ Stoppen', class: "btn btn-danger" %> <% end %>
<% end %>
<%= form_with url: start_timer_entries_path, method: :post, local: true do %>
<%= label_tag :typ, 'Typ' %> <%= select_tag :typ, options_for_select(Entry::PRAKTIKUMSTYPEN), class: "form-select" %>
<%= label_tag :art, 'Art' %> <%= select_tag :art, options_for_select(Entry::ENTRY_ARTEN), class: "form-select" %>
<%= submit_tag '▶️ Start', class: "btn btn-success w-100", disabled: @running_entry.present? %>
<% end %>
<%= link_to '➕ Neuer Eintrag', new_entry_path, class: 'btn btn-outline-primary mt-3 w-100 w-md-auto mb-3' %>

📋 Einträge

<% @entries.each do |entry| %> <% end %>
Datum Zeit Typ Art Beschreibung Kilometer Pauschale Kosten Aktionen
<%= entry.date.strftime('%d.%m.%Y') %> <%= entry.hours.to_i %>h <%= entry.minutes.to_i %>min <%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.entry_art : entry.praktikums_typ.capitalize %> <%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.beschreibung : entry.entry_art.capitalize %> <%= entry.beschreibung %> <%= entry.distance_km.to_f %> km <%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %> <%= number_to_currency(entry.kosten, unit: "€", separator: ",", delimiter: ".") %>
<%= link_to 'Bearbeiten', edit_entry_path(entry), class: 'btn btn-sm btn-outline-primary' %> <%= link_to 'Löschen', entry_path(entry), class: 'btn btn-sm btn-outline-danger open-delete-modal' %>
<%= link_to "Export als CSV", export_csv_entries_path(format: :csv), class: "btn btn-outline-secondary mt-3 w-100 w-md-auto" %>