From: Bill Erickson Date: Mon, 10 Dec 2018 20:06:23 +0000 (-0500) Subject: LP#1807461 FM-editor show danger toasts when create/update fails X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa0b57799eebdd19b1996a84e4792f8eefc13a51;p=evergreen%2Ftadl.git LP#1807461 FM-editor show danger toasts when create/update fails Display a danger toast when update or create attempts fail in the Angular fieldmapper editor dialog. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html index 8cf50709c1..44e407b862 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html @@ -1,9 +1,16 @@ {{idlClassDef.label}} Update Succeeded +Update of {{idlClassDef.label}} failed + + + {{idlClassDef.label}} Succeessfully Created +Failed to create new {{idlClassDef.label}} + +
diff --git a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts index 03ba326894..001836daa2 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts @@ -69,6 +69,8 @@ export class AdminPageComponent implements OnInit { @ViewChild('editDialog') editDialog: FmRecordEditorComponent; @ViewChild('successString') successString: StringComponent; @ViewChild('createString') createString: StringComponent; + @ViewChild('createErrString') createErrString: StringComponent; + @ViewChild('updateFailedString') updateFailedString: StringComponent; @ViewChild('translator') translator: TranslateComponent; idlClassDef: any; @@ -177,7 +179,10 @@ export class AdminPageComponent implements OnInit { .then(str => this.toast.success(str)); this.grid.reload(); }, - err => {} + err => { + this.createErrString.current() + .then(str => this.toast.danger(str)); + } ); }; @@ -320,7 +325,10 @@ export class AdminPageComponent implements OnInit { .then(str => this.toast.success(str)); this.grid.reload(); }, - err => {} + err => { + this.updateFailedString.current() + .then(str => this.toast.danger(str)); + } ); }