Skip to content

Conversation

@WizCoderr
Copy link
Contributor

@WizCoderr WizCoderr commented Oct 28, 2025

Fixes - Jira-#Issue_Number

Didn't create a Jira ticket, click here to create new.

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

  • New Features

    • Added Beneficiary Management screen to the third-party transfer flow.
    • Implemented status-based sorting for savings accounts (Active, Pending Approval, Closed, Inactive).
  • Improvements

    • Enhanced savings account status display with localized pending-approval text and improved formatting for active accounts.
    • Refined navigation routing for the third-party transfer feature.

@coderabbitai
Copy link

coderabbitai bot commented Oct 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces status-based sorting for savings accounts with improved display formatting, adds comprehensive navigation infrastructure for the third-party transfer feature with new sealed navigation types and helpers, and enhances screen composables with ViewModel injection and modifier parameters.

Changes

Cohort / File(s) Summary
Savings Account Status Display
feature/savings-account/src/commonMain/kotlin/org/mifos/mobile/feature/savingsaccount/savingsAccount/SavingsAccountScreen.kt
Replaced LoanStatus with SavingStatus; introduced status-based sorting (ACTIVE → SUBMIT_AND_PENDING_APPROVAL → CLOSED → INACTIVE); refactored status color mapping to use new enum values; updated account display to show formatted currency for active accounts and conditional pending-approval text for non-active states
Third-Party Transfer Navigation Infrastructure
feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/navigation/ThirdPartyTransferRoute.kt
Added sealed TptNavigationDestination with three destinations (Notification, TransferProcess, AddBeneficiaryScreen); introduced TptNavigator typealias; added ThirdPartyTransferNavGraphRoute serializable object; added navigation helper extensions navigateToTptGraph() and tptGraphDestination() for graph construction
Third-Party Transfer Screen Routing
feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptScreenRoute.kt
Added public navigation helpers navigateToTptScreen() and tptScreenDestination() for wiring screen-level navigation with slide transitions
Third-Party Transfer Screen Composition
feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptScreen.kt
Added viewModel parameter to TptScreen with Koin injection default; added modifier parameters to TprContent and TptForm composables
Documentation Updates
feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/di/ThirdPartyTransferModule.kt, feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptViewModel.kt
Added KDoc comments describing Third Party Transfer Koin module and accountId property documentation

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TptScreen
    participant TptViewModel
    participant Navigation
    
    User->>TptScreen: Interact with form
    TptScreen->>TptViewModel: onAction(TptAction)
    TptViewModel->>TptViewModel: Update state
    TptViewModel-->>TptScreen: Emit new state
    TptScreen->>TptScreen: Recompose with updated state
    
    alt Navigation triggered
        TptScreen->>Navigation: onNavigate(TptNavigationDestination)
        Navigation->>Navigation: Route to destination<br/>(Notification, TransferProcess,<br/>or AddBeneficiaryScreen)
    end
Loading
sequenceDiagram
    participant User
    participant SavingsAccountScreen
    participant State
    participant Display
    
    State->>SavingsAccountScreen: savingsAccount list
    SavingsAccountScreen->>SavingsAccountScreen: Sort by statusOrder<br/>(ACTIVE → PENDING →<br/>CLOSED → INACTIVE)
    SavingsAccountScreen->>Display: sortedAccounts
    
    loop For each account
        alt Account is ACTIVE
            Display->>Display: Show formatted<br/>currency balance
        else Account is SUBMIT_AND_PENDING_APPROVAL
            Display->>Display: Show pending-approval<br/>localized text
        else
            Display->>Display: Show status or empty
        end
        Display->>User: Render account card<br/>with appropriate status
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • SavingsAccountScreen.kt: Status-based sorting logic with multiple conditional branches for account display formatting and color mapping; verify sort order correctness and string resource usage for pending-approval state
  • ThirdPartyTransferRoute.kt: New sealed class design and its integration with navigation graph building; review the navigation helper implementation and parameter wiring for the graph destination
  • TptScreen.kt: Composable signature changes with new parameters; ensure existing call sites are updated and modifier composition is correct
  • Navigation wiring: Verify that the new TptNavigationDestination destinations are properly handled throughout the navigation flow

Possibly related PRs

Suggested reviewers

  • Nagarjuna0033

🐰 Hop along with sorted savings, so neat,
Third-party transfers with nav so sweet,
Status displays dance in perfect array,
New routes and screens light the way!

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

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 70c39c6 and 116a3ba.

📒 Files selected for processing (6)
  • feature/savings-account/src/commonMain/kotlin/org/mifos/mobile/feature/savingsaccount/savingsAccount/SavingsAccountScreen.kt (4 hunks)
  • feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/di/ThirdPartyTransferModule.kt (1 hunks)
  • feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/navigation/ThirdPartyTransferRoute.kt (1 hunks)
  • feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptScreen.kt (4 hunks)
  • feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptScreenRoute.kt (1 hunks)
  • feature/third-party-transfer/src/commonMain/kotlin/org/mifos/mobile/feature/third/party/transfer/thirdPartyTransfer/TptViewModel.kt (1 hunks)

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.

@WizCoderr WizCoderr closed this Oct 28, 2025
@WizCoderr WizCoderr deleted the MM-445 branch October 28, 2025 14:39
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.

1 participant