mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { NavParams } from '@ionic/angular';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
||||
|
||||
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AlertController, ModalController } from '@ionic/angular';
|
||||
@Component({
|
||||
selector: 'app-view-document',
|
||||
templateUrl: './view-document.page.html',
|
||||
@@ -27,6 +27,7 @@ export class ViewDocumentPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private sanitazer: DomSanitizer,
|
||||
private processes: ProcessesService,
|
||||
private alertController: AlertController,
|
||||
) {
|
||||
this.file = this.navParams.get('file');
|
||||
this.applicationId = this.navParams.get('applicationId');
|
||||
@@ -44,9 +45,27 @@ export class ViewDocumentPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> {
|
||||
const link: string = res;
|
||||
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);
|
||||
|
||||
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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user