mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add counting
This commit is contained in:
@@ -25,15 +25,15 @@ export class DocumentCounterService {
|
|||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
// falta a contagem dos deplomas
|
// falta a contagem dos deplomas
|
||||||
get mdTotalDocument() {
|
get mdTotalDocument(): number {
|
||||||
return this.despachoStore.count + this.expedienteGbStore.count + this.pedidosStore.countdeferimento
|
return this.despachoStore.count + this.expedienteGbStore.count + this.pedidosStore.countdeferimento
|
||||||
+ this.pedidosStore.countparecer + this.expedientePrStore.count + this.despachoPrStore.count + this.pendentesStore.count
|
+ this.pedidosStore.countparecer + this.expedientePrStore.count + this.despachoPrStore.count + this.pendentesStore.count
|
||||||
+ this.eventoAprovacaoStore.count + this.deplomasStore.diplomasListCount + this.deplomasStore.countDiplomasListCount
|
+ this.eventoAprovacaoStore.count + this.deplomasStore.diplomasListCount + this.deplomasStore.countDiplomasAssinadoListCount + this.deplomasStore.deplomasReviewCount
|
||||||
}
|
}
|
||||||
|
|
||||||
get prTotalDocument() {
|
get prTotalDocument(): number {
|
||||||
return this.despachoStore.count + this.expedienteGbStore.count + this.pedidosStore.countdeferimento
|
return this.despachoStore.count + this.expedienteGbStore.count + this.pedidosStore.countdeferimento
|
||||||
+ this.pedidosStore.countparecer + this.expedientePrStore.count + this.despachoPrStore.count + this.pendentesStore.count
|
+ this.pedidosStore.countparecer + this.expedientePrStore.count + this.despachoPrStore.count + this.pendentesStore.count
|
||||||
+ this.eventoAprovacaoStore.count + this.deplomasStore.diplomasListCount + this.deplomasStore.countDiplomasListCount
|
+ this.eventoAprovacaoStore.count + this.deplomasStore.diplomasListCount + this.deplomasStore.countDiplomasAssinadoListCount + this.deplomasStore.deplomasReviewCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<ion-tab-button tab="gabinete-digital">
|
<ion-tab-button tab="gabinete-digital">
|
||||||
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
||||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
<ion-icon class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
||||||
<ion-badge color="danger" *ngIf="p.userRole(['MDGPR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
<ion-badge color="danger" *ngIf="!p.userRole(['PR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge>
|
||||||
<ion-label>Gabinete</ion-label>
|
<ion-label>Gabinete</ion-label>
|
||||||
</ion-tab-button>
|
</ion-tab-button>
|
||||||
<ion-tab-button tab="publications">
|
<ion-tab-button tab="publications">
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ export class HomePage implements OnInit {
|
|||||||
private notificatinsservice: NotificationsService,
|
private notificatinsservice: NotificationsService,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private activeroute: ActivatedRoute,
|
private activeroute: ActivatedRoute,
|
||||||
public documentCounterService: DocumentCounterService,
|
|
||||||
// private network: NetworkService,
|
// private network: NetworkService,
|
||||||
public p: PermissionService) {
|
public p: PermissionService,
|
||||||
|
public documentCounterService: DocumentCounterService) {
|
||||||
|
|
||||||
this.router.events.subscribe((val) => {
|
this.router.events.subscribe((val) => {
|
||||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
||||||
<p class="text-center exp-card-content">{{eventoaprovacaostore.count}} <span class="title1">Documentos</span></p>
|
<p class="text-center exp-card-content">{{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||||
|
|||||||
@@ -501,6 +501,18 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let mdEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||||
|
let mdEventsPessoal = await this.processesbackend.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||||
|
const eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
||||||
|
this.eventoaprovacaostore.resetmd(eventsMDGPRList);
|
||||||
|
|
||||||
|
let prEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||||
|
let prEventsPessoal = await this.processesbackend.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||||
|
const eventsPRList = prEventsOficial.concat(prEventsPessoal);
|
||||||
|
this.eventoaprovacaostore.resetpr(eventsPRList);
|
||||||
|
|
||||||
|
|
||||||
let diplomasValidar = despachospr.filter(data => data.activityInstanceName == "Revisar Diploma");
|
let diplomasValidar = despachospr.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||||
this.count_dip_pv = Object.keys(diplomasValidar).length;
|
this.count_dip_pv = Object.keys(diplomasValidar).length;
|
||||||
this.deplomasStore.resetDiplomasReview(diplomasValidar)
|
this.deplomasStore.resetDiplomasReview(diplomasValidar)
|
||||||
@@ -518,7 +530,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
this.processesbackend.GetToApprovedEvents('Agenda','true').subscribe(res=>{
|
this.processesbackend.GetToApprovedEvents('Agenda','true').subscribe(res=>{
|
||||||
this.count_ev_apr = res;
|
this.count_ev_apr = res;
|
||||||
});
|
});
|
||||||
this.eventoaprovacaostore.count;
|
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class DespachoStoreService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get count() {
|
get count() {
|
||||||
return this._count
|
return this._count || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
set count(value: number) {
|
set count(value: number) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ get list() {
|
|||||||
return this._list || []
|
return this._list || []
|
||||||
}
|
}
|
||||||
|
|
||||||
get count() { return this._count }
|
get count() { return this._count || 0 }
|
||||||
set count(value: number) {
|
set count(value: number) {
|
||||||
this._count = value
|
this._count = value
|
||||||
this.save()
|
this.save()
|
||||||
|
|||||||
@@ -39,17 +39,17 @@ export class EventoaprovacaoStoreService {
|
|||||||
get listpr() { return this._listPr }
|
get listpr() { return this._listPr }
|
||||||
get listmd() { return this._listMd }
|
get listmd() { return this._listMd }
|
||||||
|
|
||||||
get count() { return this._count }
|
get count() { return this._count || 0 }
|
||||||
set count(value: number) {
|
set count(value: number) {
|
||||||
this._count = value
|
this._count = value
|
||||||
}
|
}
|
||||||
|
|
||||||
get countPr() { return this._countPr }
|
get countPr() { return this._countPr || 0 }
|
||||||
set countPr (value) {
|
set countPr (value: number) {
|
||||||
this._countPr = value
|
this._countPr = value
|
||||||
}
|
}
|
||||||
|
|
||||||
get countMd() { return this._countMd }
|
get countMd() { return this._countMd || 0 }
|
||||||
set countMd (value) {
|
set countMd (value) {
|
||||||
this._countMd = value
|
this._countMd = value
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ export class EventoaprovacaoStoreService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private saveMd() {
|
private saveMd() {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
localstoreService.set(this.keyNamemd,{
|
localstoreService.set(this.keyNamemd,{
|
||||||
lisMd: this._listMd,
|
lisMd: this._listMd,
|
||||||
countListMd: this._countMd
|
countListMd: this._countMd
|
||||||
@@ -80,6 +80,7 @@ export class EventoaprovacaoStoreService {
|
|||||||
}, 10)
|
}, 10)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private savePr() {
|
private savePr() {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
localstoreService.set(this.keyNamepr,{
|
localstoreService.set(this.keyNamepr,{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class ExpedientegdStoreService {
|
|||||||
return this._list
|
return this._list
|
||||||
}
|
}
|
||||||
get count() {
|
get count() {
|
||||||
return this._count
|
return this._count || 0
|
||||||
}
|
}
|
||||||
set count(value: number) {
|
set count(value: number) {
|
||||||
this._count = value
|
this._count = value
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class ExpedienteprStoreService {
|
|||||||
|
|
||||||
get list() { return this._list || [] }
|
get list() { return this._list || [] }
|
||||||
|
|
||||||
get count() { return this._count }
|
get count() { return this._count || 0 }
|
||||||
set count(value: number) {
|
set count(value: number) {
|
||||||
this._count = value
|
this._count = value
|
||||||
this.save()
|
this.save()
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export class PedidosStoreService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get countparecer() {
|
get countparecer() {
|
||||||
return this._countparecer
|
return this._countparecer || 0
|
||||||
}
|
}
|
||||||
set countparecer(value: number) {
|
set countparecer(value: number) {
|
||||||
this._countparecer = value
|
this._countparecer = value
|
||||||
@@ -50,7 +50,7 @@ export class PedidosStoreService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get countdeferimento() {
|
get countdeferimento() {
|
||||||
return this._countDeferiemnto
|
return this._countDeferiemnto || 0
|
||||||
}
|
}
|
||||||
set countdeferimento(value: number ) {
|
set countdeferimento(value: number ) {
|
||||||
this._countDeferiemnto = value
|
this._countDeferiemnto = value
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ export class PendestesStoreService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get count() {
|
get count() {
|
||||||
return this._count
|
return this._count || 0
|
||||||
this.save()
|
|
||||||
}
|
}
|
||||||
set count(value) {
|
set count(value) {
|
||||||
this._count = value
|
this._count = value
|
||||||
|
|||||||
Reference in New Issue
Block a user