mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add domain layer
This commit is contained in:
@@ -88,8 +88,6 @@ export class DeplomaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async getList() {
|
async getList() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { customTask, fullTask, fullTaskList } from '../models/dailyworktask.model';
|
import { customTask, fullTaskList } from '../models/dailyworktask.model';
|
||||||
import { AttachmentList } from '../models/Excludetask';
|
import { AttachmentList } from '../models/Excludetask';
|
||||||
import { CustomTaskPipe } from '../pipes/custom-task.pipe';
|
import { CustomTaskPipe } from '../pipes/custom-task.pipe';
|
||||||
import { ProcessesService } from '../services/processes.service';
|
import { ProcessesService } from '../services/processes.service';
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
import { ProcessesService } from "src/app/services/processes.service";
|
||||||
|
|
||||||
|
// check 1
|
||||||
|
export class DiplomaGenerates {
|
||||||
|
|
||||||
|
processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'All'
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async enviarDiploma({note = '', docs = [], serialnumber}) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Enviar diploma",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" : docs,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'All'
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
delegar(task: any, note, EmailAddress) {
|
||||||
|
let body = {
|
||||||
|
"SerialNumber": task.SerialNumber,
|
||||||
|
"DispatchDocId": task.DocId,
|
||||||
|
"FolderID": task.FolderId || task.FolderID,
|
||||||
|
"Subject": task.Folio,
|
||||||
|
"Comment": note,
|
||||||
|
"DelegatedUserEmail": EmailAddress,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.DelegateTask(body).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'All'
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async sendExpedienteToPending(serialnumber) {
|
||||||
|
|
||||||
|
this.processes.SetTaskToPending(serialnumber).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* need to work on
|
||||||
|
* @event 'All'
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async setUpMeeting() {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
import { AttachmentList } from "src/app/models/Excludetask";
|
||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service";
|
||||||
|
// check
|
||||||
|
export class DiplomasSignPrDomain {
|
||||||
|
|
||||||
|
processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Diploma Assinado'
|
||||||
|
* @description arquivar
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async arquivar(note: string, documents: AttachmentList, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Diploma Assinado',
|
||||||
|
* @description Concluir
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async conclude(note: string, documents: any, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Concluir",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Diploma Assinado',
|
||||||
|
*/
|
||||||
|
static async PerformeDispatch(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import { AttachmentList } from "src/app/models/Excludetask";
|
||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service";
|
||||||
|
|
||||||
|
// check
|
||||||
|
export class DiplomasSignPrDomain {
|
||||||
|
|
||||||
|
|
||||||
|
static processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description arquivar
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async archive(note: string, documents: AttachmentList, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Concluir
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async finish(note: string, documents: any, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Concluir",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event
|
||||||
|
*/
|
||||||
|
static async PerformeDispatch(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param param0
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async sign({note, documents, serialNumber, activityInstanceName}) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Assinado",
|
||||||
|
"ActionTypeId": 99999842,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
import { AttachmentList } from "src/app/models/Excludetask"
|
||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service"
|
||||||
|
|
||||||
|
// check
|
||||||
|
export class DiplomasValidate {
|
||||||
|
static processes: ProcessesService
|
||||||
|
static p: any
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt solicitar assinatura
|
||||||
|
* @event 'Revisar Diploma'
|
||||||
|
* @description Solicitar assinatura do Presidente
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async askSignature(note: string, documents: any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Aprovar",
|
||||||
|
"ActionTypeId": 99999840,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Revisar Diploma',
|
||||||
|
* @description Solicitar alteração
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async askToChange(note: string, documents: any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Retificar",
|
||||||
|
"ActionTypeId": 99999841,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Revisar Diploma', 'Diploma Assinado',
|
||||||
|
* @description Arquivar
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async arquivar(note: string, documents: AttachmentList, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Revisar Diploma', 'Diploma Assinado',
|
||||||
|
*/
|
||||||
|
static async PerformeDispatch(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* need to work on
|
||||||
|
* @event 'Revisar Diploma'
|
||||||
|
*/
|
||||||
|
static async setUpMeeting() {}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
import { ProcessesService } from "src/app/services/processes.service";
|
||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { task } from "src/app/models/ExpedientTaskModalPage";
|
||||||
|
|
||||||
|
function prohibited (a: any) {
|
||||||
|
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||||
|
console.log("first(): called");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function permited (a: any) {
|
||||||
|
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||||
|
console.log("first(): called");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DispatchDomain {
|
||||||
|
|
||||||
|
static processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt arquivar
|
||||||
|
* @event 'Concluir Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
@prohibited({userRoleId:[], permission:[]})
|
||||||
|
static async archive(note:string, documents:any, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt executado
|
||||||
|
* @event 'Tarefa de Despacho', 'Reexecutar Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
* @emits finish proceses
|
||||||
|
*/
|
||||||
|
static async executed(note:string, documents:any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt reexecutar
|
||||||
|
* @event 'Concluir Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async rerun(note:string, documents:any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Reexecução",
|
||||||
|
"ActionTypeId": 100000010,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Concluir Despacho', 'Reexecutar Despacho', 'Tarefa de Despacho'
|
||||||
|
* @param SerialNumber
|
||||||
|
*/
|
||||||
|
static async sendToPending(SerialNumber) {
|
||||||
|
this.processes.SetTaskToPending(SerialNumber).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt pedido de parecer
|
||||||
|
* @event 'Reexecutar Despacho', 'Tarefa de Despacho'
|
||||||
|
*/
|
||||||
|
static async requestAppear() {
|
||||||
|
return GenericBehaviorProcess.requestAppear(task, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt Efetuar Despacho
|
||||||
|
* @event 'Concluir Despacho', 'Reexecutar Despacho', 'Tarefa de Despacho'
|
||||||
|
*/
|
||||||
|
static async PerformeDispatch(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt marcar reunião
|
||||||
|
* @event 'Concluir Despacho', 'Reexecutar Despacho', 'Tarefa de Despacho'
|
||||||
|
*/
|
||||||
|
static async setUpMeeting() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Reexecutar Despacho' , 'Tarefa de Despacho'
|
||||||
|
*/
|
||||||
|
static async Delegar(task, note, taskParticipants) {
|
||||||
|
let body = {
|
||||||
|
"SerialNumber": task.SerialNumber,
|
||||||
|
"DispatchDocId": task.DocId,
|
||||||
|
"FolderID": task.FolderId || task.FolderID,
|
||||||
|
"Subject": task.Folio,
|
||||||
|
"Comment": note,
|
||||||
|
"DelegatedUserEmail": taskParticipants[0].EmailAddress,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.DelegateTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service"
|
||||||
|
|
||||||
|
export class DispatchPrDomain {
|
||||||
|
static processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt executado
|
||||||
|
* @event 'Tarefa de Despacho',
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async executed(note: string, documents: any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return serialNumber
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt gerar diploma
|
||||||
|
* @event 'Tarefa de Despacho',
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async generateDiploma(note: string, documents: any, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Reencaminhar",
|
||||||
|
"ActionTypeId": 99999839,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @concluir
|
||||||
|
* @event 'Tarefa de Despacho',
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async conclude(note: string, documents: any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Executado",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt reexecutar
|
||||||
|
* @event 'Concluir Despacho',
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async rerun(note: string, documents: any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Reexecução",
|
||||||
|
"ActionTypeId": 100000010,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Tarefa de Despacho',
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async requestAppear(task, postData) {
|
||||||
|
return GenericBehaviorProcess.requestAppear(task, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Tarefa de Despacho', 'Concluir Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async setUpMeeting() {}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Concluir Despacho', 'Tarefa de Despacho',
|
||||||
|
*/
|
||||||
|
static async sendToPending(serialNumber) {
|
||||||
|
return GenericBehaviorProcess.SetTaskToPending(serialNumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt Marcar como Concluido
|
||||||
|
* @event 'Concluir Despacho',
|
||||||
|
*/
|
||||||
|
static async MarkAsCompleted() {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": 'serialNumber',
|
||||||
|
"action": "Executado",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList": 'documents',
|
||||||
|
}
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt Delegar
|
||||||
|
* @event 'Tarefa de Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async Delegate(task: any, note, taskParticipants) {
|
||||||
|
let body = {
|
||||||
|
"SerialNumber": task.SerialNumber,
|
||||||
|
"DispatchDocId": task.DocId,
|
||||||
|
"FolderID": task.FolderId || task.FolderID,
|
||||||
|
"Subject": task.Folio,
|
||||||
|
"Comment": note,
|
||||||
|
"DelegatedUserEmail": taskParticipants[0].EmailAddress,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.DelegateTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt Efetuar Despacho
|
||||||
|
* @event 'Tarefa de Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
PerformeDispatch(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
import { ProcessesService } from "src/app/services/processes.service";
|
||||||
|
import { GenericBehaviorProcess } from "./GenericBehaviorTaskActions";
|
||||||
|
|
||||||
|
export class Expediente {
|
||||||
|
|
||||||
|
processes: ProcessesService
|
||||||
|
// MD
|
||||||
|
/**
|
||||||
|
* @Pt Solicitar consideração superior, Aprovar
|
||||||
|
* @description
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialnumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async AskForSupeiorValidaiton(note:string, documents:any, serialnumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Aprovar",
|
||||||
|
"ActionTypeId": 100000004 ,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check
|
||||||
|
* @PT Submeter para revisão
|
||||||
|
* @event 'Concluir Despacho', 'Tarefa de Despacho',
|
||||||
|
*/
|
||||||
|
async sendToReview(note:string, documents:any, serialnumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Retificar",
|
||||||
|
"ActionTypeId": 99999877,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check
|
||||||
|
* @pt Arquivar
|
||||||
|
* @event 'Concluir Despacho', 'Tarefa de Despacho',
|
||||||
|
*/
|
||||||
|
async archive(SerialNumber) {
|
||||||
|
|
||||||
|
let otherbody = {
|
||||||
|
"serialNumber": SerialNumber,
|
||||||
|
"action": "Passivo",
|
||||||
|
"ActionTypeId": 99999877,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(otherbody).toPromise()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Profile PR
|
||||||
|
* @event 'Concluir Despacho', 'Tarefa de Despacho',
|
||||||
|
*/
|
||||||
|
sendToPending(serialnumber) {
|
||||||
|
this.processes.SetTaskToPending(serialnumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Profile PR
|
||||||
|
* @pt Pedido de parecer
|
||||||
|
*/
|
||||||
|
async RequestOpinion() {
|
||||||
|
const postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: 'this.postData.Priority',
|
||||||
|
UserEmail: 'this.loggeduser.Email',
|
||||||
|
UsersSelected: 'attendees',
|
||||||
|
DispatchFolder: 'this.dispatchFolder',
|
||||||
|
AttachmentList: 'docs'
|
||||||
|
}
|
||||||
|
|
||||||
|
let ActionTypeId;
|
||||||
|
|
||||||
|
if('this.loggeduser.Profile'.concat('') != 'PR') {
|
||||||
|
ActionTypeId = 92
|
||||||
|
} else if ('this.loggeduser.Profile'.concat('') == 'PR' ) {
|
||||||
|
ActionTypeId = 99999881
|
||||||
|
}
|
||||||
|
|
||||||
|
let action_parecer = {
|
||||||
|
"serialNumber": 'this.task.serialNumber',
|
||||||
|
"action": "Tratado",
|
||||||
|
"ActionTypeId": ActionTypeId,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": 'this.postData.DispatchFolder.Message',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if('this.loggeduser.Profile'.concat('') != 'PR') {
|
||||||
|
let taskResult = await this.processes.postParecer(postData).toPromise();
|
||||||
|
} else if ('this.loggeduser.Profile'.concat('') == 'PR' ) {
|
||||||
|
let taskResult = await this.processes.postParecerPr(postData).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.processes.CompleteTask(action_parecer).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt pedidod de deferimetno
|
||||||
|
*/
|
||||||
|
async defermentrequest() {
|
||||||
|
const postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: 'this.postData.Priority',
|
||||||
|
UserEmail: 'this.loggeduser.Email',
|
||||||
|
UsersSelected: 'attendees',
|
||||||
|
DispatchFolder: 'this.dispatchFolder',
|
||||||
|
AttachmentList: 'docs'
|
||||||
|
}
|
||||||
|
//
|
||||||
|
let action_deferimento = {
|
||||||
|
"serialNumber": 'this.task.serialNumber',
|
||||||
|
"action": "Tratado",
|
||||||
|
"ActionTypeId": 93,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": 'this.postData.DispatchFolder.Message',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.processes.postDeferimento(postData).toPromise();
|
||||||
|
await this.processes.CompleteTask(action_deferimento).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt Anexar Documentos
|
||||||
|
*/
|
||||||
|
addAttachment() {
|
||||||
|
let body = {
|
||||||
|
"InstanceID": 'this.task.InstanceID',
|
||||||
|
"WorkflowDisplayName": 'this.task.WorkflowName',
|
||||||
|
"FolderID": 'this.task.FolderId',
|
||||||
|
"DispatchNumber": 'this.task.DispatchNumber',
|
||||||
|
"AttachmentsProcessLastInstanceID": 'this.task.AttachmentsProcessLastInstanceID',
|
||||||
|
"Attachments": []
|
||||||
|
}
|
||||||
|
|
||||||
|
// const Attachments = this.searchDocumentPipe.transformToAttachment(element)
|
||||||
|
// body.Attachments = Attachments;
|
||||||
|
|
||||||
|
// await this.attachmentsService.AddAttachment(body).toPromise()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async PerformeDispatch(body) {
|
||||||
|
return await GenericBehaviorProcess.PerformeDispatch(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
static async requestAppear(task) {
|
||||||
|
return await GenericBehaviorProcess.requestAppear(task, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
static async ApplicationForDeferment(task) {
|
||||||
|
return await GenericBehaviorProcess.ApplicationForDeferment(task)
|
||||||
|
}
|
||||||
|
|
||||||
|
static async setUpMeeting(task) {
|
||||||
|
return await GenericBehaviorProcess.setUpMeeting(task, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pr Enviar para pendentes
|
||||||
|
* @param task
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async SetTaskToPending(task) {
|
||||||
|
return await GenericBehaviorProcess.setUpMeeting(task, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,310 @@
|
|||||||
|
import { AttachmentList } from "src/app/models/Excludetask";
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service";
|
||||||
|
|
||||||
|
|
||||||
|
export class GenericBehaviorProcess {
|
||||||
|
|
||||||
|
static processes: ProcessesService
|
||||||
|
static p: any
|
||||||
|
|
||||||
|
static async setUpMeeting(task, createEventFromData) {
|
||||||
|
const eventBody = {
|
||||||
|
BodyType: '1',
|
||||||
|
Text: 'this.postData.Body.Text',
|
||||||
|
}
|
||||||
|
|
||||||
|
// createEventFromData
|
||||||
|
const postData = {
|
||||||
|
EventId: '',
|
||||||
|
Subject: 'this.postData.Subject',
|
||||||
|
Body: 'this.eventBody',
|
||||||
|
Location: 'this.postData.Location',
|
||||||
|
CalendarId: '',
|
||||||
|
CalendarName: 'this.postData.CalendarName',
|
||||||
|
StartDate: 'this.dateStart',
|
||||||
|
EndDate: 'this.dateEnd',
|
||||||
|
EventType: 'Reunião',
|
||||||
|
Attendees: 'Attendees',
|
||||||
|
IsMeeting: false,
|
||||||
|
IsRecurring: false,
|
||||||
|
AppointmentState: 0,
|
||||||
|
TimeZone: 'UTC',
|
||||||
|
Organizer: null,
|
||||||
|
Category: 'Reunião',
|
||||||
|
HasAttachments: true,
|
||||||
|
EventRecurrence: {
|
||||||
|
Type: 'this.EventRecurrenceType',
|
||||||
|
LastOccurrence: 'this.Occurrence'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if(task.FsId == '8') {
|
||||||
|
|
||||||
|
try {
|
||||||
|
// const CalendarId = this.selectedCalendarId()
|
||||||
|
// await this.calendarService.genericPostExpedientEvent(task.DocId, this.postData, "",task.SerialNumber, task.FsId, CalendarId).toPromise();
|
||||||
|
|
||||||
|
// this.modalController.dismiss();
|
||||||
|
//this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
// this.httpErroHandle.httpStatusHandle(error)
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(task.FsId == '361') {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
// const CalendarId = this.selectedCalendarId()
|
||||||
|
// await this.calendarService.genericCreateTaskEvent(task.FolderID | task.FolderId, this.postData, "",task.SerialNumber, task.FsId, CalendarId).toPromise();
|
||||||
|
|
||||||
|
// this.close();
|
||||||
|
// this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
// this.httpErroHandle.httpStatusHandle(error)
|
||||||
|
} finally {
|
||||||
|
// loader.remove()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static async SetTaskToPending(serialNumber) {
|
||||||
|
return await this.processes.SetTaskToPending(serialNumber).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description arquivar
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async archive(note: string, documents: AttachmentList, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt executado
|
||||||
|
* @event 'Tarefa de Despacho', 'Reexecutar Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
* @emits finish proceses
|
||||||
|
*/
|
||||||
|
static async executed(note:string, documents:any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @pt reexecutar
|
||||||
|
* @event 'Concluir Despacho'
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async rerun(note:string, documents:any, serialNumber) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Reexecução",
|
||||||
|
"ActionTypeId": 100000010,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Diploma Assinado',
|
||||||
|
* @description Concluir
|
||||||
|
* @param note
|
||||||
|
* @param documents
|
||||||
|
* @param serialNumber
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static async conclude(note: string, documents: any, serialNumber) {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Concluir",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static async Delegar() {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"SerialNumber": 'this.task.SerialNumber',
|
||||||
|
"DispatchDocId": 'this.task.DocId',
|
||||||
|
"FolderID": 'this.task.FolderId' || 'this.task.FolderID',
|
||||||
|
"Subject": 'this.task.Folio',
|
||||||
|
"Comment": 'this.note',
|
||||||
|
"DelegatedUserEmail": 'this.taskParticipants[0].EmailAddress',
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.DelegateTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event 'Revisar Diploma', 'Diploma Assinado',
|
||||||
|
*/
|
||||||
|
static async PerformeDispatch(body: any) {
|
||||||
|
|
||||||
|
const postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: "this.postData.Priority",
|
||||||
|
UserEmail: "this.loggeduser.Email",
|
||||||
|
UsersSelected: "attendees",
|
||||||
|
DispatchFolder: "this.dispatchFolder",
|
||||||
|
AttachmentList: "docs"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.p.userRole(['PR'])) {
|
||||||
|
return this.processes.postDespatchoPr(postData).toPromise();
|
||||||
|
} else {
|
||||||
|
return this.processes.postDespatcho(postData).toPromise();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async requestAppear(task, _postData) {
|
||||||
|
const postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: 'this.postData.Priority',
|
||||||
|
UserEmail: 'this.loggeduser.Email',
|
||||||
|
UsersSelected: 'attendees',
|
||||||
|
DispatchFolder: 'this.dispatchFolder',
|
||||||
|
AttachmentList: 'docs'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (task.activityInstanceName == 'Tarefa de Despacho' || task.activityInstanceName == 'Reexecutar Despacho') {
|
||||||
|
if(this.p.userRole(['PR'])) {
|
||||||
|
await this.processes.postParecerPr(postData).toPromise();
|
||||||
|
} else {
|
||||||
|
await this.processes.postParecer(postData).toPromise();
|
||||||
|
}
|
||||||
|
let body;
|
||||||
|
|
||||||
|
if(task.activityInstanceName == 'Concluir Despacho'
|
||||||
|
|| task.activityInstanceName == 'Concluir Parecer'
|
||||||
|
|| task.activityInstanceName == 'Concluir Deferimento'
|
||||||
|
|| task.activityInstanceName == 'Tarefa de Deferimento'
|
||||||
|
) {
|
||||||
|
body = {
|
||||||
|
"serialNumber": task.serialNumber,
|
||||||
|
"action": "Parecer",
|
||||||
|
"ActionTypeId": 92,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList" :' documents',
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
body = {
|
||||||
|
"serialNumber": task.serialnumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 92,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList" : 'documents',
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(this.p.userRole(['PR'])) {
|
||||||
|
await this.processes.postParecerPr(postData).toPromise();
|
||||||
|
} else {
|
||||||
|
await this.processes.postParecer(postData).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
const body = {
|
||||||
|
"serialNumber": task.serialNumber,
|
||||||
|
"action": "Parecer",
|
||||||
|
"ActionTypeId": 92, // Pedido de parece
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList" :null,
|
||||||
|
}
|
||||||
|
return this.processes.CompleteTask(body).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static async ApplicationForDeferment(task) {
|
||||||
|
const postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: 'this.postData.Priority',
|
||||||
|
UserEmail: 'this.loggeduser.Email',
|
||||||
|
UsersSelected: 'attendees',
|
||||||
|
DispatchFolder: 'this.dispatchFolder',
|
||||||
|
AttachmentList: 'docs'
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.processes.postDeferimento(postData).toPromise()
|
||||||
|
|
||||||
|
const body = {
|
||||||
|
"serialNumber": task.serialNumber,
|
||||||
|
"action": "Deferimento",
|
||||||
|
"ActionTypeId": 93, // Pedido de deferimento
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList" :null,
|
||||||
|
}
|
||||||
|
return this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service"
|
||||||
|
|
||||||
|
export class RequestForApproval {
|
||||||
|
static processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Tarefa de Deferimento', 'Reapreciar Deferimento', 'Concluir Deferimento'
|
||||||
|
*/
|
||||||
|
static Arquivar() {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": 'serialNumber',
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList" :'documents',
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Tarefa de Deferimento', 'Reapreciar Deferimento', 'Concluir Deferimento'
|
||||||
|
*/
|
||||||
|
static async Delegar() {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": 'this.serialNumber',
|
||||||
|
"action": "Registar",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'this.note',
|
||||||
|
},
|
||||||
|
"AttachmentList": 'docs',
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @evactivityInstanceNameent 'Tarefa de Deferimento', 'Reapreciar Deferimento', 'Concluir Deferimento'
|
||||||
|
*/
|
||||||
|
static EfetuarDespacho(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Tarefa de Deferimento', 'Reapreciar Deferimento', 'Concluir Deferimento'
|
||||||
|
*/
|
||||||
|
static MarcarReuniao() {}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Tarefa de Deferimento', 'Concluir Deferimento', 'Reapreciar Deferimento'
|
||||||
|
*/
|
||||||
|
static enviarParaPendente(serialNumber) {
|
||||||
|
return GenericBehaviorProcess.SetTaskToPending(serialNumber)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Concluir Deferimento'
|
||||||
|
*/
|
||||||
|
static SolicitarParecer(task) {
|
||||||
|
return GenericBehaviorProcess.requestAppear(task, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Concluir Deferimento'
|
||||||
|
*/
|
||||||
|
static SolicitarReapreciação() {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": 'this.serialnumber',
|
||||||
|
"action": "Reapreciação",
|
||||||
|
"ActionTypeId": 100000009,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList": 'documents',
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body).toPromise()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
import { GenericBehaviorProcess } from "src/app/domain/process/GenericBehaviorTaskActions"
|
||||||
|
import { ProcessesService } from "src/app/services/processes.service"
|
||||||
|
|
||||||
|
export class RequestForOpinion {
|
||||||
|
static processes: ProcessesService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer'
|
||||||
|
*/
|
||||||
|
static arquivar() {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": 'serialNumber',
|
||||||
|
"action": "Arquivo",
|
||||||
|
"ActionTypeId": 95,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList" :'documents',
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.processes.CompleteTask(body)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer'
|
||||||
|
*/
|
||||||
|
static EfetuarDespacho(body) {
|
||||||
|
return GenericBehaviorProcess.PerformeDispatch(body)}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer'
|
||||||
|
*/
|
||||||
|
static SolicitarParecer(task) {
|
||||||
|
return GenericBehaviorProcess.requestAppear(task, {})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @profile != PR
|
||||||
|
* @activityInstanceName 'Pedido de Parecer'
|
||||||
|
*/
|
||||||
|
static PedidoDedeferimento(task) {
|
||||||
|
return GenericBehaviorProcess.requestAppear(task, {})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer'
|
||||||
|
*/
|
||||||
|
static setUpMeeting(){}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer'
|
||||||
|
*/
|
||||||
|
static SendToPeding(serialNumber){
|
||||||
|
return GenericBehaviorProcess.SetTaskToPending(serialNumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer', 'Pedido de Parecer do Presidente'
|
||||||
|
*/
|
||||||
|
static async DarOMeuParecer() {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": 'serialNumber',
|
||||||
|
"action": "Registar",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'note',
|
||||||
|
},
|
||||||
|
"AttachmentList": 'docs',
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteTask(body).toPromise();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @activityInstanceName 'Pedido de Parecer', 'Pedido de Parecer do Presidente'
|
||||||
|
*/
|
||||||
|
static MarcarReuniao() {}
|
||||||
|
/**
|
||||||
|
* @Profile PR
|
||||||
|
* @pt Reencaminhar
|
||||||
|
* @activityInstanceName 'Pedido de Parecer do Presidente'
|
||||||
|
*/
|
||||||
|
static async Reencaminhar() {
|
||||||
|
|
||||||
|
let body = {
|
||||||
|
"usersSelected": 'attendees',
|
||||||
|
"serialNumber": 'this.task.SerialNumber',
|
||||||
|
"action": "Reencaminhar",
|
||||||
|
"actionTypeId": 98,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": 'this.note',
|
||||||
|
},
|
||||||
|
"FolderId": 'this.task.FolderId',
|
||||||
|
"AttachmentList" : 'docs',
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.processes.CompleteParecerPrTask(body).toPromise();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { AlertController, ModalController, NavParams } from '@ionic/angular';
|
||||||
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
|
||||||
import { Event } from 'src/app/models/event.model'
|
import { Event } from 'src/app/models/event.model'
|
||||||
import { EventBody } from 'src/app/models/eventbody.model';
|
import { EventBody } from 'src/app/models/eventbody.model';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
@@ -45,13 +42,9 @@ export class DelegarPage implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private router:Router,
|
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private processes:ProcessesService,
|
private processes:ProcessesService,
|
||||||
private attachmentsService: AttachmentsService,
|
|
||||||
private calendarService: EventsService,
|
|
||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private animationController: AnimationController,
|
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private httpErrorHandle: HttpErrorHandle
|
private httpErrorHandle: HttpErrorHandle
|
||||||
@@ -150,7 +143,7 @@ export class DelegarPage implements OnInit {
|
|||||||
|
|
||||||
async setContact(data:EventPerson[]) {
|
async setContact(data:EventPerson[]) {
|
||||||
|
|
||||||
if(this.adding == "intervenient"){
|
if(this.adding == "intervenient") {
|
||||||
this.taskParticipants = data;
|
this.taskParticipants = data;
|
||||||
} else if (this.adding == "CC") {
|
} else if (this.adding == "CC") {
|
||||||
|
|
||||||
|
|||||||
@@ -75,17 +75,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <app-task-details class="content d-flex flex-column"
|
|
||||||
[task]="task"
|
|
||||||
[intervenientes]="intervenientes"
|
|
||||||
[cc]="cc"
|
|
||||||
[customDate]="customDate"
|
|
||||||
[fulltask]="fulltask"
|
|
||||||
(openOptions)="openOptions($event)"
|
|
||||||
(goBack)="goBack()"
|
|
||||||
(viewDocument)="viewDocument($event)"
|
|
||||||
> </app-task-details> -->
|
|
||||||
|
|
||||||
<div class="content d-flex flex-column" *ngIf="!task">
|
<div class="content d-flex flex-column" *ngIf="!task">
|
||||||
<ion-item lines="none"
|
<ion-item lines="none"
|
||||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import { NavigationStart, Router } from '@angular/router';
|
|||||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||||
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
||||||
import { RouteService } from 'src/app/services/route.service';
|
import { RouteService } from 'src/app/services/route.service';
|
||||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
|
||||||
import { Platform } from '@ionic/angular';
|
|
||||||
import { BackgroundService } from 'src/app/services/background.service';
|
import { BackgroundService } from 'src/app/services/background.service';
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
@@ -28,8 +26,6 @@ export class DespachosPage implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private despachoRule: DespachoService,
|
private despachoRule: DespachoService,
|
||||||
private sqliteservice: SqliteService,
|
|
||||||
private platform: Platform,
|
|
||||||
private backgroundservice: BackgroundService,
|
private backgroundservice: BackgroundService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
public TaskService: TaskService,
|
public TaskService: TaskService,
|
||||||
|
|||||||
+1
-1
@@ -170,7 +170,7 @@ export class DiplomaAssinarPage implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async Assinar(){
|
async Assinar() {
|
||||||
let body = {
|
let body = {
|
||||||
"serialNumber": this.serialnumber,
|
"serialNumber": this.serialnumber,
|
||||||
"action": "Assinado",
|
"action": "Assinado",
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { EventList } from '../models/agenda/AgendaEventList';
|
|||||||
import { ChangeProfileService } from './change-profile.service';
|
import { ChangeProfileService } from './change-profile.service';
|
||||||
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
||||||
import { catchError } from "rxjs/operators";
|
import { catchError } from "rxjs/operators";
|
||||||
import { BackgroundService } from 'src/app/services/background.service';
|
|
||||||
import { SessionStore } from '../store/session.service';
|
import { SessionStore } from '../store/session.service';
|
||||||
import { calendarInterface } from '../models/user.model';
|
import { calendarInterface } from '../models/user.model';
|
||||||
import { Subscribe } from './subcribe';
|
import { Subscribe } from './subcribe';
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "6ea40ab55",
|
"shortSHA": "e4b08b887",
|
||||||
"SHA": "6ea40ab55f681269113bbb8c6724fbe4f60099c7",
|
"SHA": "e4b08b8873b7278834b61cc63d60d4efc5757727",
|
||||||
"branch": "feature/gabinete-search",
|
"branch": "feature/gabinete-search",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Thu Jun 22 12:53:35 2023 +0100'",
|
"lastCommitTime": "'Thu Jun 22 13:09:11 2023 +0100'",
|
||||||
"lastCommitMessage": "remove un used import",
|
"lastCommitMessage": "change order",
|
||||||
"lastCommitNumber": "5017",
|
"lastCommitNumber": "5018",
|
||||||
"change": "",
|
"change": "diff --git a/.gitignore b/.gitignore\nindex 80b2c44ec..e8ea8cb22 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -84,7 +84,6 @@ migrat/\n cypress/videos\n *.rar\n \n-src/app/domain\n src/app/models/beast-orm-pro.ts",
|
||||||
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.html\n\tmodified: src/app/shared/agenda/event-list/event-list.page.html\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts",
|
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/Rules/deploma.service.ts\n\tmodified: src/app/Rules/despacho.service.ts\n\tnew file: src/app/domain/agenda/event.ts\n\tnew file: src/app/domain/process/DiplomaGenerate.ts\n\tnew file: src/app/domain/process/DiplomaSignPr.ts\n\tnew file: src/app/domain/process/DiplomaToSign.ts\n\tnew file: src/app/domain/process/DiplomasValidate.ts\n\tnew file: src/app/domain/process/DispatchDomain.ts\n\tnew file: src/app/domain/process/DispatchPrDomain.ts\n\tnew file: src/app/domain/process/Expediente.ts\n\tnew file: src/app/domain/process/GenericBehaviorTaskActions.ts\n\tnew file: src/app/domain/process/RequestsForDeferment.ts\n\tnew file: src/app/domain/process/RequestsForOpinion.ts\n\tmodified: src/app/modals/delegar/delegar.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts\n\tmodified: src/app/services/events.service.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: .gitignore\n\nUntracked files:\n (use \"git add <file>...\" to include in what will be committed)\n\tgabinete-digital-fo.code-workspace",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user