Skip to content

Conversation

@sam-arth07
Copy link
Contributor

@sam-arth07 sam-arth07 commented Sep 3, 2025

Fixes - Jira-#576

Please Add Screenshots If there are any UI changes.

AddAddress.mp4

After Refactoring and minor changes:

updated.mp4

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.

@revanthkumarJ
Copy link
Contributor

@sam-arth07 also upload a video what happens if address is disabled by admin.


LaunchedEffect(Unit) {
viewModel.loadClientAddress()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

i think it can be moved to init{ } of viewmodel

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually this is intentional because when we navigate to client Address Lists after submitting the form, then we want to show the updated list of address and if this is moved to viewModel, then the list remains stale as both the screens are linked to the same viewModel so init won't rerun the loadClientAddress func. If there is is better way do share

when (state.dialogState) {
is ClientAddressState.DialogState.Loading -> {
MifosCircularProgress()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

we have a discussion regarding this with rajan sir and decided to not use Loading state inside dialog

follow how dialog , error managed here in this pr
#2491

and follow same here

) {
MifosBreadcrumbNavBar(navController)
if (state.dialogState == null) {
ClientAddressHeader(
Copy link
Contributor

Choose a reason for hiding this comment

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

here also instead of null do it differently as like above mentioned pr


IconButton(
onClick = {
// ToDo: Implement Search Address Functionality
Copy link
Contributor

Choose a reason for hiding this comment

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

why can't we implement t in this pr itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not mentioned as the acceptance criteria. Should i try implementing in this pr itself then?

image

)

Spacer(modifier = Modifier.height(12.dp))

This comment was marked as resolved.

} catch (e: Exception) {
mutableStateFlow.update {
it.copy(
dialogState = ClientAddressState.DialogState.Error(

This comment was marked as resolved.


LaunchedEffect(Unit) {
viewModel.loadClientAddress()
}

This comment was marked as resolved.


init {
loadClientAddress()
loadAddressTemplate()

This comment was marked as resolved.

@sam-arth07
Copy link
Contributor Author

@revanthkumarJ

it is still not resolved

Actually this is intentional because when we navigate to client Address Lists after submitting the form, then we want to show the updated list of address and if this is moved to viewModel, then the list remains stale as both the screens are linked to the same viewModel so init won't rerun the loadClientAddress func. If there is is better way do share

@therajanmaurya therajanmaurya merged commit edd3194 into openMF:development Sep 4, 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.

3 participants