Skip to content

Add Group Savings Application to Savings Account - #136

Merged
staru09 merged 1 commit into
openMF:devfrom
Craig-Rosario:group-savings
Jul 29, 2026
Merged

Add Group Savings Application to Savings Account#136
staru09 merged 1 commit into
openMF:devfrom
Craig-Rosario:group-savings

Conversation

@Craig-Rosario

@Craig-Rosario Craig-Rosario commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

JIRA TICKET: MXWAR-107

Description

Add functionality to savings account to handle group details

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 CONTRIBUTING.md.

Summary by CodeRabbit

  • New Features
    • Added support for creating savings accounts from group profiles.
    • Added group-specific navigation, breadcrumbs, and cancellation flows.
    • Improved savings account date entry with consistent display and storage formatting.

@Craig-Rosario
Craig-Rosario requested a review from a team July 28, 2026 09:24
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

CreateSavingsAccount now supports group-specific routes, identifiers, template loading, breadcrumbs, and navigation. The submitted date field converts between stored localized dates and HTML date-input values, and a protected group creation route has been added.

Changes

Savings account creation

Layer / File(s) Summary
Route-aware account creation
src/pages/savings/CreateSavingsAccount.tsx, src/router/AppRoutes.tsx
Group and client flows select their respective identifiers, template requests, breadcrumbs, submit destinations, and cancel destinations. A protected group savings-account creation route is registered.
Submitted date formatting
src/pages/savings/savings-account-stepper/SavingsAccountDetailsStep.tsx
The submitted date is converted to YYYY-MM-DD for the date input and stored as an en-GB localized string after edits.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: staru09

Sequence Diagram(s)

sequenceDiagram
  participant AppRoutes
  participant CreateSavingsAccount
  participant savingsAccountApi
  participant MultiStepForm
  AppRoutes->>CreateSavingsAccount: Open group savings account route
  CreateSavingsAccount->>savingsAccountApi: Fetch template14 with groupId
  savingsAccountApi-->>CreateSavingsAccount: Return template
  CreateSavingsAccount->>MultiStepForm: Render group-scoped form
  MultiStepForm->>CreateSavingsAccount: Submit or cancel
  CreateSavingsAccount-->>AppRoutes: Navigate to group general page
Loading
🚥 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 matches the main change: adding group savings application support to the savings account flow.
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.

@staru09 staru09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@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/pages/savings/CreateSavingsAccount.tsx`:
- Around line 57-60: Update the formData state initialization flow in
CreateSavingsAccount so it resets when either id or isGroup changes, rebuilding
the request with the current route context and the existing locale/dateFormat
defaults. Ensure handleSubmit uses the refreshed clientId or groupId rather than
values from the previous route.

In `@src/pages/savings/savings-account-stepper/SavingsAccountDetailsStep.tsx`:
- Around line 51-70: Update the submittedOnDate value and onChange handling in
SavingsAccountDetailsStep to convert between dd MMMM yyyy and yyyy-MM-dd using
explicit day, month, and year components, without constructing Date objects or
applying timezone conversion. Preserve empty values and ensure date input
2026-07-28 is submitted as 28 July 2026.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1eff7b55-cb5e-4edc-b603-d4babdce4c65

📥 Commits

Reviewing files that changed from the base of the PR and between e1d64c7 and 110224a.

📒 Files selected for processing (3)
  • src/pages/savings/CreateSavingsAccount.tsx
  • src/pages/savings/savings-account-stepper/SavingsAccountDetailsStep.tsx
  • src/router/AppRoutes.tsx

Comment thread src/pages/savings/CreateSavingsAccount.tsx
@Craig-Rosario

Copy link
Copy Markdown
Contributor Author

@staru09 PR can be merged now

@staru09
staru09 merged commit 0085a1d into openMF:dev Jul 29, 2026
4 checks passed
@Craig-Rosario
Craig-Rosario deleted the group-savings branch August 4, 2026 04:03
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.

2 participants