This commit is contained in:
Peter Maquiran
2021-04-06 11:56:04 +01:00
29 changed files with 372 additions and 297 deletions
@@ -47,6 +47,7 @@
</ion-label>
</div>
</div>
<div class="line"></div>
<div class="middle-content">
<div *ngIf="loadedEvent.Attendees">
<h5>Intervenientes</h5>
@@ -58,18 +59,20 @@
</ion-label>
</ion-item>
</div>
<div *ngIf="loadedEvent.Body.Text">
<h5>Detalhes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<p [innerHTML]="loadedEvent.Body.Text"></p>
<textarea disabled class="width-100" [innerHTML]="loadedEvent.Body.Text" rows="6"></textarea>
</ion-item>
</div>
</div>
<div *ngIf="loadedAttachments" class="bottom-content">
<div *ngIf="loadedAttachments" class="bottom-content width-100">
<ion-list>
<h3>Documentos Anexados</h3>
<h5>Documentos Anexados</h5>
<ion-item 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>
@@ -151,6 +151,10 @@ ion-menu{
font-size: 16px;
}
}
.line{
margin-top: 15px;
border-top: 1px solid #d8d8d8;
}
.middle-conten{
.middle-content h3, .middle-content p{
font-size: 16px;
@@ -158,7 +162,6 @@ ion-menu{
}
.bottom-content{
width: 360px;
margin: 0 auto;
.bottom-content h3{
@@ -230,4 +233,8 @@ ion-menu{
margin: 0 auto !important;
margin-bottom: 10px !important;
}
}
textarea{
border:none;
--background:#fff !important;
}
@@ -8,7 +8,7 @@ import { EventsService } from 'src/app/services/events.service';
import { Event } from '../../../models/event.model';
import { EditEventPage } from '../edit-event/edit-event.page';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { EventEditPage } from '../../events/edit-event/edit-event.component';
import { ProcessesService } from 'src/app/services/processes.service';
@Component({
selector: 'app-view-event',
@@ -43,6 +43,7 @@ export class ViewEventPage implements OnInit {
private attachmentsService: AttachmentsService,
public alertController: AlertController,
private iab: InAppBrowser,
private processes: ProcessesService,
)
{
this.profile = this.navParams.get('profile');
@@ -116,7 +117,7 @@ export class ViewEventPage implements OnInit {
}
const modal = await this.modalController.create({
component: EventEditPage,
component: EditEventPage,
componentProps: {
eventId: this.loadedEvent.EventId,
profile: this.profile,
@@ -157,10 +158,14 @@ export class ViewEventPage implements OnInit {
});
}
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();
});
}
}