mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Add counter to localstorage
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<ion-tab-button tab="events">
|
||||
<!-- <ion-icon name="home"></ion-icon> -->
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
|
||||
<ion-badge color="danger">{{totalEvent}}</ion-badge>
|
||||
<ion-badge color="danger">{{toDayEventStorage.eventsList.length}}</ion-badge>
|
||||
<ion-label>Início</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import { NotificationsService } from '../services/notifications.service';
|
||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||
import { NavigationExtras,Router,ActivatedRoute } from '@angular/router';
|
||||
import { ToastService } from '../services/toast.service';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -25,6 +26,9 @@ export class HomePage implements OnInit {
|
||||
totalExpediente = 0;
|
||||
profile: string;
|
||||
|
||||
|
||||
toDayEventStorage = ToDayEventStorage
|
||||
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
mobileComponent = {
|
||||
showAddNewEvent: false,
|
||||
@@ -71,33 +75,6 @@ export class HomePage implements OnInit {
|
||||
this.mobilefirstConnect();
|
||||
this.notificatinsservice.onReceviNotification();
|
||||
}
|
||||
this.count();
|
||||
|
||||
}
|
||||
|
||||
async count() {
|
||||
|
||||
// let date = new Date();
|
||||
// date.setMonth(date.getMonth() + 1);
|
||||
// let start = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
// let end = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " 23:59:59";
|
||||
|
||||
// this.profile = "mdgpr";
|
||||
// if (this.profile == "mdgpr") {
|
||||
|
||||
// let mdOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
||||
// let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
||||
// this.eventsList = mdOficialEvents.concat(mdPessoalEvents)
|
||||
// this.totalEvent = this.eventsList.length;
|
||||
|
||||
// }
|
||||
// else {
|
||||
// let prOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
||||
// let prPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
||||
// this.eventsList = prOficialEvents.concat(prPessoalEvents)
|
||||
// this.totalEvent = this.eventsList.length;
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user