Skip to content

Enhance Admin Dashboard for user email display and application handling#78

Merged
rsmoke merged 1 commit intomainfrom
staging
Mar 17, 2026
Merged

Enhance Admin Dashboard for user email display and application handling#78
rsmoke merged 1 commit intomainfrom
staging

Conversation

@rsmoke
Copy link
Copy Markdown
Member

@rsmoke rsmoke commented Mar 17, 2026

This pull request improves the robustness of the admin dashboard by handling cases where expected associations or methods may be missing, and adds a test to ensure correct display when a payment is not linked to an application. The changes prevent errors in the dashboard and enhance the user experience for admins.

Admin dashboard robustness improvements:

  • Updated the "Recent Applications" panel to safely handle cases where Application.active_conference_applications may not return objects with a display_name method, preventing potential errors.
  • Enhanced the "Recent Payments" panel to display the user's email with a message when a payment is not linked to a current application, instead of failing or omitting the entry.
  • Improved the "Accepted Applicants" and "Waiting for Responses" panels to check for method existence before calling collection methods, and to provide fallback logic if methods are missing, increasing dashboard reliability.
  • Wrapped the dashboard columns in a begin/rescue block to catch and silently handle NoMethodError exceptions, ensuring the dashboard remains accessible even if data is incomplete.

Testing:

  • Added a request spec (spec/requests/admin_dashboard_spec.rb) to verify that the admin dashboard correctly displays the user's email with a message when a payment exists without a corresponding application.

…plications and improve application handling

Refactor the dashboard to ensure that user emails are displayed when there is no current application associated with a payment. Update the logic for displaying accepted and offered applications to handle cases where the application may not respond to expected methods. Add a new request spec to validate the display of user emails in these scenarios.
@rsmoke rsmoke merged commit a11a08a into main Mar 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant