mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-13 10:07:15 +01:00
Allow closing individual documents from sidebar
This commit is contained in:
parent
66f7ae3773
commit
548b1ea7ec
4 changed files with 51 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue