<ng-template #successStrTmpl i18n>{{idlClassDef.label}} Update Succeeded</ng-template>
<eg-string #successString [template]="successStrTmpl"></eg-string>
+<ng-template #updateFailedStrTmpl i18n>Update of {{idlClassDef.label}} failed</ng-template>
+<eg-string #updateFailedString [template]="updateFailedStrTmpl"></eg-string>
+
+
<ng-template #createStrTmpl i18n>{{idlClassDef.label}} Succeessfully Created</ng-template>
<eg-string #createString [template]="createStrTmpl"></eg-string>
+<ng-template #createErrStrTmpl i18n>Failed to create new {{idlClassDef.label}}</ng-template>
+<eg-string #createErrString [template]="createErrStrTmpl"></eg-string>
+
<ng-container *ngIf="orgField">
<div class="d-flex">
<div>
@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;
.then(str => this.toast.success(str));
this.grid.reload();
},
- err => {}
+ err => {
+ this.createErrString.current()
+ .then(str => this.toast.danger(str));
+ }
);
};
.then(str => this.toast.success(str));
this.grid.reload();
},
- err => {}
+ err => {
+ this.updateFailedString.current()
+ .then(str => this.toast.danger(str));
+ }
);
}