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:
@@ -292,7 +292,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
this.toastService._successMessage('Despacho criado');
|
this.toastService._successMessage('Despacho criado');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error?.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
|
}
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
@@ -324,7 +329,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.toastService._successMessage('Pedido de Parecer enviado');
|
this.toastService._successMessage('Pedido de Parecer enviado');
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
if(error?.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -349,8 +359,13 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
if(error?.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -377,7 +392,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
this.toastService._successMessage('Despacho criado');
|
this.toastService._successMessage('Despacho criado');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error?.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove();
|
loader.remove();
|
||||||
}
|
}
|
||||||
@@ -413,7 +433,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.toastService._successMessage('Pedido de Parecer criado');
|
this.toastService._successMessage('Pedido de Parecer criado');
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -438,7 +463,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -493,7 +523,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise();
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
this.toastService._successMessage(message);
|
this.toastService._successMessage(message);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não efectuado');
|
this.toastService._badRequest('Processo não efectuado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,11 @@ export class DarParecerPage implements OnInit {
|
|||||||
this.modalController.dismiss('sucess');
|
this.modalController.dismiss('sucess');
|
||||||
this.toastService._successMessage('Parecer enviado');
|
this.toastService._successMessage('Parecer enviado');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest("Parecer não solicitado");
|
this.toastService._badRequest("Parecer não solicitado");
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,11 @@ export class DelegarPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
(error)=>{
|
(error)=>{
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest("Processo não delegado")
|
this.toastService._badRequest("Processo não delegado")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
()=>{
|
()=>{
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
|||||||
@@ -277,7 +277,12 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
this.modalController.dismiss()
|
this.modalController.dismiss()
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
laoder.remove()
|
laoder.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Não foi possível marcar a reunião');
|
this.toastService._badRequest('Não foi possível marcar a reunião');
|
||||||
|
}
|
||||||
}, ()=>{
|
}, ()=>{
|
||||||
laoder.remove()
|
laoder.remove()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -151,7 +151,12 @@ export class ForwardPage implements OnInit {
|
|||||||
this.goBack();
|
this.goBack();
|
||||||
},
|
},
|
||||||
(error)=>{
|
(error)=>{
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest("Processo não delegado")
|
this.toastService._badRequest("Processo não delegado")
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,8 +352,12 @@ export class EditEventPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
|
|
||||||
}, error => {
|
}, error => {
|
||||||
if(error.status != 0)
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
|
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
|
||||||
@@ -376,8 +380,12 @@ export class EditEventPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
|
|
||||||
}, error => {
|
}, error => {
|
||||||
if(error.status != 0)
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -447,8 +447,9 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if(error.status == 0) {
|
if(error.status == 0) {
|
||||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -274,8 +274,13 @@ export class DespachoPrPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise()
|
await this.processes.CompleteTask(body).toPromise()
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -299,8 +304,13 @@ export class DespachoPrPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise()
|
await this.processes.CompleteTask(body).toPromise()
|
||||||
this.toastService._successMessage('Processo arquivado')
|
this.toastService._successMessage('Processo arquivado')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não arquivado')
|
this.toastService._badRequest('Processo não arquivado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -321,8 +331,13 @@ export class DespachoPrPage implements OnInit {
|
|||||||
|
|
||||||
this.toastService._successMessage('Processo criado')
|
this.toastService._successMessage('Processo criado')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não criado')
|
this.toastService._badRequest('Processo não criado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -346,8 +361,13 @@ export class DespachoPrPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise()
|
await this.processes.CompleteTask(body).toPromise()
|
||||||
this.toastService._successMessage('')
|
this.toastService._successMessage('')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -371,8 +391,13 @@ export class DespachoPrPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise()
|
await this.processes.CompleteTask(body).toPromise()
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -390,9 +415,14 @@ export class DespachoPrPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo enviado para pendentes')
|
this.toastService._successMessage('Processo enviado para pendentes')
|
||||||
this.goBack()
|
this.goBack()
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}, () => {
|
}, (error) => {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -279,8 +279,13 @@ export class DespachoPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo criado')
|
this.toastService._successMessage('Processo criado')
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest("Processo não criado")
|
this.toastService._badRequest("Processo não criado")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -295,8 +300,13 @@ export class DespachoPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo descartado')
|
this.toastService._successMessage('Processo descartado')
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest("Processo não descartado")
|
this.toastService._badRequest("Processo não descartado")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -322,8 +332,13 @@ export class DespachoPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -348,7 +363,12 @@ export class DespachoPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -110,7 +110,12 @@ export class DiplomaAssinarPage implements OnInit {
|
|||||||
|
|
||||||
}, (error)=>{
|
}, (error)=>{
|
||||||
try {
|
try {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
@@ -176,8 +181,13 @@ export class DiplomaAssinarPage implements OnInit {
|
|||||||
this.goBack();
|
this.goBack();
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,12 @@ export class DiplomasGerarPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -314,8 +319,13 @@ export class DiplomasGerarPage implements OnInit {
|
|||||||
this.goBack();
|
this.goBack();
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,8 +162,13 @@ export class DiplomaPage implements OnInit {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}
|
}
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -286,8 +291,13 @@ export class DiplomaPage implements OnInit {
|
|||||||
})
|
})
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -309,8 +319,13 @@ export class DiplomaPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise()
|
await this.processes.CompleteTask(body).toPromise()
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -335,8 +350,13 @@ export class DiplomaPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise();
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
this.toastService._successMessage('Processo concluído')
|
this.toastService._successMessage('Processo concluído')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -107,8 +107,13 @@ export class ApproveEventModalPage implements OnInit {
|
|||||||
})
|
})
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Evento não aprovado')
|
this.toastService._badRequest('Evento não aprovado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -134,8 +139,13 @@ export class ApproveEventModalPage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Evento não rejeitado')
|
this.toastService._badRequest('Evento não rejeitado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -198,7 +208,12 @@ export class ApproveEventModalPage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|||||||
@@ -218,8 +218,13 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.goBack();
|
this.goBack();
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -264,7 +269,12 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.toastService._successMessage('Pedido enviado');
|
this.toastService._successMessage('Pedido enviado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -285,8 +295,13 @@ export class ApproveEventPage implements OnInit {
|
|||||||
await this.toastService._successMessage('Processo rejeitado');
|
await this.toastService._successMessage('Processo rejeitado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -365,7 +380,12 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -319,8 +319,13 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
this.toastService._successMessage('Reunião criada');
|
this.toastService._successMessage('Reunião criada');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Reunião não criada')
|
this.toastService._badRequest('Reunião não criada')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -339,7 +344,12 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
this.toastService._successMessage('Reunião criada');
|
this.toastService._successMessage('Reunião criada');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-6
@@ -321,8 +321,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if(error.status == 0) {
|
if(error.status == 0) {
|
||||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await this.toastService._badRequest('Processo não efetuado')
|
await this.toastService._badRequest('Processo não efetuado')
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -359,8 +360,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if(error.status == 0) {
|
if(error.status == 0) {
|
||||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await this.toastService._badRequest('Processo não efetuado')
|
await this.toastService._badRequest('Processo não efetuado')
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -394,8 +396,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
this.modalController.dismiss(action_deferimento);
|
this.modalController.dismiss(action_deferimento);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if(error.status == 0) {
|
if(error.status == 0) {
|
||||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await this.toastService._badRequest('Processo não efetuado')
|
await this.toastService._badRequest('Processo não efetuado')
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -435,10 +438,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
await this.toastService._successMessage('Processo efetuado');
|
await this.toastService._successMessage('Processo efetuado');
|
||||||
this.modalController.dismiss(action_despacho_pr);
|
this.modalController.dismiss(action_despacho_pr);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
if(error.status == 0) {
|
if(error.status == 0) {
|
||||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await this.toastService._badRequest('Processo não efetuado')
|
await this.toastService._badRequest('Processo não efetuado')
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -478,8 +481,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
this.modalController.dismiss(action_parecer_pr);
|
this.modalController.dismiss(action_parecer_pr);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if(error.status == 0) {
|
if(error.status == 0) {
|
||||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await this.toastService._badRequest('Processo não efetuado')
|
await this.toastService._badRequest('Processo não efetuado')
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
+46
-1
@@ -244,7 +244,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage('Processo aprovado')
|
this.toastService._successMessage('Processo aprovado')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não aprovado')
|
this.toastService._badRequest('Processo não aprovado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -269,7 +274,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -336,7 +346,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,8 +408,13 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}
|
}
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -484,9 +504,14 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
loader.remove()
|
loader.remove()
|
||||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch(e) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -521,7 +546,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise();
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -555,7 +585,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo descartado');
|
this.toastService._successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -574,7 +609,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
//this.toastService._successMessage('Processo descartado');
|
//this.toastService._successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -588,7 +628,12 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,12 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
},
|
},
|
||||||
(error)=>{
|
(error)=>{
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +314,12 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage('Processo aprovado')
|
this.toastService._successMessage('Processo aprovado')
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não aprovado')
|
this.toastService._badRequest('Processo não aprovado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -334,7 +344,12 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -455,7 +470,12 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo descartado');
|
this.toastService._successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -492,7 +512,12 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,8 +183,13 @@ export class PedidoPage implements OnInit {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}
|
}
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -374,7 +379,12 @@ export class PedidoPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -394,7 +404,12 @@ export class PedidoPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -419,7 +434,12 @@ export class PedidoPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -431,9 +451,14 @@ export class PedidoPage implements OnInit {
|
|||||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res => {
|
this.processes.SetTaskToPending(this.serialnumber).subscribe(res => {
|
||||||
this.goBack();
|
this.goBack();
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}, () => {
|
}, (error) => {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,12 @@ export class EditActionPage implements OnInit {
|
|||||||
this.updateDesktopComponent.emit();
|
this.updateDesktopComponent.emit();
|
||||||
this.toastService._successMessage('Acção presidencial atualizada')
|
this.toastService._successMessage('Acção presidencial atualizada')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,9 +255,14 @@ export class PublicationsPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
await this.publications.DeletePresidentialAction(id).toPromise();
|
await this.publications.DeletePresidentialAction(id).toPromise();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.refreshing()
|
this.refreshing()
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ServerConnectionService } from './server-connection.service';
|
||||||
|
|
||||||
|
describe('ServerConnectionService', () => {
|
||||||
|
let service: ServerConnectionService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(ServerConnectionService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class ServerConnectionService {
|
||||||
|
|
||||||
|
constructor(private http: HttpClient,) { }
|
||||||
|
|
||||||
|
async BaseAPI(): Promise<boolean> {
|
||||||
|
try {
|
||||||
|
await this.http.get(environment.apiURL)
|
||||||
|
return true
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -192,7 +192,12 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.toastService._successMessage('Evento enviado para revisão');
|
this.toastService._successMessage('Evento enviado para revisão');
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -415,7 +415,12 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goToApproveEventList();
|
this.goToApproveEventList();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<ion-label class="title">Novo Evento</ion-label>
|
<ion-label class="title">Novo Evento"</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ion-progress-bar class="calendar-progress-bar" type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
<ion-progress-bar class="calendar-progress-bar" type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import { FormGroup, Validators } from '@angular/forms';
|
|||||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
||||||
|
import { ServerConnectionService } from 'src/app/services/server-connection.service';
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
@@ -129,6 +130,7 @@ export class NewEventPage implements OnInit {
|
|||||||
private dateAdapter: DateAdapter<any>,
|
private dateAdapter: DateAdapter<any>,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private chatMethodService: ChatMethodsService,
|
private chatMethodService: ChatMethodsService,
|
||||||
|
private ServerConnectionService: ServerConnectionService
|
||||||
// private translate: TranslateService
|
// private translate: TranslateService
|
||||||
) {
|
) {
|
||||||
this.dateAdapter.setLocale('pt');
|
this.dateAdapter.setLocale('pt');
|
||||||
@@ -529,9 +531,15 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
console.log(error, 'error')
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.showLoader = false
|
this.showLoader = false
|
||||||
|
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest('Evento não criado')
|
this.toastService._badRequest('Evento não criado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -585,10 +593,19 @@ export class NewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.toastService._successMessage('Evento criado')
|
this.toastService._successMessage('Evento criado')
|
||||||
},()=>{
|
},(error) => {
|
||||||
|
|
||||||
|
//const connectionToServer = this.ServerConnectionService.BaseAPI()
|
||||||
|
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
this.toastService._badRequest('Evento não criado')
|
||||||
|
}
|
||||||
|
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.showLoader = false
|
this.showLoader = false
|
||||||
this.toastService._badRequest('Evento não criado')
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -641,10 +658,15 @@ export class NewEventPage implements OnInit {
|
|||||||
this.chatMethodService.sendMessage(this.roomId,data);
|
this.chatMethodService.sendMessage(this.roomId,data);
|
||||||
}
|
}
|
||||||
this.toastService._successMessage('Evento criado')
|
this.toastService._successMessage('Evento criado')
|
||||||
},()=>{
|
},(error)=>{
|
||||||
|
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.showLoader = false
|
this.showLoader = false
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest('Evento não criado')
|
this.toastService._badRequest('Evento não criado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,7 +312,12 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||||
this.toastService._successMessage('Evento editado');
|
this.toastService._successMessage('Evento editado');
|
||||||
}, error =>{
|
}, error =>{
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Evento não editado');
|
this.toastService._badRequest('Evento não editado');
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -322,14 +327,24 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
}, error =>{
|
}, error =>{
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else if(document['action'] == 'delete') {
|
} else if(document['action'] == 'delete') {
|
||||||
delete document.action
|
delete document.action
|
||||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
}, error =>{
|
}, error =>{
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,12 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -154,7 +159,12 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -180,7 +190,11 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -205,8 +219,13 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise();
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
this.toastService._successMessage('Processo concluído')
|
this.toastService._successMessage('Processo concluído')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,9 +78,14 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
loader.remove()
|
loader.remove()
|
||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
},()=>{
|
},(error)=>{
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,7 +178,12 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -254,7 +264,12 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo arquivado')
|
this.toastService._successMessage('Processo arquivado')
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não arquivado')
|
this.toastService._badRequest('Processo não arquivado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -281,7 +296,12 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -308,7 +328,12 @@ export class DespachosOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,10 +104,14 @@ export class DespachosPrOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.popoverController.dismiss('close')
|
this.popoverController.dismiss('close')
|
||||||
loader.remove()
|
loader.remove()
|
||||||
},()=>{
|
},(error)=>{
|
||||||
loader.remove()
|
loader.remove()
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +210,12 @@ export class DespachosPrOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -290,8 +299,13 @@ export class DespachosPrOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage('')
|
this.toastService._successMessage('')
|
||||||
this.close();
|
this.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,12 @@ export class DiplomasGerarOptionsPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack()
|
this.goBack()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,12 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -180,7 +185,12 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo descartado');
|
this.toastService._successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -199,7 +209,12 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
// this.toastService.successMessage('Processo descartado');
|
// this.toastService.successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado');
|
this.toastService._badRequest('Processo não descartado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -214,7 +229,12 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest();
|
this.toastService._badRequest();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -242,7 +262,12 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -255,9 +280,13 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.close();
|
this.close();
|
||||||
},()=>{
|
}, (error) => {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
loader.remove()
|
loader.remove()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -295,7 +324,11 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
// this.toastService.successMessage('Processo descartado');
|
// this.toastService.successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest('Processo não descartado');
|
this.toastService._badRequest('Processo não descartado');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,8 +170,13 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
|
|
||||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
},()=> {
|
}, (error) => {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
},()=> {
|
},()=> {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
});
|
});
|
||||||
@@ -248,7 +253,12 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -258,9 +268,13 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||||
this.goBack();
|
this.goBack();
|
||||||
},()=>{
|
},(error)=>{
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não encontrado')
|
this.toastService._badRequest('Processo não encontrado')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,7 +298,12 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage('Processo aprovado')
|
this.toastService._successMessage('Processo aprovado')
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não aprovado')
|
this.toastService._badRequest('Processo não aprovado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -340,7 +359,12 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
await this.processes.CompleteTask(body).toPromise();
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -375,7 +399,12 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo descartado');
|
this.toastService._successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -395,7 +424,12 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
this.toastService._successMessage('Processo descartado');
|
this.toastService._successMessage('Processo descartado');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não descartado')
|
this.toastService._badRequest('Processo não descartado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -410,7 +444,11 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
this.toastService._successMessage();
|
this.toastService._successMessage();
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,8 +191,13 @@ export class RequestOptionsPage implements OnInit {
|
|||||||
this.close();
|
this.close();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -260,7 +265,12 @@ export class RequestOptionsPage implements OnInit {
|
|||||||
|
|
||||||
this.toastService._successMessage('Processo arquivado')
|
this.toastService._successMessage('Processo arquivado')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Processo não arquivado')
|
this.toastService._badRequest('Processo não arquivado')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,11 @@ export class EditActionPage implements OnInit {
|
|||||||
this.getActions.emit()
|
this.getActions.emit()
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,12 @@ export class NewActionPage implements OnInit {
|
|||||||
|
|
||||||
this.getActions.emit()
|
this.getActions.emit()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
|
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,11 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -188,7 +192,11 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -216,7 +224,11 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
@@ -247,7 +259,11 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
this.goBackToViewPublications.emit();
|
this.goBackToViewPublications.emit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -90,7 +90,11 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
this.toastService._successMessage("Publicação eliminado")
|
this.toastService._successMessage("Publicação eliminado")
|
||||||
this.goBackToViewPublications.emit();
|
this.goBackToViewPublications.emit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
this.toastService._badRequest("Publicação não eliminado")
|
this.toastService._badRequest("Publicação não eliminado")
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
laoder.remove()
|
laoder.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
getpublication = [];
|
getpublication = [];
|
||||||
error: any;
|
error: any;
|
||||||
|
|
||||||
@Input() folderId: string;
|
@Input() folderId: any;
|
||||||
@Output() addNewPublication = new EventEmitter<any>();
|
@Output() addNewPublication = new EventEmitter<any>();
|
||||||
@Output() editPublication = new EventEmitter<any>();
|
@Output() editPublication = new EventEmitter<any>();
|
||||||
@Output() openPublicationDetails= new EventEmitter<any>();
|
@Output() openPublicationDetails= new EventEmitter<any>();
|
||||||
@@ -221,9 +221,14 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
|
if(error.status == 0) {
|
||||||
|
this.toastService._badRequest('sem conexão ao servidor')
|
||||||
|
} else {
|
||||||
|
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "0036ce6ab",
|
"shortSHA": "bcb7da422",
|
||||||
"SHA": "0036ce6ab20cb98b60cd6f86af434a2bffa15d13",
|
"SHA": "bcb7da42239be63e10e7f06c99de40e03fd7baa6",
|
||||||
"branch": "no_bug_movemente",
|
"branch": "no_bug_movemente",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Thu Feb 2 10:37:17 2023 +0100'",
|
"lastCommitTime": "'Thu Feb 2 17:14:23 2023 +0100'",
|
||||||
"lastCommitMessage": "fix loader",
|
"lastCommitMessage": "improve",
|
||||||
"lastCommitNumber": "4709",
|
"lastCommitNumber": "4710",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/modals/create-process/create-process.page.html\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/shared/popover/opts-expediente/opts-expediente.page.html\n\tmodified: src/app/shared/popover/opts-expediente/opts-expediente.page.ts\n\tmodified: src/app/shared/popover/searched-document-options/searched-document-options.page.html\n\tmodified: src/environments/environment.prod.ts\n\tnew file: www.rar",
|
"changeStatus": "On branch no_bug_movemente\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/modals/dar-parecer/dar-parecer.page.ts\n\tmodified: src/app/modals/delegar/delegar.page.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/modals/forward/forward.page.ts\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-gerar/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts\n\tmodified: src/app/pages/publications/edit-action/edit-action.page.ts\n\tmodified: src/app/pages/publications/publications.page.ts\n\tnew file: src/app/services/server-connection.service.spec.ts\n\tnew file: src/app/services/server-connection.service.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.html\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts\n\tmodified: src/app/shared/popover/deploma-options/deploma-options.page.ts\n\tmodified: src/app/shared/popover/despachos-options/despachos-options.page.ts\n\tmodified: src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts\n\tmodified: src/app/shared/popover/diplomas-gerar-options/diplomas-gerar-options.page.ts\n\tmodified: src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts\n\tmodified: src/app/shared/popover/opts-expediente/opts-expediente.page.ts\n\tmodified: src/app/shared/popover/request-options/request-options.page.ts\n\tmodified: src/app/shared/publication/edit-action/edit-action.page.ts\n\tmodified: src/app/shared/publication/new-action/new-action.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts\n\tmodified: version/git-version.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user