Merged
Conversation
…om/OneCommunityGlobal/HGNRest into Shuhua-Types_List_Page_Edit_Delete
…ssues/breakdown) Introduce robust issue statistics aggregation with filtering and dynamic issue types. - Add imports for mongoose, BuildingIssue, BuildingProject - Add helpers: parseCSV, parseYmdUtc, parseObjectIdsCSV, buildMatchQuery - Refactor getIssueStatistics to parse/validate query params - Implement aggregation pipeline with allowDiskUse and project name lookup - Group by projectId + issueType and reshape to flat per-project response - Include filtered projects with zero-counts when no matching issues - Sort results by projectName - Return 400 on invalid ObjectIds/dates; 500 on DB errors; 200 with [] when empty Behavior - Filters use AND across groups, OR within arrays (projects, issueTypes) - Dates are UTC; endDate inclusive for entire day - Response includes dynamic properties for actual issue types from DB Endpoint - GET /api/issues/breakdown Notes - Maintains existing controller methods unchanged - Optimized for performance via MongoDB aggregation
…api/issues/types)
Introduce lightweight API to retrieve distinct issue types for filtering/UI.
Controller
- Add getIssueTypes in IssuesController
- Use BuildingIssue.distinct('issueType') to fetch unique values
- Filter falsy/null/empty values and sort alphabetically
- Return { issueTypes: string[] }
- Handle errors with 500 and console.error for visibility
Routes
- Register GET /types in IssuesRouter before /breakdown and param routes
- Map to issuesController.getIssueTypes
Behavior
- No query params required
- Returns example: { issueTypes: [Safety, Labor, Weather, ...] }
- Mirrors pattern used by getUniqueSeverities/getUniqueInjuryTypes for consistency
Notes
- Non-breaking addition; existing endpoints unchanged
- Keeps response minimal for client consumption
…ribution-chart Sohail: Role Distribution Showing Incomplete Role Data
…ted_volunteers_filter Roshini Seelamsetty: (PRIORITY HIGH) Yagna: Deactivated Volunteers Count Not getting reflected with Time Filter
…donut_chart_backend Adithya implement injury donut chart backend
…eams_metric Roshini Seelamsetty: (PRIORITY HIGH) Yagna: Total Active Teams Metric Includes Teams Without Logged Volunteer Hours
…lOrgSummary_DateRange Sayali: add server-side caching for volunteer stats data endpoint to optimize date range queries
Maithili - fix: resolve merge conflicts of 1342
…ry-dashboard-add-filters-to-issues-breakdown-chart Aditya-feat: Add filters to Issues Breakdown Chart
Vamsidhar taking over for Samman: Backend: Phase 2 Summary Dashboard: Making the Issues for Injuries Tracking
… and reusable type endpoint - Add /invtypes/:type/:invtypeId route for PUT and DELETE to match frontend URL - Fix Mongoose discriminator issue: resolve correct subtype model (MatType, ConsType, etc.) in updateInventoryType and updateNameAndUnit so fields like unit and fuelType are no longer silently dropped by the base model - Add addReusableType controller and POST /invtypes/reusables route - Add addInventoryUnit and deleteInventoryUnit controller functions and routes Made-with: Cursor
…e_Edit_Delete Juhitha took over for Jiayu & Shuhua - All Inventory Types page functionalities
…tudent_Report_Generation Akshith Individual Student Report Generation – Backend
…iers-orders-models Akshith - Kitchen Inventory Management - Build database models for orders and suppliers
…n-inventory Akshith - Create Backend API endpoints to add and store seeds, trees and bushes and animals in the farm
…e-endpoints Akshith - Create Backend API endpoints to add and store recipes and their instructions.
…eTeams Diya 🔥 fix(teams): Show Inactive Teams
Diya feat: Enhanced existing User State Feature
…unction-be Akshith - Application/Job Posting Page/Function and Design - Search Function - Backend
…ryReport Diya 🔥 fix(report): Fixed Weekly Summary Report
|
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
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.



Includes: Diya 🔥 fix(teams): Show Inactive Teams #2153, Akshith - Create Backend API endpoints to add and store recipes and their instructions. #2107, Akshith Individual Student Report Generation – Backend #1951, Akshith - Kitchen Inventory Management - Build database models for orders and suppliers #2020, Akshith - Create Backend API endpoints to add and store seeds, trees and bushes and animals in the farm #2068, Diya 🔥 feat: Enhanced existing User State Feature 5098+#2148, Sohail: Role Distribution Showing Incomplete Role Data #2078, Sayali: optimize TotalOrgSummary date range loading with parallel API calls, debounce, and caching 5019+#2011, Roshini Seelamsetty: (PRIORITY HIGH) Yagna: Total Active Teams Metric Includes Teams Without Logged Volunteer Hours #2094, Roshini Seelamsetty: (PRIORITY HIGH) Yagna: Deactivated Volunteers Count Not getting reflected with Time Filter #2067,Aditya-Feat: Add filters to Issues Breakdown Chart in BM Dashboard 4324+#1879, Adithya impl injuries donut chart 4204+#1805, Maithili - fix: resolve the issue that interactive map is not seen 5028+#2064, Akshith - Application/Job Posting Page/Function and Design - Search Function - Frontend 5096+#2147, Vamsidhar - fix: use bumissuechart store key for Issue Dashboard list 5084+#1404, Juhitha - Cleanup the inventory types page 3833+#765, Diya 🔥 fix(report): Fixed Weekly Summary Report #2156,