This commit is contained in:
tiago.kayaya
2021-08-20 11:59:01 +01:00
3 changed files with 31 additions and 5 deletions
@@ -244,17 +244,44 @@ export class DespachosPrOptionsPage implements OnInit {
else if(actionName == 'Gerar Diploma'){
await this.generateDiploma(res.data.note, docs);
}
else if(actionName == 'Concluido'){
//this.concluir(res.data.note, docs);
}
else if(actionName == 'Reexecução'){
await this.reexecutar(res.data.note, docs);
}
else if(actionName == 'Concluido'){
await this.concluir(res.data.note, docs);
}
this.goBack();
}
});
}
async concluir(note:string, documents:any){
let body = {
"serialNumber": this.serialNumber,
"action": "Executado",
"ActionTypeId": 104,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('')
this.close();
} catch (error) {
this.toastService.badRequest()
}
finally {
loader.remove()
}
}
async arquivar(note:string, documents:any){
let body = {
"serialNumber": this.serialNumber,
+1 -1
View File
@@ -59,7 +59,7 @@ export class LocalstoreService {
export const localstoreService = new LocalstoreService()
// console.log( AES.encrypt( 'peter', 'v14-dba29fd8bdbf24ffe4840b0f778f70f6a163d424').toString())
console.log( AES.encrypt( 'pode ser qualquer', 'ayrton').toString() )
// // Create WebSocket connection.
// const socket = new WebSocket('ws://localhost:8080');
@@ -1,5 +1,4 @@
import { Injectable } from '@angular/core'
import { Publication } from 'src/app/models/publication'
import { localstoreService } from './localstore.service'
import { SHA1 } from 'crypto-js'