From 21623eeb2defec89185ba37f6dd2eb1b58a66179 Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Fri, 18 Apr 2025 16:56:20 -0400 Subject: [PATCH] Fix display for compound conditions --- app/views/rules/_rule.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/rules/_rule.html.erb b/app/views/rules/_rule.html.erb index caaee500..1a10351f 100644 --- a/app/views/rules/_rule.html.erb +++ b/app/views/rules/_rule.html.erb @@ -5,7 +5,11 @@ <% if rule.conditions.any? %>

- If <%= rule.conditions.first.filter.label %> <%= rule.conditions.first.operator %> <%= rule.conditions.first.value_display %> + <% if rule.conditions.first.compound? %> + If <%= rule.conditions.first.sub_conditions.first.filter.label %> <%= rule.conditions.first.sub_conditions.first.operator %> <%= rule.conditions.first.sub_conditions.first.value_display %> + <% else %> + If <%= rule.conditions.first.filter.label %> <%= rule.conditions.first.operator %> <%= rule.conditions.first.value_display %> + <% end %> <% if rule.conditions.count > 1 %>