diff --git a/frontend/src/app/features/calendar/calendar-page/calendar-page.component.css b/frontend/src/app/features/calendar/calendar-page/calendar-page.component.css index 4e2a291..45b3bcd 100644 --- a/frontend/src/app/features/calendar/calendar-page/calendar-page.component.css +++ b/frontend/src/app/features/calendar/calendar-page/calendar-page.component.css @@ -5,32 +5,42 @@ } -::ng-deep full-calendar div.fc-daygrid-event-harness { +::ng-deep full-calendar div.fc-daygrid-event-harness { display: block; } ::ng-deep full-calendar .fc-daygrid-day-events { display: flex; - flex-wrap: wrap; /* Adjust this if items overflow */ + flex-wrap: wrap; + /* Adjust this if items overflow */ } /* Ensure the event harness keeps the layout */ ::ng-deep full-calendar .fc-daygrid-event-harness { display: flex; - align-items: center; /* Center items vertically within the harness */ + align-items: center; + /* Center items vertically within the harness */ } /* Align the inner div of each event to row */ -::ng-deep full-calendar .fc-event > div { +::ng-deep full-calendar .fc-event>div { display: flex; - flex-direction: row; /* Align images and titles horizontally */ - align-items: center; /* Center items vertically */ - gap: 5px; /* Space between image and title */ + flex-direction: row; + /* Align images and titles horizontally */ + align-items: center; + /* Center items vertically */ + gap: 5px; + /* Space between image and title */ } /* Set image sizes to ensure consistency */ ::ng-deep full-calendar .fc-event img { - width: 70px; /* Set consistent width for images */ - height: auto; /* Maintain aspect ratio */ + width: 70px; + /* Set consistent width for images */ + height: auto; + /* Maintain aspect ratio */ } +::ng-deep full-calendar .fc-daygrid-event-harness { + cursor: pointer; +} \ No newline at end of file diff --git a/frontend/src/app/features/calendar/calendar-page/calendar-page.component.ts b/frontend/src/app/features/calendar/calendar-page/calendar-page.component.ts index e75f044..212eb65 100644 --- a/frontend/src/app/features/calendar/calendar-page/calendar-page.component.ts +++ b/frontend/src/app/features/calendar/calendar-page/calendar-page.component.ts @@ -78,7 +78,10 @@ export class CalendarPageComponent implements OnInit { title: `S${e.season.season_number}E${e.episode_number}`, date: e.air_date, photo: this.getPosterPath(e.entry), - url: `/entries/${e.entry.id}`, + extendedProps: { + id: e.entry.id, + }, + // url: `/entries/${e.entry.id}`, }; }); }, @@ -100,10 +103,11 @@ export class CalendarPageComponent implements OnInit { handleEventClick(clickInfo: EventClickArg) { // Example: Display an alert with event title - // alert(`Event clicked: ${clickInfo.event.title}`); + // alert(`Event clicked: ${clickInfo.event.extendedProps['id']}`); // const event = clickInfo.event as any; - // console.log(event); - // this.router.navigate([`/entries/${clickInfo.event.publicId}`]); + const entryId = clickInfo.event.extendedProps['id']; + console.log(entryId); + this.router.navigate([`/entries/${entryId}`]); // Example: You can also access other event properties // console.log('Clicked event details:', clickInfo.event); }