Add timestamps to results [SCI-9181]

This commit is contained in:
Giga Chubinidze 2023-09-04 11:40:32 +04:00
parent cb023cd9c8
commit 3b8669ed84
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