-
-
-
+
-
-
diff --git a/src/app/shared/popover/deploma-options/deploma-options.page.ts b/src/app/shared/popover/deploma-options/deploma-options.page.ts
index 6b808b6e1..362b7cea9 100644
--- a/src/app/shared/popover/deploma-options/deploma-options.page.ts
+++ b/src/app/shared/popover/deploma-options/deploma-options.page.ts
@@ -40,36 +40,6 @@ export class DeplomaOptionsPage implements OnInit {
console.log(this.serialnumber);
}
- async Assinar() {
- this.popoverController.dismiss();
-
- let body = {
- "action": "Assinado",
- "serialNumber": this.serialnumber,
- "ActionTypeId": 99999842,
- "dataFields": {
- "ReviewUserComment": '',
- },
- "AttachmentList": [],
- }
-
- const loader = this.toastService.loading()
-
- try {
- await this.processes.CompleteTask(body).toPromise()
-
- this.toastService.successMessage(false, ()=>{
- this.goBack();
- })
- } catch (error) {
- this.toastService.badRequest()
- }
- finally {
- loader.remove()
- }
-
- }
-
async openAddNoteModal(actionName:string) {
this.popoverController.dismiss();
@@ -105,16 +75,15 @@ export class DeplomaOptionsPage implements OnInit {
Attachments: DocumentToSave,
}
- this.Assinar();
-
-
- if(actionName == 'Solicitar assinatura'){
+ if(actionName == 'Solicitar assinatura') {
await this.askSignature(res.data.note, docs);
this.goBack();
- }
- else if(actionName == 'Solicitar alteração'){
+ } else if(actionName == 'Solicitar alteração') {
await this.askToChange(res.data.note, docs);
this.goBack();
+ } else if (actionName == 'Assinar Diploma') {
+ await this.sign(res.data.note, docs);
+ this.goBack();
}
}
});
@@ -166,6 +135,7 @@ export class DeplomaOptionsPage implements OnInit {
modal.onDidDismiss();
}
+
async askSignature(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
@@ -192,6 +162,31 @@ export class DeplomaOptionsPage implements OnInit {
}
+ async sign(note:string, documents:any) {
+ let body = {
+ "serialNumber": this.serialnumber,
+ "action": "Assinado",
+ "ActionTypeId": 99999842,
+ "dataFields": {
+ "ReviewUserComment": note,
+ },
+ "AttachmentList" :documents,
+ }
+
+ const loader = this.toastService.loading()
+
+ try {
+ await this.processes.CompleteTask(body).toPromise()
+ this.close();
+ this.toastService.successMessage()
+ } catch (error) {
+ this.toastService.badRequest()
+ } finally {
+ loader.remove()
+ }
+ }
+
+
goBack() {
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
}
-
+
- {{ task.Folio }}
-
-
+ *ngFor = "let task of expedienteStorage.list"
+ (click)="goToExpediente(task.SerialNumber)"
+ >
+
+
+
+
+
+ {{ task.Folio }}
-
-
-
- {{task.Senders}}
-
-
-
+
- {{task.activityInstanceName}}
-
-
- {{ task.CreateDate | date: 'dd-MM-yy' }}
-
+
+
-
-
+ {{task.Senders}}
+
+
+
+ {{task.activityInstanceName}}
+
+
+ {{ task.CreateDate | date: 'dd-MM-yy' }}
+
+
- {{ attach.CreateDate | date: 'dd-MM-yy' }}
+ {{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }}