Skip to content

Commit

Permalink
Initial commit : migrated KYCLevel3Fragment to compose
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKumdale authored and therajanmaurya committed Apr 14, 2024
1 parent 88fff18 commit 02109c2
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.mifos.mobilewallet.mifospay.kyc.presenter

import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import org.mifos.mobilewallet.core.base.UseCaseHandler
import org.mifos.mobilewallet.mifospay.data.local.LocalRepository
import javax.inject.Inject

@HiltViewModel
class KYCLevel3ViewModel @Inject constructor(
private val mUseCaseHandler: UseCaseHandler,
private val mLocalRepository: LocalRepository
) : ViewModel() {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package org.mifos.mobilewallet.mifospay.kyc.ui

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.mifos.mobilewallet.mifospay.R
import org.mifos.mobilewallet.mifospay.designsystem.component.MifosOutlinedTextField
import org.mifos.mobilewallet.mifospay.theme.MifosTheme

@Composable
fun KYCLevel3Screen(
modifier: Modifier
) {
var panIdValue by rememberSaveable { mutableStateOf("") }

Column(
modifier = Modifier
.fillMaxSize()
.padding(20.dp),
verticalArrangement = Arrangement.spacedBy(20.dp)
) {

MifosOutlinedTextField(
modifier = modifier
.fillMaxWidth()
.padding(vertical = 8.dp),
value = panIdValue,
onValueChange = {
panIdValue = it
},
label = R.string.pan_id,
)

Button(
onClick = {},
modifier = Modifier
.align(Alignment.CenterHorizontally)
.padding(16.dp)
) {
Text(stringResource(R.string.submit))
}
}
}

@Preview(showBackground = true)
@Composable
fun KYCLevel3ScreenPreview() {
MifosTheme {
KYCLevel3Screen(modifier = Modifier)
}
}

0 comments on commit 02109c2

Please sign in to comment.