Skip to content

fix: hours and other bugs#37

Merged
alexdivadi merged 2 commits intodevfrom
feature/non-user-attendees
Apr 6, 2026
Merged

fix: hours and other bugs#37
alexdivadi merged 2 commits intodevfrom
feature/non-user-attendees

Conversation

@alexdivadi
Copy link
Copy Markdown
Owner

This pull request introduces several improvements and new features to the reporting and user profile functionality, focusing on volunteer hours reporting, user email handling, and UI enhancements. The main changes include more accurate and user-friendly formatting of volunteer hours, improved filtering and capping logic for hours calculations, enhanced user privacy and email handling, and the addition of a sorting feature for reports.

Volunteer Hours Calculation and Formatting

  • Added a new utility function formatHours for consistent and user-friendly formatting of hours, trimming unnecessary trailing zeros and handling edge cases. [1] [2] [3]
  • Improved volunteer hours calculation logic by introducing a _capVolunteerHours helper to ensure hours are clamped between 0 and 8 per event, and exposed volunteerHoursForUserEvent for consistent usage across the codebase. [1] [2] [3]
  • Updated event filtering in userEventsInRange to use UTC times and correct filter logic, ensuring only relevant events are included in reports.

User Profile and Email Handling

  • Enhanced the UserModel with logic to detect placeholder emails, determine if a user can receive email, and expose a safe emailForMailing property, improving privacy and data quality for exports and communication. [1] [2]
  • Updated the report detail screen to only show the user's email if it is valid for mailing.

Reporting UI and Usability

  • Added a sorting feature for volunteer reports, allowing users to sort by hours or last name in ascending or descending order via a new modal. [1] [2] [3] [4]
  • Improved the report detail screen UI with badges for user roles and age group, a clearer date range label, and enhanced layout for better readability. [1] [2] [3]
  • Made AnyStepBadge more flexible by allowing custom padding and border radius.

Snackbar Usability

  • Improved snackbar accessibility and consistency by using the localized close label, standardizing duration, and ensuring consistent appearance throughout the app. [1] [2] [3] [4]

Other Improvements

  • Refactored imports for better code organization and maintainability. [1] [2] [3]

These changes collectively improve the accuracy, usability, and maintainability of the reporting and user profile features.

@alexdivadi alexdivadi merged commit b0de43a into dev Apr 6, 2026
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