timeline fix null

This commit is contained in:
2021-02-01 12:24:24 +01:00
parent 4e7deb50a5
commit dce4afd4da
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -178,7 +178,7 @@
<!-- Calendar currente date -->
<ion-row class="ion-justify-content-between ion-align-items-center currente-date-timelien">
<ion-row class="timeline-date">
<span *ngIf="timelineIsCurrentDate()">Hoje, </span> {{ timelineDate }}
<span *ngIf="timelineIsCurrentDate()">Hoje, &nbsp;</span> {{ timelineDate }}
</ion-row>
<!-- <ion-row class="filter ion-align-items-center">
<div class="filter-name">Todos</div>
+3 -4
View File
@@ -230,7 +230,6 @@ export class AgendaPage implements OnInit {
/* this.router.navigate(["/home/agenda", ev.event.EventId, 'agenda']); */
}
onCurrentChanged = (ev: Date) => {
// timeline change date
this.timelineDate = formatDate(ev,'dd MMMM yyyy', 'pt');
@@ -294,14 +293,14 @@ export class AgendaPage implements OnInit {
});
}
timeLineTemplate(startTime: string, eventlocation: string, eventDiscription: any, calendarName: string): string{
timeLineTemplate(startTime: string, eventlocation: string, eventDiscription: any, calendarName: string, subject: string): string{
return `
<div class="timeline-box timeline-box-${calendarName}">
<div>
<span class="timeline-start-time">${startTime}</span><span class="timeline-location">${eventlocation}</span>
</div>
<div class="timeline-event-discription">
${eventDiscription.Text}
${subject}
</div>
</div>
`;
@@ -343,7 +342,7 @@ export class AgendaPage implements OnInit {
const EndHours = formatDate(new Date(element.EndDate), 'HH', 'pt');
this.events.push({
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName),
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: {