@burdenoff/microfe-healthybowl 2026.725.1 → 2026.725.2

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.
@@ -1,48 +1,180 @@
1
- import { cn as e, formatCurrency as t } from "../utils/helpers.js";
2
- import { useBasePath as n } from "../hooks/useBasePath.js";
3
- import { PageLayout as r } from "../components/PageLayout.js";
4
- import { StatCard as i } from "../components/StatCard.js";
1
+ import { cn as e, formatCurrency as t, formatDateOnly as n } from "../utils/helpers.js";
2
+ import { useBasePath as r } from "../hooks/useBasePath.js";
3
+ import { PageLayout as i } from "../components/PageLayout.js";
5
4
  import { StatusBadge as a } from "../components/StatusBadge.js";
6
- import { ErrorState as o } from "../components/ErrorState.js";
7
- import { ChartCard as s } from "../components/ChartCard.js";
8
- import { PageLoader as ee } from "../components/PageLoader.js";
5
+ import { EmptyState as o } from "../components/EmptyState.js";
6
+ import { ErrorState as s } from "../components/ErrorState.js";
7
+ import { PageLoader as c } from "../components/PageLoader.js";
9
8
  import "../components/index.js";
10
- import { useHealthyBowlData as c } from "../hooks/useHealthyBowlData.js";
11
- import { useCallback as l, useMemo as u } from "react";
12
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
- import { AlertTriangle as f, BarChart3 as p, Calendar as m, ClipboardList as h, Cloud as g, DollarSign as _, Droplets as v, Eye as y, MapPin as b, PawPrint as x, Plus as S, ShieldCheck as C, Sprout as w, Thermometer as T, TrendingDown as E, TrendingUp as te, Wind as D } from "lucide-react";
14
- import { useNavigate as O } from "react-router-dom";
15
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
16
- import { EmphasisPanel as j, GlassCard as M, ShowMore as N } from "@burdenoff/fe-libs/ui";
9
+ import { useHealthyBowlData as l } from "../hooks/useHealthyBowlData.js";
10
+ import { useCallback as u, useMemo as d } from "react";
11
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { AlertTriangle as p, ArrowUpRight as m, BarChart3 as h, CalendarClock as ee, CheckCircle2 as g, ChevronRight as _, ClipboardList as te, Cloud as v, Droplets as y, Eye as b, MapPin as x, PawPrint as ne, Plus as S, ShieldCheck as C, Sprout as w, Thermometer as T, Wallet as E, Wind as re } from "lucide-react";
13
+ import { useNavigate as D } from "react-router-dom";
14
+ import { jsx as O, jsxs as k } from "react/jsx-runtime";
15
+ import { EmphasisPanel as A, GlassCard as j } from "@burdenoff/fe-libs/ui";
17
16
  //#region src/healthybowl/pages/HomePage.tsx
