clear count

This commit is contained in:
Peter Maquiran
2023-01-30 16:27:33 +01:00
parent 261478a204
commit 49142391e9
8 changed files with 15 additions and 24 deletions
@@ -99,7 +99,7 @@
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Outras opções</div> </div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
@@ -637,7 +637,6 @@ export class GabineteDigitalPage implements OnInit {
expedientes = expedientes.map((element) => this.expedienteTaskPipe.transform(element));
this.expedientegbstore.count = expedientes.length;
this.expedientegbstore.reset(expedientes);
this.updateAllProcess()
@@ -58,6 +58,9 @@ export class EventListPage implements OnInit {
ngOnChanges() {
this.LoadToApproveEvents();
setTimeout(() => {
this.LoadToApproveEvents();
}, 3000)
}
segmentChanged(ev: any) {
@@ -16,7 +16,7 @@
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<!-- <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> -->
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
+1 -1
View File
@@ -98,7 +98,7 @@ export class DespachoStoreService {
}
get count() {
return this._count || 0
return this._list.length || 0
}
set count(value: number) {
+2 -7
View File
@@ -11,7 +11,6 @@ export class DespachosprStoreService {
private _list: [] = []
// local storage keyName
private keyName: string;
private _count = 0
constructor() {
@@ -21,7 +20,6 @@ constructor() {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -30,9 +28,8 @@ get list() {
return this._list || []
}
get count() { return this._count || 0 }
get count() { return this._list.length || 0 }
set count(value: number) {
this._count = value
this.save()
}
@@ -46,11 +43,9 @@ reset(eventsList: any) {
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
list: this._list,
count:this._count
list: this._list
})
}, 10)
}
}
+1 -7
View File
@@ -30,17 +30,11 @@ export class ExpedientegdStoreService {
return this._list
}
get count() {
return this._count || 0
}
set count(value: number) {
this._count = value
this.save()
return this._list.length || 0
}
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save()
}