fix(WEB-1088): correct checker inbox date display and advanced-search… - #3787
fix(WEB-1088): correct checker inbox date display and advanced-search…#3787Ruba-Tawk-FOO wants to merge 1 commit into
Conversation
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Search and filter flow src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html, src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts |
The end-date control uses makerDateTimeTo. A Reset button clears filters. Search results normalize epoch-second dates and trigger change detection after asynchronous updates. |
Checker inbox table fields src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html, src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts |
The table displays the resourceId field. |
Estimated code review effort: 2 (Simple) | ~10 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly identifies the main changes to Checker Inbox date display and advanced search. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts (1)
194-199: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftAdd a typed checker-row contract.
The new helper uses
any[]andany, so TypeScript cannot detect the mismatch betweenmadeOnDateandtimestampor validatemakerUsernameandresourceId. Define aMakerCheckerRowresponse type at the service or resolver boundary and use it intransformDates. Track the broader API-typing work separately if it is outside this PR.As per coding guidelines, application TypeScript must use strict typing conventions. Based on learnings, use specific response types instead of adding more
anyat the component boundary.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts` around lines 194 - 199, Replace the any[]/any types in transformDates with a typed MakerCheckerRow response contract defined at the service or resolver boundary, including madeOnDate, timestamp, makerUsername, and resourceId as appropriate. Update the helper and its callers to use this contract so date normalization is type-checked without expanding unrelated API typing work.Sources: Coding guidelines, Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html`:
- Around line 129-130: The date column and normalization use different fields;
make them share one canonical date property. In
src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.html
lines 129-130, bind the column to the API field normalized by transformDates,
and in
src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts
lines 190-198, normalize that same property and update the helper comment;
ensure the epoch conversion affects the rendered value.
In
`@src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts`:
- Around line 168-174: Update the search callback in search() to synchronize
checkerData with the results by assigning it based on whether
this.searchData.length is greater than zero, alongside the existing
noSearchedData update. Preserve the current dataSource and selection refresh
behavior.
- Around line 184-186: Update resetFilters() to reset makerCheckerSearchForm
with explicit empty-string values for all controls, preserving the defaults
established by createMakerCheckerSearchForm() and preventing
makerDateTimeFrom/makerDateTimeTo from becoming null before search() runs.
---
Nitpick comments:
In
`@src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts`:
- Around line 194-199: Replace the any[]/any types in transformDates with a
typed MakerCheckerRow response contract defined at the service or resolver
boundary, including madeOnDate, timestamp, makerUsername, and resourceId as
appropriate. Update the helper and its callers to use this contract so date
normalization is type-checked without expanding unrelated API typing work.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b4a04141-9a2a-493c-aa5b-cce0e02c1a56
📒 Files selected for processing (2)
src/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.htmlsrc/app/tasks/checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component.ts
… filters The Checker Inbox showed madeOnDate incorrectly (e.g. "21 January 1970") because the backend returns it as epoch seconds while the UI treated it as milliseconds, and the "To date" filter was ignored because the form control / query param was named "makerDateTimeto" instead of "makerDateTimeTo". - Convert madeOnDate from epoch seconds to milliseconds before formatting. - Rename the "To date" control/param to makerDateTimeTo so the upper bound applies. - Add a Reset button that clears the filters and reloads the list. - Add a Resource ID column to the results table. - Mark the view for check after the async search so results render on the first click (the component uses OnPush change detection). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
015e8cc to
d78602b
Compare
… filters
The Checker Inbox showed madeOnDate incorrectly (e.g. "21 January 1970") because the backend returns it as epoch seconds while the UI treated it as milliseconds, and the "To date" filter was ignored because the form control / query param was named "makerDateTimeto" instead of "makerDateTimeTo".
Description
Describe the changes made and why they were made instead of how they were made. List any dependencies that are required for this change.
Related issues and discussion
#{Issue Number}
Screenshots, if any
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit
New Features
Bug Fixes
Backend dependency
The date-range filter (From/To date) depends on a Fineract backend fix:
That backend change fixes
makerDateTimeFrom/makerDateTimeTofiltering(records migrated to
made_on_date_utcwere not matched) and addsdd MMMM yyyyfallback date parsing. Until it is merged, the date-range filter will not return
correct results on stock Fineract (and may error if
dateFormat/localeareomitted). The rest of this PR — the
madeOnDatedisplay fix, Reset button,Resource ID column, and Action/Entity filters — is independent and works without it.