mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix chat and gabinete
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user