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:
@@ -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