mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
web notification config
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attachments',
|
||||
templateUrl: './attachments.page.html',
|
||||
styleUrls: ['./attachments.page.scss'],
|
||||
})
|
||||
export class AttachmentsPage implements OnInit {
|
||||
|
||||
loadedEventAttachments: Attachment[];
|
||||
pageId: string;
|
||||
|
||||
constructor(
|
||||
private attachamentsService: AttachmentsService,
|
||||
private iab: InAppBrowser,
|
||||
private modalCtrl: ModalController,
|
||||
private navParams: NavParams) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.loadAttachments(this.navParams.get('eventId'));
|
||||
}
|
||||
|
||||
loadAttachments(eventid:string)
|
||||
{
|
||||
this.attachamentsService.getAttachmentsById(eventid).subscribe(attachments => {
|
||||
this.loadedEventAttachments = attachments;
|
||||
this.pageId = eventid;
|
||||
});
|
||||
}
|
||||
|
||||
async viewDocument(documenturl:string)
|
||||
{
|
||||
const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
}
|
||||
close(){
|
||||
this.modalCtrl.dismiss(null);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user