% @report.each do |month, groups| %> <% is_current_month = month.month == Date.today.month && month.year == Date.today.year %> <% total_minutes = groups.values.map { |data| (data[:hours].to_i * 60 + data[:minutes].to_i) }.sum %> <% total_hours = total_minutes / 60 %> <% total_rest_minutes = total_minutes % 60 %>
| 📌 Typ | 📂 Art | ⏱️ Zeit | 🧮 Monats-Gesamt |
|---|---|---|---|
| <%= typ.capitalize %> | <%= art %> | <%= data[:hours] %>h <%= data[:minutes] %>min | <% if index == 0 %><%= total_hours %>h <%= total_rest_minutes %>min | <% end %>