recipes: add cake form size scaling for ingredient multiplier

Allow recipes to specify a default pan shape (round, rectangular, gugelhupf)
with dimensions. On the recipe page, users can enter their own pan size to
auto-calculate an ingredient multiplier based on the 2D area ratio.
This commit is contained in:
2026-02-27 20:09:29 +01:00
parent aa07ebc3b0
commit 7a1321279d
5 changed files with 253 additions and 19 deletions

View File

@@ -28,6 +28,13 @@ const RecipeSchema = new mongoose.Schema(
},
portions :{type:String, default: ""},
defaultForm: {
shape: { type: String, enum: ['round', 'rectangular', 'gugelhupf'] },
diameter: { type: Number },
width: { type: Number },
length: { type: Number },
innerDiameter: { type: Number },
},
cooking: {type:String, default: ""},
total_time : {type:String, default: ""},
ingredients: [{