Merge pull request #6125 from G-Chubinidze/gc_SCI_9181

Add timestamps to results [SCI-9181]
This commit is contained in:
artoscinote 2023-09-04 10:36:24 +02:00 committed by GitHub
commit 6bf0c6cb2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -100,6 +100,11 @@
</div>
</div>
</div>
<div class="relative ml-1 bottom-17 w-356 h-15 font-normal font-hairline text-xs leading-4">
{{ i18n.t('protocols.steps.timestamp', {date: result.attributes.created_at, user: result.attributes.created_by }) }}
</div>
<ReorderableItemsModal v-if="reordering"
title="Placeholder title for this modal"
:items="reorderableElements"

View file

@ -9,7 +9,7 @@ class ResultSerializer < ActiveModel::Serializer
attributes :name, :id, :urls, :updated_at, :created_at_formatted, :updated_at_formatted, :user,
:my_module_id, :attachments_manageble, :marvinjs_enabled, :marvinjs_context,
:wopi_enabled, :wopi_context
:wopi_enabled, :wopi_context, :created_at, :created_by
def marvinjs_enabled
MarvinJsService.enabled?
@ -89,4 +89,12 @@ class ResultSerializer < ActiveModel::Serializer
urls_list
end
def created_at
object.created_at.strftime('%B %d, %Y at %H:%M')
end
def created_by
object.user.full_name
end
end