add options

This commit is contained in:
Peter Maquiran
2021-08-11 11:15:43 +01:00
parent 4bcaba8ee0
commit da9df36320
3 changed files with 17 additions and 18 deletions
@@ -49,7 +49,7 @@ export class OptsExpedientePage implements OnInit {
}
close() {
if( window.innerWidth < 801){
if( window.innerWidth < 801) {
this.popoverController.dismiss();
}
else{
@@ -127,7 +127,7 @@ export class OptsExpedientePage implements OnInit {
await modal.present();
modal.onDidDismiss().then(res => {
modal.onDidDismiss().then( async (res) => {
console.log(res);
if(res.data){
const DocumentToSave = res.data.documents.map((e) => {
@@ -142,21 +142,22 @@ export class OptsExpedientePage implements OnInit {
Attachments: DocumentToSave,
}
if(actionName == 'Aprovar'){
this.approve(res.data.note, docs);
if(actionName == 'Aprovar') {
await this.approve(res.data.note, docs);
}
else if(actionName == 'Revisão'){
this.sendToReview(res.data.note, docs);
else if(actionName == 'Revisão') {
await this.sendToReview(res.data.note, docs);
}
this.popoverController.dismiss();
this.goBack();
}
});
}
async sendToReview(note:string, documents:any){
async sendToReview(note:string, documents:any) {
let body = {
"serialNumber": this.task.serialnumber,
"serialNumber": this.task.serialnumber || this.task.SerialNumber,
"action": "Retificar",
"ActionTypeId": 99999877,
"dataFields": {
@@ -190,7 +191,7 @@ export class OptsExpedientePage implements OnInit {
async approve(note:string, documents:any){
let body = {
"serialNumber": this.task.serialnumber,
"serialNumber": this.task.serialnumber || this.task.SerialNumber,
"action": "Aprovar",
"ActionTypeId": 100000004 ,
"dataFields": {