18
- var P = (e) => {
19
- switch (e) {
20
- case "critical": return "error";
21
- case "warning": return "warning";
22
- default: return "info";
23
- }
24
- }, F = (e) => {
17
+ var M = {
18
+ neutral: "text-text-primary",
19
+ success: "text-status-success-text",
20
+ warning: "text-status-warning-text",
21
+ danger: "text-status-error-text"
22
+ }, N = {
23
+ neutral: "bg-[var(--color-accent-soft)] text-text-primary",
24
+ success: "bg-status-success-bg text-status-success-text",
25
+ warning: "bg-status-warning-bg text-status-warning-text",
26
+ danger: "bg-status-error-bg text-status-error-text"
27
+ }, P = {
28
+ critical: 0,
29
+ warning: 1,
30
+ info: 2
31
+ }, F = {
32
+ critical: "bg-status-error-text",
33
+ warning: "bg-status-warning-text",
34
+ info: "bg-status-info-text"
35
+ }, I = (e) => {
25
36
  switch (e) {
26
37
  case "excellent": return "success";
27
38
  case "good": return "info";
28
39
  case "fair": return "warning";
29
40
  default: return "error";
30
41
  }
31
- }, I = (e) => {
32
- switch (e) {
33
- case "harvest_ready": return "success";
34
- case "growing":
35
- case "fruiting": return "info";
36
- case "planted": return "muted";
37
- default: return "default";
38
- }
39
- }, L = () => {
40
- let { dashboardStats: L, alerts: R, crops: z, weatherData: B, marketplaceProducts: V, markAlertRead: H, farm: U, loadings: W, errors: G, refetch: K } = c(), q = O(), { t: J } = d(), Y = l((e, t) => {
41
- let n = J(e);
42
- return n === e ? t : n;
43
- }, [J]), { buildPath: X } = n(), Z = L, Q = {
44
- location: B?.location ?? "",
45
- current: B?.current ?? {
42
+ }, L = (e) => Math.max(0, Math.min(100, Math.round(e))), R = ({ label: t, value: n, icon: r, tone: i = "neutral", glow: a = !1, drillLabel: o, onClick: s }) => /* @__PURE__ */ O("button", {
43
+ type: "button",
44
+ onClick: s,
45
+ className: "group block text-left focus-visible:outline-none",
46
+ children: /* @__PURE__ */ k(j, {
47
+ treatment: "metric",
48
+ glow: a,
49
+ className: "flex h-full flex-col gap-3 border-border-seam p-4 transition-shadow group-hover:shadow-pop group-focus-visible:ring-2 group-focus-visible:ring-border-focus group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-bg-canvas",
50
+ children: [
51
+ /* @__PURE__ */ k("div", {
52
+ className: "flex items-center justify-between",
53
+ children: [/* @__PURE__ */ O("span", {
54
+ className: "text-sm font-medium text-text-secondary",
55
+ children: t
56
+ }), /* @__PURE__ */ O("span", {
57
+ className: e("flex size-8 items-center justify-center rounded-lg [&>svg]:size-4", N[i]),
58
+ children: r
59
+ })]
60
+ }),
61
+ /* @__PURE__ */ O("span", {
62
+ className: e("text-3xl font-semibold tabular-nums", M[i]),
63
+ children: n
64
+ }),
65
+ /* @__PURE__ */ k("span", {
66
+ className: "mt-auto inline-flex items-center gap-1 text-xs font-medium text-text-secondary transition-colors group-hover:text-text-primary",
67
+ children: [o, /* @__PURE__ */ O(m, { className: "size-3.5" })]
68
+ })
69
+ ]
70
+ })
71
+ }), z = ({ label: e, value: t, hint: n, icon: r, onClick: i }) => /* @__PURE__ */ O("button", {
72
+ type: "button",
73
+ onClick: i,
74
+ className: "group block text-left focus-visible:outline-none",
75
+ children: /* @__PURE__ */ k(j, {
76
+ className: "flex h-full items-center justify-between gap-3 border-border-seam p-3 transition-shadow group-hover:shadow-pop group-focus-visible:ring-2 group-focus-visible:ring-border-focus group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-bg-canvas",
77
+ children: [/* @__PURE__ */ k("div", {
78
+ className: "min-w-0",
79
+ children: [
80
+ /* @__PURE__ */ O("p", {
81
+ className: "text-xs font-medium text-text-secondary",
82
+ children: e
83
+ }),
84
+ /* @__PURE__ */ O("p", {
85
+ className: "mt-0.5 truncate text-lg font-semibold tabular-nums text-text-primary",
86
+ children: t
87
+ }),
88
+ n && /* @__PURE__ */ O("p", {
89
+ className: "mt-0.5 truncate text-xs text-text-secondary",
90
+ children: n
91
+ })
92
+ ]
93
+ }), /* @__PURE__ */ O("span", {
94
+ className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-secondary [&>svg]:size-4",
95
+ children: r
96
+ })]
97
+ })
98
+ }), B = ({ alert: t, ctaLabel: n, relTime: r, onOpen: i }) => /* @__PURE__ */ k("li", {
99
+ className: "flex items-start gap-3 py-3",
100
+ children: [/* @__PURE__ */ O("span", {
101
+ className: e("mt-1.5 size-2.5 shrink-0 rounded-full", F[t.severity]),
102
+ "aria-hidden": !0
103
+ }), /* @__PURE__ */ k("div", {
104
+ className: "min-w-0 flex-1",
105
+ children: [
106
+ /* @__PURE__ */ k("div", {
107
+ className: "flex items-baseline justify-between gap-3",
108
+ children: [/* @__PURE__ */ O("p", {
109
+ className: "truncate text-sm font-medium text-text-primary",
110
+ children: t.title
111
+ }), /* @__PURE__ */ O("button", {
112
+ type: "button",
113
+ onClick: i,
114
+ className: "shrink-0 text-xs font-medium text-action-primary-bg transition-colors hover:underline focus-visible:underline focus-visible:outline-none",
115
+ children: n
116
+ })]
117
+ }),
118
+ /* @__PURE__ */ O("p", {
119
+ className: "mt-0.5 truncate text-xs text-text-secondary",
120
+ children: t.message
121
+ }),
122
+ /* @__PURE__ */ O("p", {
123
+ className: "mt-0.5 text-xs text-text-muted",
124
+ children: r
125
+ })
126
+ ]
127
+ })]
128
+ }), V = ({ crop: e, metaLabel: t, healthLabel: n, harvestLabel: r, openLabel: i, onOpen: o }) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k("button", {
129
+ type: "button",
130
+ onClick: o,
131
+ className: "group block w-full rounded-lg p-3 text-left transition-colors hover:bg-bg-sunken/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
132
+ children: [
133
+ /* @__PURE__ */ k("div", {
134
+ className: "flex items-center justify-between gap-2",
135
+ children: [/* @__PURE__ */ k("div", {
136
+ className: "min-w-0",
137
+ children: [/* @__PURE__ */ O("p", {
138
+ className: "truncate text-sm font-medium text-text-primary",
139
+ children: e.name
140
+ }), /* @__PURE__ */ O("p", {
141
+ className: "truncate text-xs text-text-secondary",
142
+ children: t
143
+ })]
144
+ }), /* @__PURE__ */ O(a, {
145
+ label: n,
146
+ variant: I(e.healthStatus),
147
+ dot: !0
148
+ })]
149
+ }),
150
+ /* @__PURE__ */ k("div", {
151
+ className: "mt-2 flex items-center gap-3",
152
+ children: [/* @__PURE__ */ O("div", {
153
+ className: "h-1.5 flex-1 overflow-hidden rounded-full bg-bg-sunken",
154
+ children: /* @__PURE__ */ O("div", {
155
+ className: "h-full rounded-full bg-action-primary-bg",
156
+ style: { width: `${L(e.progress)}%` }
157
+ })
158
+ }), /* @__PURE__ */ k("span", {
159
+ className: "w-9 shrink-0 text-right text-xs font-medium tabular-nums text-text-secondary",
160
+ children: [L(e.progress), "%"]
161
+ })]
162
+ }),
163
+ /* @__PURE__ */ k("div", {
164
+ className: "mt-1.5 flex items-center justify-between text-xs text-text-secondary",
165
+ children: [/* @__PURE__ */ O("span", {
166
+ className: "truncate",
167
+ children: r
168
+ }), /* @__PURE__ */ k("span", {
169
+ className: "inline-flex shrink-0 items-center gap-0.5 font-medium transition-colors group-hover:text-text-primary",
170
+ children: [i, /* @__PURE__ */ O(_, { className: "size-3.5" })]
171
+ })]
172
+ })
173
+ ]
174
+ }) }), H = () => {
175
+ let { dashboardStats: a, alerts: m, crops: _, weatherData: M, markAlertRead: N, farm: F, loadings: I, errors: L, refetch: H } = l(), U = D(), { t: W } = f(), G = u((e, t, n) => W(e, t, n), [W]), { buildPath: K } = r(), q = a, J = {
176
+ location: M?.location ?? "",
177
+ current: M?.current ?? {
46
178
  temperature: 0,
47
179
  condition: "N/A",
48
180
  feelsLike: 0,
@@ -52,408 +184,358 @@ var P = (e) => {
52
184
  pressure: 0,
53
185
  visibility: 0
54
186
  },
55
- forecast: B?.forecast ?? []
56
- }, ne = u(() => V.reduce((e, t) => e + t.price * t.stock, 0), [V]), $ = u(() => Z.totalRevenue === 0 ? null : Math.round(Z.totalExpenses / Z.totalRevenue * 100 * 10) / 10, [Z.totalExpenses, Z.totalRevenue]), re = [
187
+ forecast: M?.forecast ?? []
188
+ }, Y = d(() => (/* @__PURE__ */ new Date()).toLocaleDateString(void 0, {
189
+ weekday: "long",
190
+ day: "numeric",
191
+ month: "long"
192
+ }), []), X = d(() => [...m].sort((e, t) => P[e.severity] - P[t.severity]), [m]), ie = X.slice(0, 5), Z = m.length, ae = d(() => [..._].sort((e, t) => (e.daysToHarvest ?? 2 ** 53 - 1) - (t.daysToHarvest ?? 2 ** 53 - 1)), [_]).slice(0, 6), Q = d(() => q.totalRevenue === 0 ? null : Math.round(q.totalExpenses / q.totalRevenue * 100 * 10) / 10, [q.totalExpenses, q.totalRevenue]), oe = u((e) => {
193
+ let t = new Date(e).getTime();
194
+ if (Number.isNaN(t)) return "";
195
+ let n = Math.max(0, Math.floor((Date.now() - t) / 6e4));
196
+ if (n < 1) return G("healthybowl.home.time.now", "just now");
197
+ if (n < 60) return G("healthybowl.home.time.minutes", "{{n}}m ago", { n });
198
+ let r = Math.floor(n / 60);
199
+ if (r < 24) return G("healthybowl.home.time.hours", "{{n}}h ago", { n: r });
200
+ let i = Math.floor(r / 24);
201
+ return i < 7 ? G("healthybowl.home.time.days", "{{n}}d ago", { n: i }) : G("healthybowl.home.time.weeks", "{{n}}w ago", { n: Math.floor(i / 7) });
202
+ }, [G]), se = u((e) => e === "critical" ? G("healthybowl.home.needsAttention.review", "Review") : e === "warning" ? G("healthybowl.home.needsAttention.open", "Open") : G("healthybowl.home.needsAttention.view", "View"), [G]), ce = u((e) => {
203
+ N(e.id, !0), e.actionUrl && U(e.actionUrl);
204
+ }, [N, U]), le = q.netProfit > 0 ? "success" : q.netProfit < 0 ? "danger" : "neutral", ue = m.some((e) => e.severity === "critical"), de = m.some((e) => e.severity === "warning"), $ = Z === 0 ? "success" : ue ? "danger" : de ? "warning" : "neutral", fe = [
57
205
  {
58
- label: Y("healthybowl.home.quickActions.addCrop.label", "Add Crop"),
206
+ label: G("healthybowl.home.quickActions.addCrop.label", "Add crop"),
59
207
  icon: w,
60
- path: X("crops"),
61
- description: Y("healthybowl.home.quickActions.addCrop.description", "Register a new crop")
208
+ path: K("crops")
62
209
  },
63
210
  {
64
- label: Y("healthybowl.home.quickActions.recordHarvest.label", "Record Harvest"),
65
- icon: h,
66
- path: X("crops/harvest"),
67
- description: Y("healthybowl.home.quickActions.recordHarvest.description", "Log harvest data")
211
+ label: G("healthybowl.home.quickActions.recordHarvest.label", "Record harvest"),
212
+ icon: te,
213
+ path: K("crops/harvest")
68
214
  },
69
215
  {
70
- label: Y("healthybowl.home.quickActions.viewFields.label", "View Fields"),
71
- icon: b,
72
- path: X("crops/fields"),
73
- description: Y("healthybowl.home.quickActions.viewFields.description", "Manage farm fields")
216
+ label: G("healthybowl.home.quickActions.viewFields.label", "View fields"),
217
+ icon: x,
218
+ path: K("crops/fields")
74
219
  },
75
220
  {
76
- label: Y("healthybowl.home.quickActions.viewWeather.label", "View Weather"),
221
+ label: G("healthybowl.home.quickActions.viewWeather.label", "View weather"),
77
222
  icon: T,
78
- path: X("weather"),
79
- description: Y("healthybowl.home.quickActions.viewWeather.description", "Check forecast")
223
+ path: K("weather")
80
224
  },
81
225
  {
82
- label: Y("healthybowl.home.quickActions.analytics.label", "Analytics"),
83
- icon: p,
84
- path: X("analytics"),
85
- description: Y("healthybowl.home.quickActions.analytics.description", "View farm reports")
226
+ label: G("healthybowl.home.quickActions.analytics.label", "Analytics"),
227
+ icon: h,
228
+ path: K("analytics")
86
229
  }
87
- ];
88
- return /* @__PURE__ */ A(r, {
89
- hero: !0,
90
- title: Y("healthybowl.home.title", "Farm Dashboard"),
91
- titleAccent: Y("healthybowl.home.titleAccent", "Dashboard"),
92
- description: Y("healthybowl.home.description", "Overview of your farm operations"),
93
- purpose: "Your farm at a glance — revenue, active crops, alerts and weather in one view. Start your day here to see what needs attention, then jump straight into the area that does.",
94
- actions: /* @__PURE__ */ A("button", {
95
- onClick: () => q(X("crops")),
96
- className: "inline-flex min-h-[44px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas",
97
- children: [/* @__PURE__ */ k(S, { className: "h-4 w-4" }), Y("healthybowl.home.primaryAction", "Quick Action")]
98
- }),
99
- children: [
100
- W.dashboard ? /* @__PURE__ */ k(ee, {}) : G.dashboard ? /* @__PURE__ */ k(o, { onRetry: K }) : !U?.id && /* @__PURE__ */ A(j, {
101
- className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
102
- children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
103
- className: "text-base font-semibold text-text-primary",
104
- children: Y("healthybowl.home.onboarding.title", "Welcome to HealthyBowl")
105
- }), /* @__PURE__ */ k("p", {
106
- className: "text-sm text-text-secondary",
107
- children: Y("healthybowl.home.onboarding.description", "Set up your farm to start tracking crops, livestock, finances, and more.")
108
- })] }), /* @__PURE__ */ A("button", {
109
- onClick: () => q(X("getting-started")),
110
- className: "inline-flex min-h-[44px] items-center gap-2 self-start rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas sm:self-auto",
111
- children: [/* @__PURE__ */ k(S, { className: "h-4 w-4" }), Y("healthybowl.home.onboarding.action", "Set up your farm")]
112
- })]
113
- }),
114
- /* @__PURE__ */ A("div", {
115
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-4",
116
- children: [
117
- /* @__PURE__ */ k(i, {
118
- hero: !0,
119
- label: Y("healthybowl.home.stats.revenue", "Revenue"),
120
- value: Z.totalRevenue,
121
- prefix: "$",
122
- icon: /* @__PURE__ */ k(_, { className: "h-4 w-4" })
123
- }),
124
- /* @__PURE__ */ k(i, {
125
- label: Y("healthybowl.home.stats.activeCrops", "Active Crops"),
126
- value: Z.activeCrops,
127
- icon: /* @__PURE__ */ k(w, { className: "h-4 w-4" })
128
- }),
129
- /* @__PURE__ */ k(i, {
130
- label: Y("healthybowl.home.stats.harvestDue", "Harvest Due"),
131
- value: Z.harvestDue,
132
- icon: /* @__PURE__ */ k(m, { className: "h-4 w-4" })
133
- }),
134
- /* @__PURE__ */ k(i, {
135
- label: Y("healthybowl.home.stats.marketValue", "Market Value"),
136
- value: ne,
137
- prefix: "$",
138
- icon: /* @__PURE__ */ k(te, { className: "h-4 w-4" })
139
- })
140
- ]
141
- }),
142
- /* @__PURE__ */ A("div", {
143
- className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
144
- children: [
145
- /* @__PURE__ */ k(M, {
146
- treatment: "metric",
147
- className: "border-border-seam p-4",
148
- children: /* @__PURE__ */ A("div", {
149
- className: "flex items-center justify-between",
150
- children: [/* @__PURE__ */ A("div", { children: [
151
- /* @__PURE__ */ k("p", {
152
- className: "text-xs font-medium text-text-secondary",
153
- children: Y("healthybowl.home.metrics.totalFields", "Total Fields")
154
- }),
155
- /* @__PURE__ */ k("p", {
156
- className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
157
- children: Z.totalFields
158
- }),
159
- /* @__PURE__ */ k("p", {
160
- className: "mt-0.5 text-xs text-text-secondary",
161
- children: Y("healthybowl.home.metrics.totalFieldsHint", "All monitored")
162
- })
163
- ] }), /* @__PURE__ */ k(b, { className: "h-5 w-5 text-text-secondary" })]
164
- })
165
- }),
166
- /* @__PURE__ */ k(M, {
167
- treatment: "metric",
168
- className: "border-border-seam p-4",
169
- children: /* @__PURE__ */ A("div", {
170
- className: "flex items-center justify-between",
171
- children: [/* @__PURE__ */ A("div", { children: [
172
- /* @__PURE__ */ k("p", {
173
- className: "text-xs font-medium text-text-secondary",
174
- children: Y("healthybowl.home.metrics.totalAnimals", "Total Animals")
175
- }),
176
- /* @__PURE__ */ k("p", {
177
- className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
178
- children: Z.totalAnimals
179
- }),
180
- /* @__PURE__ */ k("p", {
181
- className: "mt-0.5 text-xs text-text-secondary",
182
- children: Y("healthybowl.home.metrics.totalAnimalsHint", "All healthy")
230
+ ], pe = Z === 0 ? G("healthybowl.home.header.allClear", "You're all caught up") : Z === 1 ? G("healthybowl.home.header.needsAttentionOne", "1 item needs your attention") : G("healthybowl.home.header.needsAttentionOther", "{{count}} items need your attention", { count: Z }), me = F?.name ? `${Y} · ${F.name}` : Y, he = /* @__PURE__ */ k("button", {
231
+ type: "button",
232
+ onClick: () => U(K("crops")),
233
+ className: "inline-flex min-h-[40px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas",
234
+ children: [/* @__PURE__ */ O(S, { className: "h-4 w-4" }), G("healthybowl.home.primaryAction", "Add")]
235
+ });
236
+ return /* @__PURE__ */ O(i, {
237
+ title: G("healthybowl.home.title", "Farm Dashboard"),
238
+ description: me,
239
+ actions: he,
240
+ children: I.dashboard ? /* @__PURE__ */ O(c, {}) : L.dashboard ? /* @__PURE__ */ O(s, { onRetry: H }) : /* @__PURE__ */ k("div", {
241
+ className: "space-y-6",
242
+ children: [
243
+ /* @__PURE__ */ k("div", {
244
+ className: e("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium", Z === 0 ? "bg-status-success-bg text-status-success-text" : "bg-status-warning-bg text-status-warning-text"),
245
+ children: [O(Z === 0 ? g : p, { className: "size-4" }), pe]
246
+ }),
247
+ !F?.id && /* @__PURE__ */ k(A, {
248
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
249
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
250
+ className: "text-base font-semibold text-text-primary",
251
+ children: G("healthybowl.home.onboarding.title", "Welcome to HealthyBowl")
252
+ }), /* @__PURE__ */ O("p", {
253
+ className: "text-sm text-text-secondary",
254
+ children: G("healthybowl.home.onboarding.description", "Set up your farm to start tracking crops, livestock, finances, and more.")
255
+ })] }), /* @__PURE__ */ k("button", {
256
+ type: "button",
257
+ onClick: () => U(K("getting-started")),
258
+ className: "inline-flex min-h-[44px] items-center gap-2 self-start rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas sm:self-auto",
259
+ children: [/* @__PURE__ */ O(S, { className: "h-4 w-4" }), G("healthybowl.home.onboarding.action", "Set up your farm")]
260
+ })]
261
+ }),
262
+ /* @__PURE__ */ O("div", {
263
+ className: "flex flex-wrap gap-2",
264
+ children: fe.map(({ label: e, icon: t, path: n }) => /* @__PURE__ */ k("button", {
265
+ type: "button",
266
+ onClick: () => U(n),
267
+ className: "inline-flex min-h-[40px] items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3.5 py-2 text-sm font-medium text-text-secondary transition-colors hover:border-border-default hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas",
268
+ children: [/* @__PURE__ */ O(t, { className: "size-4" }), e]
269
+ }, e))
270
+ }),
271
+ /* @__PURE__ */ k("div", {
272
+ className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
273
+ children: [/* @__PURE__ */ k("div", {
274
+ className: "grid grid-cols-2 gap-4 lg:col-span-2",
275
+ children: [
276
+ /* @__PURE__ */ O(R, {
277
+ label: G("healthybowl.home.kpi.activeCrops", "Active crops"),
278
+ value: String(q.activeCrops),
279
+ icon: /* @__PURE__ */ O(w, {}),
280
+ drillLabel: G("healthybowl.home.kpi.viewCrops", "View crops"),
281
+ onClick: () => U(K("crops"))
282
+ }),
283
+ /* @__PURE__ */ O(R, {
284
+ label: G("healthybowl.home.kpi.harvestDue", "Harvest due"),
285
+ value: String(q.harvestDue),
286
+ icon: /* @__PURE__ */ O(ee, {}),
287
+ drillLabel: G("healthybowl.home.kpi.viewHarvest", "View harvest"),
288
+ onClick: () => U(K("crops/harvest"))
289
+ }),
290
+ /* @__PURE__ */ O(R, {
291
+ label: G("healthybowl.home.kpi.netProfit", "Net profit"),
292
+ value: t(q.netProfit),
293
+ icon: /* @__PURE__ */ O(E, {}),
294
+ tone: le,
295
+ drillLabel: G("healthybowl.home.kpi.viewFinance", "View finances"),
296
+ onClick: () => U(K("financial"))
297
+ }),
298
+ /* @__PURE__ */ O(R, {
299
+ label: G("healthybowl.home.kpi.needsAttention", "Needs attention"),
300
+ value: String(Z),
301
+ icon: /* @__PURE__ */ O(p, {}),
302
+ tone: $,
303
+ glow: $ === "danger" || $ === "warning",
304
+ drillLabel: G("healthybowl.home.kpi.viewAlerts", "View alerts"),
305
+ onClick: () => U(K("weather/alerts"))
306
+ })
307
+ ]
308
+ }), /* @__PURE__ */ k(j, {
309
+ className: "flex h-full flex-col border-border-seam p-0",
310
+ children: [/* @__PURE__ */ k("div", {
311
+ className: "flex items-center justify-between px-4 pb-1 pt-4",
312
+ children: [/* @__PURE__ */ O("h3", {
313
+ className: "text-sm font-semibold text-text-primary",
314
+ children: G("healthybowl.home.needsAttention.title", "Needs attention")
315
+ }), X.length > 0 && /* @__PURE__ */ O("button", {
316
+ type: "button",
317
+ onClick: () => U(K("weather/alerts")),
318
+ className: "text-xs font-medium text-text-secondary transition-colors hover:text-text-primary focus-visible:text-text-primary focus-visible:outline-none",
319
+ children: G("healthybowl.home.needsAttention.viewAll", "View all")
320
+ })]
321
+ }), /* @__PURE__ */ O("div", {
322
+ className: "flex-1 px-4 pb-4",
323
+ children: X.length === 0 ? /* @__PURE__ */ O(o, {
324
+ icon: /* @__PURE__ */ O(g, { className: "h-8 w-8 text-status-success-text" }),
325
+ title: G("healthybowl.home.needsAttention.empty.title", "You're all caught up"),
326
+ description: G("healthybowl.home.needsAttention.empty.description", "No urgent farm alerts right now."),
327
+ action: /* @__PURE__ */ O("button", {
328
+ type: "button",
329
+ onClick: () => U(K("weather/alert-rules")),
330
+ className: "inline-flex min-h-[40px] items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
331
+ children: G("healthybowl.home.needsAttention.empty.action", "Manage alert rules")
183
332
  })
184
- ] }), /* @__PURE__ */ k(x, { className: "h-5 w-5 text-text-secondary" })]
185
- })
186
- }),
187
- /* @__PURE__ */ k(M, {
188
- treatment: "metric",
189
- className: "border-border-seam p-4",
190
- children: /* @__PURE__ */ A("div", {
191
- className: "flex items-center justify-between",
192
- children: [/* @__PURE__ */ A("div", { children: [
193
- /* @__PURE__ */ k("p", {
194
- className: "text-xs font-medium text-text-secondary",
195
- children: Y("healthybowl.home.metrics.expenses", "Expenses")
196
- }),
197
- /* @__PURE__ */ k("p", {
198
- className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
199
- children: t(Z.totalExpenses)
200
- }),
201
- /* @__PURE__ */ k("p", {
202
- className: "mt-0.5 text-xs text-text-secondary",
203
- children: $ == null ? Y("healthybowl.home.metrics.noRevenue", "No revenue yet") : `${$}% ${Y("healthybowl.home.metrics.ofRevenue", "of revenue")}`
333
+ }) : /* @__PURE__ */ O("ul", {
334
+ className: "divide-y divide-border-subtle",
335
+ children: ie.map((e) => /* @__PURE__ */ O(B, {
336
+ alert: e,
337
+ ctaLabel: se(e.severity),
338
+ relTime: oe(e.timestamp),
339
+ onOpen: () => ce(e)
340
+ }, e.id))
341
+ })
342
+ })]
343
+ })]
344
+ }),
345
+ /* @__PURE__ */ k("div", {
346
+ className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
347
+ children: [/* @__PURE__ */ k(j, {
348
+ glow: !0,
349
+ className: "flex h-full flex-col border-border-seam p-0 lg:col-span-2",
350
+ children: [/* @__PURE__ */ k("div", {
351
+ className: "flex items-center justify-between px-5 pb-2 pt-5",
352
+ children: [/* @__PURE__ */ k("div", {
353
+ className: "flex items-center gap-2",
354
+ children: [/* @__PURE__ */ O("span", {
355
+ className: "flex size-8 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-primary [&>svg]:size-4",
356
+ children: /* @__PURE__ */ O(w, {})
357
+ }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h2", {
358
+ className: "text-base font-semibold text-text-primary",
359
+ children: G("healthybowl.home.cropsAnchor.title", "Crop overview")
360
+ }), /* @__PURE__ */ O("p", {
361
+ className: "text-xs text-text-secondary",
362
+ children: _.length === 1 ? G("healthybowl.home.cropsAnchor.subtitleOne", "1 crop in progress") : G("healthybowl.home.cropsAnchor.subtitleOther", "{{count}} crops in progress", { count: _.length })
363
+ })] })]
364
+ }), _.length > 0 && /* @__PURE__ */ O("button", {
365
+ type: "button",
366
+ onClick: () => U(K("crops")),
367
+ className: "text-xs font-medium text-text-secondary transition-colors hover:text-text-primary focus-visible:text-text-primary focus-visible:outline-none",
368
+ children: G("healthybowl.home.cropsAnchor.viewAll", "View all crops")
369
+ })]
370
+ }), /* @__PURE__ */ O("div", {
371
+ className: "flex-1 px-3 pb-3",
372
+ children: _.length === 0 ? /* @__PURE__ */ O(o, {
373
+ icon: /* @__PURE__ */ O(w, { className: "h-8 w-8 text-primary" }),
374
+ title: G("healthybowl.home.cropsAnchor.empty.title", "No active crops"),
375
+ description: G("healthybowl.home.cropsAnchor.empty.description", "Register your first crop to track growth, health and harvest here."),
376
+ action: /* @__PURE__ */ k("button", {
377
+ type: "button",
378
+ onClick: () => U(K("crops")),
379
+ className: "inline-flex min-h-[40px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
380
+ children: [/* @__PURE__ */ O(S, { className: "h-4 w-4" }), G("healthybowl.home.quickActions.addCrop.label", "Add crop")]
204
381
  })
205
- ] }), /* @__PURE__ */ k(E, { className: "h-5 w-5 text-text-secondary" })]
206
- })
207
- }),
208
- /* @__PURE__ */ k(M, {
209
- treatment: "metric",
210
- className: "border-border-seam p-4",
211
- children: /* @__PURE__ */ A("div", {
212
- className: "flex items-center justify-between",
213
- children: [/* @__PURE__ */ A("div", { children: [
214
- /* @__PURE__ */ k("p", {
215
- className: "text-xs font-medium text-text-secondary",
216
- children: Y("healthybowl.home.metrics.organicScore", "Organic Score")
217
- }),
218
- /* @__PURE__ */ A("p", {
219
- className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
220
- children: [Z.organicScore, "%"]
221
- }),
222
- /* @__PURE__ */ k("p", {
223
- className: "mt-0.5 text-xs text-text-secondary",
224
- children: Y("healthybowl.home.metrics.organicHint", "Certified organic compliance")
382
+ }) : /* @__PURE__ */ O("ul", {
383
+ className: "divide-y divide-border-subtle",
384
+ children: ae.map((e) => {
385
+ let t = (e.growthStage || e.status || "").replace(/_/g, " ").trim();
386
+ return /* @__PURE__ */ O(V, {
387
+ crop: e,
388
+ metaLabel: [e.fieldName, t].filter(Boolean).join(" · ") || G("healthybowl.home.cropsAnchor.noField", "Unassigned"),
389
+ healthLabel: (e.healthStatus || "unknown").replace(/_/g, " "),
390
+ harvestLabel: e.expectedHarvestDate ? G("healthybowl.home.cropsAnchor.harvest", "Harvest {{date}}", { date: n(e.expectedHarvestDate) }) : G("healthybowl.home.cropsAnchor.harvestUnknown", "Harvest date TBD"),
391
+ openLabel: G("healthybowl.home.cropsAnchor.open", "Open"),
392
+ onOpen: () => U(K(`crops/${e.id}`))
393
+ }, e.id);
225
394
  })
226
- ] }), /* @__PURE__ */ k(C, { className: "h-5 w-5 text-text-secondary" })]
227
- })
228
- })
229
- ]
230
- }),
231
- /* @__PURE__ */ A("div", {
232
- className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
233
- children: [
234
- /* @__PURE__ */ k(s, {
235
- title: Y("healthybowl.home.weatherCard.title", "Current Weather"),
236
- description: Q.location,
237
- children: /* @__PURE__ */ A("div", {
238
- className: "flex flex-col gap-4",
395
+ })
396
+ })]
397
+ }), /* @__PURE__ */ k(j, {
398
+ className: "flex h-full flex-col border-border-seam p-0",
399
+ children: [/* @__PURE__ */ k("div", {
400
+ className: "px-4 pb-1 pt-4",
401
+ children: [/* @__PURE__ */ O("h3", {
402
+ className: "text-sm font-semibold text-text-primary",
403
+ children: G("healthybowl.home.weatherCard.title", "Current weather")
404
+ }), J.location && /* @__PURE__ */ O("p", {
405
+ className: "text-xs text-text-secondary",
406
+ children: J.location
407
+ })]
408
+ }), /* @__PURE__ */ k("div", {
409
+ className: "flex flex-1 flex-col gap-4 px-4 pb-4",
239
410
  children: [
240
- /* @__PURE__ */ A("div", {
411
+ /* @__PURE__ */ k("div", {
241
412
  className: "flex items-center justify-between",
242
- children: [/* @__PURE__ */ A("div", { children: [
243
- /* @__PURE__ */ A("p", {
413
+ children: [/* @__PURE__ */ k("div", { children: [
414
+ /* @__PURE__ */ k("p", {
244
415
  className: "text-4xl font-bold text-text-primary",
245
- children: [Q.current.temperature, "°C"]
416
+ children: [J.current.temperature, "°C"]
246
417
  }),
247
- /* @__PURE__ */ k("p", {
418
+ /* @__PURE__ */ O("p", {
248
419
  className: "text-sm text-text-secondary",
249
- children: Q.current.condition
420
+ children: J.current.condition
250
421
  }),
251
- /* @__PURE__ */ A("p", {
422
+ /* @__PURE__ */ k("p", {
252
423
  className: "mt-1 text-xs text-text-secondary",
253
424
  children: [
254
- Y("healthybowl.home.weatherCard.feelsLike", "Feels like"),
425
+ G("healthybowl.home.weatherCard.feelsLike", "Feels like"),
255
426
  " ",
256
- Q.current.feelsLike,
427
+ J.current.feelsLike,
257
428
  "°C"
258
429
  ]
259
430
  })
260
- ] }), /* @__PURE__ */ A("div", {
431
+ ] }), /* @__PURE__ */ k("div", {
261
432
  className: "flex flex-col items-center",
262
- children: [/* @__PURE__ */ k(g, { className: "h-12 w-12 text-text-secondary" }), /* @__PURE__ */ A("span", {
433
+ children: [/* @__PURE__ */ O(v, { className: "h-12 w-12 text-text-secondary" }), /* @__PURE__ */ k("span", {
263
434
  className: "mt-1 text-xs text-text-secondary",
264
- children: ["UV ", Q.current.uvIndex]
435
+ children: ["UV ", J.current.uvIndex]
265
436
  })]
266
437
  })]
267
438
  }),
268
- /* @__PURE__ */ A("div", {
439
+ /* @__PURE__ */ k("div", {
269
440
  className: "grid grid-cols-2 gap-3 border-t border-border-subtle pt-3",
270
441
  children: [
271
- /* @__PURE__ */ A("div", {
442
+ /* @__PURE__ */ k("div", {
272
443
  className: "flex items-center gap-2 text-sm text-text-secondary",
273
- children: [/* @__PURE__ */ k(v, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", { children: [
274
- Q.current.humidity,
444
+ children: [/* @__PURE__ */ O(y, { className: "h-4 w-4" }), /* @__PURE__ */ k("span", { children: [
445
+ J.current.humidity,
275
446
  "% ",
276
- Y("healthybowl.home.weatherCard.humidity", "Humidity")
447
+ G("healthybowl.home.weatherCard.humidity", "Humidity")
277
448
  ] })]
278
449
  }),
279
- /* @__PURE__ */ A("div", {
450
+ /* @__PURE__ */ k("div", {
280
451
  className: "flex items-center gap-2 text-sm text-text-secondary",
281
- children: [/* @__PURE__ */ k(D, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", { children: [Q.current.windSpeed, " km/h"] })]
452
+ children: [/* @__PURE__ */ O(re, { className: "h-4 w-4" }), /* @__PURE__ */ k("span", { children: [J.current.windSpeed, " km/h"] })]
282
453
  }),
283
- /* @__PURE__ */ A("div", {
454
+ /* @__PURE__ */ k("div", {
284
455
  className: "flex items-center gap-2 text-sm text-text-secondary",
285
- children: [/* @__PURE__ */ k(T, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", { children: [Q.current.pressure, " hPa"] })]
456
+ children: [/* @__PURE__ */ O(T, { className: "h-4 w-4" }), /* @__PURE__ */ k("span", { children: [J.current.pressure, " hPa"] })]
286
457
  }),
287
- /* @__PURE__ */ A("div", {
458
+ /* @__PURE__ */ k("div", {
288
459
  className: "flex items-center gap-2 text-sm text-text-secondary",
289
- children: [/* @__PURE__ */ k(y, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", { children: [Q.current.visibility, " km"] })]
460
+ children: [/* @__PURE__ */ O(b, { className: "h-4 w-4" }), /* @__PURE__ */ k("span", { children: [J.current.visibility, " km"] })]
290
461
  })
291
462
  ]
292
463
  }),
293
- /* @__PURE__ */ k("div", {
464
+ J.forecast.length > 0 && /* @__PURE__ */ O("div", {
294
465
  className: "grid grid-cols-4 gap-2 border-t border-border-subtle pt-3",
295
- children: Q.forecast.slice(0, 4).map((e) => /* @__PURE__ */ A("div", {
466
+ children: J.forecast.slice(0, 4).map((e) => /* @__PURE__ */ k("div", {
296
467
  className: "rounded-md bg-bg-sunken/50 p-2 text-center",
297
468
  children: [
298
- /* @__PURE__ */ k("p", {
469
+ /* @__PURE__ */ O("p", {
299
470
  className: "text-xs font-medium text-text-secondary",
300
471
  children: new Date(e.date).toLocaleDateString("en-US", { weekday: "short" })
301
472
  }),
302
- /* @__PURE__ */ A("p", {
473
+ /* @__PURE__ */ k("p", {
303
474
  className: "mt-1 text-sm font-semibold text-text-primary",
304
475
  children: [e.high, "°"]
305
476
  }),
306
- /* @__PURE__ */ A("p", {
477
+ /* @__PURE__ */ k("p", {
307
478
  className: "text-xs text-text-secondary",
308
479
  children: [e.low, "°"]
309
480
  }),
310
- /* @__PURE__ */ A("p", {
481
+ /* @__PURE__ */ k("p", {
311
482
  className: "mt-0.5 text-xs text-text-secondary",
312
483
  children: [e.precipitation, "%"]
313
484
  })
314
485
  ]
315
486
  }, e.date))
316
487
  }),
317
- /* @__PURE__ */ k("button", {
318
- onClick: () => q(X("weather")),
319
- className: "w-full rounded-md border border-border-subtle py-2 text-sm text-text-primary hover:bg-bg-sunken/50",
320
- children: Y("healthybowl.home.weatherCard.viewForecast", "View Full Forecast")
488
+ /* @__PURE__ */ O("button", {
489
+ type: "button",
490
+ onClick: () => U(K("weather")),
491
+ className: "mt-auto w-full rounded-md border border-border-subtle py-2 text-sm text-text-primary transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
492
+ children: G("healthybowl.home.weatherCard.viewForecast", "View full forecast")
321
493
  })
322
494
  ]
323
- })
324
- }),
325
- /* @__PURE__ */ k(s, {
326
- title: Y("healthybowl.home.cropsCard.title", "Active Crops"),
327
- description: `${z.length} ${Y("healthybowl.home.cropsCard.description", "crops in progress")}`,
328
- children: /* @__PURE__ */ A("div", {
329
- className: "flex flex-col gap-3",
330
- children: [z.map((e) => /* @__PURE__ */ A("div", {
331
- onClick: () => q(X(`crops/${e.id}`)),
332
- className: "cursor-pointer rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
333
- children: [
334
- /* @__PURE__ */ A("div", {
335
- className: "flex items-center justify-between",
336
- children: [/* @__PURE__ */ k("span", {
337
- className: "text-sm font-medium text-text-primary",
338
- children: e.name
339
- }), /* @__PURE__ */ k(a, {
340
- label: (e.status ?? "unknown").replace("_", " "),
341
- variant: I(e.status ?? "unknown")
342
- })]
343
- }),
344
- /* @__PURE__ */ A("p", {
345
- className: "mt-1 text-xs text-text-secondary",
346
- children: [
347
- e.fieldName,
348
- " · ",
349
- e.variety
350
- ]
351
- }),
352
- /* @__PURE__ */ A("div", {
353
- className: "mt-2 flex items-center gap-2",
354
- children: [/* @__PURE__ */ k("div", {
355
- className: "h-2 flex-1 rounded-full bg-bg-sunken",
356
- children: /* @__PURE__ */ k("div", {
357
- className: "h-2 rounded-full bg-action-primary-bg",
358
- style: { width: `${e.progress}%` }
359
- })
360
- }), /* @__PURE__ */ A("span", {
361
- className: "text-xs font-medium text-text-secondary",
362
- children: [e.progress, "%"]
363
- })]
364
- }),
365
- /* @__PURE__ */ A("div", {
366
- className: "mt-1.5 flex items-center justify-between",
367
- children: [/* @__PURE__ */ k(a, {
368
- label: e.healthStatus,
369
- variant: F(e.healthStatus)
370
- }), /* @__PURE__ */ A("span", {
371
- className: "text-xs text-text-secondary",
372
- children: [
373
- e.daysToHarvest,
374
- "d ",
375
- Y("healthybowl.home.cropsCard.daysToHarvest", "to harvest")
376
- ]
377
- })]
378
- })
379
- ]
380
- }, e.id)), /* @__PURE__ */ k("button", {
381
- onClick: () => q(X("crops")),
382
- className: "w-full rounded-md border border-border-subtle py-2 text-sm text-text-primary hover:bg-bg-sunken/50",
383
- children: Y("healthybowl.home.cropsCard.viewAll", "View All Crops")
384
- })]
385
- })
386
- }),
387
- /* @__PURE__ */ k(s, {
388
- title: Y("healthybowl.home.alertsCard.title", "Alerts & Notifications"),
389
- description: `${R.filter((e) => !e.read).length} ${Y("healthybowl.home.alertsCard.unread", "unread")}`,
390
- children: /* @__PURE__ */ k(N, {
391
- collapsedHeight: 260,
392
- label: Y("healthybowl.home.alertsCard.viewAll", "View all"),
393
- className: "flex flex-col gap-3",
394
- children: R.map((t) => /* @__PURE__ */ A("div", {
395
- onClick: () => {
396
- H(t.id, !0), t.actionUrl && q(t.actionUrl);
397
- },
398
- className: e("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors hover:bg-bg-sunken/50", t.severity === "critical" && "border-l-4 border-l-destructive border-t-border border-r-border border-b-border", t.severity === "warning" && "border-l-4 border-l-warning border-t-border border-r-border border-b-border", t.severity === "info" && "border-l-4 border-l-info border-t-border border-r-border border-b-border", !t.read && "bg-bg-sunken/50"),
399
- children: [/* @__PURE__ */ k(f, { className: e("mt-0.5 h-4 w-4 shrink-0", t.severity === "critical" && "text-status-error-text", t.severity === "warning" && "text-warning", t.severity === "info" && "text-info") }), /* @__PURE__ */ A("div", {
400
- className: "min-w-0 flex-1",
401
- children: [/* @__PURE__ */ A("div", {
402
- className: "flex items-center gap-2",
403
- children: [/* @__PURE__ */ k("span", {
404
- className: "text-sm font-medium text-text-primary",
405
- children: t.title
406
- }), /* @__PURE__ */ k(a, {
407
- label: t.severity,
408
- variant: P(t.severity)
409
- })]
410
- }), /* @__PURE__ */ k("p", {
411
- className: "mt-0.5 text-xs text-text-secondary",
412
- children: t.message
413
- })]
414
- })]
415
- }, t.id))
416
- })
417
- })
418
- ]
419
- }),
420
- /* @__PURE__ */ A(M, {
421
- className: "border-border-seam p-6",
422
- children: [/* @__PURE__ */ A("div", {
423
- className: "mb-4",
424
- children: [/* @__PURE__ */ k("h3", {
425
- className: "text-sm font-semibold text-text-primary",
426
- children: Y("healthybowl.home.quickActions.title", "Quick Actions")
427
- }), /* @__PURE__ */ k("p", {
428
- className: "text-xs text-text-secondary",
429
- children: Y("healthybowl.home.quickActions.subtitle", "Frequently used features to manage your farm efficiently")
495
+ })]
430
496
  })]
497
+ }),
498
+ /* @__PURE__ */ k("section", { children: [/* @__PURE__ */ O("h3", {
499
+ className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
500
+ children: G("healthybowl.home.glance.title", "At a glance")
431
501
  }), /* @__PURE__ */ k("div", {
432
- className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",
433
- children: re.map(({ label: e, icon: t, path: n, description: r }) => /* @__PURE__ */ A("button", {
434
- onClick: () => q(n),
435
- className: "flex min-h-[44px] flex-col items-center gap-2 rounded-xl border border-border-seam bg-gloss-card p-4 text-center shadow-sm transition-shadow hover:shadow-pop focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas",
436
- children: [
437
- /* @__PURE__ */ k("div", {
438
- className: "rounded-full bg-[var(--color-accent-soft)] p-3",
439
- children: /* @__PURE__ */ k(t, { className: "h-5 w-5 text-primary" })
440
- }),
441
- /* @__PURE__ */ k("span", {
442
- className: "text-sm font-medium text-text-primary",
443
- children: e
444
- }),
445
- /* @__PURE__ */ k("span", {
446
- className: "text-xs text-text-secondary",
447
- children: r
448
- })
449
- ]
450
- }, e))
451
- })]
452
- })
453
- ]
502
+ className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
503
+ children: [
504
+ /* @__PURE__ */ O(z, {
505
+ label: G("healthybowl.home.glance.fields", "Fields"),
506
+ value: String(q.totalFields),
507
+ hint: q.totalFields > 0 ? G("healthybowl.home.glance.fieldsHint", "Monitored") : G("healthybowl.home.glance.fieldsEmpty", "No fields yet"),
508
+ icon: /* @__PURE__ */ O(x, {}),
509
+ onClick: () => U(K("crops/fields"))
510
+ }),
511
+ /* @__PURE__ */ O(z, {
512
+ label: G("healthybowl.home.glance.livestock", "Livestock"),
513
+ value: String(q.totalAnimals),
514
+ hint: q.totalAnimals > 0 ? G("healthybowl.home.glance.livestockHint", "Under management") : G("healthybowl.home.glance.livestockEmpty", "No livestock added"),
515
+ icon: /* @__PURE__ */ O(ne, {}),
516
+ onClick: () => U(K("livestock"))
517
+ }),
518
+ /* @__PURE__ */ O(z, {
519
+ label: G("healthybowl.home.glance.organic", "Organic score"),
520
+ value: q.organicScore > 0 ? `${q.organicScore}%` : G("healthybowl.home.glance.organicEmpty", "Not configured"),
521
+ hint: q.organicScore > 0 ? G("healthybowl.home.glance.organicHint", "Compliance") : void 0,
522
+ icon: /* @__PURE__ */ O(C, {}),
523
+ onClick: () => U(K("compliance"))
524
+ }),
525
+ /* @__PURE__ */ O(z, {
526
+ label: G("healthybowl.home.glance.expenses", "Expenses"),
527
+ value: t(q.totalExpenses),
528
+ hint: Q == null ? G("healthybowl.home.glance.noRevenue", "No revenue yet") : G("healthybowl.home.glance.expensesRatio", "{{pct}}% of revenue", { pct: Q }),
529
+ icon: /* @__PURE__ */ O(E, {}),
530
+ onClick: () => U(K("financial"))
531
+ })
532
+ ]
533
+ })] })
534
+ ]
535
+ })
454
536
  });
455
537
  };
456
538
  //#endregion
457
- export { L as HomePage };
539
+ export { H as HomePage };
458
540
 
459
541
  //# sourceMappingURL=HomePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.js","names":[],"sources":["../../../src/healthybowl/pages/HomePage.tsx"],"sourcesContent":["import { useMemo, useCallback, type FC } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n DollarSign,\n TrendingDown,\n TrendingUp,\n Sprout,\n PawPrint,\n ShieldCheck,\n AlertTriangle,\n Cloud,\n Droplets,\n Wind,\n Thermometer,\n Plus,\n ClipboardList,\n BarChart3,\n MapPin,\n Eye,\n Calendar,\n} from 'lucide-react';\nimport { EmphasisPanel, GlassCard, ShowMore } from '@burdenoff/fe-libs/ui';\nimport { PageLayout, StatCard, StatusBadge, ChartCard, ErrorState, PageLoader } from '../components';\nimport { useHealthyBowlData } from '../hooks/useHealthyBowlData';\nimport { useBasePath } from '../hooks/useBasePath';\nimport { cn, formatCurrency } from '../utils/helpers';\n\nconst severityVariant = (severity: string) => {\n switch (severity) {\n case 'critical':\n return 'error' as const;\n case 'warning':\n return 'warning' as const;\n default:\n return 'info' as const;\n }\n};\n\nconst healthVariant = (status: string) => {\n switch (status) {\n case 'excellent':\n return 'success' as const;\n case 'good':\n return 'info' as const;\n case 'fair':\n return 'warning' as const;\n default:\n return 'error' as const;\n }\n};\n\nconst statusVariant = (status: string) => {\n switch (status) {\n case 'harvest_ready':\n return 'success' as const;\n case 'growing':\n case 'fruiting':\n return 'info' as const;\n case 'planted':\n return 'muted' as const;\n default:\n return 'default' as const;\n }\n};\n\nexport const HomePage: FC = () => {\n const {\n dashboardStats,\n alerts,\n crops,\n weatherData,\n marketplaceProducts,\n markAlertRead,\n farm,\n loadings,\n errors,\n refetch,\n } = useHealthyBowlData();\n\n const navigate = useNavigate();\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n const { buildPath } = useBasePath();\n const stats = dashboardStats;\n const defaultCurrent = {\n temperature: 0,\n condition: 'N/A',\n feelsLike: 0,\n humidity: 0,\n windSpeed: 0,\n uvIndex: 0,\n pressure: 0,\n visibility: 0,\n };\n const weather = {\n location: weatherData?.location ?? '',\n current: weatherData?.current ?? defaultCurrent,\n forecast: weatherData?.forecast ?? [],\n };\n\n // Derive market value from marketplace products (sum of price * stock)\n const marketValue = useMemo(\n () => marketplaceProducts.reduce((sum, p) => sum + p.price * p.stock, 0),\n [marketplaceProducts]\n );\n\n // Expenses as a share of revenue (honest ratio — null when there's no revenue to compare against).\n const expenseRatioPercent = useMemo(() => {\n if (stats.totalRevenue === 0) return null;\n return Math.round((stats.totalExpenses / stats.totalRevenue) * 100 * 10) / 10;\n }, [stats.totalExpenses, stats.totalRevenue]);\n\n const quickActions = [\n {\n label: t('healthybowl.home.quickActions.addCrop.label', 'Add Crop'),\n icon: Sprout,\n path: buildPath('crops'),\n description: t('healthybowl.home.quickActions.addCrop.description', 'Register a new crop'),\n },\n {\n label: t('healthybowl.home.quickActions.recordHarvest.label', 'Record Harvest'),\n icon: ClipboardList,\n path: buildPath('crops/harvest'),\n description: t('healthybowl.home.quickActions.recordHarvest.description', 'Log harvest data'),\n },\n {\n label: t('healthybowl.home.quickActions.viewFields.label', 'View Fields'),\n icon: MapPin,\n path: buildPath('crops/fields'),\n description: t('healthybowl.home.quickActions.viewFields.description', 'Manage farm fields'),\n },\n {\n label: t('healthybowl.home.quickActions.viewWeather.label', 'View Weather'),\n icon: Thermometer,\n path: buildPath('weather'),\n description: t('healthybowl.home.quickActions.viewWeather.description', 'Check forecast'),\n },\n {\n label: t('healthybowl.home.quickActions.analytics.label', 'Analytics'),\n icon: BarChart3,\n path: buildPath('analytics'),\n description: t('healthybowl.home.quickActions.analytics.description', 'View farm reports'),\n },\n ];\n\n return (\n <PageLayout\n hero\n title={t('healthybowl.home.title', 'Farm Dashboard')}\n titleAccent={t('healthybowl.home.titleAccent', 'Dashboard')}\n description={t('healthybowl.home.description', 'Overview of your farm operations')}\n purpose=\"Your farm at a glance — revenue, active crops, alerts and weather in one view. Start your day here to see what needs attention, then jump straight into the area that does.\"\n actions={\n <button\n onClick={() => navigate(buildPath('crops'))}\n className=\"inline-flex min-h-[44px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas\"\n >\n <Plus className=\"h-4 w-4\" />\n {t('healthybowl.home.primaryAction', 'Quick Action')}\n </button>\n }\n >\n {/* First-run onboarding CTA — only after data settles, so it doesn't flash for users who have a farm */}\n {loadings.dashboard ? (\n <PageLoader />\n ) : errors.dashboard ? (\n <ErrorState onRetry={refetch} />\n ) : (\n !farm?.id && (\n <EmphasisPanel className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <p className=\"text-base font-semibold text-text-primary\">\n {t('healthybowl.home.onboarding.title', 'Welcome to HealthyBowl')}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {t(\n 'healthybowl.home.onboarding.description',\n 'Set up your farm to start tracking crops, livestock, finances, and more.'\n )}\n </p>\n </div>\n <button\n onClick={() => navigate(buildPath('getting-started'))}\n className=\"inline-flex min-h-[44px] items-center gap-2 self-start rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas sm:self-auto\"\n >\n <Plus className=\"h-4 w-4\" />\n {t('healthybowl.home.onboarding.action', 'Set up your farm')}\n </button>\n </EmphasisPanel>\n )\n )}\n\n {/* Stat Cards - including Market Value */}\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-4\">\n <StatCard\n hero\n label={t('healthybowl.home.stats.revenue', 'Revenue')}\n value={stats.totalRevenue}\n prefix=\"$\"\n icon={<DollarSign className=\"h-4 w-4\" />}\n />\n <StatCard\n label={t('healthybowl.home.stats.activeCrops', 'Active Crops')}\n value={stats.activeCrops}\n icon={<Sprout className=\"h-4 w-4\" />}\n />\n <StatCard\n label={t('healthybowl.home.stats.harvestDue', 'Harvest Due')}\n value={stats.harvestDue}\n icon={<Calendar className=\"h-4 w-4\" />}\n />\n <StatCard\n label={t('healthybowl.home.stats.marketValue', 'Market Value')}\n value={marketValue}\n prefix=\"$\"\n icon={<TrendingUp className=\"h-4 w-4\" />}\n />\n </div>\n\n {/* Secondary Stats */}\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-4\">\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t('healthybowl.home.metrics.totalFields', 'Total Fields')}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">{stats.totalFields}</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {t('healthybowl.home.metrics.totalFieldsHint', 'All monitored')}\n </p>\n </div>\n <MapPin className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t('healthybowl.home.metrics.totalAnimals', 'Total Animals')}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">{stats.totalAnimals}</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {t('healthybowl.home.metrics.totalAnimalsHint', 'All healthy')}\n </p>\n </div>\n <PawPrint className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t('healthybowl.home.metrics.expenses', 'Expenses')}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatCurrency(stats.totalExpenses)}\n </p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {expenseRatioPercent != null\n ? `${expenseRatioPercent}% ${t('healthybowl.home.metrics.ofRevenue', 'of revenue')}`\n : t('healthybowl.home.metrics.noRevenue', 'No revenue yet')}\n </p>\n </div>\n <TrendingDown className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t('healthybowl.home.metrics.organicScore', 'Organic Score')}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">{stats.organicScore}%</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {t('healthybowl.home.metrics.organicHint', 'Certified organic compliance')}\n </p>\n </div>\n <ShieldCheck className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </GlassCard>\n </div>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Weather Widget - Enhanced */}\n <ChartCard title={t('healthybowl.home.weatherCard.title', 'Current Weather')} description={weather.location}>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-4xl font-bold text-text-primary\">{weather.current.temperature}&deg;C</p>\n <p className=\"text-sm text-text-secondary\">{weather.current.condition}</p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t('healthybowl.home.weatherCard.feelsLike', 'Feels like')} {weather.current.feelsLike}&deg;C\n </p>\n </div>\n <div className=\"flex flex-col items-center\">\n <Cloud className=\"h-12 w-12 text-text-secondary\" />\n <span className=\"mt-1 text-xs text-text-secondary\">UV {weather.current.uvIndex}</span>\n </div>\n </div>\n\n <div className=\"grid grid-cols-2 gap-3 border-t border-border-subtle pt-3\">\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Droplets className=\"h-4 w-4\" />\n <span>\n {weather.current.humidity}% {t('healthybowl.home.weatherCard.humidity', 'Humidity')}\n </span>\n </div>\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Wind className=\"h-4 w-4\" />\n <span>{weather.current.windSpeed} km/h</span>\n </div>\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Thermometer className=\"h-4 w-4\" />\n <span>{weather.current.pressure} hPa</span>\n </div>\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Eye className=\"h-4 w-4\" />\n <span>{weather.current.visibility} km</span>\n </div>\n </div>\n\n <div className=\"grid grid-cols-4 gap-2 border-t border-border-subtle pt-3\">\n {weather.forecast.slice(0, 4).map((day) => (\n <div key={day.date} className=\"rounded-md bg-bg-sunken/50 p-2 text-center\">\n <p className=\"text-xs font-medium text-text-secondary\">\n {new Date(day.date).toLocaleDateString('en-US', { weekday: 'short' })}\n </p>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">{day.high}&deg;</p>\n <p className=\"text-xs text-text-secondary\">{day.low}&deg;</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{day.precipitation}%</p>\n </div>\n ))}\n </div>\n\n <button\n onClick={() => navigate(buildPath('weather'))}\n className=\"w-full rounded-md border border-border-subtle py-2 text-sm text-text-primary hover:bg-bg-sunken/50\"\n >\n {t('healthybowl.home.weatherCard.viewForecast', 'View Full Forecast')}\n </button>\n </div>\n </ChartCard>\n\n {/* Active Crops */}\n <ChartCard\n title={t('healthybowl.home.cropsCard.title', 'Active Crops')}\n description={`${crops.length} ${t('healthybowl.home.cropsCard.description', 'crops in progress')}`}\n >\n <div className=\"flex flex-col gap-3\">\n {crops.map((crop) => (\n <div\n key={crop.id}\n onClick={() => navigate(buildPath(`crops/${crop.id}`))}\n className=\"cursor-pointer rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm font-medium text-text-primary\">{crop.name}</span>\n <StatusBadge\n label={(crop.status ?? 'unknown').replace('_', ' ')}\n variant={statusVariant(crop.status ?? 'unknown')}\n />\n </div>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {crop.fieldName} &middot; {crop.variety}\n </p>\n <div className=\"mt-2 flex items-center gap-2\">\n <div className=\"h-2 flex-1 rounded-full bg-bg-sunken\">\n <div className=\"h-2 rounded-full bg-action-primary-bg\" style={{ width: `${crop.progress}%` }} />\n </div>\n <span className=\"text-xs font-medium text-text-secondary\">{crop.progress}%</span>\n </div>\n <div className=\"mt-1.5 flex items-center justify-between\">\n <StatusBadge label={crop.healthStatus} variant={healthVariant(crop.healthStatus)} />\n <span className=\"text-xs text-text-secondary\">\n {crop.daysToHarvest}d {t('healthybowl.home.cropsCard.daysToHarvest', 'to harvest')}\n </span>\n </div>\n </div>\n ))}\n <button\n onClick={() => navigate(buildPath('crops'))}\n className=\"w-full rounded-md border border-border-subtle py-2 text-sm text-text-primary hover:bg-bg-sunken/50\"\n >\n {t('healthybowl.home.cropsCard.viewAll', 'View All Crops')}\n </button>\n </div>\n </ChartCard>\n\n {/* Alerts */}\n <ChartCard\n title={t('healthybowl.home.alertsCard.title', 'Alerts & Notifications')}\n description={`${alerts.filter((a) => !a.read).length} ${t('healthybowl.home.alertsCard.unread', 'unread')}`}\n >\n <ShowMore\n collapsedHeight={260}\n label={t('healthybowl.home.alertsCard.viewAll', 'View all')}\n className=\"flex flex-col gap-3\"\n >\n {alerts.map((alert) => (\n <div\n key={alert.id}\n onClick={() => {\n void markAlertRead(alert.id, true);\n if (alert.actionUrl) {\n navigate(alert.actionUrl);\n }\n }}\n className={cn(\n 'flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors hover:bg-bg-sunken/50',\n alert.severity === 'critical' &&\n 'border-l-4 border-l-destructive border-t-border border-r-border border-b-border',\n alert.severity === 'warning' &&\n 'border-l-4 border-l-warning border-t-border border-r-border border-b-border',\n alert.severity === 'info' &&\n 'border-l-4 border-l-info border-t-border border-r-border border-b-border',\n !alert.read && 'bg-bg-sunken/50'\n )}\n >\n <AlertTriangle\n className={cn(\n 'mt-0.5 h-4 w-4 shrink-0',\n alert.severity === 'critical' && 'text-status-error-text',\n alert.severity === 'warning' && 'text-warning',\n alert.severity === 'info' && 'text-info'\n )}\n />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-text-primary\">{alert.title}</span>\n <StatusBadge label={alert.severity} variant={severityVariant(alert.severity)} />\n </div>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{alert.message}</p>\n </div>\n </div>\n ))}\n </ShowMore>\n </ChartCard>\n </div>\n\n {/* Quick Actions */}\n <GlassCard className=\"border-border-seam p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.home.quickActions.title', 'Quick Actions')}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.home.quickActions.subtitle', 'Frequently used features to manage your farm efficiently')}\n </p>\n </div>\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6\">\n {quickActions.map(({ label, icon: Icon, path, description }) => (\n <button\n key={label}\n onClick={() => navigate(path)}\n className=\"flex min-h-[44px] flex-col items-center gap-2 rounded-xl border border-border-seam bg-gloss-card p-4 text-center shadow-sm transition-shadow hover:shadow-pop focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas\"\n >\n <div className=\"rounded-full bg-[var(--color-accent-soft)] p-3\">\n <Icon className=\"h-5 w-5 text-primary\" />\n </div>\n <span className=\"text-sm font-medium text-text-primary\">{label}</span>\n <span className=\"text-xs text-text-secondary\">{description}</span>\n </button>\n ))}\n </div>\n </GlassCard>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,IAAM,KAAmB,MAAqB;AAC5C,SAAQ,GAAR;EACE,KAAK,WACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,QACE,QAAO;;GAIP,KAAiB,MAAmB;AACxC,SAAQ,GAAR;EACE,KAAK,YACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,QACE,QAAO;;GAIP,KAAiB,MAAmB;AACxC,SAAQ,GAAR;EACE,KAAK,gBACH,QAAO;EACT,KAAK;EACL,KAAK,WACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,QACE,QAAO;;GAIA,UAAqB;CAChC,IAAM,EACJ,mBACA,WACA,UACA,gBACA,wBACA,kBACA,SACA,aACA,WACA,eACE,GAAoB,EAElB,IAAW,GAAa,EACxB,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ,EACK,EAAE,iBAAc,GAAa,EAC7B,IAAQ,GAWR,IAAU;EACd,UAAU,GAAa,YAAY;EACnC,SAAS,GAAa,WAZD;GACrB,aAAa;GACb,WAAW;GACX,WAAW;GACX,UAAU;GACV,WAAW;GACX,SAAS;GACT,UAAU;GACV,YAAY;GACb;EAIC,UAAU,GAAa,YAAY,EAAE;EACtC,EAGK,KAAc,QACZ,EAAoB,QAAQ,GAAK,MAAM,IAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EACxE,CAAC,EAAoB,CACtB,EAGK,IAAsB,QACtB,EAAM,iBAAiB,IAAU,OAC9B,KAAK,MAAO,EAAM,gBAAgB,EAAM,eAAgB,MAAM,GAAG,GAAG,IAC1E,CAAC,EA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c,0BACjC,EAAM,aAAa,aAAa,gBAChC,EAAM,aAAa,UAAU,YAC9B,EACD,CAAA,EACF,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,QAAD;WAAM,WAAU;qBAAyC,EAAM;WAAa,CAAA,EAC5E,kBAAC,GAAD;WAAa,OAAO,EAAM;WAAU,SAAS,EAAgB,EAAM,SAAS;WAAI,CAAA,CAC5E;aACN,kBAAC,KAAD;UAAG,WAAU;oBAAsC,EAAM;UAAY,CAAA,CACjE;WACF;UAjCC,EAAM,GAiCP,CACN;OACO,CAAA;MACD,CAAA;KACR;;GAGN,kBAAC,GAAD;IAAW,WAAU;cAArB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBACX,EAAE,uCAAuC,gBAAgB;MACvD,CAAA,EACL,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAE,0CAA0C,2DAA2D;MACtG,CAAA,CACA;QACN,kBAAC,OAAD;KAAK,WAAU;eACZ,GAAa,KAAK,EAAE,UAAO,MAAM,GAAM,SAAM,qBAC5C,kBAAC,UAAD;MAEE,eAAe,EAAS,EAAK;MAC7B,WAAU;gBAHZ;OAKE,kBAAC,OAAD;QAAK,WAAU;kBACb,kBAAC,GAAD,EAAM,WAAU,wBAAyB,CAAA;QACrC,CAAA;OACN,kBAAC,QAAD;QAAM,WAAU;kBAAyC;QAAa,CAAA;OACtE,kBAAC,QAAD;QAAM,WAAU;kBAA+B;QAAmB,CAAA;OAC3D;QATF,EASE,CACT;KACE,CAAA,CACI;;GACD"}
1
+ {"version":3,"file":"HomePage.js","names":[],"sources":["../../../src/healthybowl/pages/HomePage.tsx"],"sourcesContent":["import { useMemo, useCallback, type FC, type ReactNode } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Sprout,\n CalendarClock,\n Wallet,\n AlertTriangle,\n Plus,\n ClipboardList,\n BarChart3,\n MapPin,\n Thermometer,\n ArrowUpRight,\n ChevronRight,\n CheckCircle2,\n Cloud,\n Droplets,\n Wind,\n Eye,\n PawPrint,\n ShieldCheck,\n} from 'lucide-react';\nimport { EmphasisPanel, GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout, StatusBadge, EmptyState, ErrorState, PageLoader } from '../components';\nimport { useHealthyBowlData } from '../hooks/useHealthyBowlData';\nimport { useBasePath } from '../hooks/useBasePath';\nimport { cn, formatCurrency, formatDateOnly } from '../utils/helpers';\nimport type { Alert, Crop } from '../types';\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Semantic maps — colour carries meaning, always paired with a label. Tokens only.\n// ─────────────────────────────────────────────────────────────────────────────\n\ntype Tone = 'neutral' | 'success' | 'warning' | 'danger';\n\nconst toneValueClass: Record<Tone, string> = {\n neutral: 'text-text-primary',\n success: 'text-status-success-text',\n warning: 'text-status-warning-text',\n danger: 'text-status-error-text',\n};\n\nconst toneChipClass: Record<Tone, string> = {\n neutral: 'bg-[var(--color-accent-soft)] text-text-primary',\n success: 'bg-status-success-bg text-status-success-text',\n warning: 'bg-status-warning-bg text-status-warning-text',\n danger: 'bg-status-error-bg text-status-error-text',\n};\n\nconst severityRank: Record<Alert['severity'], number> = { critical: 0, warning: 1, info: 2 };\n\nconst severityDotClass: Record<Alert['severity'], string> = {\n critical: 'bg-status-error-text',\n warning: 'bg-status-warning-text',\n info: 'bg-status-info-text',\n};\n\nconst healthVariant = (status: string) => {\n switch (status) {\n case 'excellent':\n return 'success' as const;\n case 'good':\n return 'info' as const;\n case 'fair':\n return 'warning' as const;\n default:\n return 'error' as const;\n }\n};\n\nconst clampPercent = (n: number) => Math.max(0, Math.min(100, Math.round(n)));\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Presentational sub-components (module-level so they don't remount each render)\n// ─────────────────────────────────────────────────────────────────────────────\n\ninterface KpiTileProps {\n label: string;\n value: string;\n icon: ReactNode;\n tone?: Tone;\n /** Featured accent glow — reserve for the single focal KPI (needs-attention). */\n glow?: boolean;\n drillLabel: string;\n onClick: () => void;\n}\n\n/** Primary KPI card — big real value + tone-coded chip + drill-down. No fabricated trend/sparkline. */\nconst KpiTile: FC<KpiTileProps> = ({ label, value, icon, tone = 'neutral', glow = false, drillLabel, onClick }) => (\n <button type=\"button\" onClick={onClick} className=\"group block text-left focus-visible:outline-none\">\n <GlassCard\n treatment=\"metric\"\n glow={glow}\n className=\"flex h-full flex-col gap-3 border-border-seam p-4 transition-shadow group-hover:shadow-pop group-focus-visible:ring-2 group-focus-visible:ring-border-focus group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-bg-canvas\"\n >\n <div className=\"flex items-center justify-between\">\n <span className=\"text-sm font-medium text-text-secondary\">{label}</span>\n <span className={cn('flex size-8 items-center justify-center rounded-lg [&>svg]:size-4', toneChipClass[tone])}>\n {icon}\n </span>\n </div>\n <span className={cn('text-3xl font-semibold tabular-nums', toneValueClass[tone])}>{value}</span>\n <span className=\"mt-auto inline-flex items-center gap-1 text-xs font-medium text-text-secondary transition-colors group-hover:text-text-primary\">\n {drillLabel}\n <ArrowUpRight className=\"size-3.5\" />\n </span>\n </GlassCard>\n </button>\n);\n\ninterface MiniStatProps {\n label: string;\n value: string;\n hint?: string;\n icon: ReactNode;\n onClick: () => void;\n}\n\n/** Secondary \"at a glance\" tile — quieter than a KPI, honest zero-state hints. */\nconst MiniStat: FC<MiniStatProps> = ({ label, value, hint, icon, onClick }) => (\n <button type=\"button\" onClick={onClick} className=\"group block text-left focus-visible:outline-none\">\n <GlassCard className=\"flex h-full items-center justify-between gap-3 border-border-seam p-3 transition-shadow group-hover:shadow-pop group-focus-visible:ring-2 group-focus-visible:ring-border-focus group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-bg-canvas\">\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-secondary\">{label}</p>\n <p className=\"mt-0.5 truncate text-lg font-semibold tabular-nums text-text-primary\">{value}</p>\n {hint && <p className=\"mt-0.5 truncate text-xs text-text-secondary\">{hint}</p>}\n </div>\n <span className=\"flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-secondary [&>svg]:size-4\">\n {icon}\n </span>\n </GlassCard>\n </button>\n);\n\ninterface AlertRowProps {\n alert: Alert;\n ctaLabel: string;\n relTime: string;\n onOpen: () => void;\n}\n\n/** One needs-attention row: severity dot + title + message + relative time + CTA. */\nconst AlertRow: FC<AlertRowProps> = ({ alert, ctaLabel, relTime, onOpen }) => (\n <li className=\"flex items-start gap-3 py-3\">\n <span className={cn('mt-1.5 size-2.5 shrink-0 rounded-full', severityDotClass[alert.severity])} aria-hidden />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline justify-between gap-3\">\n <p className=\"truncate text-sm font-medium text-text-primary\">{alert.title}</p>\n <button\n type=\"button\"\n onClick={onOpen}\n className=\"shrink-0 text-xs font-medium text-action-primary-bg transition-colors hover:underline focus-visible:underline focus-visible:outline-none\"\n >\n {ctaLabel}\n </button>\n </div>\n <p className=\"mt-0.5 truncate text-xs text-text-secondary\">{alert.message}</p>\n <p className=\"mt-0.5 text-xs text-text-muted\">{relTime}</p>\n </div>\n </li>\n);\n\ninterface CropRowProps {\n crop: Crop;\n metaLabel: string;\n healthLabel: string;\n harvestLabel: string;\n openLabel: string;\n onOpen: () => void;\n}\n\n/** Rich crop row — name, field · stage, health, progress bar, expected harvest, open. */\nconst CropRow: FC<CropRowProps> = ({ crop, metaLabel, healthLabel, harvestLabel, openLabel, onOpen }) => (\n <li>\n <button\n type=\"button\"\n onClick={onOpen}\n className=\"group block w-full rounded-lg p-3 text-left transition-colors hover:bg-bg-sunken/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\"\n >\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">{crop.name}</p>\n <p className=\"truncate text-xs text-text-secondary\">{metaLabel}</p>\n </div>\n <StatusBadge label={healthLabel} variant={healthVariant(crop.healthStatus)} dot />\n </div>\n <div className=\"mt-2 flex items-center gap-3\">\n <div className=\"h-1.5 flex-1 overflow-hidden rounded-full bg-bg-sunken\">\n <div\n className=\"h-full rounded-full bg-action-primary-bg\"\n style={{ width: `${clampPercent(crop.progress)}%` }}\n />\n </div>\n <span className=\"w-9 shrink-0 text-right text-xs font-medium tabular-nums text-text-secondary\">\n {clampPercent(crop.progress)}%\n </span>\n </div>\n <div className=\"mt-1.5 flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"truncate\">{harvestLabel}</span>\n <span className=\"inline-flex shrink-0 items-center gap-0.5 font-medium transition-colors group-hover:text-text-primary\">\n {openLabel}\n <ChevronRight className=\"size-3.5\" />\n </span>\n </div>\n </button>\n </li>\n);\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Dashboard\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const HomePage: FC = () => {\n const { dashboardStats, alerts, crops, weatherData, markAlertRead, farm, loadings, errors, refetch } =\n useHealthyBowlData();\n\n const navigate = useNavigate();\n const { t: translate } = useI18n();\n // Local wrapper preserves the (key, fallback) call style used across HB pages\n // while forwarding interpolation params to the shared i18n `t` (for {{count}} etc.).\n const t = useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string =>\n translate(key, fallback, params),\n [translate]\n );\n const { buildPath } = useBasePath();\n const stats = dashboardStats;\n\n const defaultCurrent = {\n temperature: 0,\n condition: 'N/A',\n feelsLike: 0,\n humidity: 0,\n windSpeed: 0,\n uvIndex: 0,\n pressure: 0,\n visibility: 0,\n };\n const weather = {\n location: weatherData?.location ?? '',\n current: weatherData?.current ?? defaultCurrent,\n forecast: weatherData?.forecast ?? [],\n };\n\n // Today's date, localised — \"Friday, 25 July\" style.\n const todayLabel = useMemo(\n () => new Date().toLocaleDateString(undefined, { weekday: 'long', day: 'numeric', month: 'long' }),\n []\n );\n\n // Alerts sorted by severity (critical → warning → info); capped for the panel.\n const sortedAlerts = useMemo(\n () => [...alerts].sort((a, b) => severityRank[a.severity] - severityRank[b.severity]),\n [alerts]\n );\n const visibleAlerts = sortedAlerts.slice(0, 5);\n const attentionCount = alerts.length;\n\n // Crops ordered by nearest harvest first; capped so the anchor stays scannable.\n const sortedCrops = useMemo(\n () =>\n [...crops].sort(\n (a, b) => (a.daysToHarvest ?? Number.MAX_SAFE_INTEGER) - (b.daysToHarvest ?? Number.MAX_SAFE_INTEGER)\n ),\n [crops]\n );\n const visibleCrops = sortedCrops.slice(0, 6);\n\n // Expenses as a share of revenue — honest ratio, null when there's no revenue to compare against.\n const expenseRatioPercent = useMemo(() => {\n if (stats.totalRevenue === 0) return null;\n return Math.round((stats.totalExpenses / stats.totalRevenue) * 100 * 10) / 10;\n }, [stats.totalExpenses, stats.totalRevenue]);\n\n // Compact relative-time (minutes/hours/days/weeks), i18n'd.\n const relTime = useCallback(\n (iso: string): string => {\n const then = new Date(iso).getTime();\n if (Number.isNaN(then)) return '';\n const diffMin = Math.max(0, Math.floor((Date.now() - then) / 60000));\n if (diffMin < 1) return t('healthybowl.home.time.now', 'just now');\n if (diffMin < 60) return t('healthybowl.home.time.minutes', '{{n}}m ago', { n: diffMin });\n const diffHr = Math.floor(diffMin / 60);\n if (diffHr < 24) return t('healthybowl.home.time.hours', '{{n}}h ago', { n: diffHr });\n const diffDay = Math.floor(diffHr / 24);\n if (diffDay < 7) return t('healthybowl.home.time.days', '{{n}}d ago', { n: diffDay });\n return t('healthybowl.home.time.weeks', '{{n}}w ago', { n: Math.floor(diffDay / 7) });\n },\n [t]\n );\n\n // Per-alert CTA label by severity — mirrors Review / Open / View in the design.\n const alertCta = useCallback(\n (severity: Alert['severity']): string => {\n if (severity === 'critical') return t('healthybowl.home.needsAttention.review', 'Review');\n if (severity === 'warning') return t('healthybowl.home.needsAttention.open', 'Open');\n return t('healthybowl.home.needsAttention.view', 'View');\n },\n [t]\n );\n\n const openAlert = useCallback(\n (alert: Alert) => {\n void markAlertRead(alert.id, true);\n if (alert.actionUrl) navigate(alert.actionUrl);\n },\n [markAlertRead, navigate]\n );\n\n // ── Real-field-backed KPI derivations ──\n const netProfitTone: Tone = stats.netProfit > 0 ? 'success' : stats.netProfit < 0 ? 'danger' : 'neutral';\n const hasCritical = alerts.some((a) => a.severity === 'critical');\n const hasWarning = alerts.some((a) => a.severity === 'warning');\n const attentionTone: Tone =\n attentionCount === 0 ? 'success' : hasCritical ? 'danger' : hasWarning ? 'warning' : 'neutral';\n\n const quickActions = [\n {\n label: t('healthybowl.home.quickActions.addCrop.label', 'Add crop'),\n icon: Sprout,\n path: buildPath('crops'),\n },\n {\n label: t('healthybowl.home.quickActions.recordHarvest.label', 'Record harvest'),\n icon: ClipboardList,\n path: buildPath('crops/harvest'),\n },\n {\n label: t('healthybowl.home.quickActions.viewFields.label', 'View fields'),\n icon: MapPin,\n path: buildPath('crops/fields'),\n },\n {\n label: t('healthybowl.home.quickActions.viewWeather.label', 'View weather'),\n icon: Thermometer,\n path: buildPath('weather'),\n },\n {\n label: t('healthybowl.home.quickActions.analytics.label', 'Analytics'),\n icon: BarChart3,\n path: buildPath('analytics'),\n },\n ];\n\n // Compact header subline: date · farm + a live needs-attention summary.\n const attentionSummary =\n attentionCount === 0\n ? t('healthybowl.home.header.allClear', \"You're all caught up\")\n : attentionCount === 1\n ? t('healthybowl.home.header.needsAttentionOne', '1 item needs your attention')\n : t('healthybowl.home.header.needsAttentionOther', '{{count}} items need your attention', {\n count: attentionCount,\n });\n\n // PageLayout's `description` is a plain string; the date + farm reads as the subline.\n const headerSubline = farm?.name ? `${todayLabel} · ${farm.name}` : todayLabel;\n\n const headerActions = (\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('crops'))}\n className=\"inline-flex min-h-[40px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas\"\n >\n <Plus className=\"h-4 w-4\" />\n {t('healthybowl.home.primaryAction', 'Add')}\n </button>\n );\n\n return (\n <PageLayout\n title={t('healthybowl.home.title', 'Farm Dashboard')}\n description={headerSubline}\n actions={headerActions}\n >\n {loadings.dashboard ? (\n <PageLoader />\n ) : errors.dashboard ? (\n <ErrorState onRetry={refetch} />\n ) : (\n <div className=\"space-y-6\">\n {/* Live needs-attention summary — reads directly under the compact header */}\n <div\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium',\n attentionCount === 0\n ? 'bg-status-success-bg text-status-success-text'\n : 'bg-status-warning-bg text-status-warning-text'\n )}\n >\n {attentionCount === 0 ? <CheckCircle2 className=\"size-4\" /> : <AlertTriangle className=\"size-4\" />}\n {attentionSummary}\n </div>\n\n {/* First-run onboarding — only once data has settled and there's no farm yet */}\n {!farm?.id && (\n <EmphasisPanel className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <p className=\"text-base font-semibold text-text-primary\">\n {t('healthybowl.home.onboarding.title', 'Welcome to HealthyBowl')}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {t(\n 'healthybowl.home.onboarding.description',\n 'Set up your farm to start tracking crops, livestock, finances, and more.'\n )}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('getting-started'))}\n className=\"inline-flex min-h-[44px] items-center gap-2 self-start rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas sm:self-auto\"\n >\n <Plus className=\"h-4 w-4\" />\n {t('healthybowl.home.onboarding.action', 'Set up your farm')}\n </button>\n </EmphasisPanel>\n )}\n\n {/* Quick-action strip — compact row, existing wired targets */}\n <div className=\"flex flex-wrap gap-2\">\n {quickActions.map(({ label, icon: Icon, path }) => (\n <button\n key={label}\n type=\"button\"\n onClick={() => navigate(path)}\n className=\"inline-flex min-h-[40px] items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3.5 py-2 text-sm font-medium text-text-secondary transition-colors hover:border-border-default hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas\"\n >\n <Icon className=\"size-4\" />\n {label}\n </button>\n ))}\n </div>\n\n {/* Primary row — 4 real-field KPIs + needs-attention panel above the fold */}\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <div className=\"grid grid-cols-2 gap-4 lg:col-span-2\">\n <KpiTile\n label={t('healthybowl.home.kpi.activeCrops', 'Active crops')}\n value={String(stats.activeCrops)}\n icon={<Sprout />}\n drillLabel={t('healthybowl.home.kpi.viewCrops', 'View crops')}\n onClick={() => navigate(buildPath('crops'))}\n />\n <KpiTile\n label={t('healthybowl.home.kpi.harvestDue', 'Harvest due')}\n value={String(stats.harvestDue)}\n icon={<CalendarClock />}\n drillLabel={t('healthybowl.home.kpi.viewHarvest', 'View harvest')}\n onClick={() => navigate(buildPath('crops/harvest'))}\n />\n <KpiTile\n label={t('healthybowl.home.kpi.netProfit', 'Net profit')}\n value={formatCurrency(stats.netProfit)}\n icon={<Wallet />}\n tone={netProfitTone}\n drillLabel={t('healthybowl.home.kpi.viewFinance', 'View finances')}\n onClick={() => navigate(buildPath('financial'))}\n />\n <KpiTile\n label={t('healthybowl.home.kpi.needsAttention', 'Needs attention')}\n value={String(attentionCount)}\n icon={<AlertTriangle />}\n tone={attentionTone}\n glow={attentionTone === 'danger' || attentionTone === 'warning'}\n drillLabel={t('healthybowl.home.kpi.viewAlerts', 'View alerts')}\n onClick={() => navigate(buildPath('weather/alerts'))}\n />\n </div>\n\n {/* Needs attention */}\n <GlassCard className=\"flex h-full flex-col border-border-seam p-0\">\n <div className=\"flex items-center justify-between px-4 pb-1 pt-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.home.needsAttention.title', 'Needs attention')}\n </h3>\n {sortedAlerts.length > 0 && (\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('weather/alerts'))}\n className=\"text-xs font-medium text-text-secondary transition-colors hover:text-text-primary focus-visible:text-text-primary focus-visible:outline-none\"\n >\n {t('healthybowl.home.needsAttention.viewAll', 'View all')}\n </button>\n )}\n </div>\n <div className=\"flex-1 px-4 pb-4\">\n {sortedAlerts.length === 0 ? (\n <EmptyState\n icon={<CheckCircle2 className=\"h-8 w-8 text-status-success-text\" />}\n title={t('healthybowl.home.needsAttention.empty.title', \"You're all caught up\")}\n description={t(\n 'healthybowl.home.needsAttention.empty.description',\n 'No urgent farm alerts right now.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('weather/alert-rules'))}\n className=\"inline-flex min-h-[40px] items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\"\n >\n {t('healthybowl.home.needsAttention.empty.action', 'Manage alert rules')}\n </button>\n }\n />\n ) : (\n <ul className=\"divide-y divide-border-subtle\">\n {visibleAlerts.map((alert) => (\n <AlertRow\n key={alert.id}\n alert={alert}\n ctaLabel={alertCta(alert.severity)}\n relTime={relTime(alert.timestamp)}\n onOpen={() => openAlert(alert)}\n />\n ))}\n </ul>\n )}\n </div>\n </GlassCard>\n </div>\n\n {/* Anchor row — crop overview (strongest) + compact weather */}\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Crop overview — the farm-specific anchor */}\n <GlassCard glow className=\"flex h-full flex-col border-border-seam p-0 lg:col-span-2\">\n <div className=\"flex items-center justify-between px-5 pb-2 pt-5\">\n <div className=\"flex items-center gap-2\">\n <span className=\"flex size-8 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-primary [&>svg]:size-4\">\n <Sprout />\n </span>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">\n {t('healthybowl.home.cropsAnchor.title', 'Crop overview')}\n </h2>\n <p className=\"text-xs text-text-secondary\">\n {crops.length === 1\n ? t('healthybowl.home.cropsAnchor.subtitleOne', '1 crop in progress')\n : t('healthybowl.home.cropsAnchor.subtitleOther', '{{count}} crops in progress', {\n count: crops.length,\n })}\n </p>\n </div>\n </div>\n {crops.length > 0 && (\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('crops'))}\n className=\"text-xs font-medium text-text-secondary transition-colors hover:text-text-primary focus-visible:text-text-primary focus-visible:outline-none\"\n >\n {t('healthybowl.home.cropsAnchor.viewAll', 'View all crops')}\n </button>\n )}\n </div>\n <div className=\"flex-1 px-3 pb-3\">\n {crops.length === 0 ? (\n <EmptyState\n icon={<Sprout className=\"h-8 w-8 text-primary\" />}\n title={t('healthybowl.home.cropsAnchor.empty.title', 'No active crops')}\n description={t(\n 'healthybowl.home.cropsAnchor.empty.description',\n 'Register your first crop to track growth, health and harvest here.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('crops'))}\n className=\"inline-flex min-h-[40px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\"\n >\n <Plus className=\"h-4 w-4\" />\n {t('healthybowl.home.quickActions.addCrop.label', 'Add crop')}\n </button>\n }\n />\n ) : (\n <ul className=\"divide-y divide-border-subtle\">\n {visibleCrops.map((crop) => {\n const stage = (crop.growthStage || crop.status || '').replace(/_/g, ' ').trim();\n const metaLabel = [crop.fieldName, stage].filter(Boolean).join(' · ');\n return (\n <CropRow\n key={crop.id}\n crop={crop}\n metaLabel={metaLabel || t('healthybowl.home.cropsAnchor.noField', 'Unassigned')}\n healthLabel={(crop.healthStatus || 'unknown').replace(/_/g, ' ')}\n harvestLabel={\n crop.expectedHarvestDate\n ? t('healthybowl.home.cropsAnchor.harvest', 'Harvest {{date}}', {\n date: formatDateOnly(crop.expectedHarvestDate),\n })\n : t('healthybowl.home.cropsAnchor.harvestUnknown', 'Harvest date TBD')\n }\n openLabel={t('healthybowl.home.cropsAnchor.open', 'Open')}\n onOpen={() => navigate(buildPath(`crops/${crop.id}`))}\n />\n );\n })}\n </ul>\n )}\n </div>\n </GlassCard>\n\n {/* Weather — secondary */}\n <GlassCard className=\"flex h-full flex-col border-border-seam p-0\">\n <div className=\"px-4 pb-1 pt-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.home.weatherCard.title', 'Current weather')}\n </h3>\n {weather.location && <p className=\"text-xs text-text-secondary\">{weather.location}</p>}\n </div>\n <div className=\"flex flex-1 flex-col gap-4 px-4 pb-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-4xl font-bold text-text-primary\">{weather.current.temperature}&deg;C</p>\n <p className=\"text-sm text-text-secondary\">{weather.current.condition}</p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t('healthybowl.home.weatherCard.feelsLike', 'Feels like')} {weather.current.feelsLike}&deg;C\n </p>\n </div>\n <div className=\"flex flex-col items-center\">\n <Cloud className=\"h-12 w-12 text-text-secondary\" />\n <span className=\"mt-1 text-xs text-text-secondary\">UV {weather.current.uvIndex}</span>\n </div>\n </div>\n\n <div className=\"grid grid-cols-2 gap-3 border-t border-border-subtle pt-3\">\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Droplets className=\"h-4 w-4\" />\n <span>\n {weather.current.humidity}% {t('healthybowl.home.weatherCard.humidity', 'Humidity')}\n </span>\n </div>\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Wind className=\"h-4 w-4\" />\n <span>{weather.current.windSpeed} km/h</span>\n </div>\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Thermometer className=\"h-4 w-4\" />\n <span>{weather.current.pressure} hPa</span>\n </div>\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Eye className=\"h-4 w-4\" />\n <span>{weather.current.visibility} km</span>\n </div>\n </div>\n\n {weather.forecast.length > 0 && (\n <div className=\"grid grid-cols-4 gap-2 border-t border-border-subtle pt-3\">\n {weather.forecast.slice(0, 4).map((day) => (\n <div key={day.date} className=\"rounded-md bg-bg-sunken/50 p-2 text-center\">\n <p className=\"text-xs font-medium text-text-secondary\">\n {new Date(day.date).toLocaleDateString('en-US', { weekday: 'short' })}\n </p>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">{day.high}&deg;</p>\n <p className=\"text-xs text-text-secondary\">{day.low}&deg;</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{day.precipitation}%</p>\n </div>\n ))}\n </div>\n )}\n\n <button\n type=\"button\"\n onClick={() => navigate(buildPath('weather'))}\n className=\"mt-auto w-full rounded-md border border-border-subtle py-2 text-sm text-text-primary transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\"\n >\n {t('healthybowl.home.weatherCard.viewForecast', 'View full forecast')}\n </button>\n </div>\n </GlassCard>\n </div>\n\n {/* At a glance — demoted secondary metrics with honest zero-states */}\n <section>\n <h3 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.home.glance.title', 'At a glance')}\n </h3>\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <MiniStat\n label={t('healthybowl.home.glance.fields', 'Fields')}\n value={String(stats.totalFields)}\n hint={\n stats.totalFields > 0\n ? t('healthybowl.home.glance.fieldsHint', 'Monitored')\n : t('healthybowl.home.glance.fieldsEmpty', 'No fields yet')\n }\n icon={<MapPin />}\n onClick={() => navigate(buildPath('crops/fields'))}\n />\n <MiniStat\n label={t('healthybowl.home.glance.livestock', 'Livestock')}\n value={String(stats.totalAnimals)}\n hint={\n stats.totalAnimals > 0\n ? t('healthybowl.home.glance.livestockHint', 'Under management')\n : t('healthybowl.home.glance.livestockEmpty', 'No livestock added')\n }\n icon={<PawPrint />}\n onClick={() => navigate(buildPath('livestock'))}\n />\n <MiniStat\n label={t('healthybowl.home.glance.organic', 'Organic score')}\n value={\n stats.organicScore > 0\n ? `${stats.organicScore}%`\n : t('healthybowl.home.glance.organicEmpty', 'Not configured')\n }\n hint={stats.organicScore > 0 ? t('healthybowl.home.glance.organicHint', 'Compliance') : undefined}\n icon={<ShieldCheck />}\n onClick={() => navigate(buildPath('compliance'))}\n />\n <MiniStat\n label={t('healthybowl.home.glance.expenses', 'Expenses')}\n value={formatCurrency(stats.totalExpenses)}\n hint={\n expenseRatioPercent != null\n ? t('healthybowl.home.glance.expensesRatio', '{{pct}}% of revenue', { pct: expenseRatioPercent })\n : t('healthybowl.home.glance.noRevenue', 'No revenue yet')\n }\n icon={<Wallet />}\n onClick={() => navigate(buildPath('financial'))}\n />\n </div>\n </section>\n </div>\n )}\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAoCA,IAAM,IAAuC;CAC3C,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACT,EAEK,IAAsC;CAC1C,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACT,EAEK,IAAkD;CAAE,UAAU;CAAG,SAAS;CAAG,MAAM;CAAG,EAEtF,IAAsD;CAC1D,UAAU;CACV,SAAS;CACT,MAAM;CACP,EAEK,KAAiB,MAAmB;AACxC,SAAQ,GAAR;EACE,KAAK,YACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,QACE,QAAO;;GAIP,KAAgB,MAAc,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC,CAAC,EAkBvE,KAA6B,EAAE,UAAO,UAAO,SAAM,UAAO,WAAW,UAAO,IAAO,eAAY,iBACnG,kBAAC,UAAD;CAAQ,MAAK;CAAkB;CAAS,WAAU;WAChD,kBAAC,GAAD;EACE,WAAU;EACJ;EACN,WAAU;YAHZ;G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AAwC,iBAAiB;OAEjE,MAAM,EAAM,eAAe,IAAI,EAAE,uCAAuC,aAAa,GAAG,KAAA;OACxF,MAAM,kBAAC,GAAD,EAAe,CAAA;OACrB,eAAe,EAAS,EAAU,aAAa,CAAC;OAChD,CAAA;MACF,kBAAC,GAAD;OACE,OAAO,EAAE,oCAAoC,WAAW;OACxD,OAAO,EAAe,EAAM,cAAc;OAC1C,MACE,KAAuB,OAEnB,EAAE,qCAAqC,iBAAiB,GADxD,EAAE,yCAAyC,uBAAuB,EAAE,KAAK,GAAqB,CAAC;OAGrG,MAAM,kBAAC,GAAD,EAAU,CAAA;OAChB,eAAe,EAAS,EAAU,YAAY,CAAC;OAC/C,CAAA;MACE;OACE,EAAA,CAAA;IACN;;EAEG,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-healthybowl",
3
- "version": "2026.725.1",
3
+ "version": "2026.725.2",
4
4
  "description": "Burdenoff HealthyBowl Microfrontend - Comprehensive organic farming and agro-foods management platform",
5
5
  "type": "module",
6
6
  "files": [