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