Files
doneit-web/src/app/Rules/despacho-md.service.ts
T

74 lines
1.5 KiB
TypeScript
Raw Normal View History

2021-07-27 21:19:09 +01:00
import { Injectable } from '@angular/core';
import { ProcessesService } from '../services/processes.service';
@Injectable({
providedIn: 'root'
})
export class DespachoMdService {
/**
* @description para terminar o
* 95 - signfica
* 98 - significa
*/
ActionTypeId: 95 | 98
action: "Arquivo" | "Reencaminhar"
constructor(
private processes: ProcessesService,
) { }
arquivar(note:string, documents:any, serialnumber) {
2021-07-29 10:13:39 +01:00
2021-07-27 21:19:09 +01:00
let body = {
"serialNumber": serialnumber,
"action": "Arquivo",
"ActionTypeId": 95,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
2021-07-28 14:18:02 +01:00
2021-07-27 21:19:09 +01:00
return this.processes.CompleteTask(body)
}
reencaminhar(note:string, documents:any, serialnumber) {
let body = {
"serialNumber": serialnumber,
"action": "Reencaminhar",
"ActionTypeId": 98,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
return this.processes.CompleteTask(body)
}
2021-07-27 21:26:31 +01:00
executado(note:string, documents:any , serialnumber) {
2021-07-27 21:19:09 +01:00
let body = {
"serialNumber": serialnumber,
"action": "Conhecimento",
"ActionTypeId": 104,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
return this.processes.CompleteTask(body)
}
2021-07-29 10:13:39 +01:00
2021-07-27 21:26:31 +01:00
sendExpedienteToPending(serialnumber) {
return this.processes.SetTaskToPending(serialnumber)
}
2021-07-27 21:19:09 +01:00
}