diff --git a/frontend/components/Domain/Recipe/RecipeDialogBulkAdd.vue b/frontend/components/Domain/Recipe/RecipeDialogBulkAdd.vue
index 0c1abc0b413a..4a38a039d300 100644
--- a/frontend/components/Domain/Recipe/RecipeDialogBulkAdd.vue
+++ b/frontend/components/Domain/Recipe/RecipeDialogBulkAdd.vue
@@ -2,9 +2,9 @@
-
+
{{ $t("new-recipe.bulk-add") }}
-
+
diff --git a/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue b/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue
new file mode 100644
index 000000000000..f6f85a609ef1
--- /dev/null
+++ b/frontend/components/Domain/Recipe/RecipeIngredientEditor.vue
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+ {{ $globals.icons.delete }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $globals.icons.delete }}
+
+
+
+
+
+ {{ showTitle || value.title ? $globals.icons.minus : $globals.icons.createAlt }}
+
+
+ {{ showTitle ? $t("recipe.remove-section") : $t("recipe.insert-section") }}
+
+
+
+ {{ $globals.icons.arrowUpDown }}
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/components/Domain/Recipe/RecipeIngredients.vue b/frontend/components/Domain/Recipe/RecipeIngredients.vue
index 5e819a73ed3b..6e2a4da79651 100644
--- a/frontend/components/Domain/Recipe/RecipeIngredients.vue
+++ b/frontend/components/Domain/Recipe/RecipeIngredients.vue
@@ -89,7 +89,7 @@ export default {
edit: {
type: Boolean,
- default: true,
+ default: false,
},
},
data() {
diff --git a/frontend/components/Domain/Recipe/RecipeInstructions.vue b/frontend/components/Domain/Recipe/RecipeInstructions.vue
index 317c6c75191b..5d24881fdc94 100644
--- a/frontend/components/Domain/Recipe/RecipeInstructions.vue
+++ b/frontend/components/Domain/Recipe/RecipeInstructions.vue
@@ -32,7 +32,7 @@
class="ma-1"
:class="[{ 'on-hover': hover }, isChecked(index)]"
:elevation="hover ? 12 : 2"
- :ripple="!edit"
+ :ripple="false"
@click="toggleDisabled(index)"
>
diff --git a/frontend/components/Layout/AppHeader.vue b/frontend/components/Layout/AppHeader.vue
index 937dae49eeb5..17dbb65b044e 100644
--- a/frontend/components/Layout/AppHeader.vue
+++ b/frontend/components/Layout/AppHeader.vue
@@ -96,30 +96,6 @@ export default defineComponent({
restricted: false,
nav: "/user/login",
},
- {
- icon: this.$globals.icons.calendarWeek,
- title: this.$t("meal-plan.dinner-this-week"),
- nav: "/meal-plan/this-week",
- restricted: true,
- },
- {
- icon: this.$globals.icons.calendarToday,
- title: this.$t("meal-plan.dinner-today"),
- nav: "/meal-plan/today",
- restricted: true,
- },
- {
- icon: this.$globals.icons.calendarMultiselect,
- title: this.$t("meal-plan.planner"),
- nav: "/meal-plan/planner",
- restricted: true,
- },
- {
- icon: this.$globals.icons.formatListCheck,
- title: this.$t("shopping-list.shopping-lists"),
- nav: "/shopping-list",
- restricted: true,
- },
{
icon: this.$globals.icons.logout,
title: this.$t("user.logout"),
diff --git a/frontend/components/Layout/AppSidebar.vue b/frontend/components/Layout/AppSidebar.vue
index 5f0f66336dc7..888a70472b3f 100644
--- a/frontend/components/Layout/AppSidebar.vue
+++ b/frontend/components/Layout/AppSidebar.vue
@@ -1,5 +1,5 @@
-
+
@@ -16,16 +16,47 @@
-
-
-
-
- {{ nav.icon }}
-
- {{ nav.title }}
-
-
-
+
+
+
+
+
+
+ {{ nav.title }}
+
+
+
+
+ {{ child.icon }}
+
+ {{ child.title }}
+
+
+
+
+
+
+
+
+ {{ nav.icon }}
+
+ {{ nav.title }}
+
+
+
+
+
@@ -51,6 +82,7 @@
{{ child.title }}
+
diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue
index f7087d2a1ae0..11191f799e19 100644
--- a/frontend/layouts/default.vue
+++ b/frontend/layouts/default.vue
@@ -37,20 +37,46 @@ export default defineComponent({
sidebar: null,
topLinks: [
{
- icon: this.$globals.icons.home,
- to: "/",
- title: this.$t("sidebar.home-page"),
+ icon: this.$globals.icons.calendar,
+ restricted: true,
+ title: this.$t("meal-plan.meal-planner"),
+ children: [
+ {
+ icon: this.$globals.icons.calendarMultiselect,
+ title: this.$t("meal-plan.planner"),
+ to: "/meal-plan/planner",
+ restricted: true,
+ },
+ {
+ icon: this.$globals.icons.calendarWeek,
+ title: this.$t("meal-plan.dinner-this-week"),
+ to: "/meal-plan/this-week",
+ restricted: true,
+ },
+ {
+ icon: this.$globals.icons.calendarToday,
+ title: this.$t("meal-plan.dinner-today"),
+ to: "/meal-plan/today",
+ restricted: true,
+ },
+ ],
},
{
- icon: this.$globals.icons.search,
- to: "/search",
- title: this.$t("sidebar.search"),
+ icon: this.$globals.icons.formatListCheck,
+ title: this.$t("shopping-list.shopping-lists"),
+ to: "/shopping-list",
+ restricted: true,
},
{
icon: this.$globals.icons.viewModule,
to: "/recipes/all",
title: this.$t("sidebar.all-recipes"),
},
+ {
+ icon: this.$globals.icons.search,
+ to: "/search",
+ title: this.$t("sidebar.search"),
+ },
{
icon: this.$globals.icons.tags,
to: "/recipes/categories",
diff --git a/frontend/layouts/error.vue b/frontend/layouts/error.vue
index 74027b77b73c..af5e5b499215 100644
--- a/frontend/layouts/error.vue
+++ b/frontend/layouts/error.vue
@@ -1,13 +1,30 @@
-
-
- {{ pageNotFound }}
-
-
- {{ otherError }}
-
- Home page
-
+
+
+
+ {{ $t("page.404-page-not-found") }}
+
+
+
+
+
4
+
+ {{ $globals.icons.primary }}
+
+
4
+
+
+
+
+
+
+ {{ button.icon }}
+ {{ button.text }}
+
+
+
+
+
@@ -38,4 +64,10 @@ export default {
h1 {
font-size: 20px;
}
+p {
+ padding-bottom: 0 !important;
+ margin-bottom: 0 !important;
+ font-size: 200px;
+}
+
diff --git a/frontend/pages/recipe/_slug.vue b/frontend/pages/recipe/_slug.vue
index c6ebc160c2f5..cd1834fef626 100644
--- a/frontend/pages/recipe/_slug.vue
+++ b/frontend/pages/recipe/_slug.vue
@@ -97,6 +97,24 @@
+
+
+
{{ $t("recipe.ingredients") }}
+
+
+
+
+
+ {{ $t("general.new") }}
+
+
+
-
-
-
+
+
+
+
+
{{ $t("recipe.categories") }}
-
+
+
-
+
+
+
{{ $t("tag.tags") }}
-
+
+
@@ -168,6 +205,9 @@
import { defineComponent, ref, useMeta, useRoute, useRouter } from "@nuxtjs/composition-api";
// @ts-ignore
import VueMarkdown from "@adapttive/vue-markdown";
+import draggable from "vuedraggable";
+import RecipeCategoryTagSelector from "@/components/Domain/Recipe/RecipeCategoryTagSelector.vue";
+import RecipeDialogBulkAdd from "@/components/Domain/Recipe//RecipeDialogBulkAdd.vue";
import { useApiSingleton } from "~/composables/use-api";
import { validators } from "~/composables/use-validators";
import { useRecipeContext } from "~/composables/use-recipe-context";
@@ -182,23 +222,28 @@ import RecipeInstructions from "~/components/Domain/Recipe/RecipeInstructions.vu
import RecipeNotes from "~/components/Domain/Recipe/RecipeNotes.vue";
import RecipeImageUploadBtn from "~/components/Domain/Recipe/RecipeImageUploadBtn.vue";
import RecipeSettingsMenu from "~/components/Domain/Recipe/RecipeSettingsMenu.vue";
+import RecipeIngredientEditor from "~/components/Domain/Recipe/RecipeIngredientEditor.vue";
import { Recipe } from "~/types/api-types/admin";
import { useStaticRoutes } from "~/composables/api";
export default defineComponent({
components: {
RecipeActionMenu,
+ RecipeDialogBulkAdd,
RecipeAssets,
+ RecipeCategoryTagSelector,
RecipeChips,
+ RecipeImageUploadBtn,
RecipeIngredients,
RecipeInstructions,
RecipeNotes,
RecipeNutrition,
RecipeRating,
- RecipeTimeCard,
- RecipeImageUploadBtn,
RecipeSettingsMenu,
+ RecipeIngredientEditor,
+ RecipeTimeCard,
VueMarkdown,
+ draggable,
},
setup() {
const route = useRoute();
@@ -243,6 +288,38 @@ export default defineComponent({
imageKey.value++;
}
+ function removeByIndex(list: Array, index: number) {
+ list.splice(index, 1);
+ }
+
+ function addIngredient(ingredients: Array | null = null) {
+ if (ingredients?.length) {
+ const newIngredients = ingredients.map((x) => {
+ return {
+ title: "",
+ note: x,
+ unit: {},
+ food: {},
+ disableAmount: true,
+ quantity: 1,
+ };
+ });
+
+ if (newIngredients) {
+ recipe?.value?.recipeIngredient?.push(...newIngredients);
+ }
+ } else {
+ recipe?.value?.recipeIngredient?.push({
+ title: "",
+ note: "",
+ unit: {},
+ food: {},
+ disableAmount: true,
+ quantity: 1,
+ });
+ }
+ }
+
return {
imageKey,
recipe,
@@ -254,6 +331,8 @@ export default defineComponent({
uploadImage,
validators,
recipeImage,
+ addIngredient,
+ removeByIndex,
};
},
data() {
diff --git a/frontend/types/api-types/recipe.ts b/frontend/types/api-types/recipe.ts
index cffb5f54284d..02b9b5855dca 100644
--- a/frontend/types/api-types/recipe.ts
+++ b/frontend/types/api-types/recipe.ts
@@ -56,15 +56,15 @@ export interface Recipe {
name: string;
slug: string;
image?: unknown;
- description?: string;
- recipeCategory?: string[];
- tags?: string[];
- rating?: number;
+ description: string;
+ recipeCategory: string[];
+ tags: string[];
+ rating: number;
dateAdded?: string;
dateUpdated?: string;
recipeYield?: string;
- recipeIngredient?: RecipeIngredient[];
- recipeInstructions?: RecipeStep[];
+ recipeIngredient: RecipeIngredient[];
+ recipeInstructions: RecipeStep[];
nutrition?: Nutrition;
tools?: string[];
totalTime?: string;