Skip to content
Snippets Groups Projects
Commit 7f44deb5 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #14839 TIME 0:10 control multigestUrl

parent ad65ba3e
Branches
Tags
No related merge requests found
......@@ -35,6 +35,8 @@ export class MultigestListAdministrationComponent implements OnInit {
dialogRef: MatDialogRef<any>;
multigestUrlClone: string = '';
constructor(
public translate: TranslateService,
public http: HttpClient,
......@@ -116,14 +118,17 @@ export class MultigestListAdministrationComponent implements OnInit {
}
saveUrl() {
this.http.put('../rest/multigest/configuration', { uri: this.multigestUrl }).pipe(
tap(() => {
this.notify.success(this.translate.instant('lang.dataUpdated'));
}),
catchError((err: any) => {
this.notify.handleSoftErrors(err);
return of(false);
})
).subscribe();
if (JSON.stringify(this.multigestUrl) !== JSON.stringify(this.multigestUrlClone) || this.functions.empty(this.multigestUrl)) {
this.http.put('../rest/multigest/configuration', { uri: this.multigestUrl }).pipe(
tap(() => {
this.multigestUrlClone = JSON.parse(JSON.stringify(this.multigestUrl));
this.notify.success(this.translate.instant('lang.dataUpdated'));
}),
catchError((err: any) => {
this.notify.handleSoftErrors(this.translate.instant('lang.multigestUriIsEmpty'));
return of(false);
})
).subscribe();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment