Don't show invisible columns in table options

This commit is contained in:
Bernd Bestel 2022-04-07 19:46:13 +02:00
parent 632db0d8d1
commit 150cfba455
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 2 additions and 2 deletions

View File

@ -1002,7 +1002,7 @@ $(".change-table-columns-visibility-button").on("click", function(e)
var title = headerCell.text(); var title = headerCell.text();
var visible = this.visible(); var visible = this.visible();
if (title.isEmpty() || title.startsWith("Hidden")) if (title.isEmpty() || title.startsWith("Hidden") || headerCell.hasClass("d-none"))
{ {
return; return;
} }

View File

@ -175,7 +175,7 @@
<th class="allow-grouping">{{ $__t('Parent product') }}</th> <th class="allow-grouping">{{ $__t('Parent product') }}</th>
<th class="allow-grouping">{{ $__t('Default location') }}</th> <th class="allow-grouping">{{ $__t('Default location') }}</th>
<th>{{ $__t('Product picture') }}</th> <th>{{ $__t('Product picture') }}</th>
<th>{{ $__t('Average price') }}</th> <th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Average price') }}</th>
@include('components.userfields_thead', array( @include('components.userfields_thead', array(
'userfields' => $userfields 'userfields' => $userfields