@burdenoff/microfe-healthybowl 2026.812.15 → 2026.812.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -351,10 +351,10 @@ var A = [
|
|
|
351
351
|
className: "mt-4 border-t border-border-subtle pt-4",
|
|
352
352
|
children: [/* @__PURE__ */ O("h4", {
|
|
353
353
|
className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
354
|
-
children: P("healthybowl.livestock.fertility.due.title", "Due
|
|
354
|
+
children: P("healthybowl.livestock.fertility.due.title", "Due soon, and overdue")
|
|
355
355
|
}), Y.length === 0 ? /* @__PURE__ */ O("p", {
|
|
356
356
|
className: "text-xs text-text-secondary",
|
|
357
|
-
children: P("healthybowl.livestock.fertility.due.empty", "No
|
|
357
|
+
children: P("healthybowl.livestock.fertility.due.empty", "No open pregnancy is due in the next 30 days, and none is overdue.")
|
|
358
358
|
}) : /* @__PURE__ */ O("ul", {
|
|
359
359
|
className: "flex flex-col gap-1.5",
|
|
360
360
|
children: Y.map((e) => {
|
|
@@ -371,9 +371,9 @@ var A = [
|
|
|
371
371
|
children: e.expectedDeliveryDate
|
|
372
372
|
}), /* @__PURE__ */ k("span", {
|
|
373
373
|
className: `tabular-nums ${j[t]}`,
|
|
374
|
-
children: [P(n.key, n.defaultValue),
|
|
374
|
+
children: [P(n.key, n.defaultValue), Number.isFinite(e.daysUntilDue) && /* @__PURE__ */ k("span", {
|
|
375
375
|
className: "text-text-secondary",
|
|
376
|
-
children: [" ", P("healthybowl.livestock.fertility.due.inDays", "({{n}}d)", { n: String(e.daysUntilDue) })]
|
|
376
|
+
children: [" ", t === "OVERDUE" ? P("healthybowl.livestock.fertility.due.byDays", "(by {{n}}d)", { n: String(Math.abs(e.daysUntilDue)) }) : P("healthybowl.livestock.fertility.due.inDays", "({{n}}d)", { n: String(e.daysUntilDue) })]
|
|
377
377
|
})]
|
|
378
378
|
})]
|
|
379
379
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FertilityCard.js","names":[],"sources":["../../../../src/healthybowl/pages/livestock/FertilityCard.tsx"],"sourcesContent":["/**\n * Fertility card (BOFF-6008).\n *\n * The fourth card beside growth, feed and herd statistics. Growth says how fast animals gain, feed\n * says what that gain cost, herd statistics says what the herd is made of — this says whether it is\n * actually breeding, which is the number a farmer culls on.\n *\n * The backend for this shipped without any UI, so until now no user of HealthyBowl could see a\n * single fertility figure.\n *\n * Deliberate choices:\n * - **The calving interval prints its reason, never a number, whenever the backend supplies one.**\n * A DELIVERED record with no delivery date merges two births into one gap and OVERSTATES the\n * interval — the direction that hides a fertility problem behind a figure reading as merely\n * mediocre. `calvingIntervalDisplay` owns that predicate and is unit-tested; the card cannot\n * reach the number when a reason exists. Same treatment as herd statistics gives mortality.\n * - **An unmeasured rate renders as an em dash; a measured zero renders as `0%`.** Four services\n * and nothing in calf is the most urgent thing this card can say, and it must not be flattened\n * into the same appearance as \"we have no breeding data\".\n * - **The empty state is decided by breeding ACTIVITY, not by a falsy rate** (`hasFertilityData`).\n * Deciding it on `conceptionRatePct` would print \"No breeding records yet\" over a barren herd.\n * - **Two y-axes on the trend, unlike the herd-turnover chart's one.** There, entries and exits\n * were both counts of animals and shared a scale honestly. Here counts and a percentage have no\n * common scale, so the rate rides its own right-hand axis, fixed to 0–100 so a good month and a\n * bad month are comparable across reloads rather than rescaled to whatever happened.\n * - **Due-soon is a worklist, not a chart.** It answers \"who do I check on this week\", so it is\n * ordered soonest-first and banded by urgency, with a passed due date called out rather than\n * folded into \"later\".\n * - A query error is surfaced as an error, never as the empty state — \"no breeding records\" is a\n * statement about the farm and must not be shown when the truth is \"we could not load\".\n */\n\nimport { useMemo, useState, type FC } from 'react';\nimport { Bar, CartesianGrid, ComposedChart, Legend, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ChartCard } from '../../components/ChartCard';\nimport { AnalyticsControls } from '../../components/AnalyticsControls';\nimport { formatNumber } from '../../utils/helpers';\nimport { downloadCsv } from '../../utils/download';\nimport { NOT_MEASURED, optionalMetric } from '../../utils/optionalMetric';\nimport {\n calvingIntervalDisplay,\n dueSoonUrgency,\n dueSoonUrgencyText,\n fertilityCsvRows,\n FERTILITY_CSV_HEADERS,\n hasFertilityData,\n orderedDueSoon,\n orderedFertilityBuckets,\n pregnancyLossDisplay,\n type DueSoonUrgency,\n} from '../../utils/fertility';\nimport { useHealthyBowlFertility } from '../../hooks/useHealthyBowlFertility';\nimport type { GrowthGranularity } from '../../hooks/useHealthyBowlLivestockGrowth';\n\nconst GRANULARITIES: GrowthGranularity[] = ['DAY', 'WEEK', 'MONTH'];\n\n/**\n * Urgency → text colour. Only OVERDUE and IMMINENT earn a status colour; the rest stay neutral.\n *\n * Keyed on the union rather than `string` so adding a band to `DueSoonUrgency` fails the build here\n * instead of silently rendering an unstyled row.\n */\nconst URGENCY_CLASS: Record<DueSoonUrgency, string> = {\n OVERDUE: 'text-status-error-text',\n IMMINENT: 'text-status-warning-text',\n SOON: 'text-text-primary',\n LATER: 'text-text-secondary',\n};\n\ninterface FertilityCardProps {\n groupId?: string | null;\n className?: string;\n}\n\nexport const FertilityCard: FC<FertilityCardProps> = ({ groupId = null, className }) => {\n const { t } = useI18n();\n const [granularity, setGranularity] = useState<GrowthGranularity>('MONTH');\n const [from, setFrom] = useState('');\n const [to, setTo] = useState('');\n const { fertility, dueSoon, trend, truncated, workspaceReady, loading, error } = useHealthyBowlFertility({\n groupId,\n granularity,\n from: from || null,\n to: to || null,\n });\n\n const trendData = useMemo(() => orderedFertilityBuckets(trend), [trend]);\n const dueSoonRows = useMemo(() => orderedDueSoon(dueSoon), [dueSoon]);\n\n const hasData = hasFertilityData({\n services: fertility?.services,\n deliveries: fertility?.deliveries,\n damsWithInterval: fertility?.damsWithInterval,\n dueSoonCount: dueSoonRows.length,\n trendCount: trendData.length,\n });\n\n const interval = fertility ? calvingIntervalDisplay(fertility) : null;\n const loss = fertility ? pregnancyLossDisplay(fertility) : null;\n\n const handleExportCsv = () => {\n if (!fertility) return;\n downloadCsv(\n `livestock-fertility-${new Date().toISOString().slice(0, 10)}.csv`,\n [...FERTILITY_CSV_HEADERS],\n fertilityCsvRows({\n services: fertility.services,\n conceived: fertility.conceived,\n conceptionRatePct: fertility.conceptionRatePct,\n deliveries: fertility.deliveries,\n trend: trendData,\n })\n );\n };\n\n const granularityToggle = (\n <div className=\"flex items-center gap-1\">\n {GRANULARITIES.map((g) => (\n <button\n key={g}\n type=\"button\"\n onClick={() => setGranularity(g)}\n aria-pressed={granularity === g}\n className={`min-h-[32px] rounded-md px-2 py-1 text-xs transition-colors ${\n granularity === g\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'text-text-secondary hover:bg-bg-sunken/50'\n }`}\n >\n {t(`healthybowl.livestock.fertility.granularity.${g.toLowerCase()}`, g.charAt(0) + g.slice(1).toLowerCase())}\n </button>\n ))}\n </div>\n );\n\n return (\n <ChartCard\n title={t('healthybowl.livestock.fertility.title', 'Fertility')}\n description={t(\n 'healthybowl.livestock.fertility.description',\n 'Whether the herd is actually breeding — conception, calving interval, litter size and who is due.'\n )}\n actions={\n <AnalyticsControls\n from={from}\n to={to}\n onFromChange={setFrom}\n onToChange={setTo}\n onExportCsv={handleExportCsv}\n exportDisabled={!fertility || !hasData}\n >\n {granularityToggle}\n </AnalyticsControls>\n }\n className={className}\n >\n {error ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.error.title', 'Could not load fertility analytics')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">{error.message}</p>\n </div>\n ) : !workspaceReady || (loading && !hasData) ? (\n <p className=\"py-8 text-center text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.loading', 'Loading fertility analytics…')}\n </p>\n ) : !hasData ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.empty.title', 'No breeding records yet')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.empty.hint',\n 'Record a mating on the Breeding page, then set its outcome — delivery date and offspring — to see conception, calving interval and litter size here.'\n )}\n </p>\n </div>\n ) : (\n <>\n {truncated && (\n <p className=\"mb-3 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.truncated',\n 'This herd has more breeding records than one view can load, so every figure below covers only part of it. Narrow the date range or filter by group for an exact figure.'\n )}\n </p>\n )}\n\n {/* Headline — conception is what a farmer checks first. */}\n <dl className=\"mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.conceptionRate', 'Conception rate')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.conceptionRatePct, { decimals: 1, unit: '%' })}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofServices', '{{c}} of {{s}} services', {\n c: String(fertility?.conceived ?? 0),\n s: String(fertility?.services ?? 0),\n })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.servicesPerConception', 'Services per conception')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.servicesPerConception, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.calvingInterval', 'Mean calving interval')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Never reachable when a reason exists — see calvingIntervalDisplay. */}\n {interval?.available\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(interval.meanDays),\n })\n : NOT_MEASURED}\n </dd>\n {interval?.available && interval.medianDays !== null && (\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.median', 'median {{n}}', {\n n: optionalMetric(interval.medianDays, { decimals: 0 }),\n })}\n </dd>\n )}\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.pregnancyLoss', 'Pregnancy loss')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Unreachable while a reason exists — the raw figure is a structural 0, not a\n measurement, and printing it would read as a herd that lost nothing. */}\n {loss?.available ? optionalMetric(loss.ratePct, { decimals: 1, unit: '%' }) : NOT_MEASURED}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofConfirmed', 'of confirmed pregnancies')}\n </dd>\n </div>\n </dl>\n\n {/* The reason IS the value in both of these — never a blank, and never a number. */}\n {interval && !interval.available && interval.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{interval.reason}</p>\n )}\n {loss && !loss.available && loss.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{loss.reason}</p>\n )}\n\n {/* Trend — counts as bars, rate as its own axis. */}\n <div className=\"border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.trend.title', 'Services and conceptions')}\n </h4>\n {trendData.length === 0 ? (\n <p className=\"py-4 text-center text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.trend.empty',\n 'No service in this period carries a mating date, so there is nothing to plot over time.'\n )}\n </p>\n ) : (\n <ResponsiveContainer width=\"100%\" height={220}>\n <ComposedChart data={trendData} margin={{ top: 5, right: 20, left: 0, bottom: 5 }}>\n <CartesianGrid strokeDasharray=\"3 3\" stroke=\"var(--color-border)\" />\n <XAxis dataKey=\"bucket\" tick={{ fontSize: 11 }} stroke=\"var(--color-muted-foreground)\" />\n <YAxis\n yAxisId=\"count\"\n allowDecimals={false}\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n {/* Fixed 0–100 so two periods are comparable, not rescaled to whatever happened. */}\n <YAxis\n yAxisId=\"rate\"\n orientation=\"right\"\n domain={[0, 100]}\n unit=\"%\"\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n <Tooltip\n cursor={{ fill: 'var(--color-muted)', opacity: 0.2 }}\n contentStyle={{\n backgroundColor: 'var(--color-card)',\n border: '1px solid var(--color-border)',\n borderRadius: 8,\n fontSize: 12,\n }}\n labelStyle={{ color: 'var(--color-foreground)' }}\n formatter={(value: number | string, name: string) => [\n typeof value === 'number' ? formatNumber(value) : String(value ?? NOT_MEASURED),\n name,\n ]}\n />\n <Legend wrapperStyle={{ fontSize: 11 }} />\n <Bar\n yAxisId=\"count\"\n dataKey=\"services\"\n name={t('healthybowl.livestock.fertility.trend.services', 'Services')}\n fill=\"var(--color-chart-1)\"\n radius={[4, 4, 0, 0]}\n />\n <Bar\n yAxisId=\"count\"\n dataKey=\"conceived\"\n name={t('healthybowl.livestock.fertility.trend.conceived', 'Conceived')}\n fill=\"var(--color-chart-2)\"\n radius={[4, 4, 0, 0]}\n />\n <Line\n yAxisId=\"rate\"\n type=\"monotone\"\n dataKey=\"conceptionRatePct\"\n name={t('healthybowl.livestock.fertility.trend.rate', 'Conception rate %')}\n stroke=\"var(--color-chart-3)\"\n strokeWidth={2}\n dot={false}\n connectNulls={false}\n />\n </ComposedChart>\n </ResponsiveContainer>\n )}\n </div>\n\n {/* Litter and first calving. */}\n <div className=\"mt-4 grid grid-cols-1 gap-4 border-t border-border-subtle pt-4 sm:grid-cols-2\">\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.title', 'Litter size')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.born', 'Mean born')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringBorn, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.live', 'Mean born alive')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringLive, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.perinatal', 'Perinatal mortality')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.perinatalMortalityPct, { decimals: 1, unit: '%' })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.deliveries', 'Deliveries')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.deliveries ?? 0)}\n </dd>\n </div>\n </dl>\n {/* The denominator caveat, as animalsWithoutAge is for the age chart. */}\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.litter.coverage',\n '{{counted}} of {{total}} deliveries recorded how many were born — the averages are of those.',\n {\n counted: String(fertility?.deliveriesWithCounts ?? 0),\n total: String(fertility?.deliveries ?? 0),\n }\n )}\n </p>\n </div>\n\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.title', 'Age at first calving')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.mean', 'Mean')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {fertility?.meanAgeAtFirstCalvingDays !== null && fertility?.meanAgeAtFirstCalvingDays !== undefined\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(fertility.meanAgeAtFirstCalvingDays),\n })\n : NOT_MEASURED}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.median', 'Median')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.medianAgeAtFirstCalvingDays, { decimals: 0 })}\n </dd>\n </div>\n <div className=\"col-span-2\">\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.dams', 'Dams with a first calving')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.damsWithFirstCalving ?? 0)}\n <span className=\"ms-2 text-xs font-normal text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.intervalDams', '· {{n}} with an interval', {\n n: String(fertility?.damsWithInterval ?? 0),\n })}\n </span>\n </dd>\n </div>\n </dl>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.firstCalving.coverage',\n 'Only dams whose own date of birth is recorded can contribute — an unknown birth date makes the age unknowable.'\n )}\n </p>\n </div>\n </div>\n\n {/* Due soon — a worklist, soonest first. */}\n <div className=\"mt-4 border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.due.title', 'Due in the next 30 days')}\n </h4>\n {dueSoonRows.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.due.empty',\n 'No confirmed or mated pregnancy is due in the next 30 days.'\n )}\n </p>\n ) : (\n <ul className=\"flex flex-col gap-1.5\">\n {dueSoonRows.map((row) => {\n const urgency = dueSoonUrgency(row.daysUntilDue);\n const label = dueSoonUrgencyText(urgency);\n return (\n <li\n key={`${row.animalId}:${row.expectedDeliveryDate}`}\n className=\"flex flex-wrap items-baseline justify-between gap-2 text-xs\"\n >\n <span className=\"font-medium text-text-primary\">{row.animalId}</span>\n <span className=\"flex items-baseline gap-2\">\n <span className=\"tabular-nums text-text-secondary\">{row.expectedDeliveryDate}</span>\n <span className={`tabular-nums ${URGENCY_CLASS[urgency]}`}>\n {t(label.key, label.defaultValue)}\n {urgency !== 'OVERDUE' && (\n <span className=\"text-text-secondary\">\n {' '}\n {t('healthybowl.livestock.fertility.due.inDays', '({{n}}d)', {\n n: String(row.daysUntilDue),\n })}\n </span>\n )}\n </span>\n </span>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n </ChartCard>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuDA,IAAM,IAAqC;CAAC;CAAO;CAAQ;CAAQ,EAQ7D,IAAgD;CACpD,SAAS;CACT,UAAU;CACV,MAAM;CACN,OAAO;CACR,EAOY,KAAyC,EAAE,aAAU,MAAM,mBAAgB;CACtF,IAAM,EAAE,SAAM,GAAS,EACjB,CAAC,GAAa,KAAkB,EAA4B,QAAQ,EACpE,CAAC,GAAM,KAAW,EAAS,GAAG,EAC9B,CAAC,GAAI,KAAS,EAAS,GAAG,EAC1B,EAAE,cAAW,YAAS,UAAO,cAAW,mBAAgB,YAAS,aAAU,EAAwB;EACvG;EACA;EACA,MAAM,KAAQ;EACd,IAAI,KAAM;EACX,CAAC,EAEI,IAAY,QAAc,EAAwB,EAAM,EAAE,CAAC,EAAM,CAAC,EAClE,IAAc,QAAc,EAAe,EAAQ,EAAE,CAAC,EAAQ,CAAC,EAE/D,IAAU,EAAiB;EAC/B,UAAU,GAAW;EACrB,YAAY,GAAW;EACvB,kBAAkB,GAAW;EAC7B,cAAc,EAAY;EAC1B,YAAY,EAAU;EACvB,CAAC,EAEI,IAAW,IAAY,EAAuB,EAAU,GAAG,MAC3D,IAAO,IAAY,EAAqB,EAAU,GAAG,MAErD,UAAwB;AACvB,OACL,EACE,wCAAuB,IAAI,MAAM,EAAC,aAAa,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version":3,"file":"FertilityCard.js","names":[],"sources":["../../../../src/healthybowl/pages/livestock/FertilityCard.tsx"],"sourcesContent":["/**\n * Fertility card (BOFF-6008).\n *\n * The fourth card beside growth, feed and herd statistics. Growth says how fast animals gain, feed\n * says what that gain cost, herd statistics says what the herd is made of — this says whether it is\n * actually breeding, which is the number a farmer culls on.\n *\n * The backend for this shipped without any UI, so until now no user of HealthyBowl could see a\n * single fertility figure.\n *\n * Deliberate choices:\n * - **The calving interval prints its reason, never a number, whenever the backend supplies one.**\n * A DELIVERED record with no delivery date merges two births into one gap and OVERSTATES the\n * interval — the direction that hides a fertility problem behind a figure reading as merely\n * mediocre. `calvingIntervalDisplay` owns that predicate and is unit-tested; the card cannot\n * reach the number when a reason exists. Same treatment as herd statistics gives mortality.\n * - **An unmeasured rate renders as an em dash; a measured zero renders as `0%`.** Four services\n * and nothing in calf is the most urgent thing this card can say, and it must not be flattened\n * into the same appearance as \"we have no breeding data\".\n * - **The empty state is decided by breeding ACTIVITY, not by a falsy rate** (`hasFertilityData`).\n * Deciding it on `conceptionRatePct` would print \"No breeding records yet\" over a barren herd.\n * - **Two y-axes on the trend, unlike the herd-turnover chart's one.** There, entries and exits\n * were both counts of animals and shared a scale honestly. Here counts and a percentage have no\n * common scale, so the rate rides its own right-hand axis, fixed to 0–100 so a good month and a\n * bad month are comparable across reloads rather than rescaled to whatever happened.\n * - **Due-soon is a worklist, not a chart.** It answers \"who do I check on this week\", so it is\n * ordered soonest-first and banded by urgency, with a passed due date called out rather than\n * folded into \"later\".\n * - A query error is surfaced as an error, never as the empty state — \"no breeding records\" is a\n * statement about the farm and must not be shown when the truth is \"we could not load\".\n */\n\nimport { useMemo, useState, type FC } from 'react';\nimport { Bar, CartesianGrid, ComposedChart, Legend, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ChartCard } from '../../components/ChartCard';\nimport { AnalyticsControls } from '../../components/AnalyticsControls';\nimport { formatNumber } from '../../utils/helpers';\nimport { downloadCsv } from '../../utils/download';\nimport { NOT_MEASURED, optionalMetric } from '../../utils/optionalMetric';\nimport {\n calvingIntervalDisplay,\n dueSoonUrgency,\n dueSoonUrgencyText,\n fertilityCsvRows,\n FERTILITY_CSV_HEADERS,\n hasFertilityData,\n orderedDueSoon,\n orderedFertilityBuckets,\n pregnancyLossDisplay,\n type DueSoonUrgency,\n} from '../../utils/fertility';\nimport { useHealthyBowlFertility } from '../../hooks/useHealthyBowlFertility';\nimport type { GrowthGranularity } from '../../hooks/useHealthyBowlLivestockGrowth';\n\nconst GRANULARITIES: GrowthGranularity[] = ['DAY', 'WEEK', 'MONTH'];\n\n/**\n * Urgency → text colour. Only OVERDUE and IMMINENT earn a status colour; the rest stay neutral.\n *\n * Keyed on the union rather than `string` so adding a band to `DueSoonUrgency` fails the build here\n * instead of silently rendering an unstyled row.\n */\nconst URGENCY_CLASS: Record<DueSoonUrgency, string> = {\n OVERDUE: 'text-status-error-text',\n IMMINENT: 'text-status-warning-text',\n SOON: 'text-text-primary',\n LATER: 'text-text-secondary',\n};\n\ninterface FertilityCardProps {\n groupId?: string | null;\n className?: string;\n}\n\nexport const FertilityCard: FC<FertilityCardProps> = ({ groupId = null, className }) => {\n const { t } = useI18n();\n const [granularity, setGranularity] = useState<GrowthGranularity>('MONTH');\n const [from, setFrom] = useState('');\n const [to, setTo] = useState('');\n const { fertility, dueSoon, trend, truncated, workspaceReady, loading, error } = useHealthyBowlFertility({\n groupId,\n granularity,\n from: from || null,\n to: to || null,\n });\n\n const trendData = useMemo(() => orderedFertilityBuckets(trend), [trend]);\n const dueSoonRows = useMemo(() => orderedDueSoon(dueSoon), [dueSoon]);\n\n const hasData = hasFertilityData({\n services: fertility?.services,\n deliveries: fertility?.deliveries,\n damsWithInterval: fertility?.damsWithInterval,\n dueSoonCount: dueSoonRows.length,\n trendCount: trendData.length,\n });\n\n const interval = fertility ? calvingIntervalDisplay(fertility) : null;\n const loss = fertility ? pregnancyLossDisplay(fertility) : null;\n\n const handleExportCsv = () => {\n if (!fertility) return;\n downloadCsv(\n `livestock-fertility-${new Date().toISOString().slice(0, 10)}.csv`,\n [...FERTILITY_CSV_HEADERS],\n fertilityCsvRows({\n services: fertility.services,\n conceived: fertility.conceived,\n conceptionRatePct: fertility.conceptionRatePct,\n deliveries: fertility.deliveries,\n trend: trendData,\n })\n );\n };\n\n const granularityToggle = (\n <div className=\"flex items-center gap-1\">\n {GRANULARITIES.map((g) => (\n <button\n key={g}\n type=\"button\"\n onClick={() => setGranularity(g)}\n aria-pressed={granularity === g}\n className={`min-h-[32px] rounded-md px-2 py-1 text-xs transition-colors ${\n granularity === g\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'text-text-secondary hover:bg-bg-sunken/50'\n }`}\n >\n {t(`healthybowl.livestock.fertility.granularity.${g.toLowerCase()}`, g.charAt(0) + g.slice(1).toLowerCase())}\n </button>\n ))}\n </div>\n );\n\n return (\n <ChartCard\n title={t('healthybowl.livestock.fertility.title', 'Fertility')}\n description={t(\n 'healthybowl.livestock.fertility.description',\n 'Whether the herd is actually breeding — conception, calving interval, litter size and who is due.'\n )}\n actions={\n <AnalyticsControls\n from={from}\n to={to}\n onFromChange={setFrom}\n onToChange={setTo}\n onExportCsv={handleExportCsv}\n exportDisabled={!fertility || !hasData}\n >\n {granularityToggle}\n </AnalyticsControls>\n }\n className={className}\n >\n {error ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.error.title', 'Could not load fertility analytics')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">{error.message}</p>\n </div>\n ) : !workspaceReady || (loading && !hasData) ? (\n <p className=\"py-8 text-center text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.loading', 'Loading fertility analytics…')}\n </p>\n ) : !hasData ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.empty.title', 'No breeding records yet')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.empty.hint',\n 'Record a mating on the Breeding page, then set its outcome — delivery date and offspring — to see conception, calving interval and litter size here.'\n )}\n </p>\n </div>\n ) : (\n <>\n {truncated && (\n <p className=\"mb-3 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.truncated',\n 'This herd has more breeding records than one view can load, so every figure below covers only part of it. Narrow the date range or filter by group for an exact figure.'\n )}\n </p>\n )}\n\n {/* Headline — conception is what a farmer checks first. */}\n <dl className=\"mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.conceptionRate', 'Conception rate')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.conceptionRatePct, { decimals: 1, unit: '%' })}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofServices', '{{c}} of {{s}} services', {\n c: String(fertility?.conceived ?? 0),\n s: String(fertility?.services ?? 0),\n })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.servicesPerConception', 'Services per conception')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.servicesPerConception, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.calvingInterval', 'Mean calving interval')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Never reachable when a reason exists — see calvingIntervalDisplay. */}\n {interval?.available\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(interval.meanDays),\n })\n : NOT_MEASURED}\n </dd>\n {interval?.available && interval.medianDays !== null && (\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.median', 'median {{n}}', {\n n: optionalMetric(interval.medianDays, { decimals: 0 }),\n })}\n </dd>\n )}\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.pregnancyLoss', 'Pregnancy loss')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Unreachable while a reason exists — the raw figure is a structural 0, not a\n measurement, and printing it would read as a herd that lost nothing. */}\n {loss?.available ? optionalMetric(loss.ratePct, { decimals: 1, unit: '%' }) : NOT_MEASURED}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofConfirmed', 'of confirmed pregnancies')}\n </dd>\n </div>\n </dl>\n\n {/* The reason IS the value in both of these — never a blank, and never a number. */}\n {interval && !interval.available && interval.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{interval.reason}</p>\n )}\n {loss && !loss.available && loss.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{loss.reason}</p>\n )}\n\n {/* Trend — counts as bars, rate as its own axis. */}\n <div className=\"border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.trend.title', 'Services and conceptions')}\n </h4>\n {trendData.length === 0 ? (\n <p className=\"py-4 text-center text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.trend.empty',\n 'No service in this period carries a mating date, so there is nothing to plot over time.'\n )}\n </p>\n ) : (\n <ResponsiveContainer width=\"100%\" height={220}>\n <ComposedChart data={trendData} margin={{ top: 5, right: 20, left: 0, bottom: 5 }}>\n <CartesianGrid strokeDasharray=\"3 3\" stroke=\"var(--color-border)\" />\n <XAxis dataKey=\"bucket\" tick={{ fontSize: 11 }} stroke=\"var(--color-muted-foreground)\" />\n <YAxis\n yAxisId=\"count\"\n allowDecimals={false}\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n {/* Fixed 0–100 so two periods are comparable, not rescaled to whatever happened. */}\n <YAxis\n yAxisId=\"rate\"\n orientation=\"right\"\n domain={[0, 100]}\n unit=\"%\"\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n <Tooltip\n cursor={{ fill: 'var(--color-muted)', opacity: 0.2 }}\n contentStyle={{\n backgroundColor: 'var(--color-card)',\n border: '1px solid var(--color-border)',\n borderRadius: 8,\n fontSize: 12,\n }}\n labelStyle={{ color: 'var(--color-foreground)' }}\n formatter={(value: number | string, name: string) => [\n typeof value === 'number' ? formatNumber(value) : String(value ?? NOT_MEASURED),\n name,\n ]}\n />\n <Legend wrapperStyle={{ fontSize: 11 }} />\n <Bar\n yAxisId=\"count\"\n dataKey=\"services\"\n name={t('healthybowl.livestock.fertility.trend.services', 'Services')}\n fill=\"var(--color-chart-1)\"\n radius={[4, 4, 0, 0]}\n />\n <Bar\n yAxisId=\"count\"\n dataKey=\"conceived\"\n name={t('healthybowl.livestock.fertility.trend.conceived', 'Conceived')}\n fill=\"var(--color-chart-2)\"\n radius={[4, 4, 0, 0]}\n />\n <Line\n yAxisId=\"rate\"\n type=\"monotone\"\n dataKey=\"conceptionRatePct\"\n name={t('healthybowl.livestock.fertility.trend.rate', 'Conception rate %')}\n stroke=\"var(--color-chart-3)\"\n strokeWidth={2}\n dot={false}\n connectNulls={false}\n />\n </ComposedChart>\n </ResponsiveContainer>\n )}\n </div>\n\n {/* Litter and first calving. */}\n <div className=\"mt-4 grid grid-cols-1 gap-4 border-t border-border-subtle pt-4 sm:grid-cols-2\">\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.title', 'Litter size')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.born', 'Mean born')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringBorn, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.live', 'Mean born alive')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringLive, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.perinatal', 'Perinatal mortality')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.perinatalMortalityPct, { decimals: 1, unit: '%' })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.deliveries', 'Deliveries')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.deliveries ?? 0)}\n </dd>\n </div>\n </dl>\n {/* The denominator caveat, as animalsWithoutAge is for the age chart. */}\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.litter.coverage',\n '{{counted}} of {{total}} deliveries recorded how many were born — the averages are of those.',\n {\n counted: String(fertility?.deliveriesWithCounts ?? 0),\n total: String(fertility?.deliveries ?? 0),\n }\n )}\n </p>\n </div>\n\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.title', 'Age at first calving')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.mean', 'Mean')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {fertility?.meanAgeAtFirstCalvingDays !== null && fertility?.meanAgeAtFirstCalvingDays !== undefined\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(fertility.meanAgeAtFirstCalvingDays),\n })\n : NOT_MEASURED}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.median', 'Median')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.medianAgeAtFirstCalvingDays, { decimals: 0 })}\n </dd>\n </div>\n <div className=\"col-span-2\">\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.dams', 'Dams with a first calving')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.damsWithFirstCalving ?? 0)}\n <span className=\"ms-2 text-xs font-normal text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.intervalDams', '· {{n}} with an interval', {\n n: String(fertility?.damsWithInterval ?? 0),\n })}\n </span>\n </dd>\n </div>\n </dl>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.firstCalving.coverage',\n 'Only dams whose own date of birth is recorded can contribute — an unknown birth date makes the age unknowable.'\n )}\n </p>\n </div>\n </div>\n\n {/* Due soon — a worklist, soonest first. */}\n <div className=\"mt-4 border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.due.title', 'Due soon, and overdue')}\n </h4>\n {dueSoonRows.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.due.empty',\n 'No open pregnancy is due in the next 30 days, and none is overdue.'\n )}\n </p>\n ) : (\n <ul className=\"flex flex-col gap-1.5\">\n {dueSoonRows.map((row) => {\n const urgency = dueSoonUrgency(row.daysUntilDue);\n const label = dueSoonUrgencyText(urgency);\n return (\n <li\n key={`${row.animalId}:${row.expectedDeliveryDate}`}\n className=\"flex flex-wrap items-baseline justify-between gap-2 text-xs\"\n >\n <span className=\"font-medium text-text-primary\">{row.animalId}</span>\n <span className=\"flex items-baseline gap-2\">\n <span className=\"tabular-nums text-text-secondary\">{row.expectedDeliveryDate}</span>\n <span className={`tabular-nums ${URGENCY_CLASS[urgency]}`}>\n {t(label.key, label.defaultValue)}\n {/* BOFF-6280 — an overdue row must say BY HOW MUCH. \"Overdue\" alone reads\n the same at three days as at three weeks, and those call for very\n different action. `daysUntilDue` is negative here, so it is negated\n for display rather than shown as \"-19d\". */}\n {/* Only when the count is a real number. `dueSoonUrgency` deliberately\n bands a non-finite value as OVERDUE rather than dropping the row, so\n the day count has to tolerate one too — otherwise the defence that\n keeps the row visible renders \"(by NaNd)\" next to it. */}\n {Number.isFinite(row.daysUntilDue) && (\n <span className=\"text-text-secondary\">\n {' '}\n {urgency === 'OVERDUE'\n ? t('healthybowl.livestock.fertility.due.byDays', '(by {{n}}d)', {\n n: String(Math.abs(row.daysUntilDue)),\n })\n : t('healthybowl.livestock.fertility.due.inDays', '({{n}}d)', {\n n: String(row.daysUntilDue),\n })}\n </span>\n )}\n </span>\n </span>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n </ChartCard>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuDA,IAAM,IAAqC;CAAC;CAAO;CAAQ;CAAQ,EAQ7D,IAAgD;CACpD,SAAS;CACT,UAAU;CACV,MAAM;CACN,OAAO;CACR,EAOY,KAAyC,EAAE,aAAU,MAAM,mBAAgB;CACtF,IAAM,EAAE,SAAM,GAAS,EACjB,CAAC,GAAa,KAAkB,EAA4B,QAAQ,EACpE,CAAC,GAAM,KAAW,EAAS,GAAG,EAC9B,CAAC,GAAI,KAAS,EAAS,GAAG,EAC1B,EAAE,cAAW,YAAS,UAAO,cAAW,mBAAgB,YAAS,aAAU,EAAwB;EACvG;EACA;EACA,MAAM,KAAQ;EACd,IAAI,KAAM;EACX,CAAC,EAEI,IAAY,QAAc,EAAwB,EAAM,EAAE,CAAC,EAAM,CA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