toast changes

This commit is contained in:
Jonas Winkler
2020-10-29 14:35:36 +01:00
parent 2c318b87a0
commit 635a02c611
6 changed files with 35 additions and 17 deletions

View File

@@ -66,7 +66,7 @@ export abstract class EditDialogComponent<T extends ObjectWithId> implements OnI
this.activeModal.close()
this.success.emit(result)
}, error => {
this.toastService.showToast(Toast.make("Error", `Could not save ${this.entityName}: ${error.error.name}`))
this.toastService.showToast(Toast.makeError(`Could not save ${this.entityName}: ${error.error.name}`))
})
}

View File

@@ -1,6 +1,7 @@
<ngb-toast
*ngFor="let toast of toasts"
[header]="toast.title" [autohide]="true" [delay]="toast.delay"
[class]="toast.classname"
(hide)="toastService.closeToast(toast)">
{{toast.content}}
</ngb-toast>