Add form item to export form and print protocol [SCI-11735][SCI-11688]

This commit is contained in:
Andrej 2025-03-31 08:10:50 +02:00
parent 78de60e38e
commit 3c26503f53
2 changed files with 3 additions and 1 deletions

View file

@ -26,7 +26,7 @@ class FormRepositoryRowsFieldValue < FormFieldValue
end
def formatted
value&.map { |i| "#{i['name']} (IT#{i['id']})" }&.join(' | ')
value&.map { |i| "#{i['name']} (#{RepositoryRow::ID_PREFIX}#{i['id']})" }&.join(' | ')
end
private

View file

@ -75,6 +75,8 @@
<% when 'ActionField' %>
<%= render partial: 'protocols/print/element/checkbox_button', locals: { value: field_value&.flag, description: I18n.t('forms.fields.mark_as_completed') } %>
<% when 'RepositoryRowsField'%>
<%= field_value&.formatted %>
<% end %>
<div class="flex items-center justify-end mt-4 gap-4">