mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
implementation of add + view event modals
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="title-content">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Ver Evento</ion-label>
|
||||
<ion-label class="title">{{loadedEvent.Subject}}</ion-label>
|
||||
</div>
|
||||
<div class="header-icon-right">
|
||||
<ion-icon slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
@@ -19,18 +19,18 @@
|
||||
<div class="upper-content">
|
||||
<div class="content-location">
|
||||
<div class="location-detail">
|
||||
<ion-label >Texto</ion-label>
|
||||
<ion-label >{{loadedEvent.Location}}</ion-label>
|
||||
</div>
|
||||
<div class="button-calendar-type">
|
||||
<ion-button class="button-calendar-type" slot="end">Texto</ion-button>
|
||||
<ion-button class="button-calendar-type" slot="end">{{loadedEvent.CalendarName}}</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p>Texto</p>
|
||||
<p>das Texto às Texto</p>
|
||||
<p >(Não se repete)</p>
|
||||
<p >Repete</p>
|
||||
<p>{{customDate}}</p>
|
||||
<p>das {{loadedEvent.StartDate | date: 'hh:mm'}} às {{loadedEvent.EndDate | date: 'hh:mm'}}</p>
|
||||
<p *ngIf="!loadedEvent.IsRecurring">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.IsRecurring">Repete</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,13 +38,15 @@
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<h3>Intervenientes</h3>
|
||||
<p>Texto</p>
|
||||
<div *ngFor="let attendee of loadedEvent.Attendees">
|
||||
<p>{{attendee.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<h3>Detalhes</h3>
|
||||
<p>Texto</p>
|
||||
<p>{{loadedEvent.Body.Text}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
@@ -53,9 +55,9 @@
|
||||
<ion-list>
|
||||
<h3>Documentos Anexados</h3>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<p class="attach-title-item">Receita por Natureza</p>
|
||||
<p><span class="span-left">Texto</span><span class="span-right"><!-- {{ task.CreateDate | date: 'dd-MM-yy' }} --></span></p>
|
||||
<ion-label *ngFor="let attach of loadedAttachments">
|
||||
<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>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -7,9 +14,61 @@ import { Component, OnInit } from '@angular/core';
|
||||
})
|
||||
export class ViewEventPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
loadedEvent: Event;
|
||||
eventBody: EventBody;
|
||||
loadedAttachments:any;
|
||||
loadedEventAttachments: Attachment[];
|
||||
pageId: string;
|
||||
showLoader: boolean;
|
||||
|
||||
minDate: Date;
|
||||
|
||||
profile:string;
|
||||
eventId:string;
|
||||
customDate:any;
|
||||
today:any;
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private eventsService: EventsService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
) {
|
||||
this.loadedEvent = new Event();
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.loadedEvent.Body = this.eventBody;
|
||||
this.eventId = this.navParams.get('eventId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
/* console.log(this.eventId); */
|
||||
this.loadEvent();
|
||||
this.getAttachments();
|
||||
|
||||
}
|
||||
|
||||
loadEvent(){
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
|
||||
console.log(res);
|
||||
|
||||
this.today = new Date(res.StartDate);
|
||||
console.log(new Date(this.today));
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
});
|
||||
}
|
||||
|
||||
getAttachments(){
|
||||
this.attachmentsService.getAttachmentsById(this.eventId).subscribe(res=>{
|
||||
this.loadedAttachments = res;
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user