Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cb0a803cd8
@ -35,7 +35,7 @@ export class EditierenComponent implements OnInit {
|
||||
private http: HttpClient,
|
||||
private _snackbar: MatSnackBar,
|
||||
private _logger: NGXLogger,
|
||||
) {
|
||||
private _dialog: MatDialog) {
|
||||
this.route.paramMap.subscribe(paramMap => {
|
||||
this.id = paramMap.get('id');
|
||||
if (this.id) {
|
||||
@ -69,7 +69,10 @@ export class EditierenComponent implements OnInit {
|
||||
match_all_keywords: data.match_all_keywords
|
||||
});
|
||||
},
|
||||
err => this._logger.error(err),
|
||||
err => {
|
||||
this.errorDialog();
|
||||
this._logger.error(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@ -90,6 +93,7 @@ export class EditierenComponent implements OnInit {
|
||||
this._snackbar.open('Feed erfolgreich gespeichert!', 'Schließen', {duration: 3000});
|
||||
},
|
||||
err => {
|
||||
this.errorDialog();
|
||||
this._logger.error(err);
|
||||
return throwError(err);
|
||||
}
|
||||
@ -100,10 +104,24 @@ export class EditierenComponent implements OnInit {
|
||||
this._snackbar.open('Feed erfolgreich gespeichert!', 'Schließen', {duration: 3000});
|
||||
},
|
||||
err => {
|
||||
this.errorDialog();
|
||||
this._logger.error(err);
|
||||
return throwError(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public errorDialog() {
|
||||
const dialogRef = this._dialog.open(DialogComponent, {
|
||||
data: {
|
||||
title: 'Serverfehler',
|
||||
body: 'Fehler beim Aufruf des Servers',
|
||||
abort: 'Abbrechen',
|
||||
confirm: 'OK',
|
||||
hideAbort: true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,4 +66,17 @@ export class EinstellungenComponent implements OnInit {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public errorDialog() {
|
||||
const dialogRef = this._dialog.open(DialogComponent, {
|
||||
data: {
|
||||
title: 'Serverfehler',
|
||||
body: 'Fehler beim Aufruf des Servers',
|
||||
abort: 'Abbrechen',
|
||||
confirm: 'OK',
|
||||
hideAbort: true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user