mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Allow closing individual documents from sidebar
This commit is contained in:
@@ -77,6 +77,20 @@ export class AppFrameComponent implements OnInit {
|
||||
this.router.navigate(['search'], {queryParams: {query: this.searchField.value}})
|
||||
}
|
||||
|
||||
closeDocument(d: PaperlessDocument) {
|
||||
this.closeMenu()
|
||||
this.openDocumentsService.closeDocument(d)
|
||||
|
||||
// TODO: is there a better way to do this? (taken from closeAll)
|
||||
let route = this.activatedRoute
|
||||
while (route.firstChild) {
|
||||
route = route.firstChild
|
||||
}
|
||||
if (route.component == DocumentDetailComponent) {
|
||||
this.router.navigate([""])
|
||||
}
|
||||
}
|
||||
|
||||
closeAll() {
|
||||
this.closeMenu()
|
||||
this.openDocumentsService.closeAll()
|
||||
|
Reference in New Issue
Block a user