diff --git a/cookbook/templates/frontend/tandoor.html b/cookbook/templates/frontend/tandoor.html
index dc738af8b..dc0599358 100644
--- a/cookbook/templates/frontend/tandoor.html
+++ b/cookbook/templates/frontend/tandoor.html
@@ -1,11 +1,11 @@
{% load django_vite %}
-
+
-
+ Tandoor
-
+
@@ -15,7 +15,7 @@
{% vite_hmr_client %}
{% vite_asset 'src/apps/tandoor/main.ts' %}
-
+
diff --git a/vue3/package.json b/vue3/package.json
index 139748c05..956be53f7 100644
--- a/vue3/package.json
+++ b/vue3/package.json
@@ -17,7 +17,7 @@
"vue": "^3.4.15",
"vue-router": "4",
"vuedraggable": "^4.1.0",
- "vuetify": "^3.3.15"
+ "vuetify": "^3.5.8"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.5.1",
diff --git a/vue3/src/apps/tandoor/Tandoor.vue b/vue3/src/apps/tandoor/Tandoor.vue
index 28cdba5e2..be2a618f6 100644
--- a/vue3/src/apps/tandoor/Tandoor.vue
+++ b/vue3/src/apps/tandoor/Tandoor.vue
@@ -1,21 +1,18 @@
-
-
+
-
+
-
+
-
-
@@ -58,6 +55,7 @@ export default defineComponent({
return {
drawer: true,
rail: true,
+ overlay: false
}
},
mounted() {
diff --git a/vue3/src/components/display/IngredientsTable.vue b/vue3/src/components/display/IngredientsTable.vue
index 3220de888..052769516 100644
--- a/vue3/src/components/display/IngredientsTable.vue
+++ b/vue3/src/components/display/IngredientsTable.vue
@@ -1,20 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/vue3/src/components/inputs/StepEditor.vue b/vue3/src/components/inputs/StepEditor.vue
index 5dc29af69..29acaea22 100644
--- a/vue3/src/components/inputs/StepEditor.vue
+++ b/vue3/src/components/inputs/StepEditor.vue
@@ -19,29 +19,63 @@
Time
-
+
-
+
+
+
+
+
+
+
+
+ Ingredient
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
{{ step.instruction }}
+
+
+ Ingredient
+
+
+
+
+
+ fullscreen>
Edit Instructions
-
+
@@ -51,17 +85,15 @@ import {defineComponent, PropType} from 'vue'
import {Step} from "@/openapi";
import StepMarkdownEditor from "@/components/inputs/StepMarkdownEditor.vue";
import IngredientsTable from "@/components/display/IngredientsTable.vue";
+import IngredientsTableRow from "@/components/display/IngredientsTableRow.vue";
+import draggable from "vuedraggable";
export default defineComponent({
name: "StepEditor",
- components: {IngredientsTable, StepMarkdownEditor},
- emits: {
- change(payload: { step: Step }) {
- return payload
- }
- },
+ components: {draggable, IngredientsTableRow, IngredientsTable, StepMarkdownEditor},
+ emits: ['update:modelValue'],
props: {
- step: {
+ modelValue: {
type: Object as PropType,
required: true,
},
@@ -70,10 +102,27 @@ export default defineComponent({
required: false,
},
},
+ computed: {
+ step: {
+ get() {
+ return this.modelValue
+ },
+ set(value: Step) {
+ this.$emit('update:modelValue', value)
+ }
+ }
+ },
data() {
return {
dialog_markdown_edit: false,
}
+ },
+ methods: {
+ sortIngredients() {
+ this.step.ingredients.forEach((value, index) => {
+ value.order = index
+ })
+ }
}
})
diff --git a/vue3/src/pages/RecipeEditPage.vue b/vue3/src/pages/RecipeEditPage.vue
index 6bb4b9575..77a5c9981 100644
--- a/vue3/src/pages/RecipeEditPage.vue
+++ b/vue3/src/pages/RecipeEditPage.vue
@@ -1,70 +1,83 @@
+
+
+
+ {{ recipe.name }}
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
- Save
- View
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Save
+ View
+
@@ -96,13 +109,13 @@ export default defineComponent({
this.refreshRecipe()
const api = new ApiApi()
- api.apiKeywordList().then(r => {
+ api.apiKeywordList({page: 1, pageSize: 100}).then(r => {
this.keywords = r.results
})
},
methods: {
refreshRecipe() {
- if (this.recipe.id != this.recipe_id) {
+ if (this.recipe.id != Number(this.recipe_id)) {
const api = new ApiApi()
api.apiRecipeRetrieve({id: Number(this.recipe_id)}).then(r => {
this.recipe = r
@@ -111,7 +124,7 @@ export default defineComponent({
},
updateRecipe() {
const api = new ApiApi()
- api.apiRecipeUpdate({id: this.recipe_id, recipe: this.recipe}).then(r => {
+ api.apiRecipeUpdate({id: Number(this.recipe_id), recipe: this.recipe}).then(r => {
this.recipe = r
})
}
diff --git a/vue3/src/pages/RecipeSearchPage.vue b/vue3/src/pages/RecipeSearchPage.vue
index efafcba94..c84d02295 100644
--- a/vue3/src/pages/RecipeSearchPage.vue
+++ b/vue3/src/pages/RecipeSearchPage.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/vue3/yarn.lock b/vue3/yarn.lock
index d82b81a40..e69bb3911 100644
--- a/vue3/yarn.lock
+++ b/vue3/yarn.lock
@@ -904,10 +904,10 @@ vuedraggable@^4.1.0:
dependencies:
sortablejs "1.14.0"
-vuetify@^3.3.15:
- version "3.5.4"
- resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.5.4.tgz#f919c5194995a123815c277a95812bc230e33464"
- integrity sha512-fHgfWMI7+z/UtbVPOezX+O1MNBOOMBW9HnKejcBIyQQ7jFRnTHbDQmbINf25FK0wrg/zkjfzyOmWWREKW39eXg==
+vuetify@^3.5.8:
+ version "3.5.8"
+ resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.5.8.tgz#bc8f08dfd3314640e7b5d43b50138a26d650cbbf"
+ integrity sha512-8nGS+lKejZkev55HFwIfsRt+9fOqbeDQNmXxfmLKAlnUT8FtynVwbjAwHMtX/OQAQ3ZwRaR1ptqQQmx3OgxzbQ==
w3c-xmlserializer@^4.0.0:
version "4.0.0"