mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Revert "Bug fixes from table sanity check - Part 2(inventories, tasks) [SCI-10095]"
This commit is contained in:
parent
f5fee23f7d
commit
7ac549e20d
5 changed files with 6 additions and 14 deletions
|
@ -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',
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -197,9 +197,7 @@ export default {
|
||||||
},
|
},
|
||||||
gridOptions() {
|
gridOptions() {
|
||||||
return {
|
return {
|
||||||
suppressCellFocus: true,
|
suppressCellFocus: true
|
||||||
suppressPinning: true,
|
|
||||||
suppressMovableColumns: true
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
extendedColumnDefs() {
|
extendedColumnDefs() {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue