From 3f11b3261b66ba4cf18f731a77d932ae7371f52b Mon Sep 17 00:00:00 2001 From: hay-kot Date: Thu, 6 May 2021 15:56:15 -0800 Subject: [PATCH] update docs --- docs/docs/getting-started/organizing-recipes.md | 14 ++++++++++++++ .../components/FormHelpers/CategoryTagSelector.vue | 5 ++++- frontend/src/components/UI/TheSidebar.vue | 5 ----- frontend/src/routes/admin.js | 8 -------- mealie/schema/settings.py | 4 ++-- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/docs/getting-started/organizing-recipes.md b/docs/docs/getting-started/organizing-recipes.md index 67b42d609..639190f61 100644 --- a/docs/docs/getting-started/organizing-recipes.md +++ b/docs/docs/getting-started/organizing-recipes.md @@ -1,5 +1,19 @@ # Organizing Recipes +Below are some general guidelines that were considered when creating the organization structure for recipes. + + +## From The Community + +> My categories are mostly based on the 'course' they belong to. Appetizers, Starters, Main course, but also sauces or beverages. When I'm looking for an idea for an every day dinner, I just browse "main course". +> +> My tags are for picking the exact type of meal I'm looking for, based on my mood or my guests' diet, like gluten-free, vegetarian, sweet-sour or casserole. They can also act as sub-categories, like "alcohol" for beverages or "hot meal" for a main course. +> +> User: [sephrat](https://github.com/sephrat) + + +## Structure + !!! tip Below is a suggestion of guidelines my wife and I use for organizing our recipes within Mealie. Mealie is fairly flexible, so feel free to utilize how you'd like! 👍 diff --git a/frontend/src/components/FormHelpers/CategoryTagSelector.vue b/frontend/src/components/FormHelpers/CategoryTagSelector.vue index 4a95208b5..32b5eeba3 100644 --- a/frontend/src/components/FormHelpers/CategoryTagSelector.vue +++ b/frontend/src/components/FormHelpers/CategoryTagSelector.vue @@ -100,7 +100,10 @@ export default { } }, flat() { - return this.selected.length > 0 && this.solo; + if (this.selected) { + return this.selected.length > 0 && this.solo; + } + return false; }, }, methods: { diff --git a/frontend/src/components/UI/TheSidebar.vue b/frontend/src/components/UI/TheSidebar.vue index 0633eadd4..6153efec6 100644 --- a/frontend/src/components/UI/TheSidebar.vue +++ b/frontend/src/components/UI/TheSidebar.vue @@ -133,11 +133,6 @@ export default { to: "/admin/profile", title: this.$t("settings.profile"), }, - { - icon: "mdi-food", - to: "/admin/meal-planner", - title: this.$t("meal-plan.meal-planner"), - }, ]; }, adminLinks() { diff --git a/frontend/src/routes/admin.js b/frontend/src/routes/admin.js index 77335364c..8036290d7 100644 --- a/frontend/src/routes/admin.js +++ b/frontend/src/routes/admin.js @@ -1,5 +1,4 @@ import Admin from "@/pages/Admin"; -import MealPlanner from "@/pages/Admin/MealPlanner"; import Migration from "@/pages/Admin/Migration"; import Profile from "@/pages/Admin/Profile"; import ManageUsers from "@/pages/Admin/ManageUsers"; @@ -29,13 +28,6 @@ export const adminRoutes = { title: "settings.profile", }, }, - { - path: "meal-planner", - component: MealPlanner, - meta: { - title: "meal-plan.meal-planner", - }, - }, { path: "migrations", component: Migration, diff --git a/mealie/schema/settings.py b/mealie/schema/settings.py index 27b0b6204..456e2d881 100644 --- a/mealie/schema/settings.py +++ b/mealie/schema/settings.py @@ -1,7 +1,7 @@ from typing import Optional from fastapi_camelcase import CamelModel -from mealie.schema.category import CategoryBase +from mealie.schema.category import CategoryBase, RecipeCategoryResponse from pydantic import validator from slugify import slugify @@ -34,7 +34,7 @@ class CustomPageBase(CamelModel): name: str slug: Optional[str] position: int - categories: list[CategoryBase] = [] + categories: list[RecipeCategoryResponse] = [] class Config: orm_mode = True