Skip to content

Commit

Permalink
fix(schedule): fix get event appointment in middle scale
Browse files Browse the repository at this point in the history
  • Loading branch information
abalad committed Apr 18, 2021
1 parent 4069fa4 commit 9654b71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ export class ViewDayComponent implements OnInit, AfterViewInit, OnChanges, OnDes
private addMiddleScales(events: ScheduleDataSource[], workScale: WorkScaleType[]) {
let existsEventInMiddleScale = false;
const scales = workScale.filter( work => work);

for (let workScaleIndex = 0; workScaleIndex < workScale.length - 1; workScaleIndex++ ) {
for (let e = 0; e < events.length - 1; e++ ) {
for (let e = 0; e <= events.length - 1; e++ ) {
const eventStartDate = new Date(events[e].date.start).setSeconds(0, 0);
const eventEndDate = new Date(events[e].date.end).setSeconds(0, 0);
const workStartDate = this.workScaleService.transformHourToMileseconds(workScale[workScaleIndex].end, new Date(eventStartDate));
Expand All @@ -230,7 +231,6 @@ export class ViewDayComponent implements OnInit, AfterViewInit, OnChanges, OnDes
expansed: true,
});
}

return this.sortScaleByStart( scales);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ export class ScheduleDemoOverviewComponent {
allday: false,
tags: [{color : '#FF385C', title : 'Missed'}, {color : '#1d8bff', title : 'Not Met'}, {color : '#90ED5D', title : 'Attended Now'}],
date: {
start: new Date(new Date().setHours(11, 10, 0)).getTime() ,
end: new Date( new Date().setHours(13, 0, 0) ).getTime()
start: new Date(new Date().setHours(12, 15, 0)).getTime() ,
end: new Date( new Date().setHours(12, 45, 0) ).getTime()
}
}];

Expand Down

0 comments on commit 9654b71

Please sign in to comment.