Skip to content

Commit

Permalink
Merge branch 'main' into issue-2827
Browse files Browse the repository at this point in the history
  • Loading branch information
ellykits authored Oct 23, 2023
2 parents 2ce8123 + ae8986a commit 6ea81f2
Show file tree
Hide file tree
Showing 31 changed files with 174 additions and 120 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [App Performance] Profile the time it takes for the app to load the configs and patient data from the local DB
- Add progress indicator during report generation
- Add config property in QuestionnaireConfig to indicate when to udpate or create new extracted resource
- Use `ButtonProperties.buttonType` to configure button size (BIG, MEDIUM or TINY). Deleted `ButtonProperties.smallSized`

### Fixed
- Incorrect error shown for failed authentication when the credentials are invalid.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ data class ProfileConfiguration(
ActiveResourceFilterConfig(resourceType = ResourceType.Group, active = true),
),
val configRules: List<RuleConfig>? = null,
val contentBackgroundColor: String? = "#FFFFFF",
val contentBackgroundColor: String? = "#F2F4F7",
) : Configuration()
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ data class ButtonProperties(
val enabled: String = "true",
val text: String? = null,
val status: String,
val smallSized: Boolean = false,
val fontSize: Float = 14.0f,
val actions: List<ActionConfig> = emptyList(),
val buttonType: ButtonType = ButtonType.MEDIUM,
val startIcon: ImageConfig? = null,
val letterSpacing: Int = 0,
) : ViewProperties(), Parcelable {
/**
* This function determines the status color to display depending on the value of the service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data class CompoundTextProperties(
val colorOpacity: Float = 1f,
val textCase: TextCase? = null,
val overflow: TextOverFlow? = null,
val letterSpacing: Int = 0,
) : ViewProperties(), Parcelable {
override fun interpolate(computedValuesMap: Map<String, Any>): CompoundTextProperties {
return this.copy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ val SubtitleTextColor = Color(0xFF7A7A7A)
val GreyTextColor = Color(0xFF5A5A5A)
val SuccessColor = Color(0xFF1DB11B)
val DangerColor = Color(0xFFDE0E1A)
val InfoColor = Color(0xFF006EB8)
val DefaultColor = Color(0xFF999999)
val InfoColor = Color(0xFF0077CC)
val DefaultColor = Color(0xFF7A7A7A)
val WarningColor = Color(0xFFFF8800)
val LoginDarkColor = Color(0xFF272727)
val LoginFieldBackgroundColor = Color(0xFF273844)
Expand All @@ -42,8 +42,8 @@ val PersonalDataBackgroundColor = Color(0xFFF5F5F5)
val MenuActionButtonTextColor = Color(0xFF28B8F9)
val MenuItemColor = Color(0xFFBFBFBF)
val SearchHeaderColor = Color(0xFFF2F4F7)
private val PrimaryColor = Color(0xFF005084)
private val PrimaryVariantColor = Color(0xFF003D66)
private val PrimaryColor = Color(0xFF0077CC)
private val PrimaryVariantColor = Color(0xFF006BBA)

val LightColors =
lightColors(primary = PrimaryColor, primaryVariant = PrimaryVariantColor, error = DangerColor)
Expand Down
8 changes: 4 additions & 4 deletions android/engine/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<resources>
<color name="colorError">#DD0000</color>
<color name="colorErrorDull">#f2d0d3</color>
<color name="colorPrimary">#005084</color>
<color name="colorPrimaryDark">#003D66</color>
<color name="colorPrimaryLight">#006EB8</color>
<color name="colorAccent">#0283DA</color>
<color name="colorPrimary">#0077CC</color>
<color name="colorPrimaryDark">#006BBA</color>
<color name="colorPrimaryLight">#0077CC</color>
<color name="colorAccent">#0077CC</color>
<color name="colorPrimaryLightDull">#DEECF6</color>
<color name="white">#FFFFFF</color>
<color name="drawer_menu_highlighted_bg_color">#005084</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class ButtonPropertiesTest : RobolectricTest() {
enabled = "@{enabled}",
text = "@{text}",
status = "@{status}",
smallSized = false,
fontSize = 14.0f,
actions = emptyList(),
buttonType = ButtonType.MEDIUM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class ServiceCardTest {
showVerticalDivider: Boolean = false,
serviceStatus: String = ServiceStatus.UPCOMING.name,
text: String = "Next visit 09-10-2022",
smallSized: Boolean = false,
visible: String = "true",
): ServiceCardProperties {
return ServiceCardProperties(
Expand Down Expand Up @@ -143,7 +142,6 @@ class ServiceCardTest {
visible = visible,
status = serviceStatus,
text = text,
smallSized = smallSized,
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import org.smartregister.fhircore.engine.configuration.navigation.ICON_TYPE_LOCA
import org.smartregister.fhircore.engine.configuration.navigation.ICON_TYPE_REMOTE
import org.smartregister.fhircore.engine.configuration.navigation.ImageConfig
import org.smartregister.fhircore.engine.configuration.view.ButtonProperties
import org.smartregister.fhircore.engine.configuration.view.ButtonType
import org.smartregister.fhircore.engine.configuration.view.CardViewProperties
import org.smartregister.fhircore.engine.configuration.view.ColumnArrangement
import org.smartregister.fhircore.engine.configuration.view.ColumnProperties
Expand Down Expand Up @@ -83,7 +84,7 @@ class ViewGeneratorTest {
visible = "true",
status = ServiceStatus.DUE.name,
text = "Next visit 09-10-2022",
smallSized = false,
buttonType = ButtonType.BIG,
),
),
resourceData = resourceData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1074,7 +1073,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceType": "Patient",
Expand Down Expand Up @@ -1340,7 +1338,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1352,7 +1349,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down Expand Up @@ -1461,7 +1457,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1473,7 +1468,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down Expand Up @@ -1582,7 +1576,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1594,7 +1587,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down Expand Up @@ -1703,7 +1695,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1715,7 +1706,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down Expand Up @@ -1824,7 +1814,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1836,7 +1825,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down Expand Up @@ -1945,7 +1933,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -1957,7 +1944,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down Expand Up @@ -2066,7 +2052,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -2077,7 +2062,6 @@
"workflow": "LAUNCH_QUESTIONNAIRE",
"questionnaire": {
"id": "@{taskQuestionnaireId}",

"title": "@{taskDescription}",
"saveButtonText": "Save",
"taskId": "@{taskId}",
Expand Down Expand Up @@ -2187,7 +2171,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand All @@ -2199,7 +2182,6 @@
"questionnaire": {
"id": "@{taskQuestionnaireId}",
"title": "@{taskDescription}",

"saveButtonText": "Save",
"taskId": "@{taskId}",
"resourceIdentifier": "@{taskFor}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"enabled": "@{patientActive}",
"actions": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,6 @@
"views": [
{
"viewType": "BUTTON",
"smallSized": "true",
"text": "@{taskDescriptionWithStartDate}",
"status": "@{taskStatusColorCode}",
"visible": "true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"text": "@{totalTaskCount}",
"status": "@{serviceStatus}",
"fontSize": 14.0,
"smallSized": false,
"buttonType": "BIG",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"text": "@{runningBalance}",
"status": "DUE",
"fontSize": 14.0,
"smallSized": false,
"buttonType": "BIG",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"text": "CHA Visit",
"status": "DUE",
"fontSize": 12.0,
"smallSized": false,
"buttonType": "BIG",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"visible": "@{showMemberTasks}",
"text": "@{taskDescription}",
"status": "@{serviceStatus}",
"smallSized": true,
"buttonType": "TINY",
"actions": [
{
"trigger": "ON_CLICK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fun TopScreenSection(
},
modifier =
modifier
.padding(start = 16.dp, bottom = 8.dp, end = 16.dp)
.padding(start = 8.dp, bottom = 8.dp, end = 8.dp)
.fillMaxWidth()
.clip(RoundedCornerShape(size = 10.dp))
.background(Color.White)
Expand Down
Loading

0 comments on commit 6ea81f2

Please sign in to comment.