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() } }