mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Fix
This commit is contained in:
@@ -56,13 +56,13 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
|
||||
approveTask() {
|
||||
async approveTask() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
this.processes.PostTaskAction(body).toPromise()
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService.successMessage();
|
||||
this.goBack();
|
||||
@@ -127,7 +127,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
this.processes.PostTaskAction(body).toPromise();
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
await this.toastService.successMessage('Processo rejeitado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
|
||||
@@ -335,7 +335,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
|
||||
@@ -354,19 +354,19 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
if(actionName == 'Executado'){
|
||||
this.executado(res.data.note, docs);
|
||||
await this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note, docs);
|
||||
await this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Gerar Diploma'){
|
||||
this.generateDiploma(res.data.note, docs);
|
||||
await this.generateDiploma(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Concluido'){
|
||||
this.concluir(res.data.note, docs);
|
||||
await this.concluir(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Reexecução'){
|
||||
this.reexecutar(res.data.note, docs);
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
if(res.data){
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
@@ -323,14 +323,14 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
if(actionName == 'Executado'){
|
||||
|
||||
this.executado(res.data.note, docs);
|
||||
await this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note, docs);
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Reexecução'){
|
||||
this.reexecute(res.data.note, docs);
|
||||
await this.reexecute(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if(res.data){
|
||||
|
||||
|
||||
@@ -271,15 +271,15 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
|
||||
if(actionName == 'Solicitar assinatura'){
|
||||
this.askSignature(res.data.note, docs);
|
||||
await this.askSignature(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Solicitar alteração'){
|
||||
this.askToChange(res.data.note, docs);
|
||||
await this.askToChange(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Concluir diploma'){
|
||||
this.finish(res.data.note, docs);
|
||||
await this.finish(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ export class ApproveEventPage implements OnInit {
|
||||
console.log(body);
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
this.processes.PostTaskAction(body).toPromise();
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
await this.toastService.successMessage('Processo rejeitado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import { User } from 'src/app/models/user.model';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { async } from '@angular/core/testing';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedido',
|
||||
@@ -76,7 +77,7 @@ export class PedidoPage implements OnInit {
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
notImplemented(){
|
||||
@@ -437,8 +438,8 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
const DocumentToSave = await res.data.documents.map( async (e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
@@ -451,15 +452,15 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
if(res.data){
|
||||
if(actionName == 'Solicitar Reapreciação') {
|
||||
this.repreciar(res.data.note, docs);
|
||||
await this.repreciar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note, docs);
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Assignar'){
|
||||
this.assignar(res.data.note, docs);
|
||||
await this.assignar(res.data.note, docs);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user