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
@@ -320,7 +320,12 @@ export class ExpedientTaskModalPage implements OnInit {
this.modalController.dismiss(action_despacho);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -354,7 +359,12 @@ export class ExpedientTaskModalPage implements OnInit {
this.modalController.dismiss(action_parecer);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -385,7 +395,12 @@ export class ExpedientTaskModalPage implements OnInit {
this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_deferimento);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}
@@ -423,8 +438,12 @@ export class ExpedientTaskModalPage implements OnInit {
await this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_despacho_pr);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
//loader.remove()
}
@@ -461,8 +480,12 @@ export class ExpedientTaskModalPage implements OnInit {
await this.toastService._successMessage('Pedido enviado');
this.modalController.dismiss(action_parecer_pr);
} catch (error) {
await this.toastService._badRequest('Processo não efetuado')
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
await this.toastService._badRequest('Processo não efetuado')
}
} finally {
loader.remove()
}