mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Improve loader
This commit is contained in:
+22
-6
@@ -271,6 +271,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
let action_despacho = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
@@ -291,6 +293,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
@@ -336,6 +340,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
AttachmentList: docs
|
||||
}
|
||||
//console.log(this.postData);
|
||||
const loader1 = this.toastService.loading()
|
||||
|
||||
try {
|
||||
let action_deferimento = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
@@ -346,14 +352,15 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
|
||||
|
||||
loader.remove()
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader1.remove()
|
||||
}
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
}
|
||||
@@ -375,6 +382,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
AttachmentList: docs,
|
||||
}
|
||||
console.log(this.postData);
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
let action_despacho_pr = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
@@ -394,7 +403,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
|
||||
@@ -408,7 +420,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
}
|
||||
|
||||
|
||||
const loader2 = this.toastService.loading()
|
||||
|
||||
try {
|
||||
let action_parecer_pr = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
@@ -418,15 +432,17 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
loader.remove()
|
||||
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado');
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader2.remove()
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user