fixed calendar redirect bug
This commit is contained in:
1 parent
8e05c669db
commit
a51e207707
2 files changed
+26
-12
No files matched your search
@@ -11,26 +11,36 @@
|
|||||||
|
|
||||||
::ng-deep full-calendar .fc-daygrid-day-events {
|
::ng-deep full-calendar .fc-daygrid-day-events {
|
||||||
display: flex;
|
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 */
|
/* Ensure the event harness keeps the layout */
|
||||||
::ng-deep full-calendar .fc-daygrid-event-harness {
|
::ng-deep full-calendar .fc-daygrid-event-harness {
|
||||||
display: flex;
|
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 */
|
/* 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;
|
display: flex;
|
||||||
flex-direction: row; /* Align images and titles horizontally */
|
flex-direction: row;
|
||||||
align-items: center; /* Center items vertically */
|
/* Align images and titles horizontally */
|
||||||
gap: 5px; /* Space between image and title */
|
align-items: center;
|
||||||
|
/* Center items vertically */
|
||||||
|
gap: 5px;
|
||||||
|
/* Space between image and title */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set image sizes to ensure consistency */
|
/* Set image sizes to ensure consistency */
|
||||||
::ng-deep full-calendar .fc-event img {
|
::ng-deep full-calendar .fc-event img {
|
||||||
width: 70px; /* Set consistent width for images */
|
width: 70px;
|
||||||
height: auto; /* Maintain aspect ratio */
|
/* Set consistent width for images */
|
||||||
|
height: auto;
|
||||||
|
/* Maintain aspect ratio */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::ng-deep full-calendar .fc-daygrid-event-harness {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
@@ -78,7 +78,10 @@ export class CalendarPageComponent implements OnInit {
|
|||||||
title: `S${e.season.season_number}E${e.episode_number}`,
|
title: `S${e.season.season_number}E${e.episode_number}`,
|
||||||
date: e.air_date,
|
date: e.air_date,
|
||||||
photo: this.getPosterPath(e.entry),
|
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) {
|
handleEventClick(clickInfo: EventClickArg) {
|
||||||
// Example: Display an alert with event title
|
// 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;
|
// const event = clickInfo.event as any;
|
||||||
// console.log(event);
|
const entryId = clickInfo.event.extendedProps['id'];
|
||||||
// this.router.navigate([`/entries/${clickInfo.event.publicId}`]);
|
console.log(entryId);
|
||||||
|
this.router.navigate([`/entries/${entryId}`]);
|
||||||
// Example: You can also access other event properties
|
// Example: You can also access other event properties
|
||||||
// console.log('Clicked event details:', clickInfo.event);
|
// console.log('Clicked event details:', clickInfo.event);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user