remove show label code

This commit is contained in:
Michael Genson 2025-08-04 16:49:32 +00:00
commit 142079bcd5
2 changed files with 3 additions and 19 deletions

View file

@ -27,16 +27,6 @@
</div>
</v-col>
<v-spacer />
<v-col
v-if="label && showLabel"
cols="3"
class="text-right"
>
<MultiPurposeLabel
:label="label"
size="small"
/>
</v-col>
<v-col
cols="auto"
class="text-right"
@ -167,7 +157,6 @@
import { useOnline } from "@vueuse/core";
import RecipeIngredientListItem from "../Recipe/RecipeIngredientListItem.vue";
import ShoppingListItemEditor from "./ShoppingListItemEditor.vue";
import MultiPurposeLabel from "./MultiPurposeLabel.vue";
import type { ShoppingListItemOut } from "~/lib/api/types/household";
import type { MultiPurposeLabelOut, MultiPurposeLabelSummary } from "~/lib/api/types/labels";
import type { IngredientFood, IngredientUnit, RecipeSummary } from "~/lib/api/types/recipe";
@ -179,16 +168,12 @@ interface actions {
}
export default defineNuxtComponent({
components: { ShoppingListItemEditor, MultiPurposeLabel, RecipeList, RecipeIngredientListItem },
components: { ShoppingListItemEditor, RecipeList, RecipeIngredientListItem },
props: {
modelValue: {
type: Object as () => ShoppingListItemOut,
required: true,
},
showLabel: {
type: Boolean,
default: false,
},
labels: {
type: Array as () => MultiPurposeLabelOut[],
required: true,
@ -210,7 +195,7 @@ export default defineNuxtComponent({
setup(props, context) {
const i18n = useI18n();
const displayRecipeRefs = ref(false);
const itemLabelCols = ref<string>(props.modelValue.checked ? "auto" : props.showLabel ? "4" : "6");
const itemLabelCols = ref<string>(props.modelValue.checked ? "auto" : "6");
const isOffline = computed(() => useOnline().value === false);
const contextMenu: actions[] = [
@ -295,7 +280,7 @@ export default defineNuxtComponent({
}
listItem.value.recipeReferences.forEach((ref) => {
const recipe = props.recipes.get(ref.recipeId);
const recipe = props.recipes?.get(ref.recipeId);
if (recipe) {
recipeList.push(recipe);
}

View file

@ -167,7 +167,6 @@
>
<ShoppingListItem
v-model="value[index]"
:show-label="false"
:labels="allLabels || []"
:units="allUnits || []"
:foods="allFoods || []"