From 03e1efe98e9fab3ef419a018fb90189936e868aa Mon Sep 17 00:00:00 2001 From: wandji Date: Wed, 13 Dec 2023 15:13:15 +0100 Subject: [PATCH] Reloacate external_id for linked inventories [SCI-9849] (#6803) --- app/helpers/repository_datatable_helper.rb | 14 +++++++------- app/views/repositories/_repository_table.html.erb | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/helpers/repository_datatable_helper.rb b/app/helpers/repository_datatable_helper.rb index da512cc82..239a764b1 100644 --- a/app/helpers/repository_datatable_helper.rb +++ b/app/helpers/repository_datatable_helper.rb @@ -236,13 +236,13 @@ module RepositoryDatatableHelper def linked_repository_default_columns(record) { '1': assigned_row(record), - '2': escape_input(record.external_id), - '3': record.code, - '4': escape_input(record.name), - '5': I18n.l(record.created_at, format: :full), - '6': escape_input(record.created_by.full_name), - '7': (record.archived_on ? I18n.l(record.archived_on, format: :full) : ''), - '8': escape_input(record.archived_by&.full_name) + '2': record.code, + '3': escape_input(record.name), + '4': I18n.l(record.created_at, format: :full), + '5': escape_input(record.created_by.full_name), + '6': (record.archived_on ? I18n.l(record.archived_on, format: :full) : ''), + '7': escape_input(record.archived_by&.full_name), + '8': escape_input(record.external_id) } end diff --git a/app/views/repositories/_repository_table.html.erb b/app/views/repositories/_repository_table.html.erb index 30fdb67e0..010978982 100644 --- a/app/views/repositories/_repository_table.html.erb +++ b/app/views/repositories/_repository_table.html.erb @@ -35,15 +35,15 @@ <%= t("repositories.table.assigned") %> - <% if @repository.is_a?(LinkedRepository) %> - <%= t('repositories.table.external_id') %> - <% end %> <%= t("repositories.table.id") %> <%= t("repositories.table.row_name") %> <%= t("repositories.table.added_on") %> <%= t("repositories.table.added_by") %> <%= t("repositories.table.archived_on") %> <%= t("repositories.table.archived_by") %> + <% if @repository.is_a?(LinkedRepository) %> + <%= t('repositories.table.external_id') %> + <% end %> <% repository.repository_columns.order(:id).each do |column| %>