Skip to content
Snippets Groups Projects
Verified Commit 4cf1c307 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #9305 TIME 0:20 add modal update version

parent 279ec882
No related branches found
No related tags found
No related merge requests found
<div *ngIf="updateInprogress" class="updateInProgress">
<mat-spinner diameter="30"></mat-spinner>&nbsp;
<div>
Mise à jour en cours ...
{{lang.updateInProgress}}
</div>
</div>
<div class="admin-container" [class.admin-is-mobile]="mobileQuery.matches">
......
......@@ -4,7 +4,7 @@ import { HttpClient } from '@angular/common/http';
import { LANG } from '../../translate.component';
import { MatSidenav, MatDialog, MatDialogRef } from '@angular/material';
import { HeaderService } from '../../../service/header.service';
import { tap, catchError } from 'rxjs/operators';
import { tap, catchError, exhaustMap } from 'rxjs/operators';
import { NotificationService } from '../../notification.service';
import { of } from 'rxjs';
import { AlertComponent } from '../../../plugins/modal/alert.component';
......@@ -70,11 +70,12 @@ export class VersionsUpdateAdministrationComponent implements OnInit {
this.http.put('../../rest/versionsUpdate', {}).pipe(
tap(() => {
this.dialogRef = this.dialog.open(AlertComponent, { autoFocus: false, disableClose: true, data: { mode: '', title: 'Mise à jour effectuée avec succès !', msg: '' } });
this.dialogRef.afterClosed().subscribe(() => {
window.location.reload(true);
this.dialogRef = null;
});
this.dialogRef = this.dialog.open(AlertComponent, { autoFocus: false, disableClose: true, data: { mode: '', title: this.lang.updateOk, msg: '' } });
}),
exhaustMap(() => this.dialogRef.afterClosed()),
tap(() => {
window.location.reload(true);
this.dialogRef = null;
}),
catchError(err => {
this.notify.handleErrors(err);
......@@ -82,7 +83,7 @@ export class VersionsUpdateAdministrationComponent implements OnInit {
}),
tap(() => {
this.updateInprogress = false;
}),
})
).subscribe();
}
}
......@@ -1025,4 +1025,6 @@ export const LANG_EN = {
"to_note" : "To note",
"confidential" : "Confidential",
"ok" : "Ok",
"updateOk" : "Update successfull !",
"updateInProgress" : "Update in progress ...",
};
......@@ -1058,4 +1058,6 @@ export const LANG_FR = {
"to_note" : "À annoter",
"confidential" : "Confidentiel",
"ok" : "Ok",
"updateOk" : "Mise à jour effectuée avec succès !",
"updateInProgress" : "Mise à jour en cours ...",
};
\ No newline at end of file
......@@ -1051,4 +1051,6 @@ export const LANG_NL = {
"to_note" : "To note", //_TO_TRANSLATE
"confidential" : "Confidential", //_TO_TRANSLATE
"ok" : "Ok", //_TO_TRANSLATE
"updateOk" : "Update successfull !", //_TO_TRANSLATE
"updateInProgress" : "Update in progress ...", //_TO_TRANSLATE
};
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