Skip to content

Commit

Permalink
#1371 | Subject Dashboard UI updates - feedback comments
Browse files Browse the repository at this point in the history
  • Loading branch information
1t5j0y committed Apr 29, 2024
1 parent 158701f commit 055e3b7
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 33 deletions.
17 changes: 8 additions & 9 deletions packages/openchs-android/src/views/common/IndividualProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ class IndividualProfile extends AbstractComponent {
renderProfileActionButton(iconMode, displayTextMessageKey, onPress) {
return (<TouchableNativeFeedback onPress={onPress}>
<View style={{
flexDirection: 'row', height: DGS.resizeHeight(30),
flexDirection: 'row',
paddingHorizontal: DGS.resizeWidth(6),
alignItems: 'center', justifyContent: 'flex-start', marginHorizontal: 4, backgroundColor: Styles.greyBackground
alignItems: 'center', justifyContent: 'flex-start', marginHorizontal: 4, backgroundColor: Styles.greyBackground,
borderRadius: 5, elevation: 2
}}>
<AvniIcon name={iconMode} style={{
fontSize: DGS.resizeWidth(Styles.programProfileButtonText.fontSize),
Expand Down Expand Up @@ -188,7 +189,9 @@ class IndividualProfile extends AbstractComponent {
paddingHorizontal: 10,
marginEnd: 2,
alignItems: 'center',
backgroundColor: Styles.greyBackground
backgroundColor: Styles.greyBackground,
borderRadius: 5,
elevation: 2
}}>
<Text style={{color: Styles.accentColor}}>{`${groupAction.label} ${this.I18n.t(label)}`}</Text>
</TouchableOpacity>
Expand Down Expand Up @@ -243,18 +246,14 @@ class IndividualProfile extends AbstractComponent {
(
<>
<CustomActivityIndicator loading={this.state.displayProgressIndicator}/>
<View style={{
marginVertical: 10,
marginHorizontal: 10,
backgroundColor: Styles.greyBackground
}}>
<View>
<ActionSelector
title={this.I18n.t("enrolInProgram")}
hide={() => this.dispatchAction(Actions.HIDE_ACTION_SELECTOR)}
visible={this.state.displayActionSelector}
actions={this.state.programActions}
/>
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View style={{flexDirection: 'row', alignItems: 'center', paddingBottom: 10, backgroundColor: Styles.greyBackground}}>
<View style={{
paddingHorizontal: 20,
justifyContent: 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,11 @@ const styles = StyleSheet.create({
container: {
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 3
marginVertical: 3,
borderWidth: 2,
borderColor: Styles.greyBackground,
borderRadius: 10
},
viewAllContainer: {
right: Distances.ScaledContentDistanceFromEdge,
Expand Down
15 changes: 10 additions & 5 deletions packages/openchs-android/src/views/common/Relatives.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Relatives extends AbstractComponent {
const dataSource = new ListView.DataSource({rowHasChanged: () => false}).cloneWithRows(relatives);
return (
relatives.length > 0 ?
(<View style={{flexDirection: "column", paddingBottom: 10}}>
(<View style={{flexDirection: "column", paddingBottom: 10, borderRadius: 10}}>
{this.renderTitle()}
<ListView enableEmptySections={true}
dataSource={dataSource}
Expand All @@ -125,7 +125,9 @@ class Relatives extends AbstractComponent {
</View>

</View>
<View style={{marginHorizontal: 10}}>
<SubjectInfoCard individual={relative.relative} />
</View>
{editDeleteFeatureToggle && this.renderRelativeActionButton(relative)}
</View>
</TouchableNativeFeedback>
Expand All @@ -143,11 +145,11 @@ export default Relatives;
const styles = StyleSheet.create({
container: {
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 3,
paddingBottom: 5,
paddingTop: 5
paddingBottom: 10,
paddingTop: 5,
borderRadius: 10
},
relativeDetails: {
flexDirection: 'row',
Expand All @@ -159,6 +161,9 @@ const styles = StyleSheet.create({
flex: 1
},
buttonStyle: {
backgroundColor: Styles.greyBackground
backgroundColor: Styles.greyBackground,
borderRadius: 5,
elevation: 2,
marginHorizontal: 5
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class SubjectDashboardGeneralTab extends AbstractComponent {

render() {
return (
<View style={{backgroundColor: Colors.GreyContentBackground, marginTop: 10}}>
<View style={{backgroundColor: Colors.WhiteContentBackground, marginTop: 10}}>
<ActionSelector
title={this.I18n.t("followupTypes")}
hide={() => this.dispatchAction(Actions.HIDE_ENCOUNTER_SELECTOR)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,18 @@ class SubjectDashboardProfileTab extends AbstractComponent {

renderSummary() {
return <View>
<View>
<View style={{marginLeft: 10}}>
<Text style={Styles.cardTitle}>{this.I18n.t('subjectSummary')}</Text>
</View>

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

<Observations observations={_.defaultTo(this.state.subjectSummary, [])}
Expand Down Expand Up @@ -402,13 +404,9 @@ const styles = StyleSheet.create({
container: {
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 3,
borderBottomLeftRadius: 5,
borderBottomRightRadius: 5,
borderTopLeftRadius: 5,
borderTopRightRadius: 5,
borderRadius: 10,
},
memberCard: {
marginTop: 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class ContextActionButton extends AbstractComponent {
fontSize: Fonts.Medium,
color: color,
paddingHorizontal: 5,
backgroundColor: Styles.greyBackground
backgroundColor: Styles.greyBackground,
borderRadius: 5,
elevation: 2
}}>{`${this.I18n.t(this.props.labelKey)}`}</Text></TouchableOpacity>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ class SubjectDashboardProgramsTab extends AbstractComponent {
(<View style={{
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 16
marginVertical: 16,
borderRadius: 10
}}>
<Text style={[Fonts.MediumBold]}>{this.getExitHeaderMessage(this.state.enrolment)}</Text>
<Observations form={this.getExitForm()}
Expand All @@ -214,9 +214,9 @@ class SubjectDashboardProgramsTab extends AbstractComponent {
return <View style={{
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 16
marginVertical: 16,
borderRadius: 10
}}>
<View>
<Text style={Styles.cardTitle}>{this.I18n.t('summary')}</Text>
Expand All @@ -235,9 +235,9 @@ class SubjectDashboardProgramsTab extends AbstractComponent {
return (<View style={{
padding: Distances.ScaledContentDistanceFromEdge,
margin: 4,
elevation: 2,
backgroundColor: Styles.greyBackground,
marginVertical: 16
marginVertical: 16,
borderRadius: 10
}}>
<TouchableOpacity onPress={() => this.dispatchAction(Actions.ON_ENROLMENT_TOGGLE)}>
<Text style={Styles.cardTitle}>{this.I18n.t('enrolmentDetails')}</Text>
Expand Down Expand Up @@ -283,7 +283,7 @@ class SubjectDashboardProgramsTab extends AbstractComponent {
marginHorizontal: 16,
backgroundColor: Colors.WhiteContentBackground
}}>
<View style={{backgroundColor: Styles.greyBackground}}>
<View style={{backgroundColor: Styles.greyBackground, borderRadius: 10}}>
{this.state.enrolment.individual.voided &&
<Text style={{
fontSize: Fonts.Large,
Expand Down

0 comments on commit 055e3b7

Please sign in to comment.