WEB-1081 - Date picker disables future dates for "Specified Due Date" charges - #3776
WEB-1081 - Date picker disables future dates for "Specified Due Date" charges#3776Farah-Nahle-FOO wants to merge 1 commit into
Conversation
|
@Farah-Nahle-FOO empty PR |
|
Warning Review limit reached
Next review available in: 56 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Note
|
| Layer / File(s) | Summary |
|---|---|
Apply limits during charge creation src/app/savings/saving-account-actions/... |
buildDependencies uses switchMap for charge-template retrieval. Selected charge types use December 31, 2100. Other charge types use the business date. |
Apply limits during charge editing src/app/savings/savings-account-stepper/... |
editChargeDate injects SettingsService and sets the maximum date from the charge time type. |
Estimated code review effort: 2 (Simple) | ~10 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly describes the main change: enabling future dates for Specified Due Date charges. |
| 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. |
✨ 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: 2
🤖 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/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts`:
- Around line 96-106: Update the chargeId.valueChanges pipeline to use switchMap
so prior getChargeTemplate requests are canceled when a new selection arrives,
and place takeUntilDestroyed(this.destroyRef) after switchMap. Move the maxDate
assignment into the latest response handler so only the currently selected
charge’s chargeTimeType determines the value.
In
`@src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts`:
- Around line 183-196: Update the datepicker configuration in the
savings-account charges edit flow to use the configured business date for
non-eligible charge types. Inject or reuse SettingsService in the component and
replace the new Date() fallback in the maxDate expression with
this.settingsService.businessDate, while preserving the existing future-date
behavior.
🪄 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: 2ff02619-d8b7-4eee-8db6-4702d5b86557
📒 Files selected for processing (2)
src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.tssrc/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts
0a241fc to
f5177b9
Compare
|
@IOhacker Hi, sorry, I ran into an issue while committing earlier. The changes have now been pushed. |
|
@Farah-Nahle-FOO Please rebase this PR |
f5177b9 to
3cf1a67
Compare
|
@adamsaghy Rebased onto the latest dev. |
b8ae0c1 to
92967b1
Compare
|
@IOhacker Resolved and rebased. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
92967b1 to
c0cd189
Compare
Allow future dates for Specified Due Date, Weekly, Monthly, and Annual Fee savings charges, and use the configured Fineract business date (instead of the client clock) as the maxDate for all other charge types. Also fixes a race condition where rapid charge selection changes could let a stale getChargeTemplate response overwrite the form for a later selection.
df60ef5 to
18f1ba4
Compare
Taking Latest Changes
Description
When creating a charge with charge time type Specified Due Date and adding it to a savings account, the date picker does not allow the user to select future dates.
For this charge type, future dates should be available because the charge is intended to be assigned with a specific due date. This should behave similarly to charges such as Annual Fee and Monthly Fee, where future dates can be selected when creating the charge.
Related issues and discussion
WEB-1081
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