Skip to content

Conversation

@itsPronay
Copy link
Collaborator

@itsPronay itsPronay commented Aug 28, 2025

image

Fixes - https://mifosforge.jira.com/browse/MIFOSAC-570

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.

@itsPronay itsPronay marked this pull request as draft August 28, 2025 10:48
@itsPronay itsPronay marked this pull request as ready for review August 28, 2025 15:55
Copy link
Contributor

@sam-arth07 sam-arth07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Move all the hardcoded strings to strings.xml,
  2. Use DesignToken instead of hardcoding size values
  3. Add a screen recording showcasing the functionality added in this pr so that it is easier to verify.

@Composable
fun MifosEmptyCard(
msg: String,
msg: String = "Click Here To View Filled State.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the string to strings.xml and use stringResource

navigateToViewAccount: (Int) -> Unit,
) {
composable<ClientLoanAccountsRoute> {
ClientLoanAccountsScreenRoute(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be changed as follows as it is a composable func that refers to a screen not a route

Suggested change
ClientLoanAccountsScreenRoute(
ClientLoanAccountsScreen(

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added to distinguish between the two ClientLoanAccountsScreen

Comment on lines 63 to 65
is ClientLoanAccountsEvent.MakeRepayment -> TODO()
ClientLoanAccountsEvent.NavigateBack -> TODO()
is ClientLoanAccountsEvent.ViewAccount -> TODO()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using TODO() can crash the app, u can use empty {}, if the functionality for the event is not in place and leave a comment saying TODO instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, i forgot

Column(
modifier = Modifier.padding(paddingValues)
.fillMaxSize()
.padding(start = 16.dp, end = 16.dp, top = 16.dp),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use DesignToken.padding instead of hardcording padding values

)
}

Spacer(modifier = Modifier.height(16.dp))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too, try to use the DesignToken instead of hardcoded values

Comment on lines 61 to 63
viewAssociatedLoanAccounts: (Int) -> Unit,
viewAssociatedSavingsAccounts: (Int) -> Unit,
identifiers: (Int) -> Unit,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update your pr, with latest changes from my pr.

Comment on lines 22 to +26
fun NavGraphBuilder.clientProfileGeneralDestination(
onNavigateBack: () -> Unit = {},
upcomingCharges: (Int) -> Unit = {},
loanAccounts: (Int) -> Unit = {},
savingAccounts: (Int) -> Unit = {},
loanAccounts: (Int) -> Unit,
savingAccounts: (Int) -> Unit,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an issue as it is gonna change anyways, but if you are making those parameters mandatory then place then above optional parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not the best practice + it is confusing when used in Navigation function, i almost thought we can't navigate to loanAccounts and savings from here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay. and i deleted the below comment, I didn't way they were lamba functions.

val dialogState: DialogState? = null,
val details: Map<StringResource, String> = emptyMap(),
val networkConnection: Boolean = false,
val showAccountChooserDialog: Boolean = false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are you using this value?

@therajanmaurya therajanmaurya enabled auto-merge (squash) September 1, 2025 16:29
@therajanmaurya therajanmaurya merged commit 926da27 into openMF:development Sep 1, 2025
2 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.

5 participants