mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add options
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user