Merge branch '390-bug-temperature-timestamp-can-be-deleted' into 'master'

Only show timestamp when it has a value

Closes #390

See merge request bloodyhealth/drip!234
This commit is contained in:
Julia Friesel
2019-06-25 18:17:42 +00:00
+4 -1
View File
@@ -60,7 +60,10 @@ export default class CycleDayOverView extends Component {
}, },
temperature: temperature => { temperature: temperature => {
if (isNumber(temperature.value)) { if (isNumber(temperature.value)) {
let temperatureLabel = `${temperature.value} °C - ${temperature.time}` let temperatureLabel = `${temperature.value} °C`
if (temperature.time) {
temperatureLabel = `${temperatureLabel} - ${temperature.time}`
}
if (temperature.exclude) { if (temperature.exclude) {
temperatureLabel = "( " + temperatureLabel + " )" temperatureLabel = "( " + temperatureLabel + " )"
} }