This commit is contained in:
Michael Shamoon 2020-12-13 12:17:01 -08:00
parent 2c18f6268b
commit 7ac101d84e
3 changed files with 15 additions and 15 deletions

View File

@ -113,17 +113,17 @@ export class DocumentListComponent implements OnInit {
}
clickTag(tagID: number) {
this.filterEditorService.toggleFitlerByTagID(tagID)
this.filterEditorService.toggleFilterByTagID(tagID)
this.applyFilterRules()
}
clickCorrespondent(correspondentID: number) {
this.filterEditorService.toggleFitlerByCorrespondentID(correspondentID)
this.filterEditorService.toggleFilterByCorrespondentID(correspondentID)
this.applyFilterRules()
}
clickDocumentType(documentTypeID: number) {
this.filterEditorService.toggleFitlerByDocumentTypeID(documentTypeID)
this.filterEditorService.toggleFilterByDocumentTypeID(documentTypeID)
this.applyFilterRules()
}

View File

@ -52,17 +52,17 @@ export class FilterEditorComponent implements AfterViewInit {
}
onToggleTag(tag: PaperlessTag) {
this.filterEditorService.toggleFitlerByTag(tag)
this.filterEditorService.toggleFilterByTag(tag)
this.applyFilters()
}
onToggleCorrespondent(correspondent: PaperlessCorrespondent) {
this.filterEditorService.toggleFitlerByCorrespondent(correspondent)
this.filterEditorService.toggleFilterByCorrespondent(correspondent)
this.applyFilters()
}
onToggleDocumentType(documentType: PaperlessDocumentType) {
this.filterEditorService.toggleFitlerByDocumentType(documentType)
this.filterEditorService.toggleFilterByDocumentType(documentType)
this.applyFilters()
}

View File

@ -76,28 +76,28 @@ export class FilterEditorViewService {
return this.documentTypes?.filter(dt => documentTypeRules.find(dtr => dtr.value == dt.id))
}
toggleFitlerByTag(tag: PaperlessTag) {
toggleFilterByTag(tag: PaperlessTag) {
this.toggleFilterByItem(tag, FILTER_HAS_TAG)
}
toggleFitlerByCorrespondent(tag: PaperlessCorrespondent) {
toggleFilterByCorrespondent(tag: PaperlessCorrespondent) {
this.toggleFilterByItem(tag, FILTER_CORRESPONDENT)
}
toggleFitlerByDocumentType(tag: PaperlessDocumentType) {
toggleFilterByDocumentType(tag: PaperlessDocumentType) {
this.toggleFilterByItem(tag, FILTER_DOCUMENT_TYPE)
}
toggleFitlerByTagID(tagID: number) {
this.toggleFitlerByTag(this.tags?.find(t => t.id == tagID))
toggleFilterByTagID(tagID: number) {
this.toggleFilterByTag(this.tags?.find(t => t.id == tagID))
}
toggleFitlerByCorrespondentID(correspondentID: number) {
this.toggleFitlerByCorrespondent(this.correspondents?.find(t => t.id == correspondentID))
toggleFilterByCorrespondentID(correspondentID: number) {
this.toggleFilterByCorrespondent(this.correspondents?.find(t => t.id == correspondentID))
}
toggleFitlerByDocumentTypeID(documentTypeID: number) {
this.toggleFitlerByDocumentType(this.documentTypes?.find(t => t.id == documentTypeID))
toggleFilterByDocumentTypeID(documentTypeID: number) {
this.toggleFilterByDocumentType(this.documentTypes?.find(t => t.id == documentTypeID))
}
private toggleFilterByItem(item: ObjectWithId, filterRuleTypeID: number) {