mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add current hours and minutes on display
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</ion-label>
|
||||
|
||||
<div class="next-meeting">
|
||||
<div class="meeting-time">08:30</div>
|
||||
<div class="meeting-time">{{hoursMinutes}}</div>
|
||||
<div class="meeting-description">Reunião de Conselho de Ministros no Palácio Presidencial</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
customText = false;
|
||||
totalEvent=0;
|
||||
currentHoursMinutes: String;
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -59,6 +60,15 @@ export class EventsPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private authService: AuthService) {
|
||||
this.prEventList = null;
|
||||
|
||||
// update hours and time
|
||||
setInterval(()=> {
|
||||
let d = new Date();
|
||||
let n = d.toLocaleTimeString();
|
||||
this.currentHoursMinutes = n.slice(0,5);
|
||||
}, 1000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -217,5 +227,15 @@ export class EventsPage implements OnInit {
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @returns time in format HH:MM:SS
|
||||
*/
|
||||
get hoursMinutes():String {
|
||||
|
||||
return this.currentHoursMinutes;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user