-
Notifications
You must be signed in to change notification settings - Fork 658
Client Loan accounts UI #2477
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
Client Loan accounts UI #2477
Changes from all commits
462c327
d1aa799
94e2e43
102c0f0
ff963c8
d8e7d59
408f006
307f14a
238d9ba
f8411dd
c527d69
4c5b3f2
11c6811
5acf2c1
e78abee
c339576
bbd84d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||
| /* | ||||||
| * Copyright 2025 Mifos Initiative | ||||||
| * | ||||||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||||||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||||||
| * file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||||||
| * | ||||||
| * See https://github.com/openMF/android-client/blob/master/LICENSE.md | ||||||
| */ | ||||||
| package com.mifos.feature.client.clientLoanAccounts | ||||||
|
|
||||||
| import androidx.navigation.NavController | ||||||
| import androidx.navigation.NavGraphBuilder | ||||||
| import androidx.navigation.compose.composable | ||||||
| import kotlinx.serialization.Serializable | ||||||
|
|
||||||
| @Serializable | ||||||
| data class ClientLoanAccountsRoute( | ||||||
| val clientId: Int = -1, | ||||||
| ) | ||||||
|
|
||||||
| fun NavGraphBuilder.clientLoanAccountsDestination( | ||||||
| navigateBack: () -> Unit, | ||||||
| navigateToViewAccount: (Int) -> Unit, | ||||||
| navigateToMakeRepayment: (Int) -> Unit, | ||||||
| ) { | ||||||
| composable<ClientLoanAccountsRoute> { | ||||||
| ClientLoanAccountsScreenRoute( | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was added to distinguish between the two |
||||||
| navigateBack = navigateBack, | ||||||
| viewAccount = navigateToViewAccount, | ||||||
| makeRepayment = navigateToMakeRepayment, | ||||||
| ) | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| fun NavController.navigateToClientLoanAccountsRoute( | ||||||
| clientId: Int, | ||||||
| ) { | ||||||
| this.navigate(ClientLoanAccountsRoute(clientId = clientId)) | ||||||
| } | ||||||
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.
Not an issue as it is gonna change anyways, but if you are making those parameters mandatory then place then above optional parameters.
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.
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.
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.
okay. and i deleted the below comment, I didn't way they were lamba functions.