Skip to content

Commit 0971d59

Browse files
fix: Can't remove organizer (#6771)
1 parent 9b799ca commit 0971d59

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

frontend/components/Domain/Recipe/RecipeActionMenu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ withDefaults(defineProps<Props>(), {
126126
canEdit: false,
127127
});
128128
129-
const emit = defineEmits(["print", "input", "delete", "close", "edit"]);
129+
const emit = defineEmits(["print", "input", "save", "delete", "close", "json", "edit"]);
130130
131131
const deleteDialog = ref(false);
132132

frontend/components/Domain/Recipe/RecipeOrganizerSelector.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
</template>
4949

5050
<script setup lang="ts">
51-
import type { IngredientFood, RecipeCategory, RecipeTag } from "~/lib/api/types/recipe";
52-
import type { RecipeTool } from "~/lib/api/types/admin";
51+
import type { IngredientFood, RecipeCategory, RecipeTag, RecipeTool } from "~/lib/api/types/recipe";
5352
import { Organizer, type RecipeOrganizer } from "~/lib/api/types/non-generated";
5453
import type { HouseholdSummary } from "~/lib/api/types/household";
5554
import { useCategoryStore, useFoodStore, useHouseholdStore, useTagStore, useToolStore } from "~/composables/store";
@@ -166,6 +165,15 @@ const items = computed<any[]>(() => {
166165
return list;
167166
});
168167
168+
function removeByIndex(index: number) {
169+
if (selected.value === undefined) {
170+
return;
171+
}
172+
173+
const newSelected = selected.value.filter((_, i) => i !== index);
174+
selected.value = [...newSelected];
175+
}
176+
169177
function appendCreated(item: any) {
170178
if (selected.value === undefined) {
171179
return;

frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const props = withDefaults(defineProps<Props>(), {
4747
landscape: false,
4848
});
4949
50-
defineEmits(["save", "delete"]);
50+
defineEmits(["save", "delete", "print"]);
5151
5252
const { recipeImage } = useStaticRoutes();
5353
const { imageKey, setMode, toggleEditMode, isEditMode } = usePageState(props.recipe.slug);

0 commit comments

Comments
 (0)