|
@@ -58,9 +58,13 @@ import androidx.compose.ui.text.style.TextAlign
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
import androidx.compose.ui.unit.sp
|
|
|
import com.fastest.pass.R
|
|
|
+import com.fastest.pass.home.domain.model.CountryInfo
|
|
|
|
|
|
@Composable
|
|
|
-fun AddPassportFormScreen() {
|
|
|
+fun AddPassportFormScreen(
|
|
|
+ onCountryList: (List<CountryInfo>, String) -> Unit,
|
|
|
+ countryListDisplayed: List<CountryInfo>
|
|
|
+) {
|
|
|
val keyboardController = LocalSoftwareKeyboardController.current
|
|
|
val focusManager = LocalFocusManager.current
|
|
|
val gender = listOf("Please Select", "Male", "Female", "Other")
|
|
@@ -91,7 +95,15 @@ fun AddPassportFormScreen() {
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
|
NameTextFieldAPFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.name)
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
|
- SelectCountryInfoPassport(labelText = R.string.country, keyboardController = keyboardController, focusManager = focusManager)
|
|
|
+ SelectCountryInfoPassport(
|
|
|
+ labelText = R.string.country,
|
|
|
+ keyboardController = keyboardController,
|
|
|
+ focusManager = focusManager,
|
|
|
+ onCountryList = { list, text ->
|
|
|
+ onCountryList.invoke(list, text)
|
|
|
+ },
|
|
|
+ countryListDisplayed = countryListDisplayed
|
|
|
+ )
|
|
|
// NameTextFieldAPFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.country)
|
|
|
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
@@ -476,7 +488,9 @@ fun ColumnScope.NotesTextFieldAPFS(
|
|
|
fun ColumnScope.SelectCountryInfoPassport(
|
|
|
labelText: Int,
|
|
|
keyboardController: SoftwareKeyboardController?,
|
|
|
- focusManager: FocusManager
|
|
|
+ focusManager: FocusManager,
|
|
|
+ onCountryList: (List<CountryInfo>, String) -> Unit,
|
|
|
+ countryListDisplayed: List<CountryInfo>
|
|
|
) {
|
|
|
var selectedCountry by remember { mutableStateOf("Please Select") }
|
|
|
var isSheetOpened by remember { mutableStateOf(false) }
|
|
@@ -536,7 +550,10 @@ fun ColumnScope.SelectCountryInfoPassport(
|
|
|
selectedCountry = countryName
|
|
|
},
|
|
|
onSearchTextChanged = {},
|
|
|
- onCountryList = { t , c -> }
|
|
|
+ onCountryList = { list , text ->
|
|
|
+ onCountryList.invoke(list, text)
|
|
|
+ },
|
|
|
+ countryListDisplayed = countryListDisplayed
|
|
|
)
|
|
|
}
|
|
|
}
|