nutrition: detect recipe refs in ingredients, show in edit UI with multiplier
All checks were successful
CI / update (push) Successful in 5m35s
All checks were successful
CI / update (push) Successful in 5m35s
Skip embedding matching for anchor-tag ingredients that reference other recipes. Instead, mark them with recipeRef/recipeRefMultiplier fields so their nutrition is resolved via resolveReferencedNutrition with a user-configurable fraction. The edit UI shows these as teal REF badges with an editable "Anteil" input.
This commit is contained in:
@@ -180,6 +180,8 @@ const RecipeSchema = new mongoose.Schema(
|
||||
unitConversionSource: { type: String, enum: ['direct', 'density', 'usda_portion', 'estimate', 'manual', 'none'] },
|
||||
manuallyEdited: { type: Boolean, default: false },
|
||||
excluded: { type: Boolean, default: false },
|
||||
recipeRef: { type: String },
|
||||
recipeRefMultiplier: { type: Number, default: 1 },
|
||||
}],
|
||||
|
||||
// Translation metadata for tracking changes
|
||||
|
||||
Reference in New Issue
Block a user