mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user