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 @@ -31,7 +31,7 @@ data class ServerConfig(
endPoint = "tt.mifos.community",
apiPath = "/fineract-provider/api/v1/",
port = "80",
tenant = "default",
tenant = "dev",
)

val LOCALHOST = ServerConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
*/
package com.mifos.core.network.model.share

import com.mifos.core.model.objects.template.client.ChargeAppliesTo
import com.mifos.core.model.objects.template.client.ChargeCalculationType
import com.mifos.core.model.objects.template.client.ChargePaymentMode
import com.mifos.core.model.objects.template.client.ChargeTimeType
import com.mifos.core.model.objects.template.client.Currency
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand All @@ -25,6 +29,8 @@ data class ShareTemplate(

val productOptions: List<ProductOption> = emptyList(),

val chargeOptions: List<ChargeOptions> = emptyList(),

@SerialName("clientSavingsAccounts")
val savingsAccountOptions: List<SavingsAccountOption>? = emptyList(),

Expand Down Expand Up @@ -52,3 +58,17 @@ data class FrequencyTypeOption(

val value: String,
)

@Serializable
data class ChargeOptions(
val id: Int? = null,
val name: String? = null,
val active: Boolean? = null,
val penalty: Boolean? = null,
val currency: Currency? = null,
val amount: Double? = null,
val chargeTimeType: ChargeTimeType? = null,
val chargeAppliesTo: ChargeAppliesTo? = null,
val chargeCalculationType: ChargeCalculationType? = null,
val chargePaymentMode: ChargePaymentMode? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ fun AddChargeBottomSheet(
title: String,
confirmText: String,
dismissText: String,
showDatePicker: Boolean,
showDatePicker: Boolean = false,
selectedChargeName: String,
selectedDate: String,
selectedDate: String? = null,
chargeAmount: String,
chargeType: String,
chargeCollectedOn: String,
Expand Down Expand Up @@ -109,13 +109,15 @@ fun AddChargeBottomSheet(
label = stringResource(Res.string.name),
)

MifosDatePickerTextField(
value = selectedDate,
label = stringResource(Res.string.date),
openDatePicker = { onDatePick(true) },
)
if (selectedDate != null) {
MifosDatePickerTextField(
value = selectedDate,
label = stringResource(Res.string.date),
openDatePicker = { onDatePick(true) },
)

Spacer(Modifier.height(DesignToken.padding.large))
Spacer(Modifier.height(DesignToken.padding.large))
}

MifosOutlinedTextField(
value = chargeAmount,
Expand Down Expand Up @@ -161,7 +163,7 @@ fun AddChargeBottomSheet(
secondBtnText = confirmText,
onFirstBtnClick = onDismiss,
onSecondBtnClick = onConfirm,
isSecondButtonEnabled = chargeAmount.isNotEmpty() && chargeType.isNotEmpty() && amountError.isNullOrEmpty(),
isSecondButtonEnabled = chargeAmount.isNotEmpty() && amountError.isNullOrEmpty(),
)
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ fun MifosActionsShareListingComponent(
fun MifosActionsChargeListingComponent(
chargeTitle: String,
type: String,
date: String,
date: String? = null,
collectedOn: String,
amount: String,
menuList: List<Actions> = listOf<Actions>(
Expand Down Expand Up @@ -642,11 +642,15 @@ fun MifosActionsChargeListingComponent(
text = type,
),
)
PrintTextUtil(
TextUtil(
text = date,
),
)
if (
date != null
) {
PrintTextUtil(
TextUtil(
text = date,
),
)
}
}
Row(
verticalAlignment = Alignment.CenterVertically,
Expand Down
13 changes: 13 additions & 0 deletions feature/client/src/commonMain/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,19 @@
<string name="feature_share_account_terms_type">Type</string>
<string name="feature_share_account_terms_lock_in_period">Lock-in Period</string>

<string name="feature_share_account_charge">Charge</string>
<string name="feature_share_account_charge_add_new">Add New</string>
<string name="feature_share_account_charge_view">View</string>
<string name="feature_share_account_charge_active_charge">Active Charge</string>
<string name="feature_share_account_charge_add_new_charge">Add New Charge</string>
<string name="feature_share_account_charge_date">Date</string>
<string name="feature_share_account_charge_type">Type</string>
<string name="feature_share_account_charge_collected_on">Collected On</string>
<string name="feature_share_account_charge_view_charges">View Charges</string>
<string name="feature_share_account_charge_edit_charge">Edit Charge</string>
<string name="feature_share_account_charge_add">Add</string>
<string name="feature_share_account_charge_btn_add_new">Add</string>


<!-- Handle Error-->
<string name="feature_share_account_field_empty">This field cannot be empty</string>
Expand Down
Loading