-
Notifications
You must be signed in to change notification settings - Fork 5
Enhancements/events #1073
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
Merged
Merged
Enhancements/events #1073
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Added validation to prevent RSVPs for draft events in EventAttendance model. - Updated EventAttendancePolicy to restrict RSVP creation and updates for draft events. - Modified EventsController to redirect with an alert when attempting to RSVP to a draft event. - Enhanced show view to display appropriate messages for draft events. - Added internationalization support for new alert messages. - Created tests to ensure proper behavior for draft event restrictions.
… improve clarity in datetime partial tests
- Ensure user is logged in before managing RSVPs - Optimize event attendance queries to reduce N+1 issues - Preload necessary associations for event and calendar displays
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements and refactors to the BetterTogether event management features, focusing on improving event time handling, optimizing database queries, enhancing privacy display consistency, and refining RSVP logic. It also adds new helper methods for UI consistency and performance, and updates documentation and linting rules.
Event Management & RSVP Improvements
events_controller.rbto ensure only scheduled events allow RSVP, require login for RSVP/cancel actions, and provide user feedback via redirects and alerts. [1] [2]set_resource_instanceto avoid N+1 queries and improve event page performance.Event Time Handling
event_datetime_controller.js) for dynamic synchronization of event start time, end time, and duration fields, enforcing minimum duration and providing user feedback.display_event_timehelper to intelligently format event times based on duration and date span for clearer UI display.Privacy Display Consistency
privacy_display_valuehelper for consistent, translated privacy level display across the application, and updatedprivacy_badgeto use this helper. [1] [2] [3]Performance Optimizations
people_controller.rbto avoid N+1 queries.UI Consistency & Documentation
event_relationship_iconhelper to display appropriate icons and colors for a person's relationship to an event.RSpec/MultipleExpectationscop to allow multiple expectations per test.