Repository navigation
Shreevaths taking over for Vamsidhar - Create a Line Graph Chart for Cost Breakdown by Type of Expenditure - #1357
Conversation
…t-breakdown-by-expenditure-backend
Venk-rgb
left a comment
There was a problem hiding this comment.
Tested the PR with the corresponding UI. Approving changes in the backend. I have added comments in the frontend PR.
Screen.Recording.2025-06-27.at.9.46.48.AM.mov
…t-breakdown-by-expenditure-backend
vamsidharpanithi
left a comment
There was a problem hiding this comment.
Checked out and tested the backend along with the related frontend PR. The routes under /expenditure are defined, and the controller for retrieving expenditure data is present. However, the /ExpenditureLineGraph page on the frontend returns a 404 error, and there is a TypeError related to an undefined projectFilter state. This may indicate a mismatch between the expected backend response and the frontend integration. Please review the route accessibility and ensure the endpoint is correctly connected to the frontend component.
…t-breakdown-by-expenditure-backend
shashankm9
left a comment
There was a problem hiding this comment.
Tested this PR along with the frontend, Everything is working as expected.
PR.3458.mp4
harshavarma29
left a comment
There was a problem hiding this comment.
I have tested the related Frontend PR, and it's working as expected. However, I have left a few comments.
I noticed that an "undefined" category is being added next to the expenditures. Please refer to the screenshot below:
It seems the JSON property highlighted below leads to the "undefined" issue in the Frontend.
|
With reference to PR 3906, tested the backend:
|
|
Tested the related frontend PR #3906 by checking out this PR, got the following error while fetching the data: Error: Error fetching data: Request failed with status code 404 |
vishnu-ing
left a comment
There was a problem hiding this comment.
Tested the expenditure graph code changes and API in local and added comments in FE PR-3906.
aseemdeshmukh
left a comment
There was a problem hiding this comment.
Works perfect! (Referred FE PR 3906)
- Tested in light and dark mode. Everything is clearly visible.
- Filters work properly.
- Getting the error when start date is greater than end date; which is expected
- attached screenshots
NOTE (Whoever is getting Error 404 and the graph is not loading; check if the frontend API hitting the backend. Make sure your .env file has the same port as backend, and in the browser when loading the website check the API.)
|
…hart-for-cost-breakdown-by-expenditure-backend
|
sawantgayatri19
left a comment
There was a problem hiding this comment.
Hello everyone,
I have consolidated the feedback and tested the current implementation. Below are the key bugs and items that need to be addressed before this can be merged:
1.API 404 Error / Data Fetching Failures:
Multiple reviewers (aseemdeshmukh, Swetha-1306, kanishkagarwal6101, etc.) are consistently encountering Request failed with status code 404 when hitting the /api/bm/expenditure endpoint from the frontend. Please double-check the route registration and endpoint wiring to ensure the backend seamlessly connects with the frontend PR.
2. Dark Mode Label Visibility:
As noted by shashank-madan, axis and legend labels are not visible in dark mode and need proper styling adjustments.
3. "Undefined" Category Bug:
harshavarma29 pointed out that an "undefined" category appears next to expenditures due to a mismatch or missing property in the backend JSON response. Please sanitize/verify the payload fields.
4. SonarCloud Quality Gate (Code Coverage):
The current SonarCloud check is failing because the new code coverage is at 57.8% (falling short of the required 80%threshold). Please add unit tests to cover the new code paths and resolve the quality gate failures.
Looking forward to the updates so we can get this merged!
…-for-cost-breakdown-by-expenditure-backend
…-for-cost-breakdown-by-expenditure-backend
kzou55
left a comment
There was a problem hiding this comment.
Hi Shreevaths,
I ran and tested the PR locally alongside its associated frontend. See the frontend PR for its review.
Issue/Clarification
kzou55
left a comment
There was a problem hiding this comment.
Hi Shreevaths,
Clarification
Could you confirm whether the backend API requirements in the task description are still current? The specification calls for GET /api/projects/:id/cost-breakdown with two date query parameters, but the current implementation uses GET /api/bm/expenditure and returns all expenditure records, with the frontend handling the filtering. Is the current endpoint/architecture intentional, or should it be updated to match the API requirements in the task description?
…-for-cost-breakdown-by-expenditure-backend
…-for-cost-breakdown-by-expenditure-backend
|


























Description
Backend for a frontend line graph chart that shows time in months (x-axis) and cost (y-axis) of projects. The chart can be filtered by projects and by date range.
Related PRS (if any):
To test this backend PR you need to checkout the #3458 frontend PR --> Redone with OneCommunityGlobal/HighestGoodNetworkApp#3906
…
Main changes explained:
…
How to test:
npm installandnpm run startto run this PR locally