📊 Dashboard

<%= render partial: 'dashboards/summary_tiles' %>
📈 Monatsverlauf
<%= column_chart @monthly_minutes_chart_data, height: "250px", colors: ["#0d6efd"] %>
<% @report.each do |month, groups| %> <% total_minutes = groups.values.map { |data| (data[:hours] * 60 + data[:minutes]) }.sum %> <% total_hours = total_minutes / 60 %> <% rest_min = total_minutes % 60 %> <% percent = ((total_minutes.to_f / @monthly_targets[month]) * 100).round rescue 0 %>
<%= month.strftime("%B %Y") %>

⏱️ <%= total_hours %>h <%= rest_min %>min

🎯 Ziel: <%= @monthly_targets[month] / 60 %>h

<%= percent %>%
<% end %>