-
Ingredient: {{ ingredient.name }}
-
Quantity: {{ ingredient.quantity }}
-
Unit: {{ ingredient.unit }}
-
Preparation: {{ ingredient.preparation }}
+
+
+
+
+ {{ ingredient?.quantity || 'qty' }}
+ {{ ingredient?.unit || 'unit' }}
+ of
+ {{ ingredient?.name || 'name' }}
+ ({{ ingredient?.product?.name || 'product' }})
+
+
+
+
+
+
+
-
-
Product: {{ ingredient.product.name }}
-
![]()
+
+
+
+
+
Ingredient: {{ ingredient.name }}
+
Quantity: {{ ingredient.quantity }}
+
Unit: {{ ingredient.unit }}
+
Preparation: {{ ingredient.preparation }}
+
+
+
Product: {{ ingredient.product.name }}
+
![]()
+
+
+
+
@@ -40,6 +64,7 @@ export default {
return {
ingredientText: this.ingredient.line,
productLink: this.ingredient.product?.link ?? "",
+ showDetails: false
};
},
methods: {
@@ -50,7 +75,10 @@ export default {
updateProductLink() {
if (this.productLink && this.productLink != this.ingredient.product?.link)
this.$emit('update-product-link', this.ingredient, this.productLink);
- }
+ },
+ deleteItem() {
+ this.$emit('delete-item', this.ingredient);
+ },
}
};
@@ -72,6 +100,74 @@ export default {
padding-left: 1em;
}
+.action-bar {
+ display: flex;
+ align-items: center;
+ justify-content: right;
+ padding: 10px;
+ border: 1px solid #ccc;
+ margin-bottom: 10px;
+}
+
+.compact-parse-results {
+ display: inline-block;
+ font-weight: bold;
+ flex: 1;
+ text-align: left;
+}
+
+.parse-element {
+ margin-right: 1em;
+ border-bottom: solid 1px #ccc;
+ padding: 0.5em;
+}
+
+.parse-element.missing {
+ color: red;
+ border: solid red 1px;
+}
+
+.quantity {
+ color: blue;
+}
+
+.unit {
+ color: green;
+}
+
+.name {
+ color: black;
+}
+
+.product-name {
+ color: purple;
+}
+
+.delete-button,
+.expand-button {
+ padding: 8px 16px;
+ margin: 0 5px;
+ cursor: pointer;
+}
+
+.expand-button {
+ background-color: #f0f0f0;
+ border: 1px solid #ccc;
+}
+
+.rotate-chevron {
+ transform: rotate(180deg);
+}
+
+.details-section {
+ margin-top: 10px;
+ padding: 10px;
+ border: 1px solid #ccc;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+}
+
.product_teaser img {
max-width: 3em;
max-height: 3em;