mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +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
|
|
@ -35,6 +35,7 @@ import {
|
|||
import { PaperlessDocumentSuggestions } from 'src/app/data/paperless-document-suggestions'
|
||||
import { FILTER_FULLTEXT_MORELIKE } from 'src/app/data/filter-rule-type'
|
||||
import { normalizeDateStr } from 'src/app/utils/date'
|
||||
import { QueryParamsService } from 'src/app/services/query-params.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-detail',
|
||||
|
|
@ -114,7 +115,8 @@ export class DocumentDetailComponent
|
|||
private documentListViewService: DocumentListViewService,
|
||||
private documentTitlePipe: DocumentTitlePipe,
|
||||
private toastService: ToastService,
|
||||
private settings: SettingsService
|
||||
private settings: SettingsService,
|
||||
private queryParamsService: QueryParamsService
|
||||
) {
|
||||
this.titleSubject
|
||||
.pipe(
|
||||
|
|
@ -446,7 +448,7 @@ export class DocumentDetailComponent
|
|||
}
|
||||
|
||||
moreLike() {
|
||||
this.documentListViewService.quickFilter([
|
||||
this.queryParamsService.loadFilterRules([
|
||||
{
|
||||
rule_type: FILTER_FULLTEXT_MORELIKE,
|
||||
value: this.documentId.toString(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue