Revert "Bug fixes from table sanity check - Part 2(inventories, tasks) [SCI-10095]"

This commit is contained in:
aignatov-bio 2024-02-01 09:36:13 +01:00 committed by GitHub
parent f5fee23f7d
commit 7ac549e20d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 14 deletions

View file

@ -130,8 +130,7 @@ export default {
}, },
{ {
field: 'nr_of_rows', field: 'nr_of_rows',
headerName: this.i18n.t('libraries.index.table.number_of_items'), headerName: this.i18n.t('libraries.index.table.number_of_items')
sortable: true
}, },
{ {
field: 'shared_label', field: 'shared_label',

View file

@ -98,7 +98,7 @@ export default {
this.close(); this.close();
}, },
columnVisbile(column) { columnVisbile(column) {
return !this.currentTableState.columnsState?.find((col) => col.colId === column.field)?.hide; return !this.currentTableState.columnsState?.find((col) => col.colId === column.field).hide;
}, },
columnPinned(column) { columnPinned(column) {
return this.currentTableState.columnsState?.find((col) => col.colId === column.field).pinned; return this.currentTableState.columnsState?.find((col) => col.colId === column.field).pinned;

View file

@ -197,9 +197,7 @@ export default {
}, },
gridOptions() { gridOptions() {
return { return {
suppressCellFocus: true, suppressCellFocus: true
suppressPinning: true,
suppressMovableColumns: true
}; };
}, },
extendedColumnDefs() { extendedColumnDefs() {

View file

@ -19,7 +19,7 @@
<i class="sn-icon sn-icon-close"></i> <i class="sn-icon sn-icon-close"></i>
</button> </button>
</div> </div>
<div class="max-h-[400px] p-3.5 pt-0.5 overflow-y-auto"> <div class="max-h-[400px] p-3.5 pt-0">
<div v-for="filter in filters" :key="filter.key"> <div v-for="filter in filters" :key="filter.key">
<Component <Component
:is="`${filter.type}Filter`" :is="`${filter.type}Filter`"
@ -28,7 +28,7 @@
@update="updateFilter" /> @update="updateFilter" />
</div> </div>
</div> </div>
<div class="p-3.5 pt-0.5 flex items-center justify-end gap-4 sticky-buttons"> <div class="p-3.5 pt-0.5 flex items-center justify-end gap-4">
<div @click.prevent="clearFilters" class="btn btn-secondary"> <div @click.prevent="clearFilters" class="btn btn-secondary">
{{ i18n.t('filters_modal.clear_btn') }} {{ i18n.t('filters_modal.clear_btn') }}
</div> </div>

View file

@ -14,15 +14,11 @@ module Lists
'ON repositories.archived_by_id = archivers.id' 'ON repositories.archived_by_id = archivers.id'
) )
.includes(:repository_rows) .includes(:repository_rows)
.joins(:repository_rows)
.joins(:team) .joins(:team)
.select('repositories.* AS repositories') .select('repositories.* AS repositories')
.select('teams.name AS team_name') .select('teams.name AS team_name')
.select('creators.full_name AS created_by_user') .select('creators.full_name AS created_by_user')
.select('archivers.full_name AS archived_by_user') .select('archivers.full_name AS archived_by_user')
.group('repositories.id', 'teams.name', 'creators.full_name', 'archivers.full_name')
.select('COUNT(repository_rows.id) OVER (PARTITION BY repositories.id) AS repository_row_count')
.group('repository_rows.id', 'repositories.id', 'teams.name', 'creators.full_name', 'archivers.full_name')
view_mode = @params[:view_mode] || 'active' view_mode = @params[:view_mode] || 'active'
@ -51,8 +47,7 @@ module Lists
created_by: 'creators.full_name', created_by: 'creators.full_name',
created_at: 'repositories.created_at', created_at: 'repositories.created_at',
archived_on: 'repositories.archived_on', archived_on: 'repositories.archived_on',
archived_by: 'archivers.full_name', archived_by: 'archivers.full_name'
nr_of_rows: 'repository_row_count'
} }
end end
end end