Browse Source

filter empty values

main
Christoph Marzell 1 month ago
parent
commit
89a0fd5822
  1. 8
      app/views/entries/index.html.erb

8
app/views/entries/index.html.erb

@ -35,15 +35,17 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% ["propädeutikum", "fachspezifikum"].each do |typ| %>
<% ["Praktikum", "Selbsterfahrung", "Supervision"].each do |art| %>
<% Entry::PRAKTIKUMSTYPEN.each do |typ| %>
<% Entry::ENTRY_ARTEN.each do |art| %>
<% remaining = @remaining_minutes_matrix.dig(typ, art) %> <% remaining = @remaining_minutes_matrix.dig(typ, art) %>
<% spent = @spent_minutes_matrix.dig(typ, art) %> <% spent = @spent_minutes_matrix.dig(typ, art) %>
<% next if spent.blank? %>
<% soll = current_user.required_hours_matrix.dig(typ, art) %> <% soll = current_user.required_hours_matrix.dig(typ, art) %>
<% weekly = current_user.weekly_target_matrix.dig(typ, art) %> <% weekly = current_user.weekly_target_matrix.dig(typ, art) %>
<% ende = @estimated_end_by_typ_art.dig(typ, art) %> <% ende = @estimated_end_by_typ_art.dig(typ, art) %>
<% if remaining.present? || soll.present? || weekly.present? %>
<% if (remaining.present? || soll.present? || weekly.present?) %>
<tr> <tr>
<td><%= typ.capitalize %></td> <td><%= typ.capitalize %></td>
<td><%= art.capitalize %></td> <td><%= art.capitalize %></td>

Loading…
Cancel
Save