Merge pull request #2610 from aignatov-bio/ai-sci-4697-fix-snapshot-date-creation

Fix snapshot date creation [SCI-4697]
This commit is contained in:
aignatov-bio 2020-05-26 16:28:13 +02:00 committed by GitHub
commit 457b0a8137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -74,7 +74,7 @@ class MyModuleRepositorySnapshotsController < ApplicationController
@repository_snapshots = @my_module.repository_snapshots
.where(parent_id: params[:repository_id])
.order(updated_at: :desc)
.order(created_at: :desc)
render json: {
html: render_to_string(
partial: 'my_modules/repositories/full_view_sidebar',

View file

@ -91,7 +91,7 @@ module MyModulesHelper
def assigned_repository_simple_view_footer_label(repository)
if repository.is_a?(RepositorySnapshot)
return t('my_modules.repository.snapshots.simple_view.snapshot_bottom_label',
date_time: l(repository.updated_at, format: :full))
date_time: l(repository.created_at, format: :full))
end
t('my_modules.repository.snapshots.simple_view.live_bottom_label')

View file

@ -3,7 +3,7 @@
data-type="snapshot"
data-source="<%= index_dt_my_module_repository_snapshot_path(@my_module, @repository_snapshot) %>"
data-repository-name="<%= @repository_snapshot.name %>"
data-repository-snapshot-created="<%= l(@repository_snapshot.updated_at, format: :full) %>"
data-repository-snapshot-created="<%= l(@repository_snapshot.created_at, format: :full) %>"
data-assigned-items-count="<%= @repository_snapshot.repository_rows.count %>"
data-default-order="<%= default_snapshot_table_order_as_js_array %>"
data-default-table-columns="<%= default_snapshot_table_columns %>"

View file

@ -19,7 +19,7 @@
data-status="<%= repository_snapshot.status %>"
data-table-url="<%= full_view_table_my_module_repository_snapshot_path(@my_module, repository_snapshot) %>">
<h4 class="list-group-item-heading">
<%= l(repository_snapshot.updated_at, format: :full) %>
<%= l(repository_snapshot.created_at, format: :full) %>
</h4>
<p class="list-group-item-text">
<%= t('my_modules.repository.snapshots.full_view.created_by', full_name: repository_snapshot.created_by.full_name) %>