From 89a0fd58226a1c0bcd43faef616fa05dac40b169 Mon Sep 17 00:00:00 2001 From: Christoph Marzell Date: Sun, 8 Feb 2026 11:45:57 +0100 Subject: [PATCH] filter empty values --- app/views/entries/index.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/entries/index.html.erb b/app/views/entries/index.html.erb index 54b3d1f..0045cea 100644 --- a/app/views/entries/index.html.erb +++ b/app/views/entries/index.html.erb @@ -35,15 +35,17 @@ - <% ["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) %> <% spent = @spent_minutes_matrix.dig(typ, art) %> + <% next if spent.blank? %> <% soll = current_user.required_hours_matrix.dig(typ, art) %> <% weekly = current_user.weekly_target_matrix.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?) %> <%= typ.capitalize %> <%= art.capitalize %>