-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ANDROAPP-5575-mobile-ui-Create-InputFileReso…
…urce-component
- Loading branch information
Showing
75 changed files
with
1,149 additions
and
56 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -70,6 +70,7 @@ fun InputMatrixScreen() { | |
newSelectedItem | ||
} | ||
}, | ||
state = InputShellState.UNFOCUSED, | ||
) | ||
|
||
InputMatrix( | ||
|
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
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
87 changes: 87 additions & 0 deletions
87
common/src/commonMain/kotlin/org/hisp/dhis/common/screens/InputOrgUnitScreen.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,87 @@ | ||
package org.hisp.dhis.common.screens | ||
|
||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.size | ||
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.Modifier | ||
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer | ||
import org.hisp.dhis.mobile.ui.designsystem.component.InputOrgUnit | ||
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState | ||
import org.hisp.dhis.mobile.ui.designsystem.component.SubTitle | ||
import org.hisp.dhis.mobile.ui.designsystem.component.SupportingTextData | ||
import org.hisp.dhis.mobile.ui.designsystem.component.SupportingTextState | ||
import org.hisp.dhis.mobile.ui.designsystem.component.Title | ||
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing | ||
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor | ||
|
||
@Composable | ||
fun InputOrgUnitScreen() { | ||
ColumnComponentContainer { | ||
Title("Input Org. unit component", textColor = TextColor.OnSurfaceVariant) | ||
SubTitle("Basic Org. unit ", textColor = TextColor.OnSurfaceVariant) | ||
var inputText1 by rememberSaveable { mutableStateOf("") } | ||
|
||
InputOrgUnit( | ||
title = "Label", | ||
inputText = inputText1, | ||
onValueChanged = { | ||
if (it != null) { | ||
inputText1 = it | ||
} | ||
}, | ||
onOrgUnitActionCLicked = {}, | ||
) | ||
Spacer(Modifier.size(Spacing.Spacing18)) | ||
|
||
SubTitle("Basic Org. unit with content ", textColor = TextColor.OnSurfaceVariant) | ||
var inputText2 by rememberSaveable { mutableStateOf("PHC Fakename") } | ||
|
||
InputOrgUnit( | ||
title = "Label", | ||
inputText = inputText2, | ||
onValueChanged = { | ||
if (it != null) { | ||
inputText2 = it | ||
} | ||
}, | ||
onOrgUnitActionCLicked = {}, | ||
) | ||
Spacer(Modifier.size(Spacing.Spacing18)) | ||
|
||
SubTitle("Error Org. unit required field ", textColor = TextColor.OnSurfaceVariant) | ||
var inputText3 by rememberSaveable { mutableStateOf("") } | ||
|
||
InputOrgUnit( | ||
title = "Label", | ||
state = InputShellState.ERROR, | ||
supportingText = listOf(SupportingTextData("Required", SupportingTextState.ERROR)), | ||
inputText = inputText3, | ||
isRequiredField = true, | ||
onValueChanged = { | ||
if (it != null) { | ||
inputText3 = it | ||
} | ||
}, | ||
onOrgUnitActionCLicked = {}, | ||
) | ||
Spacer(Modifier.size(Spacing.Spacing18)) | ||
|
||
SubTitle("Disabled Org. unit with content ", textColor = TextColor.OnSurfaceVariant) | ||
var inputText5 by rememberSaveable { mutableStateOf("PHC Fakename") } | ||
InputOrgUnit( | ||
title = "Label", | ||
state = InputShellState.DISABLED, | ||
inputText = inputText5, | ||
onValueChanged = { | ||
if (it != null) { | ||
inputText5 = it | ||
} | ||
}, | ||
onOrgUnitActionCLicked = {}, | ||
) | ||
} | ||
} |
Oops, something went wrong.