-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Event sorting on Home Screen #383
Conversation
@irby I think Bogdan added the orderBy to fix an issue on /calendar where August 2024 was sorting incorrectly. It was sorted between Dec 2024 and Jan 2025, or some such. You may want to check the calendar page to see if that bug returned. |
@allella I've checked the CalendarController and saw that the |
@irby whatever makes sense. If the PR branch is sorting like stage and live, then it's not what we expect. Showing the next 5 events starting with the current time seems to be what we had there and something in the recent rework made it do what it's doing on with only showing events for one org |
@allella Looking at the website, I do not see there's any issue with how the calendar is presented today. I think the difference as to why this is working on the calendar view is the following:
With that being said, if it's not breaking the calendar experience we have today there's no point in making a code change to order the data set that's generated by the backend. |
I'll merge this and see how things look on stage. As long as the homepage is showing the next 5 items, and not the last 5 in the database, then we should be good. |
@bogdankharchenko do you have any input on this PR? |
See: #384 |
@bogdankharchenko Approved PR with comment, think we should axe |
Fixes #382
Changes made:
getActive
scope when fetching events onHome
andEvents
pages, this will check both events are active and sort byactive_at
attributeCarbon::now()
instead ofDB::raw('NOW()'
because of SQLite does not support this command.