From d46735202966565a22450b52b95c55adbf7c0763 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 12 Sep 2023 09:48:22 -0500 Subject: [PATCH] Squashed commit of the following: commit c8fc6b52374c5bafbef17365ae975b1e9f2dd720 Author: smilerz Date: Wed Sep 6 14:01:27 2023 -0500 update Meal Plan grid to respect localization on date format --- .../apps/RecipeSearchView/RecipeSearchView.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index 94a553a54..bfc731c57 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -723,9 +723,9 @@
-
+ style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 0.5rem; row-gap: 0.5rem; grid-auto-rows: max-content" + > +
@@ -742,10 +742,8 @@
- - - - + +
@@ -977,14 +975,16 @@ export default { computed: { meal_plan_grid: function () { let grid = [] + if (this.meal_plan_store !== null && this.meal_plan_store.plan_list.length > 0) { for (const x of Array(this.ui.meal_plan_days).keys()) { let moment_date = moment().add(x, "d") + let date_label = moment_date.format("L").split("/") grid.push({ date: moment_date, create_default_date: moment_date.format("YYYY-MM-DD"), // improve meal plan edit modal to do formatting itself and accept dates - date_label: moment_date.format('ddd DD.MM'), - plan_entries: this.meal_plan_store.plan_list.filter((m) => moment_date.isBetween(moment(m.from_date), moment(m.to_date), 'day', '[]')) + date_label: moment_date.format("ddd") + " " + date_label[0] + "." + date_label[1], + plan_entries: this.meal_plan_store.plan_list.filter((m) => moment(m.date).isSame(moment_date, "day")), }) } }