diff --git a/src/app/growth/page.tsx b/src/app/growth/page.tsx index 9b61b59..c3a42a7 100644 --- a/src/app/growth/page.tsx +++ b/src/app/growth/page.tsx @@ -408,26 +408,29 @@ export default function GrowthPage() { {/* Latest Reading Card */} {latest && ( -
-
- Latest: {new Date(latest.measured_at).toLocaleDateString()} +
+
+
+
Latest Reading
+
{new Date(latest.measured_at).toLocaleDateString()}
+
{velocity && ( - - ({velocity.weight}kg/mo {velocity.direction === "up" ? "↑" : "↓"}) - +
+ {velocity.weight}kg/mo {velocity.direction === "up" ? "↑" : "↓"} +
)}
-
+
{latest.weight_kg && ( -
-
Weight
-
{latest.weight_kg} kg
+
+
Weight
+
{latest.weight_kg} kg
{weightPercentile && ( -
- {weightPercentile} percentile +
+ {weightPercentile} {savedGoals.weightKg && ( - - → {((latest.weight_kg / savedGoals.weightKg) * 100).toFixed(0)}% of goal + + → {((latest.weight_kg / savedGoals.weightKg) * 100).toFixed(0)}% )}
@@ -435,15 +438,15 @@ export default function GrowthPage() {
)} {latest.height_cm && ( -
-
Height
-
{latest.height_cm} cm
+
+
Height
+
{latest.height_cm} cm
{heightPercentile && ( -
- {heightPercentile} percentile +
+ {heightPercentile} {savedGoals.heightCm && ( - - → {((latest.height_cm / savedGoals.heightCm) * 100).toFixed(0)}% of goal + + → {((latest.height_cm / savedGoals.heightCm) * 100).toFixed(0)}% )}
@@ -451,12 +454,12 @@ export default function GrowthPage() {
)} {latest.head_circumference_cm && ( -
-
Head
-
{latest.head_circumference_cm} cm
+
+
Head
+
{latest.head_circumference_cm} cm
{headPercentile && ( -
- {headPercentile} percentile +
+ {headPercentile}
)}
@@ -467,7 +470,7 @@ export default function GrowthPage() { {/* WHO Standards Card - Enhanced with age-wise targets */} {child && standard && ( -
+
{child.name}
@@ -482,49 +485,49 @@ export default function GrowthPage() {
{/* Color-coded percentile zones legend */} -
+
- Normal (15th-85th) + Normal - Watch (<15th or >85th) + Watch - Alert (<3rd or >97th) + Alert
-
-
standard.weight.p85 ? "bg-amber-100 dark:bg-amber-900" : "bg-green-100 dark:bg-green-900"}`}> -
Weight
+
+
standard.weight.p85 ? "bg-amber-100 dark:bg-amber-900" : "bg-green-50 dark:bg-green-900"}`}> +
Weight
{standard.weight.p50} kg
-
Target: {standard.weight.p3}-{standard.weight.p97}
+
{standard.weight.p3}-{standard.weight.p97}
{latest?.weight_kg && ( -
- Actual: {latest.weight_kg}kg ({weightPercentile}) +
+ {latest.weight_kg}kg ({weightPercentile})
)}
-
standard.height.p85 ? "bg-amber-100 dark:bg-amber-900" : "bg-green-100 dark:bg-green-900"}`}> -
Height
+
standard.height.p85 ? "bg-amber-100 dark:bg-amber-900" : "bg-green-50 dark:bg-green-900"}`}> +
Height
{standard.height.p50} cm
-
Target: {standard.height.p3}-{standard.height.p97}
+
{standard.height.p3}-{standard.height.p97}
{latest?.height_cm && ( -
- Actual: {latest.height_cm}cm ({heightPercentile}) +
+ {latest.height_cm}cm ({heightPercentile})
)}
-
standard.headCircumference.p85 ? "bg-amber-100 dark:bg-amber-900" : "bg-green-100 dark:bg-green-900"}`}> -
Head
+
standard.headCircumference.p85 ? "bg-amber-100 dark:bg-amber-900" : "bg-green-50 dark:bg-green-900"}`}> +
Head
{standard.headCircumference.p50} cm
-
Target: {standard.headCircumference.p3}-{standard.headCircumference.p97}
+
{standard.headCircumference.p3}-{standard.headCircumference.p97}
{latest?.head_circumference_cm && ( -
- Actual: {latest.head_circumference_cm}cm ({headPercentile}) +
+ {latest.head_circumference_cm}cm ({headPercentile})
)}
@@ -534,7 +537,7 @@ export default function GrowthPage() { {velocity && (
- Growth velocity: + Velocity: {velocity.weight} kg/month {velocity.direction === "up" ? "↑" : "↓"} @@ -656,34 +659,40 @@ export default function GrowthPage() {

History

{growthData.map((record: any, i: number) => ( -
+
{new Date(record.measured_at).toLocaleDateString()}
-
+
{record.weight_kg && ( -
⚖️ {record.weight_kg} kg
+
+ ⚖️ {record.weight_kg} kg +
)} {record.height_cm && ( -
📏 {record.height_cm} cm
+
+ 📏 {record.height_cm} cm +
)} {record.head_circumference_cm && ( -
⭕ {record.head_circumference_cm} cm
+
+ ⭕ {record.head_circumference_cm} cm +
)}