mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 01:03:18 +08:00
Fix issues related to incorrect protocol template id/code [SCI-10299]
This commit is contained in:
parent
11270a6d2e
commit
f2d30db92f
2 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ export default {
|
|||
cellRenderer: this.nameRenderer
|
||||
},
|
||||
{
|
||||
field: 'code',
|
||||
field: 'original_code',
|
||||
headerName: this.i18n.t('protocols.index.thead.id'),
|
||||
sortable: true
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@ module Lists
|
|||
include Canaid::Helpers::PermissionsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
attributes :name, :code, :keywords, :linked_tasks, :nr_of_versions, :assigned_users, :published_by,
|
||||
attributes :name, :original_code, :keywords, :linked_tasks, :nr_of_versions, :assigned_users, :published_by,
|
||||
:published_on, :updated_at, :archived_by, :archived_on, :urls, :default_public_user_role_id,
|
||||
:hidden, :top_level_assignable, :has_draft, :team
|
||||
|
||||
|
@ -86,8 +86,8 @@ module Lists
|
|||
end
|
||||
|
||||
if has_draft
|
||||
object.initial_draft? ? object : object.draft
|
||||
urls_list[:show_draft] = protocol_path(object)
|
||||
draft = object.initial_draft? ? object : object.draft || object.parent.draft
|
||||
urls_list[:show_draft] = protocol_path(draft)
|
||||
end
|
||||
|
||||
if can_manage_protocol_users?(object)
|
||||
|
|
Loading…
Reference in a new issue