mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -120,7 +120,7 @@ export class CreateProcessPage implements OnInit {
|
||||
NumberPDPP = this.fulltask.workflowInstanceDataFields.DispatchNumber
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let SourceId;
|
||||
let SourceType;
|
||||
let SourceSecFsId;
|
||||
@@ -230,7 +230,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.runValidation()
|
||||
if(this.Form.invalid) return false
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(this.postData.Priority=='99999861') {
|
||||
this.dispatchFolder.DeadlineType = 'Normal';
|
||||
@@ -279,15 +279,16 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
console.log(this.task.activityInstanceName);
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.despachoService.EfectuarDespacho({serialnumber: this.task.serialNumber}).toPromise();
|
||||
|
||||
await this.despachoService.EfectuarDespacho({serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
|
||||
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -307,12 +308,12 @@ export class CreateProcessPage implements OnInit {
|
||||
try {
|
||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||
await this.despachoService.createParecer(this.postData).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber}).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
} else {
|
||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
|
||||
}
|
||||
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Pedido de Parecer enviado');
|
||||
}
|
||||
@@ -340,7 +341,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Pedido de Deferimento criado');
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
@@ -368,7 +369,7 @@ export class CreateProcessPage implements OnInit {
|
||||
try {
|
||||
await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.despachoService.CompleteTask({serialNumber: this.task.serialNumber}).toPromise();
|
||||
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService.successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
@@ -393,7 +394,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||
await this.despachoService.createParecer(this.postData).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber}).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
} else {
|
||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
|
||||
@@ -442,7 +443,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
|
||||
async FinalizarDespacho(loader: HTMLDivElement, message?) {
|
||||
|
||||
|
||||
let body;
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' ||
|
||||
@@ -461,7 +462,7 @@ export class CreateProcessPage implements OnInit {
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho' ||
|
||||
this.task.activityInstanceName == 'Concluir Parecer' ||
|
||||
this.task.activityInstanceName =='Concluir Deferimento' ||
|
||||
this.task.activityInstanceName =='Reapreciar Deferimento' ||
|
||||
this.task.activityInstanceName =='Reapreciar Deferimento' ||
|
||||
this.task.activityInstanceName == 'Tarefa de Deferimento'
|
||||
) {
|
||||
|
||||
@@ -478,7 +479,7 @@ export class CreateProcessPage implements OnInit {
|
||||
} else {
|
||||
console.log('unexpected activityInstanceName', this.task)
|
||||
}
|
||||
|
||||
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user