From d9823feef7ebf90a5966414264306c849c877fd1 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 12 Dec 2025 09:22:42 +0200 Subject: [PATCH] fix option --- app/views/submissions/_value.html.erb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/submissions/_value.html.erb b/app/views/submissions/_value.html.erb index f0487425..5a8e3d22 100644 --- a/app/views/submissions/_value.html.erb +++ b/app/views/submissions/_value.html.erb @@ -50,12 +50,13 @@ <%= svg_icon('check', class: "aspect-square #{area['w'] > area['h'] ? '!w-auto !h-full' : '!w-full !h-auto'}") %> <% elsif field['type'].in?(%w[multiple radio]) && area['option_uuid'] %> - <% option = field['options']&.find { |o| o['uuid'] == area['option_uuid'] } %> - <% option_name = option['value'].presence || "Option #{field['options'].index(option) + 1}" %> - <% if option && Array.wrap(value).include?(option_name) %> -
- <%= svg_icon('check', class: "aspect-square #{area['w'] > area['h'] ? '!w-auto !h-full' : '!w-full !h-auto'}") %> -
+ <% if (option = field['options']&.find { |o| o['uuid'] == area['option_uuid'] }) %> + <% option_name = option['value'].presence || "Option #{field['options'].index(option) + 1}" %> + <% if Array.wrap(value).include?(option_name) %> +
+ <%= svg_icon('check', class: "aspect-square #{area['w'] > area['h'] ? '!w-auto !h-full' : '!w-full !h-auto'}") %> +
+ <% end %> <% end %> <% elsif field['type'] == 'cells' && area['cell_w'].to_f > 0.0 %> <% cell_width = area['cell_w'] / area['w'] * 100 %>