Show amounts even when unit is empty

This commit is contained in:
Michael Kuckuk
2020-08-26 12:39:21 +02:00
parent 90dddd34f3
commit f6fb07926e

View File

@@ -148,9 +148,12 @@
<template v-if="i.no_amount"> <template v-if="i.no_amount">
<span>&#x2063;</span> <span>&#x2063;</span>
</template> </template>
<template v-if="!i.no_amount && i.unit"> <template v-if="!i.no_amount">
<span>[[roundDecimals(i.amount * ingredient_factor)]]</span> <span>[[roundDecimals(i.amount * ingredient_factor)]]</span>
[[i.unit.name]] {# Allow for amounts without units, such as "2 eggs" #}
<template v-if="i.unit">
[[i.unit.name]]
</template>
</template> </template>
</label> </label>
</div> </div>
@@ -263,9 +266,12 @@
<template v-if="i.no_amount"> <template v-if="i.no_amount">
<span>&#x2063;</span> <span>&#x2063;</span>
</template> </template>
<template v-if="!i.no_amount && i.unit"> <template v-if="!i.no_amount">
<span>[[roundDecimals(i.amount * ingredient_factor)]]</span> <span>[[roundDecimals(i.amount * ingredient_factor)]]</span>
[[i.unit.name]] {# Allow for amounts without units, such as "2 eggs" #}
<template v-if="i.unit">
[[i.unit.name]]
</template>
</template> </template>
</label> </label>
</div> </div>