feat: add the RecipeCardMenu to the recipe in a mealplan (#1551)

* Add the RecipeCardMenu to the recipe in a mealplan

* fix parameter naming

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Daniel Palstra 2022-08-12 19:02:08 +02:00 committed by GitHub
parent 553325ed09
commit ca64584fd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,8 @@
tiny
icon-size="25"
:slug="mealplan.recipe ? mealplan.recipe.slug : ''"
/>
>
</RecipeCardImage>
<v-icon v-else>
{{ $globals.icons.primary }}
</v-icon>
@ -234,6 +235,20 @@
</v-icon>
{{ mealplan.entryType }}
</v-chip>
<RecipeContextMenu
:name="mealplan.recipe.name"
:recipe-id="mealplan.recipe.id"
:slug="mealplan.recipe ? mealplan.recipe.slug : ''"
:use-items="{
delete: false,
edit: false,
download: true,
mealplanner: false,
print: true,
share: false,
shoppingList: true,
}"
/>
</v-card-actions>
</template>
</RecipeCard>
@ -254,6 +269,7 @@ import { useMealplans, planTypeOptions } from "~/composables/use-group-mealplan"
import { useRecipes, allRecipes } from "~/composables/recipes";
import RecipeCardImage from "~/components/Domain/Recipe/RecipeCardImage.vue";
import RecipeCard from "~/components/Domain/Recipe/RecipeCard.vue";
import RecipeContextMenu from "~/components/Domain/Recipe/RecipeContextMenu.vue";
import { PlanEntryType } from "~/types/api-types/meal-plan";
import { useUserApi } from "~/composables/api";
@ -262,6 +278,7 @@ export default defineComponent({
draggable,
RecipeCardImage,
RecipeCard,
RecipeContextMenu,
},
setup() {
const state = reactive({