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: Migration of Loan Application screen to compose #2571

Merged
Merged
1 change: 1 addition & 0 deletions app/src/main/java/org/mifos/mobile/api/DataManager.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.mifos.mobile.api

import android.util.Log
import io.reactivex.Observable
import okhttp3.ResponseBody
import org.mifos.mobile.api.local.DatabaseHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ data class LoanTemplate(

var clientOfficeId: Int? = null,

var loanProductId: Int? = null,

var loanProductName: String? = null,

@SerializedName("isLoanProductLinkedToFloatingRate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ interface LoanRepository {
loanWithdraw: LoanWithdraw?,
): Flow<ResponseBody?>?

fun template(): Flow<LoanTemplate?>?
fun template(): Flow<LoanTemplate?>

fun getLoanTemplateByProduct(
productId: Int?
): Flow<LoanTemplate?>?
): Flow<LoanTemplate?>
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class LoanRepositoryImp @Inject constructor(private val dataManager: DataManager
}
}

override fun template(): Flow<LoanTemplate?>? {
override fun template(): Flow<LoanTemplate?> {
return flow {
emit(dataManager.loanTemplate())
}
}

override fun getLoanTemplateByProduct(productId: Int?): Flow<LoanTemplate?>? {
override fun getLoanTemplateByProduct(productId: Int?): Flow<LoanTemplate?> {
return flow {
emit(dataManager.getLoanTemplateByProduct(productId))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.mifos.mobile.R
import org.mifos.mobile.databinding.ActivityLoanApplicationBinding
import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.ui.enums.LoanState
import org.mifos.mobile.ui.fragments.LoanApplicationFragment
import org.mifos.mobile.ui.loan_account_application.LoanApplicationFragment

class LoanApplicationActivity : BaseActivity() {

Expand Down
Loading
Loading