mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Improve
This commit is contained in:
@@ -107,9 +107,9 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -154,9 +154,9 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -180,9 +180,9 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -205,9 +205,9 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('Processo concluído')
|
||||
this.toastService._successMessage('Processo concluído')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -74,12 +74,12 @@ export class DespachosOptionsPage implements OnInit {
|
||||
sendExpedienteToPending(){
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
console.log(res);
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -244,10 +244,10 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não arquivado')
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -272,9 +272,9 @@ export class DespachosOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -298,10 +298,10 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.popoverController.dismiss('close')
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -192,10 +192,10 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -275,10 +275,10 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('')
|
||||
this.toastService._successMessage('')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -142,9 +142,9 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -179,10 +179,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(otherbody).toPromise()
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -201,7 +201,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado');
|
||||
this.toastService._badRequest('Processo não descartado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -213,10 +213,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService.successMessage();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest();
|
||||
this.toastService._badRequest();
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -242,9 +242,9 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -258,7 +258,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado');
|
||||
this.toastService._badRequest('Processo não descartado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ export class OptsExpedientePage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
},()=> {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
},()=> {
|
||||
loader.remove()
|
||||
});
|
||||
@@ -239,9 +239,9 @@ export class OptsExpedientePage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -253,7 +253,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
this.goBack();
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -275,9 +275,9 @@ export class OptsExpedientePage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService.successMessage('Processo aprovado')
|
||||
this.toastService._successMessage('Processo aprovado')
|
||||
} catch(error) {
|
||||
this.toastService.badRequest('Processo não aprovado')
|
||||
this.toastService._badRequest('Processo não aprovado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -333,7 +333,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -365,10 +365,10 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.expedienteService.discard({SerialNumber: this.task.SerialNumber}).toPromise()
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -385,10 +385,10 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -400,10 +400,10 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService.successMessage();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -80,11 +80,11 @@ export class RequestOptionsPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
|
||||
}
|
||||
@@ -157,9 +157,9 @@ export class RequestOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -226,9 +226,9 @@ export class RequestOptionsPage implements OnInit {
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não arquivado')
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user