diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts index a335aad1d..9290c09fa 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.ts @@ -22,6 +22,7 @@ import { RemoteVersionService, AppRemoteVersion, } from 'src/app/services/rest/remote-version.service' +import { QueryParamsService } from 'src/app/services/query-params.service' @Component({ selector: 'app-app-frame', @@ -37,7 +38,8 @@ export class AppFrameComponent { public savedViewService: SavedViewService, private list: DocumentListViewService, private meta: Meta, - private remoteVersionService: RemoteVersionService + private remoteVersionService: RemoteVersionService, + private queryParamsService: QueryParamsService ) { this.remoteVersionService .checkForUpdates() @@ -92,7 +94,7 @@ export class AppFrameComponent { search() { this.closeMenu() - this.list.quickFilter([ + this.queryParamsService.navigateWithFilterRules([ { rule_type: FILTER_FULLTEXT_QUERY, value: (this.searchField.value as string).trim(), diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts index e677a6e2f..9506e6842 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts @@ -3,11 +3,11 @@ import { Router } from '@angular/router' import { Subscription } from 'rxjs' import { PaperlessDocument } from 'src/app/data/paperless-document' import { PaperlessSavedView } from 'src/app/data/paperless-saved-view' -import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { ConsumerStatusService } from 'src/app/services/consumer-status.service' import { DocumentService } from 'src/app/services/rest/document.service' import { PaperlessTag } from 'src/app/data/paperless-tag' import { FILTER_HAS_TAGS_ALL } from 'src/app/data/filter-rule-type' +import { QueryParamsService } from 'src/app/services/query-params.service' @Component({ selector: 'app-saved-view-widget', @@ -18,7 +18,7 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy { constructor( private documentService: DocumentService, private router: Router, - private list: DocumentListViewService, + private queryParamsService: QueryParamsService, private consumerStatusService: ConsumerStatusService ) {} @@ -60,13 +60,14 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy { if (this.savedView.show_in_sidebar) { this.router.navigate(['view', this.savedView.id]) } else { - this.list.loadSavedView(this.savedView, true) - this.router.navigate(['documents']) + this.router.navigate(['documents'], { + queryParams: { view: this.savedView.id }, + }) } } clickTag(tag: PaperlessTag) { - this.list.quickFilter([ + this.queryParamsService.navigateWithFilterRules([ { rule_type: FILTER_HAS_TAGS_ALL, value: tag.id.toString() }, ]) } diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 9b223f22a..4d66ea384 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -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.navigateWithFilterRules([ { rule_type: FILTER_FULLTEXT_MORELIKE, value: this.documentId.toString(), diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html index 1ce61f931..e00e54333 100644 --- a/src-ui/src/app/components/document-list/document-list.component.html +++ b/src-ui/src/app/components/document-list/document-list.component.html @@ -38,7 +38,7 @@