Improve loader

This commit is contained in:
Peter Maquiran
2021-07-12 11:13:29 +01:00
parent c526426aec
commit 507ebd691a
34 changed files with 400 additions and 32 deletions
@@ -95,13 +95,18 @@ export class DeplomaOptionsPage implements OnInit {
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.toastService.successMessage()
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}
@@ -135,13 +140,19 @@ export class DeplomaOptionsPage implements OnInit {
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.toastService.successMessage()
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}