diff --git a/cookbook/templates/recipe_view.html b/cookbook/templates/recipe_view.html index 25ff3b6f5..e94766e05 100644 --- a/cookbook/templates/recipe_view.html +++ b/cookbook/templates/recipe_view.html @@ -96,7 +96,8 @@ {% endif %}
| + {{ n.type.type }} + | +{{ n.value|floatformat:2 }} | +{{ n.type.unit.short }} | +
| + | + | + |
|
-
[[i.note]]
@@ -492,25 +516,25 @@
if (step.time !== 0) {
this.has_times = true
}
- this.$set(step, 'time_finished', undefined)
+ this.$set(step, 'time_finished', undefined);
for (let i of step.ingredients) {
this.$set(i, 'checked', false)
}
}
}).catch((err) => {
- this.error = err.data
- this.loading = false
+ this.error = err.data;
+ this.loading = false;
console.log(err)
})
},
roundDecimals: function (num) {
let decimals = {% if request.user.userpreference.ingredient_decimals %}
- {{ request.user.userpreference.ingredient_decimals }} {% else %} 2 {% endif %}
+ {{ request.user.userpreference.ingredient_decimals }} {% else %} 2; {% endif %}
return +(Math.round(num + `e+${decimals}`) + `e-${decimals}`);
},
updateTimes: function (step) {
- let time_diff_first = 0
+ let time_diff_first = 0;
for (let s of this.recipe.steps) {
if (this.recipe.steps.indexOf(s) < this.recipe.steps.indexOf(step)) {
time_diff_first += s.time
@@ -519,7 +543,7 @@
this.recipe.steps[0].time_finished = moment(step.time_finished).subtract(time_diff_first, 'minutes').format(moment.HTML5_FMT.DATETIME_LOCAL);
- let time_diff = 0
+ let time_diff = 0;
for (let s of this.recipe.steps) {
s.time_finished = moment(this.recipe.steps[0].time_finished).add(time_diff, 'minutes').format(moment.HTML5_FMT.DATETIME_LOCAL);
time_diff += s.time
|