Skip to content

Commit

Permalink
feat: add the RecipeCardMenu to the recipe in a mealplan (#1551)
Browse files Browse the repository at this point in the history
* Add the RecipeCardMenu to the recipe in a mealplan

* fix parameter naming

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
  • Loading branch information
danielpalstra and hay-kot committed Aug 12, 2022
1 parent 553325e commit ca64584
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion frontend/pages/group/mealplan/planner.vue
Expand Up @@ -118,7 +118,8 @@
tiny
icon-size="25"
:slug="mealplan.recipe ? mealplan.recipe.slug : ''"
/>
>
</RecipeCardImage>
<v-icon v-else>
{{ $globals.icons.primary }}
</v-icon>
Expand Down Expand Up @@ -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>
Expand All @@ -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";
Expand All @@ -262,6 +278,7 @@ export default defineComponent({
draggable,
RecipeCardImage,
RecipeCard,
RecipeContextMenu,
},
setup() {
const state = reactive({
Expand Down

0 comments on commit ca64584

Please sign in to comment.