feat: Add optional note field to ingredient parsing and update related components
This commit is contained in:
@@ -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('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user