Make UserProfileCalendar event blocks routable#8371
Make UserProfileCalendar event blocks routable#8371michaelchadwick wants to merge 3 commits intoilios:masterfrom
Conversation
|
@dartajax Needs some discussion over the issue I found that events not connected to the current logged in user (e.g. demo_dev1 looking at non-demo_dev1 events) go to a 404 Event Not Found page instead of the expected event detail page. |
I think my gut instinct on this one was that a user like |
|
This may prove tricky because it's not an event for the user. The event detail routes expect to know and load the current user unless the event it a school event. Wondering if we change the way we load events on this calendar to load all school events and the filter for the user we're interested in. Or something else complicated. |
3e87ed1 to
c72b0e2
Compare
✅ Deploy Preview for ilios-frontend ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7f4466e to
b49955a
Compare
041495b to
5aa306c
Compare
|
@dartajax Upon further reflection, I'm not sure if there's any issue with this one. That being said, I need someone else to test it and let me know if something odd happens, and you're the person for the job, Dave. |
|
Logged in as the same user, I can go to Event Detail for anything on the Calendar - I was thinking when I wrote this ticket that the same thing could and / or should happen in Calendar on Admin Console but if it's not feasible, I guess we'd just have to close this? |
|
I think what you'd need to do is extract the information from the event slug and load the offering and other data needed to create a school event slug, then you could route to the single event page for a school event. It's not a permission issue, it is that we only load user events that belong directly to the user, for seeing the details of an event (as you would on the school calendar) you need a slightly different format. Then permissions matter. That doesn't really make sense even to me. When you want to dig into this @michaelchadwick let's pair for a bit. |
|
This may be helped a bit by #8959, now the schoolEvent factory exists to create the event and make it more clickable. |
|
Need to convert the User event to a School event |
5aa306c to
7fa53f4
Compare
❌ Visual Diff Report — FAILED768 images compared: 8 different · 760 identical DetailsDifferences (8)
Download the results. |
jrjohnson
left a comment
There was a problem hiding this comment.
Works great, huge fan. Would constructing the click event in selectEvent where it is used would work instead of passing isUserProfileCalendar down?

Fixes ilios/ilios#4295
Clicking on an event in the calendar does nothing, but clicking on an event when on the
Dashboard::Calendarcomponent routes the user to an event detail, so I changed it so they work the same way by converting aUserEventinto aSchoolEvent.