mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Warn on closing edited doc due to max open docs
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
} from 'src/app/directives/sortable.directive'
|
||||
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,
|
||||
@@ -47,7 +48,8 @@ export class DocumentListComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
private toastService: ToastService,
|
||||
private modalService: NgbModal,
|
||||
private consumerStatusService: ConsumerStatusService,
|
||||
private queryParamsService: QueryParamsService
|
||||
private queryParamsService: QueryParamsService,
|
||||
private openDocumentsService: OpenDocumentsService
|
||||
) {}
|
||||
|
||||
@ViewChild('filterEditor')
|
||||
@@ -245,6 +247,15 @@ 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(() => {
|
||||
|
Reference in New Issue
Block a user