diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts index c33089443..f867a10e3 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts @@ -17,4 +17,7 @@ export class CorrespondentListComponent extends GenericListComponent 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(_ => { diff --git a/src-ui/src/app/components/manage/tag-list/tag-list.component.ts b/src-ui/src/app/components/manage/tag-list/tag-list.component.ts index f92bb0382..2b8f916b9 100644 --- a/src-ui/src/app/components/manage/tag-list/tag-list.component.ts +++ b/src-ui/src/app/components/manage/tag-list/tag-list.component.ts @@ -20,4 +20,8 @@ export class TagListComponent extends GenericListComponent { getColor(id) { return PaperlessTag.COLOURS.find(c => c.id == id) } + + getObjectName(object: PaperlessTag) { + return `tag '${object.name}'` + } }