From 41277e5ca86efe2718e867b31e3852b0a5ce32b3 Mon Sep 17 00:00:00 2001 From: Andrej Date: Thu, 4 Jul 2024 13:45:54 +0200 Subject: [PATCH] Add disabled stock option on manage inventory columns [SCI-10839] --- app/assets/javascripts/repository_columns/index.js | 2 +- .../_manage_column_modal_content.html.erb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/repository_columns/index.js b/app/assets/javascripts/repository_columns/index.js index d17ad503c..bcd463b09 100644 --- a/app/assets/javascripts/repository_columns/index.js +++ b/app/assets/javascripts/repository_columns/index.js @@ -185,7 +185,7 @@ var RepositoryColumns = (function() { disableSearch: true, labelHTML: true, optionLabel: function(option) { - return `
+ return `
${option.label} ${option.params.text_description || ''}
` diff --git a/app/views/repository_columns/_manage_column_modal_content.html.erb b/app/views/repository_columns/_manage_column_modal_content.html.erb index 03442d578..fba93d4c8 100644 --- a/app/views/repository_columns/_manage_column_modal_content.html.erb +++ b/app/views/repository_columns/_manage_column_modal_content.html.erb @@ -98,6 +98,14 @@ selected> <%= t('libraries.manange_modal_column.select.repository_stock_value') %> + <% elsif !RepositoryBase.stock_management_enabled? %> + <% end %>