mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
21cb7d5e96
- Create new folder for publications have been integrated. - Adicional touch to display the data in a more friendly way added.
94 lines
2.3 KiB
TypeScript
94 lines
2.3 KiB
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { ProcessesService } from 'src/app/services/processes.service';
|
|
import { AlertService } from 'src/app/services/alert.service';
|
|
import { EventsService } from 'src/app/services/events.service';
|
|
import { ModalController } from '@ionic/angular';
|
|
import { EventListPage } from './event-list/event-list.page';
|
|
|
|
@Component({
|
|
selector: 'app-gabinete-digital',
|
|
templateUrl: './gabinete-digital.page.html',
|
|
styleUrls: ['./gabinete-digital.page.scss'],
|
|
})
|
|
export class GabineteDigitalPage implements OnInit {
|
|
|
|
segment:string;
|
|
showLoader: boolean;
|
|
|
|
constructor(
|
|
private processesbackend:ProcessesService,
|
|
private modalController: ModalController,
|
|
private eventService: EventsService,
|
|
private alertService: AlertService) { }
|
|
|
|
count_exp_dailywork=0;
|
|
count_exp_pp : string;
|
|
count_exp_pd : string;
|
|
count_dip_apr : string;
|
|
count_dip_pv : string;
|
|
count_de_pr : string;
|
|
count_ev_pr=0;
|
|
count_ev_md=0;
|
|
|
|
ngOnInit() {
|
|
this.LoadCounts();
|
|
/* this.eventService.getAllMdEvents.subscribe(res=>{
|
|
console.log(res);
|
|
|
|
});
|
|
console.log(this.eventService.getAllPrEvents.length);
|
|
*/
|
|
this.processesbackend.GetActionsList().subscribe(res=>{
|
|
console.log(res);
|
|
|
|
});
|
|
}
|
|
|
|
LoadCounts() {
|
|
this.showLoader = true;
|
|
this.processesbackend.GetTasksList("Expediente", true).subscribe(res =>{
|
|
this.showLoader = false;
|
|
this.count_exp_dailywork = res;
|
|
});
|
|
this.processesbackend.GetToApprovedEvents('PR','true').subscribe(res=>{
|
|
this.count_ev_pr = res;
|
|
});
|
|
this.processesbackend.GetToApprovedEvents('MDGPR','true').subscribe(res=>{
|
|
this.count_ev_md = res;
|
|
});
|
|
|
|
this.count_exp_pp = "-";
|
|
this.count_exp_pd = "-";
|
|
this.count_dip_apr = "-";
|
|
this.count_dip_pv = "-";
|
|
this.count_de_pr ='-';
|
|
|
|
}
|
|
|
|
doRefresh(event) {
|
|
this.LoadCounts();
|
|
|
|
setTimeout(() => {
|
|
event.target.complete();
|
|
}, 2000);
|
|
}
|
|
|
|
notImplemented(){
|
|
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
|
}
|
|
|
|
async openEventsToApproveList(segment:any){
|
|
const modal = await this.modalController.create({
|
|
component: EventListPage,
|
|
componentProps:{
|
|
segment: segment,
|
|
},
|
|
cssClass: 'expedient-task-modal',
|
|
backdropDismiss: false
|
|
});
|
|
await modal.present();
|
|
modal.onDidDismiss();
|
|
}
|
|
|
|
}
|