mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Merge pull request #1017 from paperless-ngx/alphabetize-tags
Enhancement: Alphabetize tags by default
This commit is contained in:
commit
92757c5d8c
@ -6,7 +6,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'
|
|||||||
import { Observable } from 'rxjs'
|
import { Observable } from 'rxjs'
|
||||||
import { Results } from 'src/app/data/results'
|
import { Results } from 'src/app/data/results'
|
||||||
import { FilterRule } from 'src/app/data/filter-rule'
|
import { FilterRule } from 'src/app/data/filter-rule'
|
||||||
import { map } from 'rxjs/operators'
|
import { map, tap } from 'rxjs/operators'
|
||||||
import { CorrespondentService } from './correspondent.service'
|
import { CorrespondentService } from './correspondent.service'
|
||||||
import { DocumentTypeService } from './document-type.service'
|
import { DocumentTypeService } from './document-type.service'
|
||||||
import { TagService } from './tag.service'
|
import { TagService } from './tag.service'
|
||||||
@ -70,7 +70,13 @@ export class DocumentService extends AbstractPaperlessService<PaperlessDocument>
|
|||||||
doc.document_type$ = this.documentTypeService.getCached(doc.document_type)
|
doc.document_type$ = this.documentTypeService.getCached(doc.document_type)
|
||||||
}
|
}
|
||||||
if (doc.tags) {
|
if (doc.tags) {
|
||||||
doc.tags$ = this.tagService.getCachedMany(doc.tags)
|
doc.tags$ = this.tagService
|
||||||
|
.getCachedMany(doc.tags)
|
||||||
|
.pipe(
|
||||||
|
tap((tags) =>
|
||||||
|
tags.sort((tagA, tagB) => tagA.name.localeCompare(tagB.name))
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (doc.storage_path) {
|
if (doc.storage_path) {
|
||||||
doc.storage_path$ = this.storagePathService.getCached(doc.storage_path)
|
doc.storage_path$ = this.storagePathService.getCached(doc.storage_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user