Mifosac 560 new fixed deposits account interest charts step
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:
-
New Components:
- InterestChartsPage.kt - Main UI for interest charts step
- FixedDepositAccountCreationScreen.kt - Stepper-based creation flow
- FixedDepositAccountState.kt - State management
- FixedDepositAccountViewModel.kt - Business logic
-
Features:
- Chart information display
- Interest rate modal with CRUD operations
- Rate validation (0-100%)
- Download functionality
- Step navigation controls
- Mobile responsive design
-
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 checkorci-prepush.shto 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 checkorci-prepush.shto 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 can you upload the screenshots what you have updated
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
@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
@KadariPavani can you upload the screenshots what you have updated
https://github.com/user-attachments/assets/f8c18776-f467-4fb9-9199-69a54f311523
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 please do a review now if any changes needed
https://github.com/user-attachments/assets/ca1446a2-694d-4f34-83ef-46a97e8d6be9
this is also not same as attach UI check so also make it same as.
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.