feat: Add optional note field to ingredient parsing and update related components

This commit is contained in:
Nils-Johan Gynther
2026-04-12 10:30:05 +02:00
parent 03727ee3c5
commit 9ca7fcce96
7 changed files with 158 additions and 34 deletions
@@ -155,6 +155,7 @@ export class QuickImportService {
quantity: number;
unit: string;
name: string;
note?: string;
}>;
instructions?: string;
},
@@ -178,7 +179,8 @@ export class QuickImportService {
for (const ing of recipe.ingredients) {
const quantity = ing.quantity > 0 ? `${ing.quantity} ` : '';
const unit = ing.unit ? `${ing.unit} ` : '';
lines.push(`- ${quantity}${unit}${ing.name}`);
const note = ing.note ? ` (${ing.note})` : '';
lines.push(`- ${quantity}${unit}${ing.name}${note}`);
}
lines.push('');
}