Skip to content

Commit

Permalink
Config parameter: Add unit to param description to enhance experience…
Browse files Browse the repository at this point in the history
… when entering UoM values

Signed-off-by: Florian Hotze <dev@florianhotze.com>
  • Loading branch information
florian-h05 committed Oct 22, 2024
1 parent a1787ed commit 877c21c
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 877c21c

Please sign in to comment.