mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Refactor query param handling to service
This commit is contained in:
parent
584082a1df
commit
3e8bff03e7
11 changed files with 147 additions and 84 deletions
|
|
@ -19,6 +19,7 @@ import {
|
|||
SortEvent,
|
||||
} from 'src/app/directives/sortable.directive'
|
||||
import { DocumentListViewService } from 'src/app/services/document-list-view.service'
|
||||
import { QueryParamsService } from 'src/app/services/query-params.service'
|
||||
import { AbstractNameFilterService } from 'src/app/services/rest/abstract-name-filter-service'
|
||||
import { ToastService } from 'src/app/services/toast.service'
|
||||
import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component'
|
||||
|
|
@ -42,7 +43,7 @@ export abstract class ManagementListComponent<T extends ObjectWithId>
|
|||
private modalService: NgbModal,
|
||||
private editDialogComponent: any,
|
||||
private toastService: ToastService,
|
||||
private list: DocumentListViewService,
|
||||
private queryParamsService: QueryParamsService,
|
||||
protected filterRuleType: number,
|
||||
public typeName: string,
|
||||
public extraColumns: ManagementListColumn[]
|
||||
|
|
@ -140,7 +141,7 @@ export abstract class ManagementListComponent<T extends ObjectWithId>
|
|||
}
|
||||
|
||||
filterDocuments(object: ObjectWithId) {
|
||||
this.list.quickFilter([
|
||||
this.queryParamsService.loadFilterRules([
|
||||
{ rule_type: this.filterRuleType, value: object.id.toString() },
|
||||
])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue