mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Hide filter / bulk editor for better switching
This commit is contained in:
parent
ee4e026ba2
commit
39b35c090b
@ -57,7 +57,7 @@ export class BulkEditorComponent {
|
||||
get tagsToggleableItems(): ToggleableItem[] {
|
||||
let tagsToggleableItems = []
|
||||
let selectedDocuments: PaperlessDocument[] = this.allDocuments.filter(d => this.selectedDocuments.has(d.id))
|
||||
this.tags.forEach(t => {
|
||||
this.tags?.forEach(t => {
|
||||
let selectedDocumentsWithTag: PaperlessDocument[] = selectedDocuments.filter(d => d.tags.includes(t.id))
|
||||
let state = ToggleableItemState.NotSelected
|
||||
if (selectedDocumentsWithTag.length == selectedDocuments.length) state = ToggleableItemState.Selected
|
||||
@ -71,7 +71,7 @@ export class BulkEditorComponent {
|
||||
let correspondentsToggleableItems = []
|
||||
let selectedDocuments: PaperlessDocument[] = this.allDocuments.filter(d => this.selectedDocuments.has(d.id))
|
||||
|
||||
this.correspondents.forEach(c => {
|
||||
this.correspondents?.forEach(c => {
|
||||
let selectedDocumentsWithCorrespondent: PaperlessDocument[] = selectedDocuments.filter(d => d.correspondent == c.id)
|
||||
let state = ToggleableItemState.NotSelected
|
||||
if (selectedDocumentsWithCorrespondent.length == selectedDocuments.length) state = ToggleableItemState.Selected
|
||||
@ -85,7 +85,7 @@ export class BulkEditorComponent {
|
||||
let documentTypesToggleableItems = []
|
||||
let selectedDocuments: PaperlessDocument[] = this.allDocuments.filter(d => this.selectedDocuments.has(d.id))
|
||||
|
||||
this.documentTypes.forEach(dt => {
|
||||
this.documentTypes?.forEach(dt => {
|
||||
let selectedDocumentsWithDocumentType: PaperlessDocument[] = selectedDocuments.filter(d => d.document_type == dt.id)
|
||||
let state = ToggleableItemState.NotSelected
|
||||
if (selectedDocumentsWithDocumentType.length == selectedDocuments.length) state = ToggleableItemState.Selected
|
||||
|
@ -78,9 +78,9 @@
|
||||
</app-page-header>
|
||||
|
||||
<div class="w-100 mb-2 mb-sm-4">
|
||||
<app-filter-editor *ngIf="!isBulkEditing" [(filterRules)]="list.filterRules" #filterEditor></app-filter-editor>
|
||||
<app-filter-editor [hidden]="isBulkEditing" [(filterRules)]="list.filterRules" #filterEditor></app-filter-editor>
|
||||
|
||||
<app-bulk-editor *ngIf="isBulkEditing"
|
||||
<app-bulk-editor [hidden]="!isBulkEditing"
|
||||
[allDocuments]="list.documents"
|
||||
[(selectedDocuments)]="list.selected"
|
||||
(selectPage)="list.selectPage()"
|
||||
|
@ -119,14 +119,17 @@ export class DocumentListComponent implements OnInit {
|
||||
}
|
||||
|
||||
clickTag(tagID: number) {
|
||||
this.list.selectNone()
|
||||
this.filterEditor.toggleTag(tagID)
|
||||
}
|
||||
|
||||
clickCorrespondent(correspondentID: number) {
|
||||
this.list.selectNone()
|
||||
this.filterEditor.toggleCorrespondent(correspondentID)
|
||||
}
|
||||
|
||||
clickDocumentType(documentTypeID: number) {
|
||||
this.list.selectNone()
|
||||
this.filterEditor.toggleDocumentType(documentTypeID)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user