-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into loan_application_migration
# Conflicts: # app/src/main/java/org/mifos/mobile/ui/loan_account/LoanAccountsDetailFragment.kt
- Loading branch information
Showing
9 changed files
with
363 additions
and
218 deletions.
There are no files selected for viewing
149 changes: 0 additions & 149 deletions
149
app/src/main/java/org/mifos/mobile/ui/fragments/LoanAccountWithdrawFragment.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
app/src/main/java/org/mifos/mobile/ui/loan_account_withdraw/LoanAccountWithdrawFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package org.mifos.mobile.ui.loan_account_withdraw | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.compose.ui.platform.ComposeView | ||
import androidx.compose.ui.platform.ViewCompositionStrategy | ||
import androidx.fragment.app.viewModels | ||
import androidx.lifecycle.Lifecycle | ||
import androidx.lifecycle.lifecycleScope | ||
import androidx.lifecycle.repeatOnLifecycle | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import kotlinx.coroutines.launch | ||
import org.mifos.mobile.R | ||
import org.mifos.mobile.core.ui.theme.MifosMobileTheme | ||
import org.mifos.mobile.databinding.FragmentLoanWithdrawBinding | ||
import org.mifos.mobile.models.accounts.loan.LoanWithAssociations | ||
import org.mifos.mobile.models.accounts.loan.LoanWithdraw | ||
import org.mifos.mobile.ui.activities.base.BaseActivity | ||
import org.mifos.mobile.ui.fragments.base.BaseFragment | ||
import org.mifos.mobile.ui.savings_account_withdraw.SavingsAccountWithdrawScreen | ||
import org.mifos.mobile.utils.Constants | ||
import org.mifos.mobile.utils.DateHelper | ||
import org.mifos.mobile.utils.LoanUiState | ||
import org.mifos.mobile.utils.ParcelableAndSerializableUtils.getCheckedParcelable | ||
import org.mifos.mobile.utils.Toaster | ||
|
||
/** | ||
* Created by dilpreet on 7/6/17. | ||
*/ | ||
@AndroidEntryPoint | ||
class LoanAccountWithdrawFragment : BaseFragment() { | ||
|
||
private val viewModel: LoanAccountWithdrawViewModel by viewModels() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
(activity as? BaseActivity)?.hideToolbar() | ||
if (arguments != null) { | ||
viewModel.setLoanContent( | ||
loanWithAssociations = arguments?.getCheckedParcelable(LoanWithAssociations::class.java, Constants.LOAN_ACCOUNT) | ||
) | ||
} | ||
} | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle?, | ||
): View { | ||
return ComposeView(requireContext()).apply { | ||
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) | ||
setContent { | ||
MifosMobileTheme { | ||
LoanAccountWithdrawScreen( | ||
navigateBack = { activity?.supportFragmentManager?.popBackStack() } | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
companion object { | ||
fun newInstance( | ||
loanWithAssociations: LoanWithAssociations?, | ||
): LoanAccountWithdrawFragment { | ||
val fragment = LoanAccountWithdrawFragment() | ||
val args = Bundle() | ||
args.putParcelable(Constants.LOAN_ACCOUNT, loanWithAssociations) | ||
fragment.arguments = args | ||
return fragment | ||
} | ||
} | ||
} |
Oops, something went wrong.