mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 17:17:26 +01:00
let OpenDocumentsService handle nav
This commit is contained in:
parent
ba1bb95935
commit
1efd226f75
10 changed files with 38 additions and 65 deletions
|
|
@ -21,10 +21,7 @@ import {
|
|||
import { ConsumerStatusService } from 'src/app/services/consumer-status.service'
|
||||
import { DocumentListViewService } from 'src/app/services/document-list-view.service'
|
||||
import { OpenDocumentsService } from 'src/app/services/open-documents.service'
|
||||
import {
|
||||
filterRulesFromQueryParams,
|
||||
QueryParamsService,
|
||||
} from 'src/app/services/query-params.service'
|
||||
import { QueryParamsService } from 'src/app/services/query-params.service'
|
||||
import {
|
||||
DOCUMENT_SORT_FIELDS,
|
||||
DOCUMENT_SORT_FIELDS_FULLTEXT,
|
||||
|
|
@ -49,7 +46,7 @@ export class DocumentListComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
private modalService: NgbModal,
|
||||
private consumerStatusService: ConsumerStatusService,
|
||||
private queryParamsService: QueryParamsService,
|
||||
private openDocumentsService: OpenDocumentsService
|
||||
public openDocumentsService: OpenDocumentsService
|
||||
) {}
|
||||
|
||||
@ViewChild('filterEditor')
|
||||
|
|
@ -247,15 +244,6 @@ export class DocumentListComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
else this.list.selectRangeTo(document)
|
||||
}
|
||||
|
||||
clickEdit(doc: PaperlessDocument) {
|
||||
this.openDocumentsService
|
||||
.openDocument(doc)
|
||||
.pipe(first())
|
||||
.subscribe((open) => {
|
||||
if (open) this.router.navigate(['documents', doc.id])
|
||||
})
|
||||
}
|
||||
|
||||
clickTag(tagID: number) {
|
||||
this.list.selectNone()
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue