This commit is contained in:
Peter Maquiran
2021-07-17 11:07:01 +01:00
parent 6ef4dd6ab4
commit a1608fd70e
3 changed files with 45 additions and 43 deletions
@@ -253,7 +253,7 @@ export class CreateProcessPage implements OnInit {
try {
await this.processes.postDespatcho(this.postData).toPromise();
this.FinalizarDespacho(loader, 'Despacho criado');
await this.FinalizarDespacho(loader, 'Despacho criado');
} catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
@@ -272,7 +272,7 @@ export class CreateProcessPage implements OnInit {
try {
await this.processes.postParecer(this.postData).toPromise();
this.FinalizarParecer(loader, 'Pedido de Parecer enviado');
await this.FinalizarParecer(loader, 'Pedido de Parecer enviado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
@@ -292,7 +292,7 @@ export class CreateProcessPage implements OnInit {
try {
await this.processes.postDeferimento(this.postData).toPromise();
this.FinalizarDeferimento(loader, 'Pedido de deferimento enviado');
await this.FinalizarDeferimento(loader, 'Pedido de deferimento enviado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
@@ -305,47 +305,47 @@ export class CreateProcessPage implements OnInit {
case 'PR':
switch (this.taskType) {
case '0':
this.postData = {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log('this.postData', this.postData, this.taskType);
case '0':
this.postData = {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log('this.postData', this.postData, this.taskType);
try {
await this.processes.postDespatcho(this.postData).toPromise();
await this.executado(loader, 'Despacho criado');
} catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
try {
await this.processes.postDespatcho(this.postData).toPromise();
await this.executado(loader, 'Despacho criado');
} catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
break;
case '1':
this.postData = {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log(this.postData);
break;
case '1':
this.postData = {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
console.log(this.postData);
try {
await this.processes.postParecer(this.postData).toPromise();
await this.executado(loader);
this.toastService.successMessage('Pedido de Parecer criado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
try {
await this.processes.postParecer(this.postData).toPromise();
await this.executado(loader);
this.toastService.successMessage('Pedido de Parecer criado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
break;
case '2':
break;
case '2':
this.postData = {
DistributionType: "Paralelo",
CountryCode: 'AO',