mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
sace
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
<h3>Documentos Anexados</h3>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-label *ngFor="let attach of loadedAttachments"
|
||||
(click)="viewDocument()">
|
||||
(click)="viewDocument(attach.SourceId)">
|
||||
<p class="attach-title-item">{{attach.SourceName}}</p>
|
||||
<p><span class="span-left">{{attach.Stakeholders}}</span><span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yy' }}</span></p>
|
||||
</ion-label>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { EditEventPage } from 'src/app/pages/agenda/edit-event/edit-event.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -42,6 +43,7 @@ export class ViewEventPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
public alertController: AlertController,
|
||||
private iab: InAppBrowser,
|
||||
private processes: ProcessesService,
|
||||
)
|
||||
{
|
||||
this.isEventEdited = false;
|
||||
@@ -109,10 +111,15 @@ export class ViewEventPage implements OnInit {
|
||||
event: this.loadedEvent
|
||||
})
|
||||
}
|
||||
viewDocument(){
|
||||
const url: string = this.loadedAttachments.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
viewDocument(sourceId){
|
||||
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user