|
@@ -199,9 +199,32 @@ fun AddContactInfoScreen(
|
|
|
countryListDisplayed = countryListDisplayed
|
|
|
)
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
|
- NumberTextFieldACIFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.mobile, placeholder = R.string.mobile, ImeAction.Next)
|
|
|
+ SelectCountryInfoMobile(
|
|
|
+ keyboardController,
|
|
|
+ focusManager,
|
|
|
+ R.string.mobile,
|
|
|
+ R.string.ext,
|
|
|
+ onCountryList = { list, text ->
|
|
|
+ onCountryList.invoke(list, text)
|
|
|
+ },
|
|
|
+ countryListDisplayed = countryListDisplayed
|
|
|
+ )
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
|
- NumberTextFieldACIFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.fax, placeholder = R.string.fax, ImeAction.Done)
|
|
|
+ SelectCountryInfoMobile(
|
|
|
+ keyboardController,
|
|
|
+ focusManager,
|
|
|
+ R.string.fax,
|
|
|
+ R.string.ext,
|
|
|
+ onCountryList = { list, text ->
|
|
|
+ onCountryList.invoke(list, text)
|
|
|
+ },
|
|
|
+ countryListDisplayed = countryListDisplayed
|
|
|
+ )
|
|
|
+
|
|
|
+// Spacer(modifier = Modifier.height(20.dp))
|
|
|
+// NumberTextFieldACIFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.mobile, placeholder = R.string.mobile, ImeAction.Next)
|
|
|
+// Spacer(modifier = Modifier.height(20.dp))
|
|
|
+// NumberTextFieldACIFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.fax, placeholder = R.string.fax, ImeAction.Done)
|
|
|
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
|
NameTextFieldACIFS(keyboardController = keyboardController, focusManager = focusManager, labelText = R.string.username)
|
|
@@ -1110,7 +1133,96 @@ fun ColumnScope.SelectCountryInfoPhoneIcon(
|
|
|
}
|
|
|
|
|
|
@Composable
|
|
|
-fun ColumnScope.SelectCountryInfoPhoneCGPT(
|
|
|
+fun ColumnScope.SelectCountryInfoMobile(
|
|
|
+ keyboardController: SoftwareKeyboardController?,
|
|
|
+ focusManager: FocusManager,
|
|
|
+ labelText: Int,
|
|
|
+ extText: Int,
|
|
|
+ onCountryList: (List<CountryInfo>, String) -> Unit,
|
|
|
+ countryListDisplayed: List<CountryInfo>
|
|
|
+) {
|
|
|
+ var number by remember { mutableStateOf("") }
|
|
|
+ var extNumber by remember { mutableStateOf("") }
|
|
|
+ var selectedCountryCode by remember { mutableStateOf("+1") }
|
|
|
+ var isSheetOpened by remember { mutableStateOf(false) }
|
|
|
+
|
|
|
+ TextField(
|
|
|
+ value = number,
|
|
|
+ onValueChange = {
|
|
|
+ number = it
|
|
|
+ },
|
|
|
+ textStyle = MaterialTheme.typography.displayMedium.copy(
|
|
|
+ color = colorResource(id = R.color.gray_splash)
|
|
|
+ ),
|
|
|
+ leadingIcon = {
|
|
|
+ Text(
|
|
|
+ text = selectedCountryCode,
|
|
|
+ style = MaterialTheme.typography.displayMedium.copy(
|
|
|
+ color = colorResource(id = R.color.gray_text)
|
|
|
+ ),
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(start = 5.dp, bottom = 4.dp)
|
|
|
+ .clickable {
|
|
|
+ isSheetOpened = true
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .height(60.dp)
|
|
|
+ .border(
|
|
|
+ 1.dp,
|
|
|
+ color = colorResource(id = R.color.gray_border_textfield),
|
|
|
+ shape = RoundedCornerShape(16.dp)
|
|
|
+ )
|
|
|
+ .background(
|
|
|
+ color = colorResource(id = R.color.transparent),
|
|
|
+ shape = RoundedCornerShape(16.dp)
|
|
|
+ ),
|
|
|
+ placeholder = {
|
|
|
+ Text(text = stringResource(id = labelText),
|
|
|
+ style = MaterialTheme.typography.displayMedium.copy(
|
|
|
+ color = colorResource(id = R.color.gray_text)
|
|
|
+ )
|
|
|
+ )
|
|
|
+ },
|
|
|
+ maxLines = 1,
|
|
|
+ colors = TextFieldDefaults.colors(
|
|
|
+ focusedLabelColor = colorResource(id = R.color.gray_splash),
|
|
|
+ unfocusedContainerColor = colorResource(id = R.color.transparent),
|
|
|
+ focusedContainerColor = colorResource(id = R.color.transparent),
|
|
|
+ focusedIndicatorColor = colorResource(id = R.color.transparent),
|
|
|
+ disabledIndicatorColor = colorResource(id = R.color.transparent),
|
|
|
+ unfocusedIndicatorColor = colorResource(id = R.color.transparent),
|
|
|
+ cursorColor = colorResource(id = R.color.gray_splash),
|
|
|
+ ),
|
|
|
+ keyboardOptions = KeyboardOptions(
|
|
|
+ keyboardType = KeyboardType.Number,
|
|
|
+ imeAction = ImeAction.Next
|
|
|
+ ),
|
|
|
+ keyboardActions = KeyboardActions(),
|
|
|
+ )
|
|
|
+
|
|
|
+ if (isSheetOpened) {
|
|
|
+ OpenModalBottomSheet(
|
|
|
+ keyboardController,
|
|
|
+ focusManager,
|
|
|
+ isSheetOpened = {isSheetOpened = false},
|
|
|
+ onSelectedCountry = { countryCode ->
|
|
|
+ selectedCountryCode = countryCode
|
|
|
+ },
|
|
|
+ isCountryList = false,
|
|
|
+ onSearchTextChanged = {},
|
|
|
+ onCountryList = { list , text ->
|
|
|
+ onCountryList.invoke(list, text)
|
|
|
+ },
|
|
|
+ countryListDisplayed = countryListDisplayed
|
|
|
+ )
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@Composable
|
|
|
+fun ColumnScope.SelectCountryInfoPhonecgp(
|
|
|
keyboardController: SoftwareKeyboardController?,
|
|
|
focusManager: FocusManager,
|
|
|
labelText: Int,
|