This commit is contained in:
Peter Maquiran
2023-08-10 16:46:55 +01:00
parent 8b3989de3b
commit 19ddb18148
33 changed files with 257 additions and 222 deletions
-1
View File
@@ -202,7 +202,6 @@ export class MessageService {
} else {
console.log('send', this)
let uploadSuccessfully = await this.sendRequestAttachment()
if(uploadSuccessfully) {
+1 -4
View File
@@ -1,10 +1,9 @@
/* eslint-disable */
/* tslint:disable */
import { EventEmitter, Injectable, NgZone } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { StorageService } from 'src/app/services/storage.service';
import { AuthConnstants } from 'src/app/config/auth-constants';
import { Tokenn } from '../models/token.model';
import { AlertController, Platform } from '@ionic/angular';
import { NavigationExtras, Router } from '@angular/router';
@@ -12,10 +11,8 @@ import { EventTrigger } from '../services/eventTrigger.service';
import { SessionStore } from '../store/session.service';
import { ActionPerformed, PushNotificationSchema, PushNotifications, Token, } from '@capacitor/push-notifications';
import { notificationObject } from '../models/notifications';
import { v4 as uuidv4 } from 'uuid'
import { Capacitor } from '@capacitor/core';
import { AngularFireMessaging } from '@angular/fire/messaging';
import { Subject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
+23 -3
View File
@@ -44,6 +44,7 @@ export class TaskService {
AllProcess = []
showLoader: boolean = false
showLoaderNum = 0
loadCount = false
loadNum = 0
@@ -213,14 +214,20 @@ export class TaskService {
}
async loadDespachos() {
this.showLoaderNum++
let despachos = await this.despachoRule.getList({ updateStore: true })
if (despachos) {
this.despachoStore.reset(despachos)
}
this.showLoaderNum--
}
async loadExpedientes() {
this.showLoaderNum++
try {
let expedientes;
expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise()
@@ -240,10 +247,13 @@ export class TaskService {
}
this.showLoaderNum--
}
async loadPedidos() {
this.showLoader = true
this.showLoaderNum++
try {
let pareceres = await this.processesbackend.GetTasksList("Pedido de Parecer", false).toPromise();
@@ -264,11 +274,13 @@ export class TaskService {
}));
} catch (error) {}
this.showLoaderNum--
}
async loadPendestes() {
this.showLoaderNum++
try {
let pendentes = await this.processesbackend.GetPendingTasks(false).toPromise();
@@ -280,11 +292,14 @@ export class TaskService {
} catch (error) {
}
this.showLoaderNum--
}
async loadEventosParaAprovacao() {
this.showLoaderNum++
// PR dont have event to approve
if(this.SessionStore.user.Profile != 'PR') {
@@ -319,12 +334,15 @@ export class TaskService {
}
}
this.showLoaderNum--
}
async loadDiplomas() {
this.showLoaderNum++
try {
let depachoAPI = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
@@ -384,6 +402,7 @@ export class TaskService {
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
} catch (error) {}
this.showLoaderNum--
}
@@ -391,9 +410,10 @@ export class TaskService {
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
console.log({workflowName, serialNumber, activityName})
if (workflowName == 'Despacho') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho' || activityName == 'Reexecutar Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
}
}