This commit is contained in:
Tiago Kayaya
2020-09-07 13:47:47 +01:00
parent 734a78d157
commit 4f13579654
3 changed files with 19 additions and 7 deletions
@@ -97,7 +97,7 @@
<div *ngIf="j<2">
<ion-list *ngIf="loadedEvent.HasAttachments">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-item lines="none">
<ion-item lines="none" (click)="viewDocument(att.Link)">
<ion-icon name="attach" slot="start"></ion-icon>
<ion-label>
<p>{{ att.Description }}</p>
@@ -111,7 +111,7 @@
<ion-label color="secondary">Ver mais...</ion-label>
</ion-button>
</div>
</div>
</div>
<!-- Skeleton Attachment -->
<ion-list *ngIf="!loadedEventAttachments">
<ion-item lines="none" >
@@ -11,6 +11,7 @@ import { AlertService } from 'src/app/services/alert.service';
import { Attachment } from 'src/app/models/attachment.model';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Component({
@@ -31,11 +32,15 @@ export class EventDetailPage implements OnInit {
minDate: Date;
constructor(public formBuilder: FormBuilder, public alertController: AlertController,
private router: Router, private activatedRoute: ActivatedRoute,
private eventsService: EventsService, private modalCtrl: ModalController,
constructor(public formBuilder: FormBuilder,
public alertController: AlertController,
private router: Router,
private activatedRoute: ActivatedRoute,
private eventsService: EventsService,
private modalCtrl: ModalController,
private alertService: AlertService,
private attachamentsService: AttachmentsService) {
private attachamentsService: AttachmentsService,
private iab: InAppBrowser) {
this.loadedEvent = new Event();
this.loadedEvent.Body = new EventBody();
}
@@ -180,7 +185,12 @@ export class EventDetailPage implements OnInit {
this.loadedEventAttachments = attachments;
});
}
async viewDocument(documenturl:string)
{
const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
}
+2
View File
@@ -13,6 +13,8 @@
<meta name="msapplication-tap-highlight" content="no" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.png" />
<!-- add to homescreen for ios -->