Skip to content
Merged
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 @@ -47,7 +47,7 @@ fun RowScope.MifosNavigationBarItem(
modifier = Modifier.padding(DesignToken.padding.extraSmall),
text = stringResource(label),
style = MifosTypography.labelMedium,
color = MaterialTheme.colorScheme.secondary,
color = MaterialTheme.colorScheme.onSurface,
)
},
selected = isSelected,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationRailDefaults
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.unit.dp
import org.mifos.mobile.core.designsystem.theme.DesignToken
Expand All @@ -38,8 +38,8 @@ fun MifosNavigationRail(
windowInsets: WindowInsets = NavigationRailDefaults.windowInsets,
) {
Surface(
color = Color.White,
contentColor = Color.Unspecified,
color = MaterialTheme.colorScheme.surface,
contentColor = MaterialTheme.colorScheme.onSurface,
modifier = modifier,
) {
Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import androidx.compose.material3.NavigationRailItemDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import org.jetbrains.compose.resources.StringResource
import org.jetbrains.compose.resources.stringResource
Expand All @@ -40,15 +39,14 @@ fun ColumnScope.MifosNavigationRailItem(
Icon(
imageVector = if (isSelected) selectedIconRes else unselectedIconRes,
contentDescription = stringResource(contentDescriptionRes),
tint = Color.Unspecified,
)
},
label = {
Text(
modifier = Modifier.padding(DesignToken.padding.extraSmall),
text = stringResource(label),
style = MifosTypography.labelMedium,
color = MaterialTheme.colorScheme.secondary,
color = MaterialTheme.colorScheme.onSurface,
)
},
selected = isSelected,
Expand All @@ -57,7 +55,9 @@ fun ColumnScope.MifosNavigationRailItem(
colors = NavigationRailItemDefaults.colors(
selectedIconColor = MaterialTheme.colorScheme.primary,
unselectedIconColor = MaterialTheme.colorScheme.primary,
indicatorColor = MaterialTheme.colorScheme.primary.copy(alpha = 0.3f),
),

modifier = modifier,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import org.mifos.mobile.core.ui.composableWithSlideTransitions
data class MakeTransferRoute(
val accountId: Long = -1L,
val accountNo: String? = null,
val amount: Double? = null,
val outstandingBalance: Double? = null,
val amount: String? = null,
val outstandingBalance: String? = null,
val transferType: String? = null,
val transferTarget: String? = null,
val transferSuccessDestination: String? = null,
Expand All @@ -36,7 +36,7 @@ fun NavController.navigateToMakeTransferScreen(transferPayload: AccountDetails,
MakeTransferRoute(
accountId = transferPayload.accountId,
accountNo = transferPayload.accountNo,
outstandingBalance = transferPayload.outstandingBalance,
outstandingBalance = transferPayload.outstandingBalance.toString(),
transferType = transferPayload.transferType,
transferTarget = transferPayload.transferTarget.name,
transferSuccessDestination = transferPayload.transferSuccessDestination,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal class MakeTransferViewModel(
MakeTransferState(
clientId = requireNotNull(userPreferencesRepositoryImpl.clientId.value),
accountId = route.accountId,
outstandingBalance = route.outstandingBalance,
outstandingBalance = route.outstandingBalance?.toDouble(),
transferTarget = if (route.transferTarget != null) {
enumValueOf<TransferType>(route.transferTarget)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data class TransferProcessRoute(
val toClientId: Long? = null,
val toAccountType: Int? = null,
val toAccountId: String? = null,
val transferAmount: Double? = null,
val transferAmount: String? = null,
val transferDescription: String? = null,
val transferType: String = TransferType.SELF.name,
val transferSuccessDestination: String = "",
Expand Down Expand Up @@ -63,7 +63,7 @@ fun NavController.navigateToTransferProcessScreen(
toAccountId = transferPayload.payToAccount?.accountNo,
toClientId = transferPayload.payToAccount?.clientId,
toAccountType = transferPayload.payToAccount?.accountType?.id,
transferAmount = transferPayload.amount.toDoubleOrNull(),
transferAmount = transferPayload.amount,
transferDescription = transferPayload.review,
transferType = transferType.name,
transferSuccessDestination = transferSuccessDestination,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ internal class TransferProcessViewModel(
toClientId = route.toClientId,
toAccountType = route.toAccountType,
transferDate = DateHelper.getDateMonthYearString(transferDate),
transferAmount = route.transferAmount,
transferAmount = route.transferAmount?.toDouble(),
transferDescription = route.transferDescription,
dateFormat = "dd MMMM yyyy",
locale = "en",
Expand Down
Loading