From 1ca9a4b0eb4a2d81b8ae8d1e2abaa1d190b9b794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Hansen?= Date: Mon, 4 Nov 2024 20:39:05 +0100 Subject: [PATCH] Fixes mealie when meal plan is empty (#819) --- src/components/services/Mealie.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/components/services/Mealie.vue b/src/components/services/Mealie.vue index 916783c..0df8c17 100644 --- a/src/components/services/Mealie.vue +++ b/src/components/services/Mealie.vue @@ -6,9 +6,11 @@ - - @@ -32,6 +34,20 @@ export default { stats: null, meal: null, }), + computed: { + mealtext: function () { + if (this.meal && this.meal.length > 0) { + return `Today: ${this.meal[0].recipe.name}`; + } + return null; + }, + statsText: function () { + if (this.stats) { + return `Happily keeping ${this.stats.totalRecipes} recipes organized`; + } + return null; + } + }, created() { this.fetchStatus(); },