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.
38 lines
1.4 KiB
38 lines
1.4 KiB
<h1 class="mb-4 display-6">📆 Monats-Report</h1>
|
|
|
|
<% @report.each do |month, groups| %>
|
|
<% is_current_month = month.month == Date.today.month && month.year == Date.today.year %>
|
|
|
|
<div class="card shadow-sm mb-4 overflow-hidden <%= 'bg-light border-primary' if is_current_month %>" style="border-radius: .75rem;">
|
|
<div class="card-header d-flex justify-content-between align-items-center bg-white" style="border-bottom: 1px solid #dee2e6;">
|
|
<strong><%= month.strftime("%B %Y") %></strong>
|
|
<% if is_current_month %>
|
|
<span class="badge bg-primary" title="Aktueller Monat">🌟 Aktuell</span>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover table-bordered mb-0 text-center align-middle" style="border-radius: 0 !important;">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th style="width: 33%">📌 Typ</th>
|
|
<th style="width: 33%">📂 Art</th>
|
|
<th style="width: 33%">⏱️ Gesamtzeit</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% groups.each do |(typ, art), data| %>
|
|
<tr>
|
|
<td><%= typ.capitalize %></td>
|
|
<td><%= art %></td>
|
|
<td><%= data[:hours] %>h <%= data[:minutes] %>min</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<% end %>
|