added setting to hide extra field columns

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-02-29 10:34:24 -07:00
parent ca09d2ca66
commit 0750b080f6
6 changed files with 42 additions and 34 deletions

View File

@@ -438,4 +438,24 @@ function getAndValidateGenericRecordValues() {
tags: genericTags
}
}
}
function showTableColumns(e, isExtraField) {
//logic for extra field since we dont hardcode the data-column type
if (isExtraField) {
var showColumn = $(e).is(':checked');
var columnName = $(e).parent().find('.form-check-label').text();
if (showColumn) {
$(`[data-column='${columnName}']`).show();
} else {
$(`[data-column='${columnName}']`).hide();
}
} else {
var showColumn = $(e).is(':checked');
var columnName = $(e).attr('data-column-toggle');
if (showColumn) {
$(`[data-column='${columnName}']`).show();
} else {
$(`[data-column='${columnName}']`).hide();
}
}
}