Improve save for edit and create event in agenda

This commit is contained in:
Peter Maquiran
2021-04-09 13:43:33 +01:00
parent e8ba2b6426
commit c5ef1f1cb6
5 changed files with 109 additions and 40 deletions
+1 -1
View File
@@ -58,7 +58,7 @@
<ion-icon class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
</button>
<button class="btn-no-color" (click)="clearContact();openAddEvent()">
<button class="btn-no-color" (click)="clearContact();openAddEvent();">
<ion-icon class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
</button>
+7 -7
View File
@@ -113,7 +113,7 @@ export class AgendaPage implements OnInit {
// this will make toggle add event and.
showEventEditOrOpen: "edit" | "add" | "" = ""
prEventList: Event[];
mdEventList: Event[]
mdEventList: Event[];
showLoader: boolean;
@@ -383,7 +383,7 @@ export class AgendaPage implements OnInit {
const profile_ = profile == 'md'? 'mdgpr': 'pr';
return `
<div class=" overflow-hidden timeline-box timeline-box-event-${eventIndex} timeline-${profile_}-box-${calendarName} calendar-top${top}">
<div class="overflow-hidden timeline-box timeline-box-event-${eventIndex} timeline-${profile_}-box-${calendarName} calendar-top${top}">
<div>
<span class="timeline-start-time">${startHours.toString().padStart(2, '0')}:${startMinutos.toString().padStart(2, '0')}</span><span class="timeline-location">${eventlocation}</span>
</div>
@@ -474,9 +474,9 @@ export class AgendaPage implements OnInit {
this.showTimelineFilterState = false;
if( profile =='md'){
/* if( profile =='md'){
console.log('eventsList: ', eventsList);
}
} */
eventsList.forEach((element, eventIndex) => {
@@ -491,6 +491,7 @@ export class AgendaPage implements OnInit {
console.log('mdEvent:', element,eventIndex);
}
// console.log( element.CalendarName);
events.push({
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName, element.Subject,startHoursOtherFormate,EndHoursOtherFormate, eventIndex, profile),
start: setHours(setMinutes(new Date(element.StartDate), 0), parseInt(startHours)),
@@ -834,7 +835,7 @@ export class AgendaPage implements OnInit {
}
async openAddEvent() {
await this.cloneAllmobileComponent();
this.showEventEditOrOpen = 'add';
@@ -1063,5 +1064,4 @@ export class AgendaPage implements OnInit {
this.postEvent = false;
}
}
}