Fixe agenda create event list all attendees

This commit is contained in:
Peter Maquiran
2021-04-01 14:44:12 +01:00
parent e6c417ee3e
commit 81f9c3108f
2 changed files with 12 additions and 15 deletions
@@ -129,16 +129,18 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div (click)="openAttendees()" class="ion-input-class-no-height flex-grow-1">
<div class="ion-input-class-no-height flex-grow-1">
<div class="list-people">
<ion-item lines="none">
<ion-list>
<ion-label class="list-people-title">Adicionar participantes</ion-label>
<ion-label hidden >Text</ion-label>
<ion-label *ngIf="!eventAttendees" class="list-people-title">Adicionar intervenientes</ion-label>
<ion-label *ngFor="let participant of eventAttendees">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
</div>
<div class="add-people">
<div class="add-people" (click)="openAttendees()">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
@@ -3,7 +3,6 @@ import { EventBody } from 'src/app/models/eventbody.model';
import { EventPerson } from 'src/app/models/eventperson.model';
import { EventsService } from 'src/app/services/events.service';
import { Event } from 'src/app/models/event.model';
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
import { ModalController } from '@ionic/angular';
@Component({
@@ -34,12 +33,7 @@ export class NewEventPage implements OnInit {
constructor(
private modalController: ModalController,
private eventService: EventsService,
) {
}
) {}
ngOnInit() {
@@ -49,7 +43,7 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
console.log(this.profile);
/* console.log(this.profile); */
let selectedStartdDate = this.selectedDate;
let selectedEndDate = new Date(this.selectedDate);
@@ -114,7 +108,9 @@ export class NewEventPage implements OnInit {
}
save(){
this.postEvent.Attendees = this.eventAttendees;
if(this.profile=='mdgpr'){
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
}
@@ -128,8 +124,7 @@ export class NewEventPage implements OnInit {
this.GoBackEditOrAdd.emit();
}
async openAttendees(data: any)
{
async openAttendees(){
this.saveTemporaryData();
this.openAttendeesComponent.emit();