diff --git a/changelog/55_UNRELEASED_2019-xx-xx.md b/changelog/55_UNRELEASED_2019-xx-xx.md index b2a61664..431b8f4f 100644 --- a/changelog/55_UNRELEASED_2019-xx-xx.md +++ b/changelog/55_UNRELEASED_2019-xx-xx.md @@ -24,6 +24,7 @@ - When adding or editing a recipe ingredient, a dialog is now used instead of switching between pages (thanks @kriddles) ### Meal plan fixes +- Added that the calories per serving are now also shown - Fixed that when `FEATURE_FLAG_STOCK_PRICE_TRACKING` was set to `false`, prices were still shown (thanks @kriddles) - Fixed that the week costs were missing for the weeks 1 - 9 of a year diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index f15ece59..fb565cdd 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -97,10 +97,14 @@ var calendar = $("#calendar").fullCalendar({ fulfillmentInfoHtml = __t('Not enough in stock'); var fulfillmentIconHtml = ''; } - var costPerServing = "" + var costAndCaloriesPerServing = "" if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) { - costPerServing = '
' + resolvedRecipe.costs + ' ' + __t('per serving') + '
'; + costAndCaloriesPerServing = '
' + resolvedRecipe.costs + ' / ' + resolvedRecipe.calories + ' kcal ' + __t('per serving') + '
'; + } + else + { + costAndCaloriesPerServing = '
' + resolvedRecipe.calories + ' kcal ' + __t('per serving') + '
'; } element.html(' \ @@ -108,7 +112,7 @@ var calendar = $("#calendar").fullCalendar({
' + recipe.name + '
\
' + __n(mealPlanEntry.servings, "%s serving", "%s servings") + '
\
' + fulfillmentIconHtml + " " + fulfillmentInfoHtml + '
\ - ' + costPerServing + ' \ + ' + costAndCaloriesPerServing + ' \
\ \ \