Add item field to shared tasks [SCI-11689]

This commit is contained in:
Anton 2025-03-28 14:07:16 +01:00
parent 70b07d4c55
commit ecf513db6d
4 changed files with 13 additions and 1 deletions

View file

@ -8,7 +8,7 @@
:excludeRows="assignedIds"
@close="rowSelectorOpened = false"
@save="addValue" />
<div class="flex items-center gap-2 mt-4 flex-wrap">
<div v-if="field.field_value" class="flex items-center gap-2 mt-4 flex-wrap">
<template v-for="(row, index) in field.field_value.value" :key="row.id">
<div class="flex items-center gap-2">
<span v-if="index > 0">|</span>

View file

@ -25,6 +25,10 @@ class FormRepositoryRowsFieldValue < FormFieldValue
data
end
def formatted
value&.map { |i| "#{i['name']} (IT#{i['id']})" }&.join(' | ')
end
private
def repository_row_snapshots(repository_row_ids)

View file

@ -62,6 +62,13 @@
<% else %>
<% end %>
<% if field_value && field_value.submitted_at %>
<div class="text-sn-grey-700 text-xs text-right w-full mt-2">
<span class='iso-formatted-date'><%= field_value.submitted_at.iso8601 %></span>
<%= I18n.t('forms.fields.by') %>
<span ><%= field_value.submitted_by.full_name %></span>
</div>
<% end %>
</div>
</div>
</div>

View file

@ -1102,6 +1102,7 @@ en:
add_number: "Add number"
from: "From"
submitted_by: "%{date} by %{user}"
by: "by"
to: "To"
add_date: "Add date"
add_datetime: "Add date & time"