fix viewer options

This commit is contained in:
tiago.kayaya
2021-10-11 09:28:54 +01:00
parent 1e34d58b2c
commit 3ce0361f21
9 changed files with 42 additions and 27 deletions
@@ -41,7 +41,9 @@ export class ViewDocumentPage implements OnInit {
if(!this.file.title) {
this.file.title = 'Sem Título'
}
console.log(this.task)
}
ngOnInit() {
@@ -72,13 +74,17 @@ export class ViewDocumentPage implements OnInit {
await modal.present();
modal.onDidDismiss().then((res)=>{
if(res.data.component == 'openBookMeetingModal') {
this.openBookMeetingModal()
} else if(res.data.component == 'openExpedientActionsModal') {
this.openExpedientActionsModal(res.data.taskAction)
} else {
console.log('component not found')
if(res.data) {
if(res.data.component == 'openBookMeetingModal') {
this.openBookMeetingModal()
} else if(res.data.component == 'openExpedientActionsModal') {
this.openExpedientActionsModal(res.data.taskAction)
} else {
console.log('component not found')
}
}
})
}
@@ -106,7 +112,7 @@ export class ViewDocumentPage implements OnInit {
}
// efetuar despacho
async openExpedientActionsModal( taskAction: any) {
let classs;
@@ -124,7 +124,7 @@ export class DespachoPrPage implements OnInit {
this.cc = users.filter(user=>{
return user.Type == 'CC';
}) || []
if(!this.cc) {
this.cc = []
}
@@ -160,12 +160,13 @@ export class DespachoPrPage implements OnInit {
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
openMenu() {
@@ -497,8 +498,8 @@ export class DespachoPrPage implements OnInit {
popover.onDidDismiss().then(( res =>{
if( res['data'] == 'close') {
this.goBack()
this.goBack()
}
}))
@@ -53,7 +53,7 @@ export class DespachoPage implements OnInit {
private despachoService: DespachoService,
private location: Location,
public p: PermissionService) {
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
@@ -113,7 +113,7 @@ export class DespachoPage implements OnInit {
async LoadTaskDetail(serial: string) {
this.processes.GetTask(serial).subscribe( (res: fullTask) => {
this.task = {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject,
@@ -162,6 +162,9 @@ export class DespachoPage implements OnInit {
async viewDocument(docId:string, Document) {
console.log(this.fulltask)
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
@@ -149,12 +149,13 @@ export class DiplomaAssinarPage implements OnInit {
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
getDocumentDetails(forlderId:string, applicationId:string) {
@@ -170,12 +170,13 @@ export class DiplomaPage implements OnInit {
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
getDocumentDetails(forlderId:string, applicationId:string) {
@@ -320,7 +320,8 @@ export class ExpedienteDetailPage implements OnInit {
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
@@ -210,12 +210,13 @@ export class ExpedientePrPage implements OnInit {
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
attachDocument() {
@@ -193,12 +193,13 @@ export class PedidoPage implements OnInit {
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
openMenu() {
@@ -224,7 +225,7 @@ export class PedidoPage implements OnInit {
popover.onDidDismiss().then(( res =>{
if( res['data'] == 'close') {
this.goBack()
this.goBack()
}
// alert(JSON.stringify(res)+' nada')
@@ -370,7 +371,7 @@ export class PedidoPage implements OnInit {
// }
// });
// }
async distartExpedientModal(){
console.log(this.fulltask);
const modal = await this.modalController.create({
@@ -5,7 +5,7 @@
</button>
</div>
<div class="buttons">
<button (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
<button hidden (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
<button (click)="addFile()" class="btn-ok" shape="round" >Anexar Documento</button>
<button hidden (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>