mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
save all
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-received-event.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button title="Novo Evento" class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
|
||||
<button *ngIf="eventService.hasAnyCalendar" title="Novo Evento" class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
|
||||
|
||||
@@ -496,6 +496,10 @@ export class AgendaPage implements OnInit {
|
||||
loadRequestHistory: any = {}
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||
if(!this.eventService.hasAnyCalendar) {
|
||||
return false
|
||||
}
|
||||
|
||||
this.array = [];
|
||||
this.rangeStartDate = startTime
|
||||
this.rangeEndDate = endTime
|
||||
@@ -518,6 +522,11 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
loadRangeEventRun(startTime: Date, endTime: Date) {
|
||||
|
||||
if(SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
this.array = [];
|
||||
this.rangeStartDate = startTime
|
||||
this.rangeEndDate = endTime
|
||||
|
||||
@@ -226,8 +226,7 @@
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer >
|
||||
|
||||
<ion-footer (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()">
|
||||
|
||||
<div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true">
|
||||
<ngx-letters-avatar [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30" [circular]="true"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<div [ngSwitch]="segmentVista" class="overflow-y-auto">
|
||||
<!-- This is the list view -->
|
||||
<div *ngSwitchCase="'listview'">
|
||||
<ion-item-sliding *ngIf="loadCount">
|
||||
<ion-item-sliding *ngIf="loadCount || (getAllProcessCount >= 1 && loadNum >= 1)">
|
||||
<div class="listview" >
|
||||
<ion-list *ngIf="AllProcess">
|
||||
<div
|
||||
@@ -234,7 +234,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<!-- <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
|
||||
@@ -280,7 +280,7 @@
|
||||
</div>
|
||||
<p class="text-center exp-card-title">Diplomas para Assinar</p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.diplomasParaAssinartCount }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div *ngIf="!loadCount" class="width-100">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Component, DoCheck, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import {NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { ExpedientsPage } from 'src/app/shared/gabinete-digital/expedients/expedients.page';
|
||||
import { PendentesPage } from 'src/app/shared/gabinete-digital/pendentes/pendentes.page';
|
||||
@@ -21,23 +21,13 @@ import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
||||
import { PendentesService } from 'src/app/Rules/pendentes.service';
|
||||
import { AproveEventService } from 'src/app/Rules/aprove-event.service';
|
||||
import { ParecerService } from 'src/app/Rules/parecer.service';
|
||||
import { DeferimentosServiceService } from 'src/app/Rules/deferimentos-service.service';
|
||||
import { DeplomasServiceService } from 'src/app/Rules/deplomas-service.service'
|
||||
import { DespachoPRService } from 'src/app/Rules/despacho-pr.service'
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
import { SqliteService } from '../../services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
@@ -113,6 +103,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
permissions = {
|
||||
Agenda: 530
|
||||
}
|
||||
|
||||
AllProcess = []
|
||||
|
||||
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
|
||||
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
|
||||
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
|
||||
@@ -120,33 +113,19 @@ export class GabineteDigitalPage implements OnInit {
|
||||
constructor(
|
||||
private processesbackend: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
authService: AuthService,
|
||||
public waitForDomService: WaitForDomService,
|
||||
private despachoRule: DespachoService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform,
|
||||
private changeProfileService: ChangeProfileService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
private dataService: DataService,
|
||||
private storage: Storage,
|
||||
public p: PermissionService,
|
||||
private ExpedienteService: ExpedienteService,
|
||||
private PendentesService: PendentesService,
|
||||
private DeferimentosServiceService: DeferimentosServiceService,
|
||||
private DeplomasServiceService: DeplomasServiceService,
|
||||
private AproveEventService: AproveEventService,
|
||||
private ParecerService: ParecerService,
|
||||
private DespachoPRService: DespachoPRService,
|
||||
public NotificationsService: NotificationsService
|
||||
) {
|
||||
|
||||
|
||||
|
||||
this.loggeduser = SessionStore.user;
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if (window.innerWidth < 701) {
|
||||
@@ -462,7 +441,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
else if (workflowName == 'Expediente') {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
else if (workflowName == 'Expediente' && this.loggeduser.Profile == 'PR') {
|
||||
else if (workflowName == 'Expediente' && SessionStore.user.Profile == 'PR') {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
else if (workflowName == "Pedido de Parecer do Presidente") {
|
||||
@@ -525,7 +504,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
else if (this.router.url == '/home/gabinete-digital?expedientes=true') {
|
||||
this.openExpedientListPage();
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if (SessionStore.user.Profile == 'MDGPR') {
|
||||
this.selectedElement = 'Correspondence';
|
||||
}
|
||||
else {
|
||||
@@ -588,11 +567,10 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showDiplomasGerar = false
|
||||
}
|
||||
|
||||
|
||||
get AllProcess() {
|
||||
return this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
|
||||
updateAllProcess() {
|
||||
this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
|
||||
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr)
|
||||
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list).concat(this.deplomasStore.DiplomaGerarList)
|
||||
// .concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list).concat(this.deplomasStore.DiplomaGerarList)
|
||||
}
|
||||
|
||||
get getAllProcessCount() {
|
||||
@@ -605,6 +583,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
return Object.keys(this.loadProcess)
|
||||
}
|
||||
|
||||
loadNum = 0
|
||||
async LoadCounts() {
|
||||
|
||||
let expedientes;
|
||||
@@ -618,6 +597,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showLoader = false
|
||||
this.loadCount = true;
|
||||
}
|
||||
|
||||
this.loadNum++;
|
||||
|
||||
expedientes = (expedientes || [] ).filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
|
||||
@@ -629,14 +610,15 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
this.expedientegbstore.count = expedientes.length;
|
||||
this.expedientegbstore.reset(expedientes);
|
||||
this.updateAllProcess()
|
||||
|
||||
|
||||
let despachos = await this.despachoRule.getList({ updateStore: true })
|
||||
this.updateAllProcess()
|
||||
if (despachos) {
|
||||
this.despachoStore.reset(despachos)
|
||||
}
|
||||
|
||||
|
||||
let pareceres = await this.processesbackend.GetTasksList("Pedido de Parecer", false).toPromise();
|
||||
let pareceresPr = await this.processesbackend.GetTasksList("Pedido de Parecer do Presidente", false).toPromise();
|
||||
|
||||
@@ -684,11 +666,12 @@ export class GabineteDigitalPage implements OnInit {
|
||||
pendentes = pendentes.map((element)=> this.customTaskPipe.transform(element))
|
||||
|
||||
this.pendentesstore.reset(pendentes);
|
||||
this.updateAllProcess()
|
||||
|
||||
let depachoAPI: any = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
|
||||
if(this.loggeduser.Profile != 'PR') {
|
||||
if(SessionStore.user.Profile != 'PR') {
|
||||
|
||||
let depacho = depachoAPI.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||
depacho = depacho.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
@@ -696,11 +679,13 @@ export class GabineteDigitalPage implements OnInit {
|
||||
depacho = depacho.map((e)=> this.customTaskPipe.transform(e))
|
||||
|
||||
this.despachoprstore.reset(depacho)
|
||||
} else if(this.loggeduser.Profile == 'PR') {
|
||||
this.updateAllProcess()
|
||||
} else if(SessionStore.user.Profile == 'PR') {
|
||||
|
||||
let depacho = depachoAPI.filter(data => data.activityInstanceName == "Concluir Despacho").filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
depacho = depacho.map((e)=> this.customTaskPipe.transform(e))
|
||||
this.despachoprstore.reset(depacho)
|
||||
this.updateAllProcess()
|
||||
}
|
||||
|
||||
let mdEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||
@@ -711,6 +696,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
this.eventoaprovacaostore.countMd = eventsMDGPRList.length
|
||||
this.eventoaprovacaostore.resetmd(eventsMDGPRList);
|
||||
this.updateAllProcess()
|
||||
|
||||
let prEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||
let prEventsPessoal = await this.processesbackend.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||
@@ -719,6 +705,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
this.eventoaprovacaostore.countPr = eventsPRList.length
|
||||
this.eventoaprovacaostore.resetpr(eventsPRList);
|
||||
this.updateAllProcess()
|
||||
|
||||
let diplomasValidar = depachoAPI.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
|
||||
@@ -754,7 +741,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
let diplomasAssinados = depachoAPI.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
|
||||
|
||||
|
||||
this.updateAllProcess()
|
||||
this.loadCount = true
|
||||
}
|
||||
|
||||
@@ -810,7 +797,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
|
||||
if(this.loggeduser.Profile != 'PR') {
|
||||
if(SessionStore.user.Profile != 'PR') {
|
||||
if (window.innerWidth < 701) {
|
||||
//this.openExpedientList();
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
@@ -821,7 +808,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showExpedients = true;
|
||||
}
|
||||
} else if(this.loggeduser.Profile == 'PR') {
|
||||
} else if(SessionStore.user.Profile == 'PR') {
|
||||
if (window.innerWidth < 701) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<div class="div-top-header">
|
||||
|
||||
<div class="div-logo">
|
||||
<img style="max-width: 90px;" *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
|
||||
<img style="max-width: 80px;" *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||
<!-- <img style="max-width: 90px;" *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
|
||||
<img style="max-width: 80px;" *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -54,13 +54,9 @@ export class LoginPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private FirstEnterService: FirstEnterService,
|
||||
private storage:Storage,
|
||||
) {
|
||||
console.log('constructor')
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log('ngOngInit')
|
||||
}
|
||||
ngOnInit() {}
|
||||
|
||||
togglePassword() {
|
||||
this.showPassword = !this.showPassword;
|
||||
@@ -99,9 +95,9 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
|
||||
getToken() {
|
||||
this.notificatinsservice.requestPermissions();
|
||||
this.notificatinsservice.registrationError();
|
||||
this.notificatinsservice.getAndpostToken(this.username);
|
||||
// this.notificatinsservice.requestPermissions();
|
||||
// this.notificatinsservice.registrationError();
|
||||
// this.notificatinsservice.getAndpostToken(this.username);
|
||||
}
|
||||
|
||||
async Login() {
|
||||
|
||||
Reference in New Issue
Block a user