Skip to content

Conversation

@itsPronay
Copy link
Collaborator

@itsPronay itsPronay commented Feb 2, 2026

Fixes - https://mifosforge.jira.com/browse/MIFOSAC-645

Changes made in this PR

  • Fixed date Format
  • made submittedOnDate non-editable (submitted date is current date)
  • set default fieldOfficerId to null, as making it default 0 gives an error from the server.
  • Set default nominal-interest to 0 according to the web version
Before After
Screenshot_20260202_214250_MifosXDroid.jpg https://github.com/user-attachments/assets/d15ffdfd-61e1-4e0e-8d63-6abf55bdbef5

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

The changes modify the savings account feature by introducing automatic initialization of savings account and template data in the ViewModel upon creation, and refactoring the savings account screen to remove interactive date picking, adjust numeric types for interest rates and field officer IDs, and update date formatting in payloads.

Changes

Cohort / File(s) Summary
ViewModel Initialization
feature/savings/src/commonMain/kotlin/com/mifos/feature/savings/savingsAccount/SavingAccountViewModel.kt
Added automatic invocation of loadSavingsAccountsAndTemplate() during ViewModel construction to trigger asynchronous data loading on creation.
Screen State & UI Refactoring
feature/savings/src/commonMain/kotlin/com/mifos/feature/savings/savingsAccount/SavingsAccountScreen.kt
Removed date picker interaction (imports and UI logic); made submittedOnDate non-editable with current timestamp initialization; converted nominalAnnualInterest from String to Double; changed fieldOfficerId from Int to nullable Int; updated date formatting to "dd-MM-yyyy" format in payload construction.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • revanthkumarJ
  • biplab1

Poem

🐰 Twitches nose with glee

Savings bloom automatic now, no click required,
Date pickers fade as timestamps tick—inspired!
Types reshape from String to Double clean,
Field officers made optional, seen and unseen,
Accounts load swift when ViewModel takes its bow! 🌱

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies a specific bug fix (savings account creation for centers) that directly relates to the changeset's primary purpose of resolving a date validation error.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@itsPronay itsPronay changed the title fix: Can't create savings account fix: Can't create savings account for centers Feb 2, 2026
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