mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
add notification message
This commit is contained in:
+54
-9
@@ -242,7 +242,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.close();
|
||||
this.toastService._successMessage('Processo aprovado')
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não aprovado')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não aprovado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -267,7 +272,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.close();
|
||||
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()
|
||||
}
|
||||
@@ -334,7 +344,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
},
|
||||
(error) => {
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -391,7 +406,12 @@ export class ExpedienteDetailPage 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')
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -482,8 +502,13 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
loader.remove()
|
||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
} catch(e) {
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -519,7 +544,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -553,7 +583,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -572,7 +607,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
//this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -586,7 +626,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user