mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Add timestamps to results [SCI-9181]
This commit is contained in:
parent
cb023cd9c8
commit
3b8669ed84
2 changed files with 14 additions and 1 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue