From deaa176a4662c210e65f3b32f423d586fef630ad Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 21 Feb 2024 16:58:29 +0100 Subject: [PATCH] update design library --- .../dataSetTable/dataSetSection/DataValueRepository.kt | 2 +- .../dataSetTable/dataSetSection/MapFieldValueToUser.kt | 2 +- .../main/java/org/dhis2/composetable/ui/DropDownOptions.kt | 4 ++-- .../java/org/dhis2/composetable/ui/MultiOptionSelector.kt | 4 ++-- gradle/libs.versions.toml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/DataValueRepository.kt b/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/DataValueRepository.kt index 9403fdba6a..20bca865b6 100644 --- a/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/DataValueRepository.kt +++ b/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/DataValueRepository.kt @@ -1035,6 +1035,6 @@ class DataValueRepository( .byOptionSetUid().eq(it) .orderBySortOrder(RepositoryScope.OrderByDirection.ASC) .blockingGet() - .map { option -> "${option.code()}%${option.displayName()}" } + .map { option -> "${option.code()}_${option.displayName()}" } } ?: emptyList() } diff --git a/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/MapFieldValueToUser.kt b/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/MapFieldValueToUser.kt index 989793c585..ea27653e45 100644 --- a/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/MapFieldValueToUser.kt +++ b/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/dataSetSection/MapFieldValueToUser.kt @@ -49,7 +49,7 @@ class MapFieldValueToUser( } } ValueType.MULTI_TEXT -> field.value()?.split(", ")?.map { code -> - field.options().find { it.contains(code) }?.split("%")?.get(1) + field.options().find { it.contains(code) }?.split("_")?.get(1) }?.joinToString(", ") else -> field.value() } diff --git a/compose-table/src/main/java/org/dhis2/composetable/ui/DropDownOptions.kt b/compose-table/src/main/java/org/dhis2/composetable/ui/DropDownOptions.kt index aa0a45b4dc..0205882063 100644 --- a/compose-table/src/main/java/org/dhis2/composetable/ui/DropDownOptions.kt +++ b/compose-table/src/main/java/org/dhis2/composetable/ui/DropDownOptions.kt @@ -17,8 +17,8 @@ fun DropDownOptions( onDismissRequest = onDismiss, ) { options.forEach { option -> - val code = option.split("%")[0] - val label = option.split("%")[1] + val code = option.split("_")[0] + val label = option.split("_")[1] DropdownMenuItem( onClick = { onSelected.invoke(code, label) diff --git a/compose-table/src/main/java/org/dhis2/composetable/ui/MultiOptionSelector.kt b/compose-table/src/main/java/org/dhis2/composetable/ui/MultiOptionSelector.kt index 2809c14ccf..41b978816f 100644 --- a/compose-table/src/main/java/org/dhis2/composetable/ui/MultiOptionSelector.kt +++ b/compose-table/src/main/java/org/dhis2/composetable/ui/MultiOptionSelector.kt @@ -17,8 +17,8 @@ fun MultiOptionSelector( ) { MultiSelectBottomSheet( items = options.map { option -> - val code = option.split("%")[0] - val label = option.split("%")[1] + val code = option.split("_")[0] + val label = option.split("_")[1] CheckBoxData( uid = code, checked = cell.value?.contains(label) == true, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 93322551a2..d4e013ecf2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ kotlin = '1.9.21' hilt = '2.47' hiltCompiler = '1.0.0' jacoco = '0.8.10' -designSystem = "0.2-20240215.110451-25" +designSystem = "0.2-20240221.124523-30" dhis2sdk = "1.10.0-20240207.110936-11" ruleEngine = "2.1.9" appcompat = "1.6.1"