-
Notifications
You must be signed in to change notification settings - Fork 659
Feature : New Fixed Deposit Details Page #2534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
WalkthroughAdds a fixed-deposit feature: network models and service, API endpoint constant, data manager and repository, DI bindings, navigation and route changes to pass clientId, a new multi-step CreateFixedDepositAccountViewmodel and state-driven UI (DetailsPage), plus string resources and minor enum endpoint update. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant Screen as CreateFixedDepositAccountScreen
participant VM as CreateFixedDepositAccountViewmodel
participant Repo as FixedDepositRepository
participant DM as DataManagerFixedDeposit
participant Service as FixedDepositService
participant API as Backend
User->>Screen: interact (select product / pick date / submit)
Screen->>VM: onAction(OnDetailsSubmit / other actions)
VM->>VM: update state (emit StateFlow)
VM-->>Screen: state updates (recompose)
alt Needs template data
VM->>Repo: getFixedDepositTemplate(clientId)
Repo->>DM: delegate
DM->>Service: fixedDepositProductTemplate(clientId)
Service->>API: GET /fixeddepositaccounts/template?clientId=...
API-->>Service: FixedDepositTemplate
Service-->>DM: Flow<FixedDepositTemplate>
DM-->>Repo: Flow<FixedDepositTemplate>
Repo-->>VM: DataState<FixedDepositTemplate>
VM->>VM: incorporate template into state
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (10)
core/database/src/commonMain/kotlin/com/mifos/room/basemodel/APIEndPoint.kt (1)
44-44: Fix spacing around the assignment operator.Missing space before the
=operator. For consistency with other constants in this file, add a space.Apply this diff:
- const val FIXED_DEPOSIT ="fixeddepositaccounts" + const val FIXED_DEPOSIT = "fixeddepositaccounts"core/data/src/commonMain/kotlin/com/mifos/core/data/repository/FixedDepositRepository.kt (1)
7-11: LGTM!The interface is well-defined and follows the repository pattern correctly.
Consider removing the extra blank lines (9-10) for cleaner formatting:
interface FixedDepositRepository { fun getFixedDepositTemplate(clientId: Int): Flow<DataState<FixedDepositTemplate>> - - }core/network/src/commonMain/kotlin/com/mifos/core/network/datamanager/DataManagerFixedDeposit.kt (1)
7-7: Fix constructor formatting.Missing space before the opening parenthesis in the constructor declaration.
Apply this diff:
-class DataManagerFixedDeposit (private val baseApiManager: BaseApiManager){ +class DataManagerFixedDeposit(private val baseApiManager: BaseApiManager) {core/data/src/commonMain/kotlin/com/mifos/core/data/repositoryImp/FixedDepositRepositoryImpl.kt (1)
11-15: LGTM!The repository implementation correctly delegates to the data manager and properly converts the Flow to a DataState Flow using the
asDataStateFlow()extension.Consider removing the extra blank lines (16-19) at the end of the class for cleaner formatting:
override fun getFixedDepositTemplate(clientId: Int): Flow<DataState<FixedDepositTemplate>> { return dataManagerFixedDeposit.getFixedDepositTemplate(clientId).asDataStateFlow() } - - - }core/network/src/commonMain/kotlin/com/mifos/core/network/services/FixedDepositService.kt (1)
14-20: LGTM!The service interface is correctly defined with proper Ktorfit annotations. The GET endpoint path uses compile-time string concatenation with
APIEndPoint.FIXED_DEPOSIT, which is appropriate.Consider removing the excessive blank lines (9-13 before the interface, 21-25 after) to improve code cleanliness:
import kotlinx.coroutines.flow.Flow - - - - - interface FixedDepositService { @GET("accounts/" + APIEndPoint.FIXED_DEPOSIT + "/template") fun fixedDepositProductTemplate( @Query("clientId") clientId: Int, ): Flow<FixedDepositTemplate> } - - - -core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositTemplate.kt (2)
6-7: Consider removing one empty line.Two consecutive empty lines are present. Kotlin style typically uses a single blank line between imports and class declarations.
13-13: Inconsistent@SerialNamestyle.This annotation uses the explicit
value =parameter name while others on lines 10 and 16 don't. For consistency, consider removingvalue =.Apply this diff:
- @SerialName(value = "clientName") + @SerialName("clientName")feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountViewmodel.kt (3)
21-26: Rename class to follow Kotlin naming conventions.The class name uses
Viewmodelbut the Kotlin/Android convention isViewModelwith a capital 'M'.Apply this diff:
-class CreateFixedDepositAccountViewmodel : +class CreateFixedDepositAccountViewModel : BaseViewModel< NewFixedDepositAccountState, NewFixedDepositAccountEvent, NewFixedDepositAccountAction, >(NewFixedDepositAccountState()) {
85-85: Consider using a more specific type fordialogState.Typing
dialogStateasAny?sacrifices type safety. Consider defining a sealed class for dialog states to improve type safety and code clarity.Example:
sealed class DialogState { data object None : DialogState() data class ConfirmationDialog(val message: String) : DialogState() // Add other dialog types as needed } // Then in state: val dialogState: DialogState = DialogState.None
102-119: Standardize sealed class member declarations.There's inconsistent use of
objectanddata objectfor members without properties. For Kotlin 1.9+, preferdata objectfor all singleton members to get consistenttoString(),equals(), andhashCode()implementations.Apply this diff for consistency:
sealed class NewFixedDepositAccountAction() { - object NextStep : NewFixedDepositAccountAction() + data object NextStep : NewFixedDepositAccountAction() data class OnStepChange(val newIndex: Int) : NewFixedDepositAccountAction() - object NavigateBack : NewFixedDepositAccountAction() + data object NavigateBack : NewFixedDepositAccountAction() data class OnSubmissionDatePick(val state: Boolean) : NewFixedDepositAccountAction() data class OnSubmissionDateChange(val date: String) : NewFixedDepositAccountAction() data class OnProductNameChange(val index: Int) : NewFixedDepositAccountAction() - object Finish : NewFixedDepositAccountAction() + data object Finish : NewFixedDepositAccountAction() data class OnFieldOfficerChange(val index: Int) : NewFixedDepositAccountAction() data class OnExternalIdChange(val value: String) : NewFixedDepositAccountAction() data object OnDetailsSubmit : NewFixedDepositAccountAction() } sealed class NewFixedDepositAccountEvent() { - object NavigateBack : NewFixedDepositAccountEvent() + data object NavigateBack : NewFixedDepositAccountEvent() - object Finish : NewFixedDepositAccountEvent() + data object Finish : NewFixedDepositAccountEvent() }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
core/data/src/commonMain/kotlin/com/mifos/core/data/repository/FixedDepositRepository.kt(1 hunks)core/data/src/commonMain/kotlin/com/mifos/core/data/repositoryImp/FixedDepositRepositoryImpl.kt(1 hunks)core/database/src/commonMain/kotlin/com/mifos/room/basemodel/APIEndPoint.kt(1 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/BaseApiManager.kt(3 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/datamanager/DataManagerFixedDeposit.kt(1 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/di/DataMangerModule.kt(2 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositProductOption.kt(1 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositTemplate.kt(1 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/services/FixedDepositService.kt(1 hunks)feature/client/src/commonMain/composeResources/values/strings.xml(1 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientApplyNewApplications/ClientApplyNewApplicationRoute.kt(1 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientApplyNewApplications/ClientApplyNewApplicationsScreen.kt(2 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/di/ClientModule.kt(2 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/navigation/ClientNavigation.kt(3 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/FixedDepositAccountViewmodel.kt(0 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountRoute.kt(1 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountScreen.kt(3 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountViewmodel.kt(1 hunks)feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/pages/DetailsPage.kt(1 hunks)
💤 Files with no reviewable changes (1)
- feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/FixedDepositAccountViewmodel.kt
🧰 Additional context used
🧬 Code graph analysis (3)
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/pages/DetailsPage.kt (3)
core/designsystem/src/commonMain/kotlin/com/mifos/core/designsystem/component/MifosTextFieldDropdown.kt (1)
MifosTextFieldDropdown(39-112)core/designsystem/src/commonMain/kotlin/com/mifos/core/designsystem/component/MifosOutlinedTextField.kt (1)
MifosDatePickerTextField(363-402)core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosTwoButtonRow.kt (1)
MifosTwoButtonRow(31-91)
feature/client/src/commonMain/kotlin/com/mifos/feature/client/navigation/ClientNavigation.kt (1)
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountRoute.kt (1)
createFixedDepositAccountDestination(25-33)
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountRoute.kt (1)
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountScreen.kt (1)
CreateFixedDepositAccountScreen(37-57)
🔇 Additional comments (9)
core/network/src/commonMain/kotlin/com/mifos/core/network/di/DataMangerModule.kt (2)
24-24: LGTM!Import correctly added for the new DataManagerFixedDeposit.
55-55: LGTM!DI binding is correctly configured following the same pattern as other data managers in this module.
core/network/src/commonMain/kotlin/com/mifos/core/network/BaseApiManager.kt (3)
46-46: LGTM!Import correctly added for the FixedDepositService.
62-62: LGTM!Import for the Ktorfit-generated service creator is correct.
79-79: LGTM!Service initialization follows the same pattern as other services in BaseApiManager and is correctly positioned.
core/network/src/commonMain/kotlin/com/mifos/core/network/datamanager/DataManagerFixedDeposit.kt (1)
9-10: LGTM!The delegation to the service layer is correct and follows the data manager pattern used throughout the codebase.
core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositTemplate.kt (1)
8-18: Verify nullability requirements against Mifos API specification.The codebase shows inconsistent nullability patterns: response models like
ShareAccountResponseuse nullable fields, while template models likeFixedDepositProductOptionin the same package use non-nullable required fields.FixedDepositTemplatefollows the template pattern with non-nullableclientIdandclientName.However, without access to the Mifos API specification or response documentation, it cannot be confirmed whether these fields can actually be null in the API response. Check the API contract to determine if
clientIdandclientNameshould be nullable (Int?,String?) to handle potential null values gracefully.feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountViewmodel.kt (2)
60-66: Verify that validation logic is not missing.The
handleOnDetailsSubmitmethod only clearsexternalIdErrorwithout performing any validation onexternalIdor other fields. Ensure that validation is either handled elsewhere or should be added here.If validation is needed, consider adding it:
private fun handleOnDetailsSubmit() { + // Add validation logic here + if (state.externalId.isBlank()) { + mutableStateFlow.update { + it.copy(externalIdError = /* error resource */) + } + return + } mutableStateFlow.update { it.copy( externalIdError = null, ) } + // Proceed to next step or submit }
98-101: Verify whetherexternalIdvalidation should be included.The
isDetailsNextEnabledcomputed property checkssubmissionDate,fixedDepositProductSelected, andfieldOfficerIndex, but doesn't validateexternalId. Confirm whetherexternalIdis optional or if validation should be added.If
externalIdis required, update the validation:val isDetailsNextEnabled = submissionDate.isNotEmpty() && fixedDepositProductSelected != -1 && - fieldOfficerIndex != -1 + fieldOfficerIndex != -1 && + externalId.isNotEmpty()
| @SerialName("totalShares") | ||
| val totalShares: Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the totalShares field naming for Fixed Deposit products.
The field name totalShares seems semantically incorrect for a Fixed Deposit product option. Fixed deposits typically don't have "shares" — that terminology is more common for equity or share products. Please verify that this field name matches the actual API response for fixed deposit product templates.
Run the following script to check if similar models use this field and to look for API documentation:
🏁 Script executed:
#!/bin/bash
# Search for other product option models to compare naming patterns
ast-grep --pattern 'data class $_ ProductOption(
$$$
)'
# Search for any API documentation or comments about totalShares in fixed deposits
rg -n -C3 'totalShares' --type=ktLength of output: 26
---
🏁 Script executed:
```shell
#!/bin/bash
# Find all kotlin files in the network model directory
echo "=== Kotlin files in network model directory ==="
fd "\.kt$" "core/network/src/commonMain/kotlin/com/mifos/core/network/model" 2>/dev/null | head -20
# Search for ProductOption data classes
echo -e "\n=== Searching for ProductOption classes ==="
rg -n "data class.*ProductOption" 2>/dev/null
# Search for totalShares references in kotlin files
echo -e "\n=== Searching for totalShares references ==="
rg -n -C3 "totalShares" 2>/dev/null
# Search for FixedDepositProductOption file
echo -e "\n=== FixedDepositProductOption file content ==="
find . -name "FixedDepositProductOption.kt" -exec cat {} \; 2>/dev/null
Length of output: 3610
---
🏁 Script executed:
```shell
#!/bin/bash
# Show the ProductOptions class from loan template
echo "=== ProductOptions from loan template ==="
cat "core/model/src/commonMain/kotlin/com/mifos/core/model/objects/template/loan/ProductOptions.kt" 2>/dev/null | head -50
# Show the ProductOption class from recurring period
echo -e "\n=== ProductOption from recurring period ==="
cat "core/model/src/commonMain/kotlin/com/mifos/core/model/objects/template/recurring/period/ProductOption.kt" 2>/dev/null | head -50
# Show the SavingProductOptionsEntity
echo -e "\n=== SavingProductOptionsEntity ==="
cat "core/database/src/commonMain/kotlin/com/mifos/room/entities/templates/clients/SavingProductOptionsEntity.kt" 2>/dev/null
# Search for any API documentation, README, or comments about FixedDepositProductOption
echo -e "\n=== Search for FixedDeposit API references ==="
rg -i "fixeddeposit.*product" -n --max-count=10 2>/dev/null
Length of output: 5845
---
🌐 Web query:
```web
Mifos fixed deposit product API totalShares field documentation
💡 Result:
There is no totalShares field on the Fixed Deposit Product API — totalShares is a field used by the Share Product / Share Accounts APIs. See the Fixed Deposit product fields (no totalShares shown). [1] For the field totalShares and examples, see the Share Product API documentation (totalShares / totalSharesIssued appear on products/share and related endpoints). [2]
Sources:
- Fixed Deposit Product Fields — Mifos docs. [1]
- Share Product / Share API (totalShares example) — Apache Fineract / Mifos API docs. [2]
Remove the totalShares field from FixedDepositProductOption — it does not exist in the Mifos Fixed Deposit Product API.
The totalShares field is specific to Share Product / Share Accounts APIs and is not included in Fixed Deposit product definitions. This field should not be in the FixedDepositProductOption class. Remove line 18-19 entirely.
🤖 Prompt for AI Agents
In
core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositProductOption.kt
around lines 18-19, remove the unnecessary `@SerialName("totalShares") val
totalShares: Int` property from the FixedDepositProductOption data class; delete
those two lines and any unused imports or references to totalShares in this file
or its usages so the model matches the Mifos Fixed Deposit Product API.
| <string name="title_new_recurring_deposit_account">New Recurring Deposit Account</string> | ||
| <!-- New Fixed Deposit Account --> | ||
| <string name="one_year_fixed_deposit">1 Year Fixed Deposit</string> | ||
| <string name="submission_on">Submission On</string> | ||
| <string name="Field_officer">Field Officer</string> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid resource name for Field Officer label.
Android string resource names must be lowercase. Defining <string name="Field_officer"> will fail the aapt compile step. Please rename it (e.g., field_officer) and update the corresponding usages such as Res.string.Field_officer.
- <string name="Field_officer">Field Officer</string>
+ <string name="field_officer">Field Officer</string>Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In feature/client/src/commonMain/composeResources/values/strings.xml around
lines 533 to 538, the string resource name "Field_officer" is invalid (contains
uppercase) and will break aapt; rename the resource to all-lowercase (e.g.,
field_officer) in this file and update all call sites/usages (e.g.,
Res.string.Field_officer → Res.string.field_officer) to match the new name.
| private fun moveToNextStep() { | ||
| val current = state.currentStep | ||
| if (current < state.totalSteps) { | ||
| mutableStateFlow.update { | ||
| it.copy( | ||
| currentStep = current + 1, | ||
| ) | ||
| } | ||
| } else { | ||
| sendEvent(NewFixedDepositAccountEvent.Finish) | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix off-by-one error in step progression logic.
With totalSteps = 4 and currentStep starting at 0, the condition current < state.totalSteps allows progression through steps 0, 1, 2, 3, and 4—creating 5 steps instead of 4.
Apply this diff to ensure exactly 4 steps (indexed 0-3):
private fun moveToNextStep() {
val current = state.currentStep
- if (current < state.totalSteps) {
+ if (current < state.totalSteps - 1) {
mutableStateFlow.update {
it.copy(
currentStep = current + 1,
)
}
} else {
sendEvent(NewFixedDepositAccountEvent.Finish)
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| private fun moveToNextStep() { | |
| val current = state.currentStep | |
| if (current < state.totalSteps) { | |
| mutableStateFlow.update { | |
| it.copy( | |
| currentStep = current + 1, | |
| ) | |
| } | |
| } else { | |
| sendEvent(NewFixedDepositAccountEvent.Finish) | |
| } | |
| } | |
| private fun moveToNextStep() { | |
| val current = state.currentStep | |
| if (current < state.totalSteps - 1) { | |
| mutableStateFlow.update { | |
| it.copy( | |
| currentStep = current + 1, | |
| ) | |
| } | |
| } else { | |
| sendEvent(NewFixedDepositAccountEvent.Finish) | |
| } | |
| } |
🤖 Prompt for AI Agents
In
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/createFixedDepositAccountViewmodel.kt
around lines 67 to 78, the progression condition allows an off-by-one (with
totalSteps=4 and zero-based currentStep you can reach index 4); change the guard
to only increment while current < state.totalSteps - 1 (so valid indices are
0..totalSteps-1) and keep the else branch sending
NewFixedDepositAccountEvent.Finish when the last step is reached.
| TextButton( | ||
| onClick = { | ||
| onAction(NewFixedDepositAccountAction.OnSubmissionDatePick(state = false)) | ||
| submissionDatePickerState.selectedDateMillis?.let { | ||
| onAction( | ||
| NewFixedDepositAccountAction.OnSubmissionDateChange( | ||
| DateHelper.getDateAsStringFromLong(it), | ||
| ), | ||
| ) | ||
| } | ||
| }, | ||
| ) { Text("Hello World") } | ||
| }, | ||
| dismissButton = { | ||
| TextButton( | ||
| onClick = { | ||
| onAction(NewFixedDepositAccountAction.OnSubmissionDatePick(state = false)) | ||
| }, | ||
| ) { Text("jljks") } | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace placeholder dialog button labels.
The DatePicker dialog currently renders literal strings "Hello World" and "jljks", which is unprofessional and not localized. Please wire these buttons to real, translated strings (for example Res.string.feature_client_next / Res.string.feature_client_cancel) so the UI is production-ready.
- ) { Text("Hello World") }
+ ) { Text(stringResource(Res.string.feature_client_next)) }
...
- ) { Text("jljks") }
+ ) { Text(stringResource(Res.string.feature_client_cancel)) }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| TextButton( | |
| onClick = { | |
| onAction(NewFixedDepositAccountAction.OnSubmissionDatePick(state = false)) | |
| submissionDatePickerState.selectedDateMillis?.let { | |
| onAction( | |
| NewFixedDepositAccountAction.OnSubmissionDateChange( | |
| DateHelper.getDateAsStringFromLong(it), | |
| ), | |
| ) | |
| } | |
| }, | |
| ) { Text("Hello World") } | |
| }, | |
| dismissButton = { | |
| TextButton( | |
| onClick = { | |
| onAction(NewFixedDepositAccountAction.OnSubmissionDatePick(state = false)) | |
| }, | |
| ) { Text("jljks") } | |
| }, | |
| TextButton( | |
| onClick = { | |
| onAction(NewFixedDepositAccountAction.OnSubmissionDatePick(state = false)) | |
| submissionDatePickerState.selectedDateMillis?.let { | |
| onAction( | |
| NewFixedDepositAccountAction.OnSubmissionDateChange( | |
| DateHelper.getDateAsStringFromLong(it), | |
| ), | |
| ) | |
| } | |
| }, | |
| ) { Text(stringResource(Res.string.feature_client_next)) } | |
| }, | |
| dismissButton = { | |
| TextButton( | |
| onClick = { | |
| onAction(NewFixedDepositAccountAction.OnSubmissionDatePick(state = false)) | |
| }, | |
| ) { Text(stringResource(Res.string.feature_client_cancel)) } | |
| }, |
🤖 Prompt for AI Agents
In
feature/client/src/commonMain/kotlin/com/mifos/feature/client/newFixedDepositAccount/pages/DetailsPage.kt
around lines 76 to 95, the DatePicker dialog buttons use placeholder text
("Hello World" and "jljks"); replace these with localized string resources
(e.g., Res.string.feature_client_next and Res.string.feature_client_cancel) by
calling the Compose stringResource (or your existing Res wrapper) to obtain the
translated text and pass that to Text for each button label; ensure you add any
necessary import for stringResource/Res and use the appropriate resource IDs so
the labels are localized and production-ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
core/network/src/commonMain/kotlin/com/mifos/core/network/services/FixedDepositService.kt (2)
9-13: Remove excessive blank lines.These consecutive blank lines are unnecessary and should be removed to maintain clean code formatting.
Apply this diff:
import kotlinx.coroutines.flow.Flow - - - - - interface FixedDepositService {
21-25: Remove trailing blank lines.Excessive blank lines at the end of the file should be removed.
Apply this diff:
} - - - -
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
core/database/src/commonMain/kotlin/com/mifos/room/entities/accounts/savings/SavingAccountDepositTypeEntity.kt(1 hunks)core/network/src/commonMain/kotlin/com/mifos/core/network/services/FixedDepositService.kt(1 hunks)
🔇 Additional comments (2)
core/database/src/commonMain/kotlin/com/mifos/room/entities/accounts/savings/SavingAccountDepositTypeEntity.kt (1)
47-47: LGTM! Corrects the endpoint mapping for fixed deposits.This change properly maps the FIXED deposit type to its dedicated endpoint
APIEndPoint.FIXED_DEPOSITinstead of incorrectly using the savings accounts endpoint. This ensures correct API routing for fixed deposit operations.core/network/src/commonMain/kotlin/com/mifos/core/network/services/FixedDepositService.kt (1)
14-20: LGTM! Clean service interface definition.The interface follows proper Ktorfit patterns with correct annotations and returns a Flow for async operations, which is appropriate for this use case.
| onFinish: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| viewModel: NewFixedDepositAccountViewmodel = viewModel(), | ||
| viewModel: CreateFixedDepositAccountViewmodel = viewModel(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we have to use koinViewModel() here
| } | ||
|
|
||
| private fun handleSubmissionDatePick(action: NewFixedDepositAccountAction.OnSubmissionDatePick) { | ||
| mutableStateFlow.update { it.copy(showSubmissionDatePick = action.state) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this pr is not completed yet, you haven't called api and fetched the template anywhere
Fixes - Jira-#Issue_Number
Didn't create a Jira ticket, click here to create new.
Please Add Screenshots If there are any UI changes.
Please make sure these boxes are checked before submitting your pull request - thanks!
Run the static analysis check
./gradlew checkorci-prepush.shto make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.
Summary by CodeRabbit