fix: show totals in chart legend and days in Time Spent budgeted sub-text#204
Merged
Conversation
…text Two small project-details-page fixes that share the same screen: - ProjectCharts: the Hours per Week chart legend now shows the sum of Planned, Approved and Pending hours across the visible weeks (e.g. "Planned (237.0h) Approved (158.5h) Pending (10.0h)"), so users get the project's overall position at a glance without hovering individual bars. Totals re-compute when navigating weeks. - ProjectKPICards: the Time Spent card's "X% of Yh budgeted" sub-text now uses the shared formatHoursWithDays helper, matching the days- in-brackets format used by the neighbouring Time Budgeted card (e.g. "71% of 237.0h (31.5d) budgeted"). Fixes #202 Fixes #203 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Two small project-details-page fixes on the same screen:
Planned (237.0h) Approved (158.5h) Pending (10.0h)). Totals re-compute when navigating weeks via the arrows / "This Week" button. Implemented via alegendTotalsuseMemoderived from the samedisplayDatathat drives the bars.formatHoursWithDayshelper, so it shows71% of 237.0h (31.5d) budgetedinstead of71% of 237h budgeted. Matches the format already used on the neighbouring Time Budgeted card.Test plan
Planned (Xh) Approved (Yh) Pending (Zh)and the figures sum to the visible bars.X% of <budget>h (<budgetdays>d) budgeted, matching the format on the Time Budgeted card next to it.Fixes #202
Fixes #203
🤖 Generated with Claude Code