Bug 41604: Correctly restore alert when bKohaColumnsUseNames is off

If we define visibility_condition we must have implemented
bKohaColumnsUseNames correctly.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-06-29 11:56:55 +02:00 committed by Lucas Gass
parent e616be2e42
commit fdc7e1c75b
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 8 additions and 0 deletions

View File

@ -998,6 +998,14 @@ function _dt_get_expected_column_visibility(column) {
function _dt_force_visibility(table_settings, table_dt, state) {
var columns_settings = table_settings.columns;
if (
!table_settings.columns.filter(
c => c.visibility_condition !== undefined
).length
)
return state;
let use_names = $(table_dt.table().node()).data("bKohaColumnsUseNames");
if (!use_names) {
throw new Error(