mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
Display nutritional energy in KJ with preference
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<i class="fas fa-fire fa-fw text-primary"></i> {{ $t('Calories') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<span v-html="calculateAmount(recipe.nutrition.calories)"></span> kcal
|
||||
<span v-html="calculateEnergy(recipe.nutrition.calories)"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import {calculateAmount} from "@/utils/utils";
|
||||
import {calculateAmount, calculateEnergy} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: 'Nutrition',
|
||||
@@ -65,6 +65,9 @@ export default {
|
||||
methods: {
|
||||
calculateAmount: function (x) {
|
||||
return calculateAmount(x, this.ingredient_factor)
|
||||
},
|
||||
calculateEnergy: function (x) {
|
||||
return calculateEnergy(x, this.ingredient_factor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user