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
@@ -183,7 +183,12 @@ export class PedidoPage 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')
}
}
});
@@ -374,7 +379,12 @@ export class PedidoPage implements OnInit {
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -394,7 +404,12 @@ export class PedidoPage implements OnInit {
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -419,7 +434,12 @@ export class PedidoPage implements OnInit {
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService._badRequest()
if(error.status == 0) {
this.toastService._badRequest('sem conexão ao servidor')
} else {
this.toastService._badRequest()
}
} finally {
loader.remove()
}
@@ -431,9 +451,14 @@ export class PedidoPage implements OnInit {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res => {
this.goBack();
loader.remove()
}, () => {
}, (error) => {
loader.remove()
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')
}
});
}