correction de bugs pour l'affichage ou la maj de la date et heure
This commit is contained in:
@@ -37,7 +37,7 @@ export class DatetimeComponent implements OnInit {
|
||||
|
||||
dateChanged(event:MatDatepickerInputEvent<Date>): void {
|
||||
var date = moment(event.value);
|
||||
this.date = date.format("DD/MM/YYYY").toString();
|
||||
this.date = date.format("YYYY-MM-DD").toString();
|
||||
if(this.time && this.date) {
|
||||
this.isDisabled = false;
|
||||
}
|
||||
@@ -61,9 +61,9 @@ export class DatetimeComponent implements OnInit {
|
||||
|
||||
onUpdate(): void {
|
||||
this.setTimeoutDisabledButton(5);
|
||||
var newDateTime:string = this.date + " " + this.time;
|
||||
var newDateTime:string = this.date + " " + this.time + ":00";
|
||||
console.log("Nouvelle date et heure: ", newDateTime);
|
||||
this.bs.updateDatetime(newDateTime).subscribe(
|
||||
this.bs.updateDatetime({'datetime':newDateTime}).subscribe(
|
||||
data => {
|
||||
this.toast.success("Mise à jour de la date et heure réussie");
|
||||
}, err => {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div style="display: grid; align-items: center;">{{today | date:'dd/MM/yyyy HH:mm:ss'}}</div>
|
||||
</div>
|
||||
<div fxLayout="row" style="width:100%; margin-bottom: 0.25rem;">
|
||||
<span fxFlex="50" style="display: grid; align-items: center;"><b>RTC:</b></span>
|
||||
<span fxFlex="50" style="display: grid; align-items: center;"><b>Horloge matérielle:</b></span>
|
||||
<div *ngIf="RTCisAlive" style="display: grid; align-items: center;"><mat-icon style="color: green;">check_circle</mat-icon></div>
|
||||
<div *ngIf="!RTCisAlive" style="display: grid; align-items: center;"><mat-icon style="color: red;">cancel</mat-icon></div>
|
||||
</div>
|
||||
|
||||
@@ -68,6 +68,7 @@ export class InfosComponent implements OnInit {
|
||||
this.isAlive = data['alive'];
|
||||
this.bs.RTCAlive().subscribe(
|
||||
data => {
|
||||
this.RTCisAlive = data['RTCalive'];
|
||||
this.isProcessing = false;
|
||||
}, err => {
|
||||
if(err.status == 401) {
|
||||
|
||||
@@ -183,7 +183,7 @@ export class BackendService {
|
||||
return this.http.post<any>(host+"/api/configurateur/shutdown", {}, options);
|
||||
}
|
||||
|
||||
updateDatetime(val:string):Observable<any> {
|
||||
updateDatetime(val:any):Observable<any> {
|
||||
let host=environment.host;
|
||||
const options = {
|
||||
headers: new HttpHeaders({
|
||||
|
||||
Reference in New Issue
Block a user