mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-16 01:31:09 -06:00
Fix broken card tags / correspondent links
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
@@ -11,6 +11,10 @@ import { SavedViewConfigService } from 'src/app/services/saved-view-config.servi
|
||||
import { Toast, ToastService } from 'src/app/services/toast.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component';
|
||||
import { FilterEditorComponent } from './filter-editor/filter-editor.component';
|
||||
import { PaperlessTag } from 'src/app/data/paperless-tag';
|
||||
import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent';
|
||||
import { PaperlessDocumentType } from 'src/app/data/paperless-document-type';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-list',
|
||||
@@ -31,6 +35,8 @@ export class DocumentListComponent implements OnInit {
|
||||
|
||||
filterRules: FilterRule[] = []
|
||||
|
||||
@ViewChild('filterEditor') filterEditor: FilterEditorComponent
|
||||
|
||||
get isFiltered() {
|
||||
return this.list.filterRules?.length > 0
|
||||
}
|
||||
@@ -99,4 +105,16 @@ export class DocumentListComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
clickTag(tagID: number) {
|
||||
this.filterEditor.toggleFilterByItem(tagID, FILTER_HAS_TAG)
|
||||
}
|
||||
|
||||
clickCorrespondent(correspondentID: number) {
|
||||
this.filterEditor.toggleFilterByItem(correspondentID, FILTER_CORRESPONDENT)
|
||||
}
|
||||
|
||||
clickDocumentType(documentTypeID: number) {
|
||||
this.filterEditor.toggleFilterByItem(documentTypeID, FILTER_DOCUMENT_TYPE)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user