Merge pull request #7682 from rekonder/aj_SCI_10839

Add disabled stock option on manage inventory columns [SCI-10839]
This commit is contained in:
aignatov-bio 2024-07-09 14:58:32 +02:00 committed by GitHub
commit 0289f44828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -185,7 +185,7 @@ var RepositoryColumns = (function() {
disableSearch: true,
labelHTML: true,
optionLabel: function(option) {
return `<div class="column-type-option" data-disabled="${option.params.disabled}">
return `<div class="column-type-option" data-e2e="${option.params.data_e2e || ''}" data-disabled="${option.params.disabled}">
<span>${option.label}</span>
<span class="text-description">${option.params.text_description || ''}</span>
</div>`

View file

@ -98,6 +98,14 @@
selected>
<%= t('libraries.manange_modal_column.select.repository_stock_value') %>
</option>
<% elsif !RepositoryBase.stock_management_enabled? %>
<option value="RepositoryStockValue" class="disabled-option"
data-params="<%= {
optionClass: 'disabled-option',
data_e2e: 'e2e-LB-invItems-manageColumnsModal-stock-dec_clm-disabled'
}.to_json %>">
<%= t('libraries.manange_modal_column.select.repository_stock_value') %>
</option>
<% end %>
<option data-delimiter=true></option>