Skip to content

Commit

Permalink
fixed error display for config change
Browse files Browse the repository at this point in the history
  • Loading branch information
datomo committed Apr 7, 2024
1 parent c9f4c07 commit 5445237
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ export class FormGeneratorComponent implements OnInit, OnDestroy {
this._config.saveChanges(changes).subscribe({
next: res => {
interface Feedback {
success?: number;
warning?: string;
success?: boolean;
message?: string;
}

const f: Feedback = <Feedback>res;
Expand All @@ -287,7 +287,7 @@ export class FormGeneratorComponent implements OnInit, OnDestroy {
this._toast.success('Saved changes.', null, null, ToastDuration.SHORT);
this.loadPage();// reload config-page after updating a config, because it can lead to additional groups or elements
} else {
this._toast.warn(f.warning, null, ToastDuration.INFINITE);
this._toast.warn(f.message, 'Invalid changes.', ToastDuration.INFINITE);
console.log(f);
if (error != null) {
error();
Expand Down

0 comments on commit 5445237

Please sign in to comment.