mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Total document
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
<ion-tab-button tab="gabinete-digital">
|
||||
<!-- <ion-icon name="file-tray-stacked"></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'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['MDGPR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
||||
<ion-label>Gabinete</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="publications">
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ToastService } from '../services/toast.service';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
|
||||
import { PermissionService } from '../OtherService/permission.service';
|
||||
import { TotalDocumentService, TotalDocumentStore } from '../store/total-document.service';
|
||||
|
||||
|
||||
// import * as Sentry from "@sentry/browser";
|
||||
@@ -42,8 +43,8 @@ export class HomePage implements OnInit {
|
||||
totalExpediente = 0;
|
||||
profile: string;
|
||||
|
||||
|
||||
toDayEventStorage = ToDayEventStorage
|
||||
totalDocumentStore = TotalDocumentStore
|
||||
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
mobileComponent = {
|
||||
|
||||
@@ -11,8 +11,6 @@ export class DailyWorkTask{
|
||||
Status: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export class fullTask {
|
||||
actions: null;
|
||||
activityInstanceName: string;
|
||||
@@ -67,7 +65,9 @@ export class fullTask {
|
||||
workflowInstanceID: number
|
||||
workflowName: string
|
||||
}
|
||||
|
||||
export class tasksList extends fullTask{}
|
||||
|
||||
export class customTaskList {
|
||||
SerialNumber: string
|
||||
Folio : string
|
||||
@@ -82,4 +82,5 @@ export class customTaskList {
|
||||
activityInstanceName : string
|
||||
Status : string
|
||||
}
|
||||
export class customTask extends customTaskList{}
|
||||
|
||||
export class customTask extends customTaskList{}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
} catch(err) { }
|
||||
}
|
||||
|
||||
sendMessage(){
|
||||
sendMessage() {
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
@@ -103,7 +103,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
loadMessages(){
|
||||
loadMessages() {
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
@@ -112,7 +112,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
getChatMembers(){
|
||||
getChatMembers() {
|
||||
this.showLoader = true;
|
||||
this.chatService.getMembers(this.roomId).subscribe(res=> {
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||
@@ -158,7 +158,7 @@ async openChatOptions(ev?: any) {
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
async serverLongPull(){
|
||||
async serverLongPull() {
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Todas as tarefas</p>
|
||||
<p class="text-center exp-card-content">{{count_all_processes}} <span class="title1">Documentos</span></p>
|
||||
<p class="text-center exp-card-content">{{ totalDocumentStore.count }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
|
||||
@@ -18,6 +18,7 @@ import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { WaitForDomService } from 'src/app/services/dom/wait-for-dom.service';
|
||||
import { TotalDocumentStore } from 'src/app/store/total-document.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
@@ -94,6 +95,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
pedidosstore = PedidosStore;
|
||||
expedienteprstore = ExpedienteprStore;
|
||||
despachoprstore = DespachosprStore;
|
||||
totalDocumentStore = TotalDocumentStore
|
||||
|
||||
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
|
||||
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
|
||||
@@ -211,6 +213,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||
|
||||
this.totalDocumentStore.resetCount( this.allProcessesList.length)
|
||||
});
|
||||
|
||||
this.skeletonLoader = false;
|
||||
|
||||
@@ -206,8 +206,6 @@ export class LoginPage implements OnInit {
|
||||
|
||||
|
||||
this.localstoreService.set('UserData', userData)
|
||||
|
||||
|
||||
this.localstoreService.set('PIN', encrypted)
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
|
||||
@@ -75,6 +75,7 @@ export class DeplomasService {
|
||||
}
|
||||
|
||||
saveDiplomasAssinadoList() {
|
||||
|
||||
setTimeout(()=>{
|
||||
localstoreService.set(this.keyNameDiplomasAssinado,{
|
||||
list: this._diplomasAssinadoList,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TotalDocumentService } from './total-document.service';
|
||||
|
||||
describe('TotalDocumentService', () => {
|
||||
let service: TotalDocumentService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(TotalDocumentService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { localstoreService } from './localstore.service'
|
||||
import { AES, enc, SHA1 } from 'crypto-js'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TotalDocumentService {
|
||||
|
||||
private _count = 0
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
|
||||
constructor() {
|
||||
this.keyName = (SHA1(this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=> {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._count = restore.count || 0
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
get count() {
|
||||
return this._count
|
||||
}
|
||||
|
||||
resetCount(value) {
|
||||
this._count = value
|
||||
}
|
||||
|
||||
saveCount() {
|
||||
setTimeout(()=> {
|
||||
localstoreService.set(this.keyName, {
|
||||
count: this._count
|
||||
})
|
||||
}, 10)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export let TotalDocumentStore = new TotalDocumentService()
|
||||
Reference in New Issue
Block a user