From 62ecaec7faf61cda6c8163ca812be3639109ce57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Oct 2025 07:42:00 +0000 Subject: [PATCH 1/3] Initial plan From b4d10e8c4a0f20fbc4c29a8d0f988dcac099a7fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Oct 2025 07:50:56 +0000 Subject: [PATCH 2/3] Fix: Rename selectedClientId to selectedClientTypeId for correct API submission Co-authored-by: SnehaghoshBarsha444 <153223798+SnehaghoshBarsha444@users.noreply.github.com> --- .../clientEditDetails/ClientEditDetailsScreen.kt | 10 +++++----- .../client/createNewClient/CreateNewClientScreen.kt | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientEditDetails/ClientEditDetailsScreen.kt b/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientEditDetails/ClientEditDetailsScreen.kt index d1459f2e179..adcd904934d 100644 --- a/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientEditDetails/ClientEditDetailsScreen.kt +++ b/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientEditDetails/ClientEditDetailsScreen.kt @@ -421,7 +421,7 @@ private fun UpdateClientDetailsContent( updateClient, isActive, staffInOffices, - selectedClientId = selectedClientTypeId, + selectedClientTypeId = selectedClientTypeId, selectedClientClassificationId, genderId, selectedStaffId, @@ -919,7 +919,7 @@ private fun handleSubmitClick( updateClient: (clientPayload: ClientPayloadEntity) -> Unit, isActive: Boolean, staffInOffices: List, - selectedClientId: Int, + selectedClientTypeId: Int, selectedClientClassificationId: Int, genderId: Int, selectedStaffId: Int?, @@ -962,7 +962,7 @@ private fun handleSubmitClick( clientTemplate, genderId, selectedStaffId, - selectedClientId, + selectedClientTypeId, selectedClientClassificationId, selectedLegalFormId, ) @@ -986,7 +986,7 @@ private fun createClientPayload( clientTemplate: ClientsTemplateEntity, genderId: Int, selectedStaffId: Int?, - selectedClientId: Int, + selectedClientTypeId: Int, selectedClientClassificationId: Int, legalFormId: Int?, ): ClientPayloadEntity { @@ -1025,7 +1025,7 @@ private fun createClientPayload( clientPayload = clientPayload.copy(staffId = selectedStaffId) } if (clientTemplate.clientTypeOptions?.isNotEmpty() == true) { - clientPayload = clientPayload.copy(clientTypeId = selectedClientId) + clientPayload = clientPayload.copy(clientTypeId = selectedClientTypeId) } if (clientTemplate.clientClassificationOptions?.isNotEmpty() == true) { clientPayload = clientPayload.copy(clientClassificationId = selectedClientClassificationId) diff --git a/feature/client/src/commonMain/kotlin/com/mifos/feature/client/createNewClient/CreateNewClientScreen.kt b/feature/client/src/commonMain/kotlin/com/mifos/feature/client/createNewClient/CreateNewClientScreen.kt index 3433cd5ecfd..9eb09f04731 100644 --- a/feature/client/src/commonMain/kotlin/com/mifos/feature/client/createNewClient/CreateNewClientScreen.kt +++ b/feature/client/src/commonMain/kotlin/com/mifos/feature/client/createNewClient/CreateNewClientScreen.kt @@ -734,7 +734,7 @@ private fun handleSubmitClick( staffInOffices: List, hasDatatables: Boolean, selectedOfficeId: Int?, - selectedClientId: Int, + selectedClientTypeId: Int, selectedClientClassificationId: Int, genderId: Int, selectedStaffId: Int?, @@ -779,7 +779,7 @@ private fun handleSubmitClick( clientTemplate, genderId, selectedStaffId, - selectedClientId, + selectedClientTypeId, selectedClientClassificationId, isAddressEnabled, isAddressActive, @@ -820,7 +820,7 @@ private fun createClientPayload( clientTemplate: ClientsTemplateEntity, genderId: Int, selectedStaffId: Int?, - selectedClientId: Int, + selectedClientTypeId: Int, selectedClientClassificationId: Int, isAddressEnabled: Boolean, isAddressActive: Boolean, @@ -882,7 +882,7 @@ private fun createClientPayload( clientPayload = clientPayload.copy(staffId = selectedStaffId) } if (clientTemplate.clientTypeOptions?.isNotEmpty() == true) { - clientPayload = clientPayload.copy(clientTypeId = selectedClientId) + clientPayload = clientPayload.copy(clientTypeId = selectedClientTypeId) } if (clientTemplate.clientClassificationOptions?.isNotEmpty() == true) { clientPayload = clientPayload.copy(clientClassificationId = selectedClientClassificationId) From 00a56503e7d5a8b8744bff4046836cbeea5bc33e Mon Sep 17 00:00:00 2001 From: "Sneha Ghosh (Technical_Isopod_075)" <153223798+SnehaghoshBarsha444@users.noreply.github.com> Date: Sat, 4 Oct 2025 18:10:22 +0000 Subject: [PATCH 3/3] Feat: Display gender, clientType, and classification on details screen --- .../room/entities/client/ClientEntity.kt | 8 +++++- .../model/objects/databaseobjects/Client.kt | 8 +++++- .../network/mappers/clients/ClientMapper.kt | 12 ++++++++- .../model/GetClientsPageItemsResponse.kt | 8 +++++- .../clientDetails/ClientDetailsScreen.kt | 26 ++++++++++++++++++- gradle/libs.versions.toml | 3 +-- version.txt | 2 +- 7 files changed, 59 insertions(+), 8 deletions(-) diff --git a/core/database/src/commonMain/kotlin/com/mifos/room/entities/client/ClientEntity.kt b/core/database/src/commonMain/kotlin/com/mifos/room/entities/client/ClientEntity.kt index d5875d19134..d5cb89b7965 100644 --- a/core/database/src/commonMain/kotlin/com/mifos/room/entities/client/ClientEntity.kt +++ b/core/database/src/commonMain/kotlin/com/mifos/room/entities/client/ClientEntity.kt @@ -107,4 +107,10 @@ data class ClientEntity( val emailAddress: String? = null, val legalForm: ClientStatusEntity? = null, -) : Parcelable + + // New fields added + val gender: String? = null, + val clientType: String? = null, + val clientClassification: String? = null + +) : Parcelable \ No newline at end of file diff --git a/core/model/src/commonMain/kotlin/com/mifos/core/model/objects/databaseobjects/Client.kt b/core/model/src/commonMain/kotlin/com/mifos/core/model/objects/databaseobjects/Client.kt index 6ca607e0980..ab0c7ecc569 100644 --- a/core/model/src/commonMain/kotlin/com/mifos/core/model/objects/databaseobjects/Client.kt +++ b/core/model/src/commonMain/kotlin/com/mifos/core/model/objects/databaseobjects/Client.kt @@ -25,4 +25,10 @@ data class Client( var mifosGroup: MifosGroup? = null, val loans: List = ArrayList(), -) : Parcelable + + // New fields added + var gender: String? = null, + var clientType: String? = null, + var clientClassification: String? = null + +) : Parcelable \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/mifos/core/network/mappers/clients/ClientMapper.kt b/core/network/src/commonMain/kotlin/com/mifos/core/network/mappers/clients/ClientMapper.kt index 2454ac43ec6..d283a1be8da 100644 --- a/core/network/src/commonMain/kotlin/com/mifos/core/network/mappers/clients/ClientMapper.kt +++ b/core/network/src/commonMain/kotlin/com/mifos/core/network/mappers/clients/ClientMapper.kt @@ -42,6 +42,11 @@ object ClientMapper : AbstractMapper( value = entity.legalForm?.value, ), dateOfBirth = entity.dateOfBirth ?: emptyList(), + + // Mapping for new fields added + gender = entity.gender, + clientType = entity.clientType, + clientClassification = entity.clientClassification ) } @@ -67,6 +72,11 @@ object ClientMapper : AbstractMapper( value = domainModel.legalForm?.value, ), dateOfBirth = domainModel.dateOfBirth, + + // Reverse mapping for new fields added + gender = domainModel.gender, + clientType = domainModel.clientType, + clientClassification = domainModel.clientClassification ) } -} +} \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsPageItemsResponse.kt b/core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsPageItemsResponse.kt index 36b9cfb1f18..4163b02e769 100644 --- a/core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsPageItemsResponse.kt +++ b/core/network/src/commonMain/kotlin/com/mifos/core/network/model/GetClientsPageItemsResponse.kt @@ -58,4 +58,10 @@ data class GetClientsPageItemsResponse( val savingAccountOptions: List = emptyList(), val shareAccounts: List = emptyList(), -) + + // New fields added + val gender: String? = null, + val clientType: String? = null, + val clientClassification: String? = null + +) \ No newline at end of file diff --git a/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientDetails/ClientDetailsScreen.kt b/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientDetails/ClientDetailsScreen.kt index 94bd32d9df6..111db6aca20 100644 --- a/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientDetails/ClientDetailsScreen.kt +++ b/feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientDetails/ClientDetailsScreen.kt @@ -395,6 +395,30 @@ private fun MifosClientDetailsScreen( value = it, ) } + + // New fields added + client?.gender?.let { + MifosClientDetailsText( + icon = MifosIcons.Person, // Replace with a more suitable icon if available + field = "Gender", // Replace with a string resource e.g., stringResource(Res.string.gender) + value = it, + ) + } + client?.clientType?.let { + MifosClientDetailsText( + icon = MifosIcons.Info, // Replace with a more suitable icon if available + field = "Client Type", // Replace with a string resource + value = it, + ) + } + client?.clientClassification?.let { + MifosClientDetailsText( + icon = MifosIcons.Info, // Replace with a more suitable icon if available + field = "Client Classification", // Replace with a string resource + value = it, + ) + } + client?.let { Utils.getStringOfDate(it.activationDate) }?.let { MifosClientDetailsText( icon = MifosIcons.DateRange, @@ -881,4 +905,4 @@ private fun ClientDetailsScreenPreview() { savingsAccountSelected = { _, _ -> }, activateClient = {}, ) -} +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c776eba5e66..d0c28c31cd4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -116,7 +116,7 @@ kotlinxCoroutines = "1.10.1" kotlinxDatetime = "0.7.1" kotlinxImmutable = "0.3.8" kotlinxSerializationJson = "1.7.3" -ksp = "2.1.0-1.0.29" +ksp = "2.1.10-1.0.30" # Ktor & Ktorfit ktorVersion = "3.1.3" @@ -131,7 +131,6 @@ koinAnnotationsVersion = "1.4.0-RC4" compose-plugin = "1.9.0" coil = "3.2.0" backHandlerVersion = "2.1.0" -constraintLayout = "0.4.0" multiplatformSettings = "1.2.0" qroseVersion = "1.0.1" okioVersion = "3.9.1" diff --git a/version.txt b/version.txt index 656e6042196..1fd39352661 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2025.9.2-beta.0.59 \ No newline at end of file +2025.10.1-beta.0.5 \ No newline at end of file