mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
fix delete dialogs
This commit is contained in:
parent
c26962f17f
commit
9089ed69c0
4 changed files with 15 additions and 1 deletions
|
|
@ -47,9 +47,13 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
|
|||
})
|
||||
}
|
||||
|
||||
getObjectName(object: T) {
|
||||
return object.toString()
|
||||
}
|
||||
|
||||
openDeleteDialog(object: T) {
|
||||
var activeModal = this.modalService.open(DeleteDialogComponent, {backdrop: 'static'})
|
||||
activeModal.componentInstance.message = `Do you really want to delete ${object}?`
|
||||
activeModal.componentInstance.message = `Do you really want to delete ${this.getObjectName(object)}?`
|
||||
activeModal.componentInstance.message2 = "Associated documents will not be deleted."
|
||||
activeModal.componentInstance.deleteClicked.subscribe(() => {
|
||||
this.service.delete(object).subscribe(_ => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue