Skip to content

Conversation

@itsPronay
Copy link
Contributor

@itsPronay itsPronay commented Dec 26, 2025

Screen_Recording_20251227_051316_Mifos.Mobile.mp4

Fixes - https://mifosforge.jira.com/browse/MM-469

Please Add Screenshots If there are any UI changes.

Before After

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

Summary by CodeRabbit

Release Notes

  • New Features

    • Removed field officer selection step from the savings application workflow for a streamlined process.
  • Bug Fixes

    • Adjusted form validation behavior and button enabling logic to reflect updated submission eligibility criteria.
    • Modified validation handling for empty amount inputs during savings application submission.
  • Refactor

    • Restructured internal form validation checks and state management.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 26, 2025

📝 Walkthrough

Walkthrough

Configuration and logic adjustments to the savings application flow: maxLineLength threshold increased from 120 to 140, button enabled state binding removed, field officer selection dropdown removed, empty-amount validation bypass introduced, and the consolidated isFormValid property removed from state layer across multiple screens and view models.

Changes

Cohort / File(s) Summary
Configuration
config/detekt/detekt.yml
MaxLineLength.maxLineLength increased from 120 to 140 characters
FillApplication Flow
feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/fillApplication/FillApplicationScreen.kt, FillApplicationViewModel.kt
Removed form-validity enabled binding from MifosButton; added empty-amount validation bypass mapping to ValidationResult.Success; changed frequency handling from toInt() to toIntOrNull() in payload composition; removed isFormValid property from SavingsApplicationState
SavingsApplication Selection
feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/savingsApplication/SavingsApplyScreen.kt, SavingsApplyViewModel.kt
Removed field officer dropdown UI and related logic; adjusted button enablement to depend on non-zero selectedSavingsProductId instead of isFormValid; removed isFormValid computed property from state

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • Nagarjuna0033

Poem

🐰 Hop, hop, the form leaps free,
No validation gates what shall be,
Officer fields fade away,
Buttons now dance without delay!
Empty checks transform to yes,
Simpler flows, no more mess!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes removing mandatory constraints from non-required fields in the savings application, which aligns with the key changes: removing form validity gates, bypassing empty-amount validation, and adjusting button enablement logic.
✨ Finishing touches
  • 📝 Generate docstrings

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 marked this pull request as draft December 26, 2025 23:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97c3695 and 8437d5a.

📒 Files selected for processing (5)
  • config/detekt/detekt.yml
  • feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/fillApplication/FillApplicationScreen.kt
  • feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/fillApplication/FillApplicationViewModel.kt
  • feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/savingsApplication/SavingsApplyScreen.kt
  • feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/savingsApplication/SavingsApplyViewModel.kt
💤 Files with no reviewable changes (2)
  • feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/savingsApplication/SavingsApplyViewModel.kt
  • feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/fillApplication/FillApplicationScreen.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR Checks KMP / Static Analysis Check
🔇 Additional comments (2)
config/detekt/detekt.yml (1)

803-803: The maxLineLength increase to 140 is justified.

The Savings Application includes legitimate lines that exceed 120 characters, including a conditional check with a fully-qualified generated resource reference (122 characters). Refactoring to avoid exceeding 120 characters would require introducing intermediate variables, making the code less readable without practical benefit. The increase accommodates necessary complexity in generated code and multi-line parameter formatting.

feature/savings-application/src/commonMain/kotlin/org/mifos/mobile/feature/savings/application/fillApplication/FillApplicationViewModel.kt (1)

115-117: LGTM: Formatting improvements.

The multi-line parameter formatting with trailing commas improves readability and aligns with Kotlin coding conventions.

Also applies to: 123-126, 128-130, 146-148, 254-257, 313-316, 475-478, 894-895

@itsPronay itsPronay marked this pull request as ready for review December 26, 2025 23:20
@itsPronay
Copy link
Contributor Author

A new ticket has been created for the preview screen. The preview screen will be designed under that ticket.
https://mifosforge.jira.com/browse/MM-479

@itsPronay itsPronay changed the title Non required fields are mandatories for Savings application fix: Non required fields are mandatories for Savings application Dec 30, 2025
@IOhacker
Copy link
Contributor

The screen seems to be OK, just to comment that the Lock In period can be 0

@therajanmaurya
Copy link
Member

The screen seems to be OK, just to comment that the Lock In period can be 0

@itsPronay confirm that Lock In period can accept 0 ?

@itsPronay
Copy link
Contributor Author

@therajanmaurya yes it can

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.

5 participants