Skip to content

WEB-1081 - Date picker disables future dates for "Specified Due Date" charges - #3776

Open
Farah-Nahle-FOO wants to merge 1 commit into
openMF:devfrom
foodeveloper:WEB-1081-fix-savings-charge-date-picker
Open

WEB-1081 - Date picker disables future dates for "Specified Due Date" charges#3776
Farah-Nahle-FOO wants to merge 1 commit into
openMF:devfrom
foodeveloper:WEB-1081-fix-savings-charge-date-picker

Conversation

@Farah-Nahle-FOO

@Farah-Nahle-FOO Farah-Nahle-FOO commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug Fixes
    • Expanded the allowed due-date range for specified, weekly, monthly, and annual savings account charges.
    • Date pickers now correctly allow future dates for applicable charge types, while retaining the current date limit for others.

@Farah-Nahle-FOO Farah-Nahle-FOO changed the title Merge pull request #1 from openMF/dev [Savings] Date picker disables future dates for "Specified Due Date" charges Jul 30, 2026
@Farah-Nahle-FOO Farah-Nahle-FOO changed the title [Savings] Date picker disables future dates for "Specified Due Date" charges WEB-1081 - Date picker disables future dates for "Specified Due Date" charges Jul 30, 2026
@IOhacker

Copy link
Copy Markdown
Contributor

@Farah-Nahle-FOO empty PR

@Farah-Nahle-FOO
Farah-Nahle-FOO requested a review from a team July 31, 2026 07:53
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Farah-Nahle-FOO, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c06184ef-5dc8-4c31-aa92-93cad6fa3ca9

📥 Commits

Reviewing files that changed from the base of the PR and between e842bba and 18f1ba4.

📒 Files selected for processing (2)
  • src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts
  • src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

The change applies charge-type-specific maximum dates when users add or edit savings account charges. Selected charge types allow dates through December 31, 2100. Other charge types use the configured business date. Charge-template retrieval now uses switchMap.

Changes

Charge date limits

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a8cacdd and 0a241fc.

📒 Files selected for processing (2)
  • src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts
  • src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.ts

@Farah-Nahle-FOO
Farah-Nahle-FOO force-pushed the WEB-1081-fix-savings-charge-date-picker branch from 0a241fc to f5177b9 Compare July 31, 2026 08:34
@Farah-Nahle-FOO

Copy link
Copy Markdown
Contributor Author

@IOhacker Hi, sorry, I ran into an issue while committing earlier. The changes have now been pushed.

@adamsaghy

Copy link
Copy Markdown
Contributor

@Farah-Nahle-FOO Please rebase this PR

@Farah-Nahle-FOO
Farah-Nahle-FOO force-pushed the WEB-1081-fix-savings-charge-date-picker branch from f5177b9 to 3cf1a67 Compare July 31, 2026 11:35
@Farah-Nahle-FOO

Copy link
Copy Markdown
Contributor Author

@adamsaghy Rebased onto the latest dev.

@Farah-Nahle-FOO
Farah-Nahle-FOO force-pushed the WEB-1081-fix-savings-charge-date-picker branch 2 times, most recently from b8ae0c1 to 92967b1 Compare August 3, 2026 07:29
@Farah-Nahle-FOO

Copy link
Copy Markdown
Contributor Author

@IOhacker Resolved and rebased.

@Farah-Nahle-FOO

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Farah-Nahle-FOO
Farah-Nahle-FOO force-pushed the WEB-1081-fix-savings-charge-date-picker branch from 92967b1 to c0cd189 Compare August 4, 2026 05:42
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.
@Farah-Nahle-FOO
Farah-Nahle-FOO force-pushed the WEB-1081-fix-savings-charge-date-picker branch from df60ef5 to 18f1ba4 Compare August 5, 2026 06:31
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.

3 participants