Skip to content

Commit

Permalink
don't show severity for NO SYMPTOMS #171
Browse files Browse the repository at this point in the history
  • Loading branch information
kenpower committed Jun 24, 2021
1 parent 3cd6620 commit b460e90
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/EntryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,23 @@ export default class EntryList extends React.Component {
const color = '#1DBBA0';
let severityText = 'no symptom';
switch (objData.severity) {
case 1: severityText = 'Mild'; break;
case 2: severityText = 'Moderate'; break;
case 3: severityText = 'Severe'; break;
case 1: severityText = 'Mild '; break;
case 2: severityText = 'Moderate '; break;
case 3: severityText = 'Severe '; break;
}
let image = this.getSymptomImageSource(objData.symptomID);
if (objData.symptomID === 0) objData.name = 'NO_SYMPTOMS'; //TODO: Temp solution. Needs to be an entry in the database
if (objData.symptomID === 0){
objData.name = 'NO_SYMPTOMS';
severityText = '';
} //TODO: Temp solution. Needs to be an entry in the database
return (
//<TouchableOpacity onPress={() => this.props.navigation.navigate('ViewSymptom', { event: item })}>
<HistoryEntry
onEditButtonClicked={() => this.props.navigation.navigate('AddSymptom', { event: item, edit: true })}
onRightButtonClicked={() => this.props.navigation.navigate('DeleteScreen', { event: item })}
navigationName={LanguageManager.getInstance().getText(objData.name)}
title={time}
subtitle={severityText + " " + LanguageManager.getInstance().getText(objData.name)}
subtitle={severityText + LanguageManager.getInstance().getText(objData.name)}
viewMiddleButtonText={'View'}
viewRightButtonText={'Delete'}
color={color}
Expand Down

0 comments on commit b460e90

Please sign in to comment.