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:
@@ -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: [{
|
||||
|
||||
Reference in New Issue
Block a user