mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 15:14:33 +08:00
Add timestamps and update n/a position on form field [SCI-11690][SCI-11652]
This commit is contained in:
parent
91d345d641
commit
b8d9b2dafa
3 changed files with 10 additions and 1 deletions
|
@ -14,9 +14,13 @@
|
|||
:field="field" :marked_as_na="markAsNa" @save="saveValue" @validChanged="checkValidField" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="field.attributes.allow_not_applicable" class="flex items-end mt-4">
|
||||
<div class="flex items-center justify-end mt-4 gap-4">
|
||||
<span class="text-sn-grey-700 text-xs" v-if="field.field_value && field.field_value.submitted_at">
|
||||
{{ i18n.t('forms.fields.submitted_by', { date: field.field_value.submitted_at, user: field.field_value.submitted_by_full_name}) }}
|
||||
</span>
|
||||
<button class="btn btn-secondary mb-0.5"
|
||||
:disabled="disabled"
|
||||
v-if="field.attributes.allow_not_applicable"
|
||||
:class="{
|
||||
'!bg-sn-super-light-blue !border-sn-blue': markAsNa && !disabled
|
||||
}"
|
||||
|
|
|
@ -9,4 +9,8 @@ class FormFieldValueSerializer < ActiveModel::Serializer
|
|||
def submitted_by_full_name
|
||||
object.submitted_by.full_name
|
||||
end
|
||||
|
||||
def submitted_at
|
||||
I18n.l(object.submitted_at, format: :full) if object.submitted_at
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1087,6 +1087,7 @@ en:
|
|||
add_text: "Add text"
|
||||
add_number: "Add number"
|
||||
from: "From"
|
||||
submitted_by: "%{date} by %{user}"
|
||||
to: "To"
|
||||
add_date: "Add date"
|
||||
add_datetime: "Add date & time"
|
||||
|
|
Loading…
Add table
Reference in a new issue