This commit is contained in:
Peter Maquiran
2021-08-05 11:47:09 +01:00
parent 38313e3260
commit ca665294f0
10 changed files with 122 additions and 39 deletions
+32 -1
View File
@@ -1,4 +1,5 @@
import { Injectable } from '@angular/core';
import { PermissionService } from '../OtherService/permission.service';
import { ProcessesService } from '../services/processes.service';
@Injectable({
@@ -16,6 +17,7 @@ export class DespachoService {
constructor(
private processes: ProcessesService,
public p: PermissionService
) { }
arquivar(note:string, documents:any, serialnumber) {
@@ -63,8 +65,37 @@ export class DespachoService {
return this.processes.CompleteTask(body)
}
sendExpedienteToPending(serialnumber) {
CompleteTask({serialNumber}) {
const body = {
"serialNumber": serialNumber,
"action": "Despacho",
"ActionTypeId": 94,
"dataFields": {
"ReviewUserComment": '',
},
"AttachmentList" :null,
}
return this.processes.CompleteTask(body)
}
sendExpedienteToPending(serialnumber) {
return this.processes.SetTaskToPending(serialnumber)
}
/**
*
* @param body any
* @returns promise
* @description for both profile PR and MDGPR
*/
createDespacho(body: any) {
if(this.p.userRole(['PR'])) {
return this.processes.postDespatchoPr(body)
} else {
return this.processes.postDespatcho(body)
}
}
}