Improve generic components

This commit is contained in:
2021-02-24 10:08:50 +01:00
parent 7f5a698b20
commit 2336e6b83f
6 changed files with 59 additions and 29 deletions
+1 -2
View File
@@ -287,7 +287,7 @@
<!-- New --> <!-- New -->
<app-new-event *ngIf="mobileComponent.showAddNewEvent" <app-new-event *ngIf="mobileComponent.showAddNewEvent"
style="height: 100%;display: flex;flex-wrap: wrap;"
[profile]="profile" [profile]="profile"
[selectedSegment]=segment [selectedSegment]=segment
@@ -297,7 +297,6 @@
></app-new-event> ></app-new-event>
<!-- Edit --> <!-- Edit -->
<app-edit-event *ngIf="mobileComponent.showEditEvent" <app-edit-event *ngIf="mobileComponent.showEditEvent"
style="height: 100%;display: flex;flex-wrap: wrap;"
[profile]="profile" [profile]="profile"
[selectedSegment]="segment" [selectedSegment]="segment"
+24
View File
@@ -544,3 +544,27 @@ td.monthview-primary-with-event {
display: block; display: block;
} }
} }
app-view-event{
height: 100%;
display: flex;
flex-wrap: wrap-reverse;
flex-direction: column;
}
app-edit-even{
height: 100%;
display: flex;
flex-wrap: wrap;
}
app-new-event{
height: 100%;
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
+3
View File
@@ -629,6 +629,7 @@ export class AgendaPage implements OnInit {
openAddEventDismiss(data){ openAddEventDismiss(data){
this.cloneAllmobileComponent(); this.cloneAllmobileComponent();
if(data.type == 'save'){
let postEvent: Event = data; let postEvent: Event = data;
if (postEvent.Subject != null) if (postEvent.Subject != null)
{ {
@@ -646,6 +647,8 @@ export class AgendaPage implements OnInit {
this.mobileComponent.showAddNewEvent = false; this.mobileComponent.showAddNewEvent = false;
} }
}
async viewEventDetail(eventId:any) { async viewEventDetail(eventId:any) {
console.log(this.profile); console.log(this.profile);
@@ -3,7 +3,7 @@
<div class="main-header"> <div class="main-header">
<div class="title-content"> <div class="title-content">
<div class="middle"> <div class="middle">
<ion-label class="title">Novo Evento1</ion-label> <ion-label class="title">Novo Evento</ion-label>
</div> </div>
</div> </div>
</div> </div>
@@ -90,12 +90,12 @@ export class NewEventPage implements OnInit {
} }
} }
close(){ close(){
this.modalController.dismiss(); this.onAddEvent.emit({
type:'close',
data: this.postEvent
});
} }
save(){ save(){
console.log(this.postEvent);
console.log(this.profile);
if(this.profile=='mdgpr'){ if(this.profile=='mdgpr'){
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe(); this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
@@ -104,7 +104,10 @@ export class NewEventPage implements OnInit {
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe(); this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe();
} }
this.onAddEvent.emit(this.postEvent); this.onAddEvent.emit({
type:'save',
data: this.postEvent
});
} }
async openAttendees() async openAttendees()
@@ -1,4 +1,4 @@
<ion-header class="ion-no-border">
<ion-toolbar class="header-toolbar"> <ion-toolbar class="header-toolbar">
<div class="main-header"> <div class="main-header">
<div class="title-content"> <div class="title-content">
@@ -15,9 +15,9 @@
</div> </div>
</div> </div>
</ion-toolbar> </ion-toolbar>
</ion-header>
<ion-content>
<div class="main-content"> <div class="main-content">
<div class="upper-content"> <div class="upper-content">
<div class="content-location"> <div class="content-location">
@@ -67,3 +67,4 @@
</ion-list> </ion-list>
</div> </div>
</div> </div>
</ion-content>