From 51893e89cd6da7f9a8ed7f96dee0226ae6c0d445 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Wed, 20 Jan 2021 17:01:43 -0900 Subject: [PATCH] Meal planner improvements (#107) * dev-bug: fixed vscode freezes * test: refactor database init to support tests * mealplan CRUD testing * restructure test folder * git attributes * tests: migration, settings, theme routes testing * docker-file shrink * rebuild * refactor: moving directories around * adding funding * mealplan redesign Co-authored-by: Hayden --- .../src/components/MealPlan/MealPlanCard.vue | 29 ++--- .../src/components/MealPlan/MealSelect.vue | 100 ------------------ frontend/src/components/UI/RecipeCard.vue | 13 ++- frontend/src/components/UI/SearchDialog.vue | 76 +++++++++++++ frontend/src/pages/MealPlanPage.vue | 97 +++++++++-------- frontend/src/utils.js | 8 +- mealie/services/meal_services.py | 1 + 7 files changed, 150 insertions(+), 174 deletions(-) delete mode 100644 frontend/src/components/MealPlan/MealSelect.vue create mode 100644 frontend/src/components/UI/SearchDialog.vue diff --git a/frontend/src/components/MealPlan/MealPlanCard.vue b/frontend/src/components/MealPlan/MealPlanCard.vue index 0b76042f5..2eb11a595 100644 --- a/frontend/src/components/MealPlan/MealPlanCard.vue +++ b/frontend/src/components/MealPlan/MealPlanCard.vue @@ -1,10 +1,6 @@ diff --git a/frontend/src/utils.js b/frontend/src/utils.js index 7d3f30799..63018b86d 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -53,17 +53,17 @@ export default { const dow = days[dateObject.getUTCDay()]; const month = months[dateObject.getUTCMonth()]; const day = dateObject.getUTCDate(); - const year = dateObject.getFullYear(); + // const year = dateObject.getFullYear(); - return `${dow}, ${month} ${day}, ${year}`; + return `${dow}, ${month} ${day}`; }, getDateAsTextAlt(dateObject) { const dow = days[dateObject.getUTCDay()]; const month = monthsShort[dateObject.getUTCMonth()]; const day = dateObject.getUTCDate(); - const year = dateObject.getFullYear(); + // const year = dateObject.getFullYear(); - return `${dow}, ${month} ${day}, ${year}`; + return `${dow}, ${month} ${day}`; }, getDateAsPythonDate(dateObject) { const month = dateObject.getMonth() + 1; diff --git a/mealie/services/meal_services.py b/mealie/services/meal_services.py index f49e8dcc9..6611bb738 100644 --- a/mealie/services/meal_services.py +++ b/mealie/services/meal_services.py @@ -32,6 +32,7 @@ class Meal(BaseModel): class MealData(BaseModel): + name: Optional[str] slug: str dateText: str