mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge
This commit is contained in:
+54
-9
@@ -244,7 +244,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()
|
||||
}
|
||||
@@ -269,7 +274,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()
|
||||
}
|
||||
@@ -336,7 +346,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')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -393,7 +408,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')
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -484,8 +504,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()
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -521,7 +546,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()
|
||||
}
|
||||
@@ -555,7 +585,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()
|
||||
}
|
||||
@@ -574,7 +609,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()
|
||||
}
|
||||
@@ -588,7 +628,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