Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: recent transaction to compose #2471

Closed
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 @@ -37,6 +37,7 @@ import org.mifos.mobile.ui.enums.ChargeType
import org.mifos.mobile.ui.fragments.*
import org.mifos.mobile.ui.getThemeAttributeColor
import org.mifos.mobile.ui.login.LoginActivity
import org.mifos.mobile.ui.recent_transaction.RecentTransactionsFragment
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.TextDrawable
import org.mifos.mobile.utils.Toaster
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.mifos.mobile.ui.recent_transaction

data class RecentTransaction(

val value: String? = null,

val amount: String? = null,

val date: String = ""
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package org.mifos.mobile.ui.recent_transaction

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
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.res.painterResource
import androidx.compose.ui.unit.dp
import org.mifos.mobile.R

/**
* @author pratyush
* @since 03/01/2024
*/

@Composable
fun RecentTransactionItem(amount: String, date: String, value: String) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp)
) {
Image(
modifier = Modifier.size(39.dp),
painter = painterResource(id = R.drawable.ic_local_atm_black_24dp),
contentDescription = null
)

Column(
modifier = Modifier
.fillMaxWidth()
.padding(start = 8.dp)
) {
Text(text = value, color = Color.White)
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(text = amount, color = Color.White)
Text(text = date, color = Color.White)
}
}
}
}
Loading
Loading