Skip to content

fix: replace hardcoded weekly completion % with dynamic calculation#457

Open
Janeeshareddy wants to merge 2 commits into
aryandas2911:mainfrom
Janeeshareddy:fix/dynamic-weekly-completion
Open

fix: replace hardcoded weekly completion % with dynamic calculation#457
Janeeshareddy wants to merge 2 commits into
aryandas2911:mainfrom
Janeeshareddy:fix/dynamic-weekly-completion

Conversation

@Janeeshareddy
Copy link
Copy Markdown

@Janeeshareddy Janeeshareddy commented May 17, 2026

Fixes #3

Changes Made

Replaced the hardcoded value="72%" in the Dashboard's "This Week
Completion" stat card with a dynamically calculated percentage based
on actual task data.

How it works

  • Filters tasks created from the start of the current week
  • Counts completed vs total tasks for the week
  • Calculates: (completedThisWeek / thisWeekTasks.length) * 100
  • Shows 0% when no tasks exist (edge case handled)

Files Changed

  • frontend/src/pages/Dashboard.jsx

Screenshots

Screenshot 2026-05-17 084158

Type of change

  • Bug fix (non-breaking change which fixes an issue)
Screenshot 2026-05-17 084158 Screenshot 2026-05-17 084158

@Janeeshareddy
Copy link
Copy Markdown
Author

@aryandas2911 Resolved the merge conflict. PR is ready for review! Also attaching the dashboard screenshot showing the dynamic weekly completion percentage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Hardcoded "This Week Completion %" in Dashboard

1 participant