mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
94 lines
2.0 KiB
TypeScript
94 lines
2.0 KiB
TypeScript
import { Injectable } from '@angular/core';
|
|
import { CustomTaskPipe } from '../pipes/custom-task.pipe';
|
|
import { ProcessesService } from '../services/processes.service';
|
|
import { LoaderService } from 'src/app/store/loader.service'
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class DeplomaService {
|
|
|
|
activityInstanceName = {
|
|
'Revisar Diploma': [
|
|
'Solicitar assinatura do Presidente',
|
|
'Solicitar alteração',
|
|
'Marcar Reunião'
|
|
],
|
|
'Diploma Assinado': [
|
|
'Concluir'
|
|
],
|
|
'Assinar Diploma': [
|
|
'Assinado'
|
|
]
|
|
}
|
|
|
|
customTaskPipe = new CustomTaskPipe()
|
|
|
|
constructor(
|
|
private processes: ProcessesService,
|
|
) { }
|
|
|
|
|
|
async askSignature({note, documents, serialNumber, activityInstanceName}) {
|
|
let body = {
|
|
"serialNumber": serialNumber,
|
|
"action": "Aprovar",
|
|
"ActionTypeId": 99999840,
|
|
"dataFields": {
|
|
"ReviewUserComment": note,
|
|
},
|
|
"AttachmentList" :documents,
|
|
}
|
|
|
|
return this.processes.CompleteTask(body)
|
|
}
|
|
|
|
async askToChange({note, documents, serialNumber, activityInstanceName}) {
|
|
let body = {
|
|
"serialNumber": serialNumber,
|
|
"action": "Retificar",
|
|
"ActionTypeId": 99999841,
|
|
"dataFields": {
|
|
"ReviewUserComment": note,
|
|
},
|
|
"AttachmentList" :documents,
|
|
}
|
|
|
|
return this.processes.CompleteTask(body)
|
|
|
|
}
|
|
|
|
async finish({note, documents, serialNumber, activityInstanceName}) {
|
|
|
|
let body = {
|
|
"serialNumber": serialNumber,
|
|
"action": "Concluir",
|
|
"ActionTypeId": 95,
|
|
"dataFields": {
|
|
"ReviewUserComment": note,
|
|
},
|
|
"AttachmentList" :documents,
|
|
}
|
|
|
|
return this.processes.CompleteTask(body);
|
|
}
|
|
|
|
async sign({note, documents, serialNumber, activityInstanceName}) {
|
|
let body = {
|
|
"serialNumber": serialNumber,
|
|
"action": "Assinado",
|
|
"ActionTypeId": 99999842,
|
|
"dataFields": {
|
|
"ReviewUserComment": note,
|
|
},
|
|
"AttachmentList" :documents,
|
|
}
|
|
|
|
return this.processes.CompleteTask(body)
|
|
}
|
|
|
|
|
|
async getList() {}
|
|
|
|
}
|