Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ data class Client(
var mifosGroup: MifosGroup? = null,

val loans: List<Loan> = ArrayList(),
) : Parcelable

// New fields added
var gender: String? = null,
var clientType: String? = null,
var clientClassification: String? = null

) : Parcelable
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ object ClientMapper : AbstractMapper<GetClientsPageItemsResponse, ClientEntity>(
value = entity.legalForm?.value,
),
dateOfBirth = entity.dateOfBirth ?: emptyList(),

// Mapping for new fields added
gender = entity.gender,
clientType = entity.clientType,
clientClassification = entity.clientClassification
)
}

Expand All @@ -67,6 +72,11 @@ object ClientMapper : AbstractMapper<GetClientsPageItemsResponse, ClientEntity>(
value = domainModel.legalForm?.value,
),
dateOfBirth = domainModel.dateOfBirth,

// Reverse mapping for new fields added
gender = domainModel.gender,
clientType = domainModel.clientType,
clientClassification = domainModel.clientClassification
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,10 @@ data class GetClientsPageItemsResponse(
val savingAccountOptions: List<SavingAccountOption> = emptyList(),

val shareAccounts: List<ShareAccounts> = emptyList(),
)

// New fields added
val gender: String? = null,
val clientType: String? = null,
val clientClassification: String? = null

)
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the comments

Copy link
Author

Choose a reason for hiding this comment

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

Ok Sir

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,
Expand Down Expand Up @@ -881,4 +905,4 @@ private fun ClientDetailsScreenPreview() {
savingsAccountSelected = { _, _ -> },
activateClient = {},
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ private fun UpdateClientDetailsContent(
updateClient,
isActive,
staffInOffices,
selectedClientId = selectedClientTypeId,
selectedClientTypeId = selectedClientTypeId,
selectedClientClassificationId,
genderId,
selectedStaffId,
Expand Down Expand Up @@ -919,7 +919,7 @@ private fun handleSubmitClick(
updateClient: (clientPayload: ClientPayloadEntity) -> Unit,
isActive: Boolean,
staffInOffices: List<StaffEntity>,
selectedClientId: Int,
selectedClientTypeId: Int,
selectedClientClassificationId: Int,
genderId: Int,
selectedStaffId: Int?,
Expand Down Expand Up @@ -962,7 +962,7 @@ private fun handleSubmitClick(
clientTemplate,
genderId,
selectedStaffId,
selectedClientId,
selectedClientTypeId,
selectedClientClassificationId,
selectedLegalFormId,
)
Expand All @@ -986,7 +986,7 @@ private fun createClientPayload(
clientTemplate: ClientsTemplateEntity,
genderId: Int,
selectedStaffId: Int?,
selectedClientId: Int,
selectedClientTypeId: Int,
selectedClientClassificationId: Int,
legalFormId: Int?,
): ClientPayloadEntity {
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ private fun handleSubmitClick(
staffInOffices: List<StaffEntity>,
hasDatatables: Boolean,
selectedOfficeId: Int?,
selectedClientId: Int,
selectedClientTypeId: Int,
selectedClientClassificationId: Int,
genderId: Int,
selectedStaffId: Int?,
Expand Down Expand Up @@ -779,7 +779,7 @@ private fun handleSubmitClick(
clientTemplate,
genderId,
selectedStaffId,
selectedClientId,
selectedClientTypeId,
selectedClientClassificationId,
isAddressEnabled,
isAddressActive,
Expand Down Expand Up @@ -820,7 +820,7 @@ private fun createClientPayload(
clientTemplate: ClientsTemplateEntity,
genderId: Int,
selectedStaffId: Int?,
selectedClientId: Int,
selectedClientTypeId: Int,
selectedClientClassificationId: Int,
isAddressEnabled: Boolean,
isAddressActive: Boolean,
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025.9.2-beta.0.59
2025.10.1-beta.0.5