File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
core/designsystem/src/commonMain/kotlin/com/mifos/core/designsystem/component
feature/center/src/commonMain/kotlin/com/mifos/feature/center/createCenter Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,10 @@ fun MifosButton(
5858 contentPadding : PaddingValues = ButtonDefaults .ContentPadding ,
5959 elevation : ButtonElevation ? = ButtonDefaults .buttonElevation(),
6060 colors : ButtonColors = ButtonDefaults .buttonColors(
61- containerColor = MaterialTheme .colorScheme.background,
61+ containerColor = MaterialTheme .colorScheme.primary,
62+ contentColor = MaterialTheme .colorScheme.onPrimary,
63+ disabledContainerColor = MaterialTheme .colorScheme.onSurface.copy(alpha = 0.12f),
64+ disabledContentColor = MaterialTheme .colorScheme.onSurface.copy(alpha = 0.38f),
6265 ),
6366 content : @Composable RowScope .() -> Unit = {},
6467) {
Original file line number Diff line number Diff line change @@ -237,16 +237,18 @@ private fun CreateNewCenterContent(
237237 value = centerName,
238238 onValueChange = { centerName = it },
239239 label = stringResource(Res .string.feature_center_center_name),
240- error = null ,
240+ error = centerNameValidator ,
241241 )
242242
243243 MifosTextFieldDropdown (
244244 value = selectedOffice,
245245 onValueChanged = {
246246 selectedOffice = it
247+ selectedOfficeValidator = null
247248 },
248249 onOptionSelected = { index, value ->
249250 selectedOffice = value
251+ selectedOfficeValidator = null
250252 offices[index].id.let {
251253 officeId = it
252254 }
@@ -299,6 +301,7 @@ private fun CreateNewCenterContent(
299301 )
300302 }
301303 },
304+ enabled = validateAllFields(),
302305 modifier = Modifier
303306 .fillMaxWidth()
304307 .heightIn(44 .dp)
You can’t perform that action at this time.
0 commit comments