web: Add support for decimal measure values.

This commit is contained in:
Jonathan Bernard 2020-02-16 23:21:56 -06:00
parent adddef3188
commit 826f0eaa73
4 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<template>
<div v-if="measure.config.isVisible" class="measure-summary" :data-name="'measure-' + measure.slug">
<div v-if="measure.config.isVisible" v-bind:key="measure.slug" class="measure-summary" :data-name="'measure-' + measure.slug">
<h2><router-link
:to="'/measures/' + measure.slug">
{{measure.name}}</router-link></h2>

View File

@ -12,7 +12,7 @@
</div>
<div>
<label for=measurementValue>{{measure.name}}</label>
<input required type=number v-model=value.value :disabled=disabled />
<input name=measurementValue required type=number step=any v-model.number=value.value :disabled=disabled />
</div>
</fieldset>
</template>

View File

@ -5,7 +5,7 @@ import { Measure, MeasureConfig, MeasureType, Measurement, MeasurementMeta } fro
export class SimpleEntry extends Vue {
@Prop() public measure!: Measure<MeasureConfig>;
@Prop() public value!: Measurement<MeasurementMeta>;
@Prop() public disabled: boolean = false;
@Prop() public disabled!: boolean;
private editTimestamp: boolean = false;
@Watch('value', { immediate: true, deep: true })

View File

@ -1,5 +1,7 @@
.user-account {
justify-content: flex-start;
section {
margin-top: 1rem;
margin-top: 2rem;
}
}