add notification message

This commit is contained in:
Peter Maquiran
2023-02-02 12:01:18 +01:00
parent 0036ce6ab2
commit ecd19c46bb
41 changed files with 721 additions and 131 deletions
@@ -162,7 +162,12 @@ export class DiplomaPage implements OnInit {
} catch (e) {
window.history.back();
}
this.toastService._badRequest('Processo não encontrado')
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest('Processo não encontrado')
}
}
});
@@ -286,7 +291,12 @@ export class DiplomaPage implements OnInit {
})
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()
@@ -309,7 +319,12 @@ export class DiplomaPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
this.toastService._successMessage()
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()
@@ -335,7 +350,12 @@ export class DiplomaPage implements OnInit {
await this.processes.CompleteTask(body).toPromise();
this.toastService._successMessage('Processo concluído')
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest()
}
}
finally {
loader.remove()