Skip to content

Commit

Permalink
Config parameter: Add unit to param description when entering UoM val…
Browse files Browse the repository at this point in the history
…ues (#2820)

Signed-off-by: Florian Hotze <dev@florianhotze.com>
  • Loading branch information
florian-h05 authored Oct 22, 2024
1 parent 85c3c31 commit 8ebd07f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span v-if="status.statusCode">Status Code: &nbsp;{{ status.statusCode }}&nbsp;&nbsp;</span>
<span v-if="status.message">{{ status.message }}</span>
</div>
<small v-html="`${configDescription.required ? '<strong>Required</strong>&nbsp;' : ''}${configDescription.description || ''}`" />
<small v-html="`${configDescription.required ? '<strong>Required</strong>&nbsp;' : ''}${description || ''}`" />
</f7-block-footer>
</f7-list>
</template>
Expand Down Expand Up @@ -94,6 +94,13 @@ export default {
return ParameterQrcode
}
return ParameterText
},
description () {
// TODO: Remove this when proper UoM support is implemented for config parameters
// Adds the unit to the description if it is available, UoM support is currently implemented through number parameters
// where the user can enter the amount for the default unit
if (this.configDescription.unit) return `${this.configDescription.description} (${this.configDescription.unit})`
return this.configDescription.description
}
},
mounted () {
Expand Down

0 comments on commit 8ebd07f

Please sign in to comment.