mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge
This commit is contained in:
@@ -107,7 +107,12 @@ export class DeplomaOptionsPage 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()
|
||||
}
|
||||
@@ -154,7 +159,12 @@ export class DeplomaOptionsPage 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()
|
||||
}
|
||||
@@ -180,7 +190,11 @@ export class DeplomaOptionsPage 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()
|
||||
}
|
||||
@@ -205,7 +219,12 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService._successMessage('Processo concluído')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -78,9 +78,14 @@ export class DespachosOptionsPage implements OnInit {
|
||||
loader.remove()
|
||||
|
||||
this.close();
|
||||
},()=>{
|
||||
},(error)=>{
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -173,7 +178,12 @@ export class DespachosOptionsPage 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()
|
||||
}
|
||||
@@ -254,7 +264,12 @@ export class DespachosOptionsPage implements OnInit {
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -281,7 +296,12 @@ export class DespachosOptionsPage 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()
|
||||
}
|
||||
@@ -308,7 +328,12 @@ export class DespachosOptionsPage 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()
|
||||
}
|
||||
|
||||
@@ -104,10 +104,14 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
this.toastService._successMessage()
|
||||
this.popoverController.dismiss('close')
|
||||
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')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -206,7 +210,12 @@ export class DespachosPrOptionsPage 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()
|
||||
}
|
||||
@@ -290,7 +299,12 @@ export class DespachosPrOptionsPage 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()
|
||||
|
||||
@@ -92,7 +92,12 @@ export class DiplomasGerarOptionsPage 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()
|
||||
}
|
||||
|
||||
@@ -142,7 +142,12 @@ export class OptsExpedientePrPage 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()
|
||||
}
|
||||
@@ -180,7 +185,12 @@ export class OptsExpedientePrPage 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()
|
||||
}
|
||||
@@ -199,7 +209,12 @@ export class OptsExpedientePrPage 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()
|
||||
}
|
||||
@@ -214,7 +229,12 @@ export class OptsExpedientePrPage 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()
|
||||
}
|
||||
@@ -242,7 +262,12 @@ export class OptsExpedientePrPage 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()
|
||||
}
|
||||
@@ -255,9 +280,13 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
loader.remove()
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}, (error) => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
@@ -295,7 +324,11 @@ export class OptsExpedientePrPage 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()
|
||||
}
|
||||
|
||||
@@ -170,8 +170,13 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||
this.toastService._successMessage()
|
||||
},()=> {
|
||||
this.toastService._badRequest()
|
||||
}, (error) => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
},()=> {
|
||||
loader.remove()
|
||||
});
|
||||
@@ -248,7 +253,12 @@ export class OptsExpedientePage 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()
|
||||
}
|
||||
@@ -258,9 +268,13 @@ export class OptsExpedientePage implements OnInit {
|
||||
this.close();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.goBack();
|
||||
},()=>{
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
},(error)=>{
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -284,7 +298,12 @@ export class OptsExpedientePage 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()
|
||||
}
|
||||
@@ -340,7 +359,12 @@ export class OptsExpedientePage 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()
|
||||
}
|
||||
@@ -375,7 +399,12 @@ export class OptsExpedientePage 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()
|
||||
}
|
||||
@@ -395,7 +424,12 @@ export class OptsExpedientePage implements OnInit {
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -409,8 +443,12 @@ export class OptsExpedientePage implements OnInit {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -191,7 +191,12 @@ export class RequestOptionsPage 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()
|
||||
@@ -260,7 +265,12 @@ export class RequestOptionsPage implements OnInit {
|
||||
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user