Denish - volunteer completed hours #1177
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.
Volunteer Reporting Enhancements
This update introduces a new functionality to retrieve volunteers who logged hours meeting or exceeding their committed weekly hours, with added comparison functionality when a date range is provided.
Description
The changes in this PR include:
getVolunteersCompletedAssignedHours
function inoverviewReportHelper.js
.getVolunteerStatsData
function inreportsController.js
to include this new functionality.These updates provide improved tracking of volunteer contributions and enable comparative analysis over different time periods.
Summary of Changes
Added Functionality
Helper Function:
getVolunteersCompletedAssignedHours
inoverviewReportHelper.js
.API Endpoint Integration:
getVolunteerStatsData
function inreportsController.js
.Related PRs
Main Changes Explained
File Updates:
1. overviewReportHelper.js
getVolunteersCompletedAssignedHours
: Computes volunteers who meet or exceed their committed weekly hours, and optionally calculates comparison percentages.2. reportsController.js
getVolunteerStatsData
endpoint to callgetVolunteersCompletedAssignedHours
.How to Test
1. Check into the Current Branch:
2. Install Dependencies:
3. Run the Application:
4. Login Using Postman:
5. Query the Endpoint:
The API should return data with the count of volunteers who:
Screenshots:
Additional Notes
startDate
andendDate
query parameters are provided in the API request.