Improved group matching

This commit is contained in:
jableader 2025-07-29 09:07:44 +10:00
parent 6cc9f8fef7
commit 7705c3113c
2 changed files with 3 additions and 3 deletions

View file

@ -154,8 +154,8 @@ async function saveShoppingList(outstandingItemGroups) {
} }
const groupsMatch = (a, b) => { const groupsMatch = (a, b) => {
if (a.product != b.product) return false; if (!!a.product != !!b.product) return false;
if (a.name && a.name === b.name) return true; if (a.name) return a.name === b.name;
return a.product.id === b.product.id; return a.product.id === b.product.id;
} }

View file

@ -6,7 +6,7 @@
<div class="product-details"> <div class="product-details">
<h3 class="header"> <h3 class="header">
<strong> <strong>
<a v-if="shoppingListItemGroup.product?.link" :href="shoppingListItemGroup.product?.link">{{ shoppingListItemGroup.product.name }}</a> <a v-if="shoppingListItemGroup.product?.link" :href="shoppingListItemGroup.product?.link">{{ shoppingListItemGroup.product?.name }}</a>
<span v-else>{{ shoppingListItemGroup.name }}</span> <span v-else>{{ shoppingListItemGroup.name }}</span>
</strong>, </strong>,
<small> <small>