diff --git a/app/views/entries/index.html.erb b/app/views/entries/index.html.erb index 3fa0377..fa77b1e 100644 --- a/app/views/entries/index.html.erb +++ b/app/views/entries/index.html.erb @@ -118,8 +118,10 @@ Zeit Typ Art - Kilometer -
Pauschale
Kosten
+ Beschreibung + Kilometer + Pauschale + Kosten Aktionen @@ -134,19 +136,26 @@ <%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.beschreibung : entry.entry_art.capitalize %> + + <%= entry.beschreibung %> + + <%= entry.distance_km.to_f %> km + + -
- <% if entry.kilometer_pauschale.present? %> -
<%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %>
- <% end %> + <%= number_to_currency(entry.kosten, unit: "€", separator: ",", delimiter: ".") %> + - <% if entry.kosten.present? %> -
<%= number_to_currency(entry.kosten, unit: "€", separator: ",", delimiter: ".") %>
- <% end %> -
+ + <%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %> + + + + +
<%= link_to 'Bearbeiten', edit_entry_path(entry), class: 'btn btn-sm btn-outline-primary' %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 46849bc..845afac 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -48,6 +48,19 @@ <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %> + + diff --git a/config/routes.rb b/config/routes.rb index aa0b6ac..25a7e88 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,6 +21,7 @@ Rails.application.routes.draw do get "/db_dump/dump", to: "db_dump#dump" get "/db_dump", to: "db_dump#index" + get "/rechner", to: "calculations#new", as: :rechner # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.