Mani shashank : add BM expenditure API routes for dashboard charts#1797
Mani shashank : add BM expenditure API routes for dashboard charts#1797shashankm9 wants to merge 1 commit intodevelopmentfrom
Conversation
|
Hi Mani Shashank, |
Anusha-Gali
left a comment
There was a problem hiding this comment.
Hi Mani Shashankl,
I have reviewed your Pr locally and have given my comments on frontend, now as to backend - i was not able to run the second API.
bhanuanishakkineni
left a comment
There was a problem hiding this comment.
Hello Shashank,
I have reviewed this PR and posted some comments for frontend PR#4193 of this PR. Please checkout those.
For the backend, I tested the API endpoints using postman.
First endpoint is working fine and returning JSON of projectIDs

Second endpoint is also working as expected and returning JSON with actual and planned values.

|
Hi Mani Shashank, I have reviewed your PR. Commented on Front End PR. For the backend I have tested the end points. First one returned the projectIDs and second returned actual and planned values. Both working as expected.
|
|
Hi Mani , I tried to test your PR with fix/bm-expenditure-charts , I have left a comment on OneCommunityGlobal/HighestGoodNetworkApp#4193 (comment) |
Ganesh112001
left a comment
There was a problem hiding this comment.
I tested Backend PR #1797 via Postman and verified that the API endpoints are functional. The POST /api/login endpoint successfully returns authentication tokens with 200 OK status. Both GET /api/bm/expenditure/projects and GET /api/bm/expenditure/:projectId/pie endpoints exist and properly enforce authentication, returning 401 Unauthorized responses. The endpoints correctly validate authorization and implement proper security by requiring BM Portal access permissions. However, I cannot verify the full data responses because the test admin account has "canAccessBMPortal" set to false in the JWT token, preventing access to BM Dashboard endpoints. The backend API implementation is functional with correct authentication and authorization enforcement. The endpoints are properly secured and ready for integration once frontend PR #4193 build errors are resolved and appropriate user permissions are configured.
|
Hi @shashankm9 |








Description
This PR restores the missing Financials Tracking functionality in the BM Dashboard that was showing "Failed to load projects" error. The expenditure pie charts and cost prediction features are now fully functional with proper authentication and CSS modules implementation.

image
Related PRS (if any):
To test this backend PR you need to checkout the #4193 frontend PR.
…
Main changes explained:
/expenditure/projectsand/expenditure/:projectId/piegetProjectIdsWithExpenditureandgetProjectExpensesPie/api/bmpathHow to test:
fix/bm-expenditure-apinpm installandnpm run buildto compile changesnpm startGET /api/bm/expenditure/projects(requires authentication)GET /api/bm/expenditure/:projectId/pie(requires authentication)["projectId1", "projectId2", ...]{"actual": [...], "planned": [...]}Screenshots or videos of changes:
Recording.2025-10-09.215401.mp4