You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
<h1 class="mb-4">🕒 Praktikumszeit Tracker</h1>
|
|
|
|
<div class="mb-3">
|
|
<p><strong>Gesamtzeit:</strong> <%= @total_minutes / 60 %> h <%= @total_minutes % 60 %> min</p>
|
|
<p><strong>Fehlend:</strong> <%= @remaining_minutes / 60 %> h <%= @remaining_minutes % 60 %> min</p>
|
|
<p><strong>Geplante Stunden/Woche:</strong> <%= current_user.weekly_target_hours %> h</p>
|
|
<% if @estimated_end_date.present? %>
|
|
<p><strong>Voraussichtliches Ende:</strong> <%= @estimated_end_date.strftime("%d.%m.%Y") %></p>
|
|
<% end %>
|
|
<%= link_to '➕ Neuer Eintrag', new_entry_path, class: 'btn btn-primary' %>
|
|
</div>
|
|
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Datum</th>
|
|
<th>Stunden</th>
|
|
<th>Minuten</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @entries.each do |entry| %>
|
|
<tr>
|
|
<td><%= entry.date %></td>
|
|
<td><%= entry.hours %></td>
|
|
<td><%= entry.minutes %></td>
|
|
<td>
|
|
<%= link_to '✏️ Bearbeiten', edit_entry_path(entry), class: 'btn btn-sm btn-primary' %>
|
|
<%= link_to '🗑️ Löschen', entry, method: :delete, data: { confirm: 'Sicher?' }, class: 'btn btn-sm btn-danger' %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|