mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
+10
-12
@@ -40,7 +40,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
private router: Router,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
@@ -64,7 +64,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
"diplomasassinar": true,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
@@ -74,9 +74,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
component: DeplomaOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask,
|
||||
taskAction:taskAction,
|
||||
serialNumber: this.task.SerialNumber,
|
||||
showEnviarPendentes: false
|
||||
},
|
||||
translucent: true
|
||||
@@ -105,7 +103,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
this.fulltask = res;
|
||||
console.log(this.task);
|
||||
|
||||
|
||||
console.log('GetTask', res);
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
@@ -119,7 +117,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
console.log(users);
|
||||
|
||||
|
||||
});
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
|
||||
@@ -148,7 +146,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getDocumentDetails(forlderId:string, applicationId:string) {
|
||||
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
|
||||
this.attachments = res.Documents;
|
||||
@@ -158,8 +156,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
async Assinar(){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Assinado",
|
||||
"ActionTypeId": 99999842,
|
||||
"dataFields": {
|
||||
@@ -172,7 +170,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
|
||||
this.toastService.successMessage(false, ()=>{
|
||||
this.goBack();
|
||||
})
|
||||
@@ -182,7 +180,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,11 +5,16 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<!-- <div class="buttons">
|
||||
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura</button>
|
||||
<button (click)="openAddNoteModal('Solicitar alteração')" class="btn-cancel" shape="round" >Solicitar alteração</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
</div> -->
|
||||
|
||||
<div class="buttons">
|
||||
<button (click)="Assinar()" class="btn-cancel" shape="round" >Assinado</button>
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -28,7 +28,7 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
private processes: ProcessesService,
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService,
|
||||
private router: Router,) {
|
||||
private router: Router,) {
|
||||
this.serialnumber = this.navParams.get('serialNumber');
|
||||
}
|
||||
|
||||
@@ -36,8 +36,41 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
console.log(this.serialnumber);
|
||||
}
|
||||
|
||||
async Assinar(){
|
||||
this.popoverController.dismiss();
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let body = {
|
||||
"action": "Assinado",
|
||||
"serialNumber": this.serialnumber,
|
||||
"ActionTypeId": 99999842,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList": [],
|
||||
}
|
||||
|
||||
console.log(body);
|
||||
|
||||
|
||||
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();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -52,25 +85,27 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if(res.data){
|
||||
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
this.Assinar();
|
||||
|
||||
|
||||
if(actionName == 'Solicitar assinatura'){
|
||||
await this.askSignature(res.data.note, docs);
|
||||
@@ -82,11 +117,11 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} */
|
||||
|
||||
async askToChange(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
/* async askToChange(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999841,
|
||||
"dataFields": {
|
||||
@@ -96,7 +131,7 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
@@ -131,8 +166,8 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async askSignature(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 99999840,
|
||||
"dataFields": {
|
||||
@@ -152,16 +187,15 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
|
||||
goBack() {
|
||||
this.close();
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
close(){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user