Attendance System Enhancements #38
Merged
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 release brings significant improvements to our attendance tracking system, focusing on more efficient data retrieval, enhanced visual reporting, and greater flexibility for historical data access.
Optimized Attendance Data Retrieval
We've refined the data fetching process within
attendance-service.ts
. Previously, two separate database queries were executed: one for basic member details (member ID, name, year) and another for their specific attendance records (member ID, time-in, time-out, and present status). After retrieving these, a mapping function combined the data for each member.Now, we've consolidated these into a single, comprehensive query. This new query efficiently retrieves all necessary member and attendance information at once. As a result, the subsequent mapping logic in the
AttendanceService
function is no longer needed and has been removed, leading to cleaner code and improved performance.New Attendance Metrics Visualizations
To provide a clearer and more immediate overview of attendance, we've added new visual components to the right side of the page:
These charts display the number of members present, absent, and late, offering quick, at-a-glance insights into daily attendance patterns.
Enhanced Calendar Component Functionality
The calendar component has been upgraded to make accessing historical attendance data much easier: