|
|
|
@ -1,32 +1,65 @@ |
|
|
|
<div class="container my-4"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h1 class="mb-4">Meine Einträge</h1> |
|
|
|
|
|
|
|
<!-- 🔢 Zusammenfassung --> |
|
|
|
<div class="mb-4"> |
|
|
|
<h5 class="mb-3">🚗 Fahrtkosten (Kilometergeld)</h5> |
|
|
|
<% @total_kilometer_costs_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> |
|
|
|
<%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %> |
|
|
|
</p> |
|
|
|
<% end %> |
|
|
|
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4"> |
|
|
|
|
|
|
|
<div class="col rounded border shadow-sm p-3"> |
|
|
|
<h5>🚗 Fahrtkosten (Kilometergeld)</h5> |
|
|
|
<% @total_kilometer_costs_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> |
|
|
|
<%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %> |
|
|
|
</p> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="col rounded border shadow-sm p-3"> |
|
|
|
<h5>💶 Fortbildungskosten</h5> |
|
|
|
<% @fortbildungskosten_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> |
|
|
|
<%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %> |
|
|
|
</p> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col rounded border shadow-sm p-3"> |
|
|
|
<h5>🧠 Selbsterfahrungskosten</h5> |
|
|
|
<% @selbsterfahrungskosten_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> |
|
|
|
<%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %> |
|
|
|
</p> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
|
|
|
|
<h5>💶 Fortbildungskosten</h5> |
|
|
|
<% @fortbildungskosten_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %></p> |
|
|
|
<% end %> |
|
|
|
<div class="col rounded border shadow-sm p-3"> |
|
|
|
<h5>👨🏫 Supervision</h5> |
|
|
|
<% @selbstsupervision_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> |
|
|
|
<%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %> |
|
|
|
</p> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
|
|
|
|
<h5>💭 Selbsterfahrungskosten</h5> |
|
|
|
<% @selbsterfahrungskosten_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> <%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %></p> |
|
|
|
<% end %> |
|
|
|
<div class="col rounded border shadow-sm p-3"> |
|
|
|
<h5>📊 Gesamtkosten</h5> |
|
|
|
<% @allekosten_by_year.each do |year, sum| %> |
|
|
|
<p><strong><%= year %>:</strong> |
|
|
|
<%= number_to_currency(sum, unit: "€", separator: ",", delimiter: ".", precision: 2) %> |
|
|
|
</p> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col rounded border shadow-sm p-3"> |
|
|
|
<h5>🕒 Gesamtzeit</h5> |
|
|
|
<p><strong><%= @total_minutes / 60 %> h <%= @total_minutes % 60 %> min</strong></p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<p><strong>Gesamtzeit:</strong> <%= @total_minutes / 60 %> h <%= @total_minutes % 60 %> min</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 📊 Übersicht je Kombination --> |
|
|
|
<div class="mb-4"> |
|
|
|
<h4>📊 Übersicht je Kombination</h4> |
|
|
|
@ -75,7 +108,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 📋 Tabelle aller Einträge --> |
|
|
|
<div class="mb-5"> |
|
|
|
<div class="m-1"> |
|
|
|
<h4 class="mb-3">📋 Einträge</h4> |
|
|
|
<div class="table-responsive"> |
|
|
|
<table class="table table-striped table-hover table-bordered" id="entriesTable"> |
|
|
|
@ -86,7 +119,7 @@ |
|
|
|
<th data-sort-index="2" class="sortable">Typ</th> |
|
|
|
<th data-sort-index="3" class="sortable">Art</th> |
|
|
|
<th data-sort-index="4" class="sortable">Kilometer</th> |
|
|
|
<th data-sort-index="5" class="sortable">Pauschale</th> |
|
|
|
<th data-sort-index="5" class="sortable"><div class="d-flex justify-content-between"><div>Pauschale</div><div>Kosten</div></div></th> |
|
|
|
<th>Aktionen</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
@ -96,16 +129,29 @@ |
|
|
|
<td><%= entry.date.strftime('%d.%m.%Y') %></td> |
|
|
|
<td><%= entry.hours.to_i %>h <%= entry.minutes.to_i %>min</td> |
|
|
|
<td> |
|
|
|
<%= entry.entry_art == "Fortbildung" ? "Fortbildung" : entry.praktikums_typ.capitalize %> |
|
|
|
<%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.entry_art : entry.praktikums_typ.capitalize %> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<%= entry.entry_art == "Fortbildung" ? entry.beschreibung : entry.entry_art.capitalize %> |
|
|
|
<%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.beschreibung : entry.entry_art.capitalize %> |
|
|
|
</td> |
|
|
|
<td><%= entry.distance_km.to_f %> km</td> |
|
|
|
<td><%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %></td> |
|
|
|
<td> |
|
|
|
<div class="d-flex justify-content-between"> |
|
|
|
<% if entry.kilometer_pauschale.present? %> |
|
|
|
<div><%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %></div> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
<% if entry.kosten.present? %> |
|
|
|
<div><%= number_to_currency(entry.kosten, unit: "€", separator: ",", delimiter: ".") %></div> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="text-end"> |
|
|
|
<div class="d-flex justify-content-between"> |
|
|
|
<%= 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' %> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<% end %> |
|
|
|
|