mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Improve
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user