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