Merge remote-tracking branch 'upstream/dev' into feature/dark-mode

This commit is contained in:
Michael Shamoon
2020-12-30 19:50:29 -08:00
30 changed files with 1818 additions and 72 deletions

View File

@@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Component } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { FILTER_CORRESPONDENT } from 'src/app/data/filter-rule-type';
import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent';
@@ -16,20 +15,16 @@ import { CorrespondentEditDialogComponent } from './correspondent-edit-dialog/co
export class CorrespondentListComponent extends GenericListComponent<PaperlessCorrespondent> {
constructor(correspondentsService: CorrespondentService, modalService: NgbModal,
private router: Router,
private list: DocumentListViewService
) {
super(correspondentsService,modalService,CorrespondentEditDialogComponent)
}
getDeleteMessage(object: PaperlessCorrespondent) {
return $localize`Do you really want to delete the correspondent ${object.name}?`
return $localize`Do you really want to delete the correspondent "${object.name}"?`
}
filterDocuments(object: PaperlessCorrespondent) {
this.list.documentListView.filter_rules = [
{rule_type: FILTER_CORRESPONDENT, value: object.id.toString()}
]
this.router.navigate(["documents"])
this.list.quickFilter([{rule_type: FILTER_CORRESPONDENT, value: object.id.toString()}])
}
}

View File

@@ -1,5 +1,4 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { FILTER_DOCUMENT_TYPE } from 'src/app/data/filter-rule-type';
import { PaperlessDocumentType } from 'src/app/data/paperless-document-type';
@@ -16,21 +15,17 @@ import { DocumentTypeEditDialogComponent } from './document-type-edit-dialog/doc
export class DocumentTypeListComponent extends GenericListComponent<PaperlessDocumentType> {
constructor(service: DocumentTypeService, modalService: NgbModal,
private router: Router,
private list: DocumentListViewService
) {
super(service, modalService, DocumentTypeEditDialogComponent)
}
getDeleteMessage(object: PaperlessDocumentType) {
return $localize`Do you really want to delete the document type ${object.name}?`
return $localize`Do you really want to delete the document type "${object.name}"?`
}
filterDocuments(object: PaperlessDocumentType) {
this.list.documentListView.filter_rules = [
{rule_type: FILTER_DOCUMENT_TYPE, value: object.id.toString()}
]
this.router.navigate(["documents"])
this.list.quickFilter([{rule_type: FILTER_DOCUMENT_TYPE, value: object.id.toString()}])
}
}

View File

@@ -1,5 +1,4 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { FILTER_HAS_TAG } from 'src/app/data/filter-rule-type';
import { TAG_COLOURS, PaperlessTag } from 'src/app/data/paperless-tag';
@@ -16,7 +15,6 @@ import { TagEditDialogComponent } from './tag-edit-dialog/tag-edit-dialog.compon
export class TagListComponent extends GenericListComponent<PaperlessTag> {
constructor(tagService: TagService, modalService: NgbModal,
private router: Router,
private list: DocumentListViewService
) {
super(tagService, modalService, TagEditDialogComponent)
@@ -27,13 +25,11 @@ export class TagListComponent extends GenericListComponent<PaperlessTag> {
}
getDeleteMessage(object: PaperlessTag) {
return $localize`Do you really want to delete the tag ${object.name}?`
return $localize`Do you really want to delete the tag "${object.name}"?`
}
filterDocuments(object: PaperlessTag) {
this.list.documentListView.filter_rules = [
{rule_type: FILTER_HAS_TAG, value: object.id.toString()}
]
this.router.navigate(["documents"])
this.list.quickFilter([{rule_type: FILTER_HAS_TAG, value: object.id.toString()}])
}
}