From 261cab84505156d155e3cb614092790879cd8e6e Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 5 May 2022 08:36:18 -0700 Subject: [PATCH] support sort fields & some refactoring --- .../app-frame/app-frame.component.ts | 2 +- .../saved-view-widget.component.ts | 2 +- .../document-detail.component.ts | 2 +- .../document-list.component.html | 4 +- .../document-list/document-list.component.ts | 57 +++--- .../management-list.component.ts | 3 +- .../services/document-list-view.service.ts | 4 +- .../src/app/services/query-params.service.ts | 179 +++++++++++------- .../src/app/services/rest/document.service.ts | 9 +- 9 files changed, 145 insertions(+), 117 deletions(-) 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 4bab42cb0..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 @@ -94,7 +94,7 @@ export class AppFrameComponent { search() { this.closeMenu() - this.queryParamsService.loadFilterRules([ + 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 20cd5aa99..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 @@ -67,7 +67,7 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy { } clickTag(tag: PaperlessTag) { - this.queryParamsService.loadFilterRules([ + 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 1961c5e9f..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 @@ -448,7 +448,7 @@ export class DocumentDetailComponent } moreLike() { - this.queryParamsService.loadFilterRules([ + 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 f3e5605eb..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 @@