fix(calculator): implement dynamic weight-based dosage calculation for Welpenmilch & Welpenbrei
- Calculate dosage in grams per kg of puppy weight for Canina Welpenmilch (puppy milk powder) and Canina Welpenbrei (puppy porridge) - Display exact water mixing ratio (e.g. 15g powder mixed with 45ml warm water) and calculate package duration reactively
This commit is contained in:
parent
fb23831640
commit
67444aa251
@ -1055,7 +1055,9 @@ export const PRODUCTS: Product[] = [
|
||||
symptoms: ["توله بدون مادر", "نیاز به شیردهی مصنوعی"],
|
||||
suitableFor: "سگ",
|
||||
calculateDosage: (weight) => {
|
||||
return { quantity: 1, unit: "قسمت", description: "مخلوط ۱:۴ با آب ۵۰ درجه سانتیگراد" };
|
||||
// 1 part milk powder (approx 10g per kg of puppy weight) mixed with 4 parts water
|
||||
const grams = Math.max(10, Math.round(weight * 10));
|
||||
return { quantity: grams, unit: "گرم پودر", description: `مخلوط ${grams} گرم پودر با ${grams * 4} میلیلیتر آب ۵۰ درجه` };
|
||||
},
|
||||
analysis: { "پروتئین": "۳۰٪" },
|
||||
feedingAdvice: "هر ۲ ساعت در هفته اول، سپس هر ۴ ساعت.",
|
||||
@ -1086,8 +1088,10 @@ export const PRODUCTS: Product[] = [
|
||||
symptoms: ["توله ۳ هفته", "شروع غذای کمکی"],
|
||||
suitableFor: "سگ",
|
||||
contraindications: ["مصرف همزمان ویتامین D2 مجاز نیست"],
|
||||
calculateDosage: () => {
|
||||
return { quantity: 1, unit: "قسمت", description: "مخلوط ۱:۳ با آب ۵۰ درجه" };
|
||||
calculateDosage: (weight) => {
|
||||
// 1 part porridge powder (approx 15g per kg of puppy weight) mixed with 3 parts warm water
|
||||
const grams = Math.max(15, Math.round(weight * 15));
|
||||
return { quantity: grams, unit: "گرم فرنی", description: `مخلوط ${grams} گرم فرنی با ${grams * 3} میلیلیتر آب ۵۰ درجه` };
|
||||
},
|
||||
analysis: { "پروتئین": "۲۷٪" },
|
||||
feedingAdvice: "کمکم از هفته سوم به عنوان غذای کمکی معرفی شود.",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user