mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
Refactor query params service
This commit is contained in:
parent
feaf2da834
commit
e60a7df9a2
14 changed files with 205 additions and 257 deletions
|
|
@ -11,7 +11,7 @@ import { CorrespondentService } from './correspondent.service'
|
|||
import { DocumentTypeService } from './document-type.service'
|
||||
import { TagService } from './tag.service'
|
||||
import { PaperlessDocumentSuggestions } from 'src/app/data/paperless-document-suggestions'
|
||||
import { filterRulesToQueryParams } from '../query-params.service'
|
||||
import { queryParamsFromFilterRules } from '../../utils/query-params'
|
||||
import { StoragePathService } from './storage-path.service'
|
||||
|
||||
export const DOCUMENT_SORT_FIELDS = [
|
||||
|
|
@ -91,7 +91,7 @@ export class DocumentService extends AbstractPaperlessService<PaperlessDocument>
|
|||
pageSize,
|
||||
sortField,
|
||||
sortReverse,
|
||||
Object.assign(extraParams, filterRulesToQueryParams(filterRules))
|
||||
Object.assign(extraParams, queryParamsFromFilterRules(filterRules))
|
||||
).pipe(
|
||||
map((results) => {
|
||||
results.results.forEach((doc) => this.addObservablesToDocument(doc))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue