android-client icon indicating copy to clipboard operation
android-client copied to clipboard

Mifosac 560 new fixed deposits account interest charts step

Open KadariPavani opened this issue 1 year ago • 8 comments

Fixes - Jira-#560

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

Please Add Screenshots If there are any UI changes. Description of Changes: Implement Interest Charts step in the Fixed Deposit Account creation flow (Step 4) that allows users to:

  • View and manage chart details (name, dates, description)
  • View and modify interest rate charts
  • Download chart information
  • Navigate between setup steps

Please Add Screenshots If there are any UI changes. Changes include:

  1. New Components:

    • InterestChartsPage.kt - Main UI for interest charts step
    • FixedDepositAccountCreationScreen.kt - Stepper-based creation flow
    • FixedDepositAccountState.kt - State management
    • FixedDepositAccountViewModel.kt - Business logic
  2. Features:

    • Chart information display
    • Interest rate modal with CRUD operations
    • Rate validation (0-100%)
    • Download functionality
    • Step navigation controls
    • Mobile responsive design
  3. Validation Rules:

    • Required chart information
    • Valid interest rate ranges
    • Confirmation for deletions
    • Non-empty chart requirement for progression

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

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

  • [X] 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.

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

  • [X] 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 Rate Chart management to the Interest step of Fixed Deposit creation.
    • Rate Chart modal lets users view chart details and a list of rate entries.
    • Select an entry to open action choices (edit or delete) via dialogs.
    • Edit dialog includes validation; delete shows confirmation.
    • Back/Next navigation and a download placeholder for rate charts.
    • Sample in-memory data included for preview.

KadariPavani avatar Oct 03 '25 19:10 KadariPavani

@KadariPavani can you upload the screenshots what you have updated

revanthkumarJ avatar Oct 06 '25 12:10 revanthkumarJ

Walkthrough

Adds two public data models (RateChartItem, ChartInformation) and a public composable InterestPage(onNext). Implements an in-page, modal-driven Rate Chart UI with listing, selection, action modal, edit dialog with validation, and delete confirmation using in-memory sample data and local state.

Changes

Cohort / File(s) Summary
Rate Chart UI & Models
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/pages/InterestPage.kt
Added public data classes RateChartItem and ChartInformation; added public composable InterestPage(onNext: () -> Unit) and several private UI components and dialogs (RateChartModal, RateChartItemCard, RateChartHeaderCard, ChartInformationCard, EditRateChartDialog, DeleteConfirmationDialog, ActionModal). Introduces in-memory sample data, modal visibility and selection state, edit/delete workflows, input validation, and download/navigation placeholders.

Sequence Diagram

sequenceDiagram
    participant User
    participant InterestPage
    participant RateChartModal
    participant ActionModal
    participant EditDialog
    participant DeleteDialog

    User->>InterestPage: Open InterestPage / tap "View Rate Chart"
    InterestPage->>RateChartModal: show list (sample data)
    User->>RateChartModal: select RateChartItem
    RateChartModal->>ActionModal: present Edit / Delete / Download options

    alt Edit
        User->>ActionModal: Choose Edit
        ActionModal->>EditDialog: open with item
        User->>EditDialog: modify & confirm
        EditDialog->>InterestPage: update item state
    else Delete
        User->>ActionModal: Choose Delete
        ActionModal->>DeleteDialog: open confirmation
        User->>DeleteDialog: confirm
        DeleteDialog->>InterestPage: remove item
    else Download
        User->>ActionModal: Choose Download
        ActionModal->>InterestPage: trigger download placeholder
    end

    User->>InterestPage: Navigate Back / Next
    InterestPage->>User: navigate away

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Review modal state transitions and selected-item lifecycle.
  • Validate EditRateChartDialog input validation and update logic.
  • Check DeleteConfirmationDialog removal and list mutation edge cases.
  • Inspect public API additions (RateChartItem, ChartInformation, InterestPage) for naming and visibility.

Poem

🐇 I found a chart in a cozy code glade,
Modals like burrows where choices cascade,
I edit and delete with a nibble and cheer,
Sample data hopping, each change now clear,
A rabbit applauds the Rate Chart parade 🥕

Pre-merge checks and finishing touches

✅ 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 change: adding the Interest Charts step UI component for Fixed Deposit Account creation, matching the scope documented in PR objectives.
✨ 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.

coderabbitai[bot] avatar Oct 27 '25 17:10 coderabbitai[bot]

@KadariPavani can you upload the screenshots what you have updated

@revanthkumarJ ,

please review the code as i updated the intrest chart page with the requirements that got from the issue Here are the output screenshots

WhatsApp Image 2025-10-27 at 23 30 02_de8b02f9 image image

KadariPavani avatar Oct 27 '25 18:10 KadariPavani

@KadariPavani can you upload the screenshots what you have updated

https://github.com/user-attachments/assets/f8c18776-f467-4fb9-9199-69a54f311523

KadariPavani avatar Nov 05 '25 05:11 KadariPavani

Screenshot 2025-11-05 125604

Please make you UI same as figma design which is attach in the ticket

For interest details use separate card and for view interest use separate card don't include in one card and also starting and ending padding is too much which is not aline with stepper.

For listing charge use pre build component and also for view interest use pre build component

Arinyadav1 avatar Nov 05 '25 07:11 Arinyadav1

@Arinyadav1 please do a review now if any changes needed

https://github.com/user-attachments/assets/ca1446a2-694d-4f34-83ef-46a97e8d6be9

KadariPavani avatar Nov 06 '25 00:11 KadariPavani

image

this is also not same as attach UI check so also make it same as.

Arinyadav1 avatar Nov 06 '25 15:11 Arinyadav1

image

For all this UI we have already in-built component in core:ui module just use that don't write whole code from scratch.

for listing data use MifosDefaultListingComponentFromStringResources() and accounting to your need. for view button row card use MifosRowWithTextAndButton() for two button back and download use MifosTwoButtonRow()

first make these changes.

Arinyadav1 avatar Nov 06 '25 16:11 Arinyadav1