Add Group Savings Application to Savings Account - #136
Conversation
📝 WalkthroughWalkthroughCreateSavingsAccount 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. ChangesSavings account creation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 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
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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/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
📒 Files selected for processing (3)
src/pages/savings/CreateSavingsAccount.tsxsrc/pages/savings/savings-account-stepper/SavingsAccountDetailsStep.tsxsrc/router/AppRoutes.tsx
|
@staru09 PR can be merged now |
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