Skip to content

Commit

Permalink
#1371 | Subject Dashboard UI updates - feedback comments wip
Browse files Browse the repository at this point in the history
  • Loading branch information
1t5j0y committed Apr 29, 2024
1 parent 2b68a42 commit 158701f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class IndividualProfile extends AbstractComponent {
headingSuffixesList.unshift(this.props.individual.userProfileSubtext1(this.I18n)); //localized Gender
}
let headingSuffix = _.join(headingSuffixesList, ", ")
return <View style={{backgroundColor: Styles.greyBackground}}>
return <View style={{backgroundColor: Styles.whiteColor}}>
{(this.props.viewContext !== IndividualProfile.viewContext.Wizard) ?
(
<>
Expand Down
6 changes: 3 additions & 3 deletions packages/openchs-android/src/views/common/NewFormButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class NewFormButton extends AbstractComponent {
renderOption() {
const containerStyle = this.props.style || {};
const availableActions = _.size(this.state.encounterActions);
return (
return ( availableActions > 0 ?
<View style={containerStyle}>
<View style={{marginTop: 2, position: 'absolute', right: 8}}>
{availableActions > 0 ? this.renderButtonBasedOnEncounters() : <View/>}
{this.renderButtonBasedOnEncounters()}
</View>
</View>
</View> : <View/>
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class PreviousEncounters extends AbstractComponent {
}
const dataSource = ListViewHelper.getDataSource(toDisplayEncounters);
const renderable = (<View>
<View style={{flexDirection: 'row', alignItems: 'center', backgroundColor: Styles.greyBackground}}>
<View style={{flexDirection: 'row', alignItems: 'center', backgroundColor: Styles.whiteColor}}>
{this.props.title && (
<Text style={[Styles.cardTitle, {padding: Distances.ScaledContentDistanceFromEdge}]}>
{this.props.title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,18 +344,22 @@ class SubjectDashboardProfileTab extends AbstractComponent {
}

renderSummary() {
return <View style={{
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Colors.cardBackgroundColor,
marginVertical: 16
}}>
return <View>
<View>
<Text style={Styles.cardTitle}>{this.I18n.t('subjectSummary')}</Text>
</View>
<Observations observations={_.defaultTo(this.state.subjectSummary, [])}
style={{marginVertical: DGS.resizeHeight(8)}}/>

<View style={{
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 16
}}>

<Observations observations={_.defaultTo(this.state.subjectSummary, [])}
style={{ marginVertical: DGS.resizeHeight(8) }}/>
</View>
</View>
}

Expand Down Expand Up @@ -383,7 +387,7 @@ class SubjectDashboardProfileTab extends AbstractComponent {
{groupSubjectToggle ? this.renderMembers() : <View/>}
</View>
{displayGeneralEncounterInfo && <SubjectDashboardGeneralTab {...this.props}/>}
<Separator height={110} backgroundColor={Colors.GreyContentBackground}/>
<Separator height={110} backgroundColor={Colors.WhiteContentBackground}/>
{editFormRuleResponse.isEditDisallowed() &&
<AvniToast message={this.I18n.t(editFormRuleResponse.getMessageKey())} onAutoClose={() => this.dispatchAction(Actions.ON_EDIT_ERROR_SHOWN)}/>}
</View>
Expand Down

0 comments on commit 158701f

Please sign in to comment.