Add calendar profile

This commit is contained in:
2021-02-01 13:01:56 +01:00
parent dce4afd4da
commit 55b1646d8c
5 changed files with 41 additions and 7 deletions
+4 -1
View File
@@ -35,7 +35,10 @@
</ion-row>
<ion-row class="ion-align-items-center">
<ion-icon class="right-icons" (click)="changeProfile()" name="add-circle-outline"></ion-icon>
<div class="arrow">
<ion-icon *ngIf="profile == 'mdgpr' " (click)="changeProfile()" class="right-icons" slot="icon-only"src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
<ion-icon *ngIf="profile == 'pr' " (click)="changeProfile()" class="right-icons" slot="icon-only"src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</div>
<ion-icon class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon class="right-icons" src="assets/images/icons-add-new-event.svg" (click)="openCalModal()" ></ion-icon>
</ion-row>
+25 -4
View File
@@ -211,7 +211,6 @@ export class AgendaPage implements OnInit {
} else {
return 'calendar-event-type-'+(Object.keys(eventType))[0];
}
}
return "";
@@ -235,7 +234,6 @@ export class AgendaPage implements OnInit {
this.timelineDate = formatDate(ev,'dd MMMM yyyy', 'pt');
this.viewDate = new Date(formatDate(ev,'yyyy-MM-dd', 'pt'));
// calendar change date
console.log('!!this!!')
this.eventSelectedDate = new Date(ev);
};
@@ -255,7 +253,6 @@ export class AgendaPage implements OnInit {
onRangeChanged (ev: { startTime: Date, endTime: Date }) {
this.rangeStartDate = ev.startTime;
this.rangeEndDate = ev.endTime;
console.log('!!!')
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
};
@@ -338,6 +335,7 @@ export class AgendaPage implements OnInit {
calendarName: element.CalendarName
});
// timeline start
const startHours = formatDate(new Date(element.StartDate), 'HH', 'pt');
const EndHours = formatDate(new Date(element.EndDate), 'HH', 'pt');
@@ -351,6 +349,7 @@ export class AgendaPage implements OnInit {
},
id: element.EventId
});
// timeline end
});
@@ -373,12 +372,34 @@ export class AgendaPage implements OnInit {
startTime: new Date(element.StartDate),
endTime: new Date(element.EndDate),
allDay: false,
event: element
event: element,
calendarName: element.CalendarName
});
// timeline start
const startHours = formatDate(new Date(element.StartDate), 'HH', 'pt');
const EndHours = formatDate(new Date(element.EndDate), 'HH', 'pt');
this.events.push({
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName, element.Subject),
start: setHours(setMinutes(new Date(element.StartDate), 0), parseInt(startHours)),
end: setHours(setMinutes(new Date(element.EndDate), 0), parseInt(EndHours)),
color: {
primary: 'white',
secondary: 'white'
},
id: element.EventId
});
// timeline end
});
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
this.showTimeline = true;
});
}
break;
@@ -31,8 +31,6 @@ export class PublicationsPage implements OnInit {
months: string[];
days:string[];
constructor(
private router: Router,
private modalController: ModalController,