feat(reports): add "Overdue" as third category in Reports charts#345
Conversation
- Add isOverdue utility function to tasks-utils.ts for shared usage - Update ReportsView to categorize pending tasks with past due dates as overdue - Add overdue bar (red #F33434) to ReportChart component - Update Tasks.tsx to import isOverdue from shared utility - Add comprehensive test coverage for overdue categorization Categorization logic: - status === 'completed' -> Completed (pink) - status === 'pending' && due < today -> Overdue (red) - status === 'pending' && (due >= today || no due) -> Ongoing (blue) Fixes: CCExtractor#341
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
More information on how to conduct a self review: This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
There was a problem hiding this comment.
update the mockData and add test for overdue bar
There was a problem hiding this comment.
update test and add new test
There was a problem hiding this comment.
add test case for isOverdue
There was a problem hiding this comment.
add new overdue bar (red color)
There was a problem hiding this comment.
counting overdue task correctly
There was a problem hiding this comment.
move isOverdue function to this and make it a shared utility, DRY principle
There was a problem hiding this comment.
import isOverdue function from shared utility and removes duplicate code
ShivaGupta-14
left a comment
There was a problem hiding this comment.
self review done! ready for review
Description
Categorization logic:
Fixes: #341
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes
Video:
Screen.Recording.2025-12-30.at.1.16.45.AM.mov