-
Notifications
You must be signed in to change notification settings - Fork 69
feat(reports): add "Overdue" as third category in Reports charts #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the mockData and add test for overdue bar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update test and add new test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test case for isOverdue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new overdue bar (red color)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
counting overdue task correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move isOverdue function to this and make it a shared utility, DRY principle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import isOverdue function from shared utility and removes duplicate code
ShivaGupta-14
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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