fix chat and gabinete

This commit is contained in:
peter.maquiran
2025-10-16 16:09:35 +01:00
parent f79df96d48
commit 9e3c6db93a
15 changed files with 127 additions and 57 deletions
@@ -22,6 +22,7 @@ export class ViewDocumentPage implements OnInit {
docId: any
task: ExpedientTaskModalPageNavParamsTask;
Document: any
link: any;
loader = true
attachment: SearchList[] = [];
@@ -38,6 +39,7 @@ export class ViewDocumentPage implements OnInit {
this.Document = this.navParams.get('Document')
this.task = this.navParams.get('task')
this.attachment = this.navParams.get('attachment')
this.link = this.navParams.get('link')
if(!this.file.title) {
@@ -57,38 +59,35 @@ export class ViewDocumentPage implements OnInit {
ngOnInit() {
this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
if(this.link == undefined) {
this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
// const iframe = document.getElementById("iframe")
// const handleLoad = () => {
// this.loader = false
// };
// iframe.addEventListener('load', handleLoad, true)
if(res == "") {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
//header: 'Apagar evento!',
message: 'Sem imagem',
buttons: [
{
text: 'Sim',
handler: () => {
this.close();
if(res == "") {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
//header: 'Apagar evento!',
message: 'Sem imagem',
buttons: [
{
text: 'Sim',
handler: () => {
this.close();
}
}
}
]
});
}
}, ()=>{
this.close();
});
]
});
}
}, ()=>{
this.close();
});
} else {
//console.log(this.link);
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(this.link);
}
}