mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-20 00:56:26 +00:00
fix delete dialogs
This commit is contained in:
@@ -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(_ => {
|
||||
|
Reference in New Issue
Block a user