mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Total document
This commit is contained in:
@@ -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'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
<ion-badge color="danger" *ngIf="p.userRole(['MDGPR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
||||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge>
|
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ totalDocumentStore.count }}</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">
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { ToastService } from '../services/toast.service';
|
|||||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||||
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
|
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
|
||||||
import { PermissionService } from '../OtherService/permission.service';
|
import { PermissionService } from '../OtherService/permission.service';
|
||||||
|
import { TotalDocumentService, TotalDocumentStore } from '../store/total-document.service';
|
||||||
|
|
||||||
|
|
||||||
// import * as Sentry from "@sentry/browser";
|
// import * as Sentry from "@sentry/browser";
|
||||||
@@ -42,8 +43,8 @@ export class HomePage implements OnInit {
|
|||||||
totalExpediente = 0;
|
totalExpediente = 0;
|
||||||
profile: string;
|
profile: string;
|
||||||
|
|
||||||
|
|
||||||
toDayEventStorage = ToDayEventStorage
|
toDayEventStorage = ToDayEventStorage
|
||||||
|
totalDocumentStore = TotalDocumentStore
|
||||||
|
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
mobileComponent = {
|
mobileComponent = {
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ export class DailyWorkTask{
|
|||||||
Status: string;
|
Status: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class fullTask {
|
export class fullTask {
|
||||||
actions: null;
|
actions: null;
|
||||||
activityInstanceName: string;
|
activityInstanceName: string;
|
||||||
@@ -67,7 +65,9 @@ export class fullTask {
|
|||||||
workflowInstanceID: number
|
workflowInstanceID: number
|
||||||
workflowName: string
|
workflowName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export class tasksList extends fullTask{}
|
export class tasksList extends fullTask{}
|
||||||
|
|
||||||
export class customTaskList {
|
export class customTaskList {
|
||||||
SerialNumber: string
|
SerialNumber: string
|
||||||
Folio : string
|
Folio : string
|
||||||
@@ -82,4 +82,5 @@ export class customTaskList {
|
|||||||
activityInstanceName : string
|
activityInstanceName : string
|
||||||
Status : 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) { }
|
} catch(err) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
sendMessage(){
|
sendMessage() {
|
||||||
let body = {
|
let body = {
|
||||||
"message":
|
"message":
|
||||||
{
|
{
|
||||||
@@ -103,7 +103,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
|||||||
this.message = "";
|
this.message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
loadMessages(){
|
loadMessages() {
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||||
/* console.log(res); */
|
/* console.log(res); */
|
||||||
@@ -112,7 +112,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
getChatMembers(){
|
getChatMembers() {
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.chatService.getMembers(this.roomId).subscribe(res=> {
|
this.chatService.getMembers(this.roomId).subscribe(res=> {
|
||||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||||
@@ -158,7 +158,7 @@ async openChatOptions(ev?: any) {
|
|||||||
return await popover.present();
|
return await popover.present();
|
||||||
}
|
}
|
||||||
|
|
||||||
async serverLongPull(){
|
async serverLongPull() {
|
||||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||||
|
|
||||||
if (res == 502) {
|
if (res == 502) {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center exp-card-title ">Todas as tarefas</p>
|
<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>
|
||||||
|
|
||||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
<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 { PermissionService } from 'src/app/OtherService/permission.service';
|
||||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
import { WaitForDomService } from 'src/app/services/dom/wait-for-dom.service';
|
import { WaitForDomService } from 'src/app/services/dom/wait-for-dom.service';
|
||||||
|
import { TotalDocumentStore } from 'src/app/store/total-document.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-gabinete-digital',
|
selector: 'app-gabinete-digital',
|
||||||
@@ -94,6 +95,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
pedidosstore = PedidosStore;
|
pedidosstore = PedidosStore;
|
||||||
expedienteprstore = ExpedienteprStore;
|
expedienteprstore = ExpedienteprStore;
|
||||||
despachoprstore = DespachosprStore;
|
despachoprstore = DespachosprStore;
|
||||||
|
totalDocumentStore = TotalDocumentStore
|
||||||
|
|
||||||
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
|
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
|
||||||
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
|
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
|
||||||
@@ -211,6 +213,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
this.allProcessesList.push(task);
|
this.allProcessesList.push(task);
|
||||||
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
||||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||||
|
|
||||||
|
this.totalDocumentStore.resetCount( this.allProcessesList.length)
|
||||||
});
|
});
|
||||||
|
|
||||||
this.skeletonLoader = false;
|
this.skeletonLoader = false;
|
||||||
|
|||||||
@@ -206,8 +206,6 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
this.localstoreService.set('UserData', userData)
|
this.localstoreService.set('UserData', userData)
|
||||||
|
|
||||||
|
|
||||||
this.localstoreService.set('PIN', encrypted)
|
this.localstoreService.set('PIN', encrypted)
|
||||||
|
|
||||||
this.router.navigate(['/home/events']);
|
this.router.navigate(['/home/events']);
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ export class DeplomasService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saveDiplomasAssinadoList() {
|
saveDiplomasAssinadoList() {
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
localstoreService.set(this.keyNameDiplomasAssinado,{
|
localstoreService.set(this.keyNameDiplomasAssinado,{
|
||||||
list: this._diplomasAssinadoList,
|
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