Skip to content

fix(core/network): added loan status and align it to network model#2609

Merged
biplab1 merged 2 commits intoopenMF:developmentfrom
piyushs-05:feat/client-loan-status-display
Feb 17, 2026
Merged

fix(core/network): added loan status and align it to network model#2609
biplab1 merged 2 commits intoopenMF:developmentfrom
piyushs-05:feat/client-loan-status-display

Conversation

@piyushs-05
Copy link
Contributor

@piyushs-05 piyushs-05 commented Feb 15, 2026

Fixes - Jira-#661

Please Add Screenshots If there are any UI changes.

Before After
image image

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

  • New Features

    • Loan account status is now displayed on loan listing cards for clearer at-a-glance information.
  • Chores

    • Status text handling standardized across network and UI so displayed status is consistent and reliable.
    • Previews and list views updated to pass and show status (with fallback for unavailable values).

@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Renamed descriptionvalue in GetClientsLoanAccountsStatus, updated mapper usages to the new field, added a status: String parameter to MifosActionsLoanListingComponent and its preview, and propagated the new argument into ClientLoanAccountsScreen calls.

Changes

Cohort / File(s) Summary
Model Property Rename
core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsLoanAccountsStatus.kt
Renamed data class property description: String?value: String?, changing the public field name.
Mapper Updates
core/network/src/commonMain/kotlin/com/mifos/core/network/mappers/clients/GetClientsClientIdAccountMapper.kt
Replaced status.description usages with status.value in mapping functions (mapFromEntity/mapToEntity).
UI Component & Preview
core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosActionsListingCardComponent.kt, core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosAllUiComponentsPreview.kt
Added status: String parameter to MifosActionsLoanListingComponent, rendered a status row, and updated preview to pass "Active".
Screen Integration
feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientLoanAccounts/ClientLoanAccountsScreen.kt
Passed loan.status?.value (with fallback) into the updated MifosActionsLoanListingComponent invocation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • biplab1
  • itsPronay
  • therajanmaurya

Poem

🐰 I hopped through fields from description to value,
I nudged the mappers and told the UI true,
Screens now whisper status with a bright little cheer,
Carrots clap softly — the change is near! 🥕

🚥 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 accurately reflects the main changes: adding loan status display and aligning the network model field from 'description' to 'value'.

✏️ 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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsLoanAccountsStatus.kt (1)

24-24: ⚠️ Potential issue | 🟡 Minor

Stale KDoc: @param description should be @param value.

The field was renamed from description to value, but the KDoc still references the old name.

📝 Proposed fix
-  * `@param` description
+  * `@param` value
🧹 Nitpick comments (1)
core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosActionsListingCardComponent.kt (1)

437-441: Consider color-coding the status value for visual consistency.

Other listing components in this file (e.g., MifosActionsIdentifierListingComponent at Line 197) apply color to the status value. Applying a valueColor based on the loan status (e.g., green for active, yellow for pending) would improve scannability and align with the existing pattern.

@piyushs-05 piyushs-05 force-pushed the feat/client-loan-status-display branch from 52dd176 to 5ce9956 Compare February 15, 2026 09:10
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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsLoanAccountsStatus.kt (1)

14-28: ⚠️ Potential issue | 🟡 Minor

Stale KDoc: @param description should be @param value.

Line 23 still references the old field name description.

Proposed fix
- * `@param` description
+ * `@param` value

@piyushs-05 piyushs-05 force-pushed the feat/client-loan-status-display branch from 5ce9956 to 090fec9 Compare February 15, 2026 09:21
@amanna13
Copy link
Contributor

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)

core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsLoanAccountsStatus.kt (1)> 14-28: ⚠️ Potential issue | 🟡 Minor

Stale KDoc: @param description should be @param value.
Line 23 still references the old field name description.

Proposed fix

- * `@param` description
+ * `@param` value

@piyushs-05 Consider fixing this suggested change.

@piyushs-05
Copy link
Contributor Author

@amanna13 ya i fixed in my last commit .

@sonarqubecloud
Copy link

@biplab1 biplab1 merged commit 66248ec into openMF:development Feb 17, 2026
5 checks passed
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.

4 participants

Comments