Skip to content

Conversation

@kampitojha
Copy link
Contributor

@kampitojha kampitojha commented Sep 15, 2025

Fixes - [Jira-#MIFOSAC-590

WhatsApp.Video.2025-09-16.at.04.04.18.mp4

](https://mifosforge.jira.com/browse/MIFOSAC-590)

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.

list: List<T>,
isActive: (T) -> Boolean,
label: (T) -> String,
): List<T> {
Copy link
Contributor

@revanthkumarJ revanthkumarJ Sep 16, 2025

Choose a reason for hiding this comment

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

why a generic one because it is used only once and this viewmodel functions can't be accessed outside in other places.

so sort directly

},
label = { identifier ->
identifier.description ?: ""
},
Copy link
Contributor

@revanthkumarJ revanthkumarJ Sep 16, 2025

Choose a reason for hiding this comment

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

sort directly here

val sortedList = dataState.data.sortedWith( compareBy( { identifier -> val s = identifier.status?.lowercase() ?: "" if (s.contains("active") && !s.contains("inactive")) 0 else 1 }, { identifier -> identifier.description?.lowercase() ?: "" } ) )

@therajanmaurya therajanmaurya enabled auto-merge (squash) September 16, 2025 14:10
@therajanmaurya therajanmaurya merged commit 20136d8 into openMF:development Sep 16, 2025
@kampitojha kampitojha deleted the feat/identifiers/sort-active-first branch September 16, 2025 15:43
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