diff --git a/web-application/src/main/static/app/schedule/schedule.ts b/web-application/src/main/static/app/schedule/schedule.ts index f2b0f4f7..e982b3c6 100644 --- a/web-application/src/main/static/app/schedule/schedule.ts +++ b/web-application/src/main/static/app/schedule/schedule.ts @@ -1,10 +1,10 @@ //This is the same model our service emits export class Schedule { - date: any; + date: string; duration: string; venue: string; venueId: string; - startTime: any; + startTime: string; id: string; sessionId: string; -} \ No newline at end of file +} diff --git a/web-application/src/main/static/app/schedule/schedules.component.ts b/web-application/src/main/static/app/schedule/schedules.component.ts index 8fe97c12..ca5f41a9 100644 --- a/web-application/src/main/static/app/schedule/schedules.component.ts +++ b/web-application/src/main/static/app/schedule/schedules.component.ts @@ -43,7 +43,7 @@ export class SchedulesComponent implements OnInit { }); this.sessionService.init(function () { //no-op - console.log("Loaded sessions"); + console.log("Loaded schedules"); }); this.header = { @@ -73,6 +73,7 @@ export class SchedulesComponent implements OnInit { setSchedules(schedules: Schedule[]): void { this.schedules = schedules; + console.log("schedules.length: %d", this.schedules.length); this.events = this.toEvents(this.schedules); } @@ -87,8 +88,10 @@ export class SchedulesComponent implements OnInit { //date,duration,venue,venueId,startTime,id,sessionId //dayOfWeek,month,dayOfMonth,dayOfYear,era,year,monthValue,chronology,leapYear - let d = new Date(s.date.monthValue + '/' + s.date.dayOfMonth + '/' + s.date.year); - let start = momentConstructor(d.toISOString().slice(0, 10)).add(s.startTime.hour, 'hours'); + console.log(s); + var datetime = s.date + " " + s.startTime; + let d = new Date(datetime); + let start = momentConstructor(d.toISOString()); let end = start.add(1, 'hours'); if (self.defaultDate.isAfter(start)) { @@ -145,4 +148,4 @@ export class SchedulesComponent implements OnInit { console.error('An error occurred', error); // TODO - Display safe error return Promise.reject(error.message || error); } -} \ No newline at end of file +}