@burdenoff/microfe-healthybowl 2026.625.4 → 2026.625.5

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.
Files changed (31) hide show
  1. package/dist/healthybowl/pages/financial/BudgetManagementPage.js +200 -189
  2. package/dist/healthybowl/pages/financial/BudgetManagementPage.js.map +1 -1
  3. package/dist/healthybowl/pages/financial/FinancialDashboardPage.js +137 -126
  4. package/dist/healthybowl/pages/financial/FinancialDashboardPage.js.map +1 -1
  5. package/dist/healthybowl/pages/financial/FinancialReportsPage.js +82 -75
  6. package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
  7. package/dist/healthybowl/pages/financial/FinancierAccessPage.js +44 -43
  8. package/dist/healthybowl/pages/financial/FinancierAccessPage.js.map +1 -1
  9. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +201 -190
  10. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
  11. package/dist/healthybowl/pages/financial/TransactionsPage.js +321 -303
  12. package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
  13. package/dist/healthybowl/pages/network/CohortsPage.js +95 -95
  14. package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
  15. package/dist/healthybowl/pages/network/CommunityPage.js +261 -252
  16. package/dist/healthybowl/pages/network/CommunityPage.js.map +1 -1
  17. package/dist/healthybowl/pages/network/EventsPage.js +304 -281
  18. package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
  19. package/dist/healthybowl/pages/network/ExpertsPage.js +416 -405
  20. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  21. package/dist/healthybowl/pages/network/MentorsPage.js +519 -508
  22. package/dist/healthybowl/pages/network/MentorsPage.js.map +1 -1
  23. package/dist/healthybowl/pages/network/NetworkOverviewPage.js +129 -120
  24. package/dist/healthybowl/pages/network/NetworkOverviewPage.js.map +1 -1
  25. package/dist/healthybowl/pages/production/ProductionPlanningPage.js +56 -54
  26. package/dist/healthybowl/pages/production/ProductionPlanningPage.js.map +1 -1
  27. package/dist/healthybowl/pages/production/ProductionSchedulePage.js +52 -46
  28. package/dist/healthybowl/pages/production/ProductionSchedulePage.js.map +1 -1
  29. package/dist/healthybowl/pages/production/RecipeManagementPage.js +242 -229
  30. package/dist/healthybowl/pages/production/RecipeManagementPage.js.map +1 -1
  31. package/package.json +1 -1
@@ -5,17 +5,18 @@ import { StatusBadge as ee } from "../../components/StatusBadge.js";
5
5
  import { ErrorState as i } from "../../components/ErrorState.js";
6
6
  import { ToastContainer as te } from "../../components/Toast.js";
7
7
  import { useConfirm as a } from "../../components/ConfirmDialog.js";
8
- import { PageLoader as ne } from "../../components/PageLoader.js";
9
- import { Modal as re } from "../../components/Modal.js";
8
+ import { PageLoader as o } from "../../components/PageLoader.js";
9
+ import { Modal as s } from "../../components/Modal.js";
10
10
  import "../../components/index.js";
11
- import { useHealthyBowlData as ie } from "../../hooks/useHealthyBowlData.js";
12
- import { useToast as ae } from "../../hooks/useToast.js";
13
- import { useMemo as o, useState as s } from "react";
14
- import { useI18n as oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
- import { AlertTriangle as c, DollarSign as l, Edit as u, PieChart as d, Plus as f, Trash2 as p, TrendingDown as m, Wallet as h } from "lucide-react";
16
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { useHealthyBowlData as ne } from "../../hooks/useHealthyBowlData.js";
12
+ import { useToast as re } from "../../hooks/useToast.js";
13
+ import { useMemo as c, useState as l } from "react";
14
+ import { useI18n as ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ import { AlertTriangle as ae, DollarSign as oe, Edit as se, PieChart as ce, Plus as le, Trash2 as ue, TrendingDown as u, Wallet as d } from "lucide-react";
16
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
17
+ import { Button as h, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b } from "@burdenoff/fe-libs/ui";
17
18
  //#region src/healthybowl/pages/financial/BudgetManagementPage.tsx
18
- var se = (e) => e === "on_track" ? "success" : e === "warning" ? "warning" : "error", y = (e) => e > 100 ? "bg-status-error-bg" : e > 75 ? "bg-warning" : "bg-success", ce = [
19
+ var de = (e) => e === "on_track" ? "success" : e === "warning" ? "warning" : "error", x = (e) => e > 100 ? "bg-status-error-bg" : e > 75 ? "bg-warning" : "bg-success", fe = [
19
20
  "crop_sales",
20
21
  "livestock_sales",
21
22
  "marketplace",
@@ -27,118 +28,118 @@ var se = (e) => e === "on_track" ? "success" : e === "warning" ? "warning" : "er
27
28
  "certification",
28
29
  "equipment",
29
30
  "other"
30
- ], b = [
31
+ ], S = [
31
32
  "Q1 2025",
32
33
  "Q2 2025",
33
34
  "Q3 2025",
34
35
  "Q4 2025"
35
- ], x = {
36
+ ], C = {
36
37
  name: "",
37
38
  category: "seeds",
38
39
  allocated: "",
39
40
  period: "Q1 2025"
40
- }, S = () => {
41
- let { t: S } = oe(), { budgets: C, createBudget: le, updateBudget: w, deleteBudget: T, loadings: E, errors: D, refetch: O } = ie(), { toasts: k, toast: A, dismiss: j } = ae(), M = a(), N = o(() => ({
42
- all: S("healthybowl.common.all", "All"),
43
- on_track: S("healthybowl.financial.budgetManagement.status.onTrack", "On track"),
44
- warning: S("healthybowl.financial.budgetManagement.status.warning", "Warning"),
45
- over_budget: S("healthybowl.financial.budgetManagement.status.overBudget", "Over budget")
46
- }), [S]), P = (e) => e === "on_track" || e === "warning" || e === "over_budget" ? N[e] : S("healthybowl.financial.budgetManagement.status.unknown", "Unknown"), F = o(() => ({
47
- crop_sales: S("healthybowl.financial.budgetManagement.categories.cropSales", "Crop sales"),
48
- livestock_sales: S("healthybowl.financial.budgetManagement.categories.livestockSales", "Livestock sales"),
49
- marketplace: S("healthybowl.financial.budgetManagement.categories.marketplace", "Marketplace"),
50
- seeds: S("healthybowl.financial.budgetManagement.categories.seeds", "Seeds"),
51
- fertilizers: S("healthybowl.financial.budgetManagement.categories.fertilizers", "Fertilizers"),
52
- labor: S("healthybowl.financial.budgetManagement.categories.labor", "Labor"),
53
- irrigation: S("healthybowl.financial.budgetManagement.categories.irrigation", "Irrigation"),
54
- pest_control: S("healthybowl.financial.budgetManagement.categories.pestControl", "Pest control"),
55
- certification: S("healthybowl.financial.budgetManagement.categories.certification", "Certification"),
56
- equipment: S("healthybowl.financial.budgetManagement.categories.equipment", "Equipment"),
57
- other: S("healthybowl.financial.budgetManagement.categories.other", "Other")
58
- }), [S]), I = (e) => e in F ? F[e] : e.replace(/_/g, " "), [L, R] = s("all"), [z, ue] = s("all"), [B, V] = s(!1), [H, U] = s(null), [de, W] = s(null), [G, K] = s(x), q = o(() => C.filter((e) => {
59
- let t = L === "all" || e.status === L, n = z === "all" || e.period === z;
41
+ }, w = () => {
42
+ let { t: w } = ie(), { budgets: T, createBudget: pe, updateBudget: me, deleteBudget: E, loadings: D, errors: O, refetch: k } = ne(), { toasts: A, toast: j, dismiss: M } = re(), N = a(), P = c(() => ({
43
+ all: w("healthybowl.common.all", "All"),
44
+ on_track: w("healthybowl.financial.budgetManagement.status.onTrack", "On track"),
45
+ warning: w("healthybowl.financial.budgetManagement.status.warning", "Warning"),
46
+ over_budget: w("healthybowl.financial.budgetManagement.status.overBudget", "Over budget")
47
+ }), [w]), F = (e) => e === "on_track" || e === "warning" || e === "over_budget" ? P[e] : w("healthybowl.financial.budgetManagement.status.unknown", "Unknown"), I = c(() => ({
48
+ crop_sales: w("healthybowl.financial.budgetManagement.categories.cropSales", "Crop sales"),
49
+ livestock_sales: w("healthybowl.financial.budgetManagement.categories.livestockSales", "Livestock sales"),
50
+ marketplace: w("healthybowl.financial.budgetManagement.categories.marketplace", "Marketplace"),
51
+ seeds: w("healthybowl.financial.budgetManagement.categories.seeds", "Seeds"),
52
+ fertilizers: w("healthybowl.financial.budgetManagement.categories.fertilizers", "Fertilizers"),
53
+ labor: w("healthybowl.financial.budgetManagement.categories.labor", "Labor"),
54
+ irrigation: w("healthybowl.financial.budgetManagement.categories.irrigation", "Irrigation"),
55
+ pest_control: w("healthybowl.financial.budgetManagement.categories.pestControl", "Pest control"),
56
+ certification: w("healthybowl.financial.budgetManagement.categories.certification", "Certification"),
57
+ equipment: w("healthybowl.financial.budgetManagement.categories.equipment", "Equipment"),
58
+ other: w("healthybowl.financial.budgetManagement.categories.other", "Other")
59
+ }), [w]), L = (e) => e in I ? I[e] : e.replace(/_/g, " "), [R, z] = l("all"), [B, he] = l("all"), [ge, V] = l(!1), [H, U] = l(null), [_e, W] = l(null), [G, K] = l(C), q = c(() => T.filter((e) => {
60
+ let t = R === "all" || e.status === R, n = B === "all" || e.period === B;
60
61
  return t && n;
61
62
  }), [
62
- C,
63
- L,
64
- z
65
- ]), J = C.reduce((e, t) => e + t.allocated, 0), Y = C.reduce((e, t) => e + t.spent, 0), fe = C.reduce((e, t) => e + t.remaining, 0), pe = C.filter((e) => e.status === "over_budget").length, X = J > 0 ? Math.round(Y / J * 100) : 0, me = async () => {
63
+ T,
64
+ R,
65
+ B
66
+ ]), J = T.reduce((e, t) => e + t.allocated, 0), Y = T.reduce((e, t) => e + t.spent, 0), ve = T.reduce((e, t) => e + t.remaining, 0), ye = T.filter((e) => e.status === "over_budget").length, X = J > 0 ? Math.round(Y / J * 100) : 0, be = async () => {
66
67
  if (!G.name || !G.allocated) {
67
- A({
68
- title: S("healthybowl.financial.budgetManagement.toast.validationError.title", "Validation Error"),
69
- description: S("healthybowl.financial.budgetManagement.toast.validationError.description", "Please fill in name and allocated amount"),
68
+ j({
69
+ title: w("healthybowl.financial.budgetManagement.toast.validationError.title", "Validation Error"),
70
+ description: w("healthybowl.financial.budgetManagement.toast.validationError.description", "Please fill in name and allocated amount"),
70
71
  variant: "error"
71
72
  });
72
73
  return;
73
74
  }
74
75
  let e = Number(G.allocated);
75
76
  if (H) try {
76
- await w({
77
+ await me({
77
78
  id: H,
78
79
  name: G.name,
79
80
  category: G.category,
80
81
  period: G.period,
81
82
  allocated: e
82
- }), A({
83
- title: S("healthybowl.financial.budgetManagement.toast.updated.title", "Budget Updated"),
84
- description: S("healthybowl.financial.budgetManagement.toast.budgetSummary", "{{name}} - {{amount}}", {
83
+ }), j({
84
+ title: w("healthybowl.financial.budgetManagement.toast.updated.title", "Budget Updated"),
85
+ description: w("healthybowl.financial.budgetManagement.toast.budgetSummary", "{{name}} - {{amount}}", {
85
86
  name: G.name,
86
87
  amount: t(e)
87
88
  }),
88
89
  variant: "success"
89
90
  });
90
91
  } catch (e) {
91
- A({
92
- title: S("healthybowl.common.error", "Error"),
93
- description: e instanceof Error ? e.message : S("healthybowl.financial.budgetManagement.toast.updateFailed", "Failed to update budget"),
92
+ j({
93
+ title: w("healthybowl.common.error", "Error"),
94
+ description: e instanceof Error ? e.message : w("healthybowl.financial.budgetManagement.toast.updateFailed", "Failed to update budget"),
94
95
  variant: "error"
95
96
  });
96
97
  return;
97
98
  }
98
99
  else try {
99
- await le({
100
+ await pe({
100
101
  name: G.name,
101
102
  category: G.category,
102
103
  period: G.period,
103
104
  allocated: e
104
- }), A({
105
- title: S("healthybowl.financial.budgetManagement.toast.created.title", "Budget Created"),
106
- description: S("healthybowl.financial.budgetManagement.toast.budgetSummary", "{{name}} - {{amount}}", {
105
+ }), j({
106
+ title: w("healthybowl.financial.budgetManagement.toast.created.title", "Budget Created"),
107
+ description: w("healthybowl.financial.budgetManagement.toast.budgetSummary", "{{name}} - {{amount}}", {
107
108
  name: G.name,
108
109
  amount: t(e)
109
110
  }),
110
111
  variant: "success"
111
112
  });
112
113
  } catch (e) {
113
- A({
114
- title: S("healthybowl.common.error", "Error"),
115
- description: e instanceof Error ? e.message : S("healthybowl.financial.budgetManagement.toast.createFailed", "Failed to create budget"),
114
+ j({
115
+ title: w("healthybowl.common.error", "Error"),
116
+ description: e instanceof Error ? e.message : w("healthybowl.financial.budgetManagement.toast.createFailed", "Failed to create budget"),
116
117
  variant: "error"
117
118
  });
118
119
  return;
119
120
  }
120
- V(!1), U(null), K(x);
121
- }, he = (e) => {
122
- let t = C.find((t) => t.id === e);
121
+ V(!1), U(null), K(C);
122
+ }, xe = (e) => {
123
+ let t = T.find((t) => t.id === e);
123
124
  t && (K({
124
125
  name: t.name,
125
126
  category: t.category,
126
127
  allocated: String(t.allocated),
127
128
  period: t.period
128
129
  }), U(e), V(!0));
129
- }, ge = async (e, t) => {
130
- if (await M({ message: S("healthybowl.financial.budgetManagement.deleteConfirm", "Delete the budget \"{{name}}\"? This cannot be undone.", { name: t }) })) {
130
+ }, Se = async (e, t) => {
131
+ if (await N({ message: w("healthybowl.financial.budgetManagement.deleteConfirm", "Delete the budget \"{{name}}\"? This cannot be undone.", { name: t }) })) {
131
132
  W(e);
132
133
  try {
133
- await T(e), A({
134
- title: S("healthybowl.financial.budgetManagement.toast.deleted.title", "Budget Deleted"),
134
+ await E(e), j({
135
+ title: w("healthybowl.financial.budgetManagement.toast.deleted.title", "Budget Deleted"),
135
136
  description: t,
136
137
  variant: "success"
137
138
  });
138
139
  } catch (e) {
139
- A({
140
- title: S("healthybowl.common.error", "Error"),
141
- description: e instanceof Error ? e.message : S("healthybowl.financial.budgetManagement.toast.deleteFailed", "Failed to delete budget"),
140
+ j({
141
+ title: w("healthybowl.common.error", "Error"),
142
+ description: e instanceof Error ? e.message : w("healthybowl.financial.budgetManagement.toast.deleteFailed", "Failed to delete budget"),
142
143
  variant: "error"
143
144
  });
144
145
  } finally {
@@ -146,191 +147,198 @@ var se = (e) => e === "on_track" ? "success" : e === "warning" ? "warning" : "er
146
147
  }
147
148
  }
148
149
  }, Z = () => {
149
- V(!1), U(null), K(x);
150
+ V(!1), U(null), K(C);
150
151
  }, Q = (e, t) => {
151
152
  K((n) => ({
152
153
  ...n,
153
154
  [e]: t
154
155
  }));
155
156
  }, $ = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]";
156
- return /* @__PURE__ */ v(n, {
157
- title: S("healthybowl.financial.budgetManagement.title", "Budget Management"),
158
- description: S("healthybowl.financial.budgetManagement.subtitle", "Track allocated budgets and spending"),
159
- actions: /* @__PURE__ */ v("button", {
157
+ return /* @__PURE__ */ m(n, {
158
+ title: w("healthybowl.financial.budgetManagement.title", "Budget Management"),
159
+ description: w("healthybowl.financial.budgetManagement.subtitle", "Track allocated budgets and spending"),
160
+ actions: /* @__PURE__ */ m(h, {
160
161
  onClick: () => {
161
- K(x), U(null), V(!0);
162
+ K(C), U(null), V(!0);
162
163
  },
163
- className: "flex items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs font-medium text-background transition-opacity hover:opacity-90",
164
- children: [/* @__PURE__ */ _(f, { className: "h-3.5 w-3.5" }), S("healthybowl.financial.budgetManagement.actions.create", "Create Budget")]
164
+ children: [/* @__PURE__ */ p(le, { className: "h-3.5 w-3.5" }), w("healthybowl.financial.budgetManagement.actions.create", "Create Budget")]
165
165
  }),
166
166
  children: [
167
- /* @__PURE__ */ v("div", {
167
+ /* @__PURE__ */ m("div", {
168
168
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
169
169
  children: [
170
- /* @__PURE__ */ _(r, {
171
- label: S("healthybowl.financial.budgetManagement.stats.totalBudget", "Total Budget"),
170
+ /* @__PURE__ */ p(r, {
171
+ label: w("healthybowl.financial.budgetManagement.stats.totalBudget", "Total Budget"),
172
172
  value: J,
173
173
  prefix: "$",
174
- icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
174
+ icon: /* @__PURE__ */ p(d, { className: "h-4 w-4" })
175
175
  }),
176
- /* @__PURE__ */ _(r, {
177
- label: S("healthybowl.financial.budgetManagement.stats.totalSpent", "Total Spent"),
176
+ /* @__PURE__ */ p(r, {
177
+ label: w("healthybowl.financial.budgetManagement.stats.totalSpent", "Total Spent"),
178
178
  value: Y,
179
179
  prefix: "$",
180
- icon: /* @__PURE__ */ _(l, { className: "h-4 w-4" })
180
+ icon: /* @__PURE__ */ p(oe, { className: "h-4 w-4" })
181
181
  }),
182
- /* @__PURE__ */ _(r, {
183
- label: S("healthybowl.financial.budgetManagement.stats.remaining", "Remaining"),
184
- value: fe,
182
+ /* @__PURE__ */ p(r, {
183
+ label: w("healthybowl.financial.budgetManagement.stats.remaining", "Remaining"),
184
+ value: ve,
185
185
  prefix: "$",
186
- icon: /* @__PURE__ */ _(m, { className: "h-4 w-4" })
186
+ icon: /* @__PURE__ */ p(u, { className: "h-4 w-4" })
187
187
  }),
188
- /* @__PURE__ */ _(r, {
189
- label: S("healthybowl.financial.budgetManagement.stats.overBudget", "Over Budget"),
190
- value: S("healthybowl.financial.budgetManagement.stats.categoriesCount", "{{count}} categories", { count: pe }),
191
- icon: /* @__PURE__ */ _(c, { className: "h-4 w-4" })
188
+ /* @__PURE__ */ p(r, {
189
+ label: w("healthybowl.financial.budgetManagement.stats.overBudget", "Over Budget"),
190
+ value: w("healthybowl.financial.budgetManagement.stats.categoriesCount", "{{count}} categories", { count: ye }),
191
+ icon: /* @__PURE__ */ p(ae, { className: "h-4 w-4" })
192
192
  })
193
193
  ]
194
194
  }),
195
- /* @__PURE__ */ v("div", {
195
+ /* @__PURE__ */ m("div", {
196
196
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
197
197
  children: [
198
- /* @__PURE__ */ v("div", {
198
+ /* @__PURE__ */ m("div", {
199
199
  className: "flex items-center justify-between",
200
- children: [/* @__PURE__ */ v("div", {
200
+ children: [/* @__PURE__ */ m("div", {
201
201
  className: "flex items-center gap-2",
202
- children: [/* @__PURE__ */ _(d, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("h3", {
202
+ children: [/* @__PURE__ */ p(ce, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ p("h3", {
203
203
  className: "text-sm font-semibold text-text-primary",
204
- children: S("healthybowl.financial.budgetManagement.utilization.title", "Budget Utilization Overview")
204
+ children: w("healthybowl.financial.budgetManagement.utilization.title", "Budget Utilization Overview")
205
205
  })]
206
- }), /* @__PURE__ */ v("span", {
206
+ }), /* @__PURE__ */ m("span", {
207
207
  className: "text-sm font-medium text-text-primary",
208
208
  children: [X, "%"]
209
209
  })]
210
210
  }),
211
- /* @__PURE__ */ _("div", {
211
+ /* @__PURE__ */ p("div", {
212
212
  className: "mt-3 h-4 w-full rounded-full bg-bg-sunken",
213
- children: /* @__PURE__ */ _("div", {
214
- className: e("h-full rounded-full transition-all", y(X)),
213
+ children: /* @__PURE__ */ p("div", {
214
+ className: e("h-full rounded-full transition-all", x(X)),
215
215
  style: { width: `${Math.min(100, X)}%` }
216
216
  })
217
217
  }),
218
- /* @__PURE__ */ v("div", {
218
+ /* @__PURE__ */ m("div", {
219
219
  className: "mt-2 flex items-center justify-between text-xs text-text-secondary",
220
- children: [/* @__PURE__ */ _("span", { children: S("healthybowl.financial.budgetManagement.utilization.spent", "Spent: {{amount}}", { amount: t(Y) }) }), /* @__PURE__ */ _("span", { children: S("healthybowl.financial.budgetManagement.utilization.allocated", "Allocated: {{amount}}", { amount: t(J) }) })]
220
+ children: [/* @__PURE__ */ p("span", { children: w("healthybowl.financial.budgetManagement.utilization.spent", "Spent: {{amount}}", { amount: t(Y) }) }), /* @__PURE__ */ p("span", { children: w("healthybowl.financial.budgetManagement.utilization.allocated", "Allocated: {{amount}}", { amount: t(J) }) })]
221
221
  })
222
222
  ]
223
223
  }),
224
- /* @__PURE__ */ v("div", {
224
+ /* @__PURE__ */ m("div", {
225
225
  className: "flex flex-wrap items-center gap-3",
226
- children: [/* @__PURE__ */ _("div", {
226
+ children: [/* @__PURE__ */ p("div", {
227
227
  className: "flex gap-1.5",
228
228
  children: [
229
229
  "all",
230
230
  "on_track",
231
231
  "warning",
232
232
  "over_budget"
233
- ].map((t) => /* @__PURE__ */ _("button", {
234
- onClick: () => R(t),
235
- className: e("rounded-md px-3 py-1.5 text-xs font-medium capitalize transition-colors", L === t ? "bg-foreground text-background" : "border border-border-subtle text-text-secondary hover:text-text-primary"),
236
- children: N[t]
233
+ ].map((t) => /* @__PURE__ */ p("button", {
234
+ type: "button",
235
+ onClick: () => z(t),
236
+ className: e("rounded-md px-3 py-1.5 text-xs font-medium capitalize transition-colors", R === t ? "bg-foreground text-background" : "border border-border-subtle text-text-secondary hover:text-text-primary"),
237
+ children: P[t]
237
238
  }, t))
238
- }), /* @__PURE__ */ v("select", {
239
- value: z,
240
- onChange: (e) => ue(e.target.value),
241
- className: "h-8 rounded-md border border-border-subtle bg-bg-surface px-2 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
242
- children: [/* @__PURE__ */ _("option", {
239
+ }), /* @__PURE__ */ m(g, {
240
+ value: B,
241
+ onValueChange: he,
242
+ children: [/* @__PURE__ */ p(y, {
243
+ className: "h-8 w-auto",
244
+ children: /* @__PURE__ */ p(b, { placeholder: w("healthybowl.financial.budgetManagement.filters.allPeriods", "All Periods") })
245
+ }), /* @__PURE__ */ m(_, { children: [/* @__PURE__ */ p(v, {
243
246
  value: "all",
244
- children: S("healthybowl.financial.budgetManagement.filters.allPeriods", "All Periods")
245
- }), b.map((e) => /* @__PURE__ */ _("option", {
247
+ children: w("healthybowl.financial.budgetManagement.filters.allPeriods", "All Periods")
248
+ }), S.map((e) => /* @__PURE__ */ p(v, {
246
249
  value: e,
247
250
  children: e
248
- }, e))]
251
+ }, e))] })]
249
252
  })]
250
253
  }),
251
- /* @__PURE__ */ _("div", {
254
+ /* @__PURE__ */ p("div", {
252
255
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
253
256
  children: q.map((n) => {
254
257
  let r = Math.round(n.spent / n.allocated * 100), i = Math.min(100, r);
255
- return /* @__PURE__ */ v("div", {
258
+ return /* @__PURE__ */ m("div", {
256
259
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
257
260
  children: [
258
- /* @__PURE__ */ v("div", {
261
+ /* @__PURE__ */ m("div", {
259
262
  className: "flex items-start justify-between",
260
- children: [/* @__PURE__ */ v("div", {
263
+ children: [/* @__PURE__ */ m("div", {
261
264
  className: "flex items-center gap-2",
262
- children: [/* @__PURE__ */ _(h, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("h3", {
265
+ children: [/* @__PURE__ */ p(d, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ p("h3", {
263
266
  className: "text-sm font-semibold text-text-primary",
264
267
  children: n.name
265
268
  })]
266
- }), /* @__PURE__ */ v("div", {
269
+ }), /* @__PURE__ */ m("div", {
267
270
  className: "flex items-center gap-1.5",
268
271
  children: [
269
- /* @__PURE__ */ _(ee, {
270
- label: P(n.status ?? "unknown"),
271
- variant: se(n.status ?? "unknown")
272
+ /* @__PURE__ */ p(ee, {
273
+ label: F(n.status ?? "unknown"),
274
+ variant: de(n.status ?? "unknown")
272
275
  }),
273
- /* @__PURE__ */ _("button", {
274
- onClick: () => he(n.id),
275
- className: "rounded-md p-1 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
276
- title: S("healthybowl.financial.budgetManagement.actions.edit", "Edit Budget"),
277
- children: /* @__PURE__ */ _(u, { className: "h-3.5 w-3.5" })
276
+ /* @__PURE__ */ p(h, {
277
+ variant: "ghost",
278
+ size: "icon-sm",
279
+ onClick: () => xe(n.id),
280
+ title: w("healthybowl.financial.budgetManagement.actions.edit", "Edit Budget"),
281
+ "aria-label": w("healthybowl.financial.budgetManagement.actions.edit", "Edit Budget"),
282
+ children: /* @__PURE__ */ p(se, { className: "h-3.5 w-3.5" })
278
283
  }),
279
- /* @__PURE__ */ _("button", {
280
- onClick: () => ge(n.id, n.name),
281
- disabled: de === n.id,
282
- className: "rounded-md p-1 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-status-error-text disabled:opacity-50",
283
- title: S("healthybowl.financial.budgetManagement.actions.delete", "Delete Budget"),
284
- children: /* @__PURE__ */ _(p, { className: "h-3.5 w-3.5" })
284
+ /* @__PURE__ */ p(h, {
285
+ variant: "ghost",
286
+ size: "icon-sm",
287
+ onClick: () => Se(n.id, n.name),
288
+ disabled: _e === n.id,
289
+ className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
290
+ title: w("healthybowl.financial.budgetManagement.actions.delete", "Delete Budget"),
291
+ "aria-label": w("healthybowl.financial.budgetManagement.actions.delete", "Delete Budget"),
292
+ children: /* @__PURE__ */ p(ue, { className: "h-3.5 w-3.5" })
285
293
  })
286
294
  ]
287
295
  })]
288
296
  }),
289
- /* @__PURE__ */ v("p", {
297
+ /* @__PURE__ */ m("p", {
290
298
  className: "mt-1 text-xs text-text-secondary",
291
299
  children: [
292
- I(n.category ?? ""),
300
+ L(n.category ?? ""),
293
301
  " · ",
294
302
  n.period
295
303
  ]
296
304
  }),
297
- /* @__PURE__ */ v("div", {
305
+ /* @__PURE__ */ m("div", {
298
306
  className: "mt-4 space-y-1",
299
- children: [/* @__PURE__ */ v("div", {
307
+ children: [/* @__PURE__ */ m("div", {
300
308
  className: "flex justify-between text-xs text-text-secondary",
301
- children: [/* @__PURE__ */ _("span", { children: S("healthybowl.financial.budgetManagement.card.spent", "Spent") }), /* @__PURE__ */ v("span", {
309
+ children: [/* @__PURE__ */ p("span", { children: w("healthybowl.financial.budgetManagement.card.spent", "Spent") }), /* @__PURE__ */ m("span", {
302
310
  className: e(r > 100 ? "font-semibold text-status-error-text" : ""),
303
311
  children: [r, "%"]
304
312
  })]
305
- }), /* @__PURE__ */ _("div", {
313
+ }), /* @__PURE__ */ p("div", {
306
314
  className: "h-2.5 w-full rounded-full bg-bg-sunken",
307
- children: /* @__PURE__ */ _("div", {
308
- className: e("h-full rounded-full transition-all", y(r)),
315
+ children: /* @__PURE__ */ p("div", {
316
+ className: e("h-full rounded-full transition-all", x(r)),
309
317
  style: { width: `${i}%` }
310
318
  })
311
319
  })]
312
320
  }),
313
- /* @__PURE__ */ v("div", {
321
+ /* @__PURE__ */ m("div", {
314
322
  className: "mt-4 grid grid-cols-3 gap-2 text-center",
315
323
  children: [
316
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
324
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
317
325
  className: "text-xs text-text-secondary",
318
- children: S("healthybowl.financial.budgetManagement.card.allocated", "Allocated")
319
- }), /* @__PURE__ */ _("p", {
326
+ children: w("healthybowl.financial.budgetManagement.card.allocated", "Allocated")
327
+ }), /* @__PURE__ */ p("p", {
320
328
  className: "text-sm font-medium text-text-primary",
321
329
  children: t(n.allocated)
322
330
  })] }),
323
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
331
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
324
332
  className: "text-xs text-text-secondary",
325
- children: S("healthybowl.financial.budgetManagement.card.spent", "Spent")
326
- }), /* @__PURE__ */ _("p", {
333
+ children: w("healthybowl.financial.budgetManagement.card.spent", "Spent")
334
+ }), /* @__PURE__ */ p("p", {
327
335
  className: "text-sm font-medium text-text-primary",
328
336
  children: t(n.spent)
329
337
  })] }),
330
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
338
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
331
339
  className: "text-xs text-text-secondary",
332
- children: S("healthybowl.financial.budgetManagement.card.remaining", "Remaining")
333
- }), /* @__PURE__ */ _("p", {
340
+ children: w("healthybowl.financial.budgetManagement.card.remaining", "Remaining")
341
+ }), /* @__PURE__ */ p("p", {
334
342
  className: e("text-sm font-medium", n.remaining < 0 ? "text-status-error-text" : "text-text-primary"),
335
343
  children: t(n.remaining)
336
344
  })] })
@@ -340,67 +348,70 @@ var se = (e) => e === "on_track" ? "success" : e === "warning" ? "warning" : "er
340
348
  }, n.id);
341
349
  })
342
350
  }),
343
- q.length === 0 && (E.financial ? /* @__PURE__ */ _(ne, {}) : D.financial ? /* @__PURE__ */ _(i, { onRetry: O }) : /* @__PURE__ */ _("div", {
351
+ q.length === 0 && (D.financial ? /* @__PURE__ */ p(o, {}) : O.financial ? /* @__PURE__ */ p(i, { onRetry: k }) : /* @__PURE__ */ p("div", {
344
352
  className: "py-12 text-center text-sm text-text-secondary",
345
- children: S("healthybowl.financial.budgetManagement.emptyState.message", "No budgets matching the selected filters.")
353
+ children: w("healthybowl.financial.budgetManagement.emptyState.message", "No budgets matching the selected filters.")
346
354
  })),
347
- /* @__PURE__ */ _(re, {
348
- open: B,
355
+ /* @__PURE__ */ p(s, {
356
+ open: ge,
349
357
  onClose: Z,
350
- title: H ? S("healthybowl.financial.budgetManagement.modal.editTitle", "Edit Budget") : S("healthybowl.financial.budgetManagement.modal.createTitle", "Create Budget"),
351
- description: H ? S("healthybowl.financial.budgetManagement.modal.editDescription", "Update budget details") : S("healthybowl.financial.budgetManagement.modal.createDescription", "Set up a new budget category"),
352
- footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
358
+ title: H ? w("healthybowl.financial.budgetManagement.modal.editTitle", "Edit Budget") : w("healthybowl.financial.budgetManagement.modal.createTitle", "Create Budget"),
359
+ description: H ? w("healthybowl.financial.budgetManagement.modal.editDescription", "Update budget details") : w("healthybowl.financial.budgetManagement.modal.createDescription", "Set up a new budget category"),
360
+ footer: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(h, {
361
+ variant: "outline",
353
362
  onClick: Z,
354
- className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
355
- children: S("healthybowl.common.cancel", "Cancel")
356
- }), /* @__PURE__ */ _("button", {
357
- onClick: me,
358
- className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-opacity hover:opacity-90",
359
- children: H ? S("healthybowl.financial.budgetManagement.modal.update", "Update") : S("healthybowl.financial.budgetManagement.modal.create", "Create")
363
+ children: w("healthybowl.common.cancel", "Cancel")
364
+ }), /* @__PURE__ */ p(h, {
365
+ onClick: be,
366
+ children: H ? w("healthybowl.financial.budgetManagement.modal.update", "Update") : w("healthybowl.financial.budgetManagement.modal.create", "Create")
360
367
  })] }),
361
- children: /* @__PURE__ */ v("div", {
368
+ children: /* @__PURE__ */ m("div", {
362
369
  className: "grid gap-4",
363
370
  children: [
364
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
371
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
365
372
  className: "mb-1 block text-sm font-medium text-text-primary",
366
- children: S("healthybowl.financial.budgetManagement.form.name.label", "Budget Name *")
367
- }), /* @__PURE__ */ _("input", {
373
+ children: w("healthybowl.financial.budgetManagement.form.name.label", "Budget Name *")
374
+ }), /* @__PURE__ */ p("input", {
368
375
  type: "text",
369
376
  value: G.name,
370
377
  onChange: (e) => Q("name", e.target.value),
371
- placeholder: S("healthybowl.financial.budgetManagement.form.name.placeholder", "e.g., Seed & Planting"),
378
+ placeholder: w("healthybowl.financial.budgetManagement.form.name.placeholder", "e.g., Seed & Planting"),
372
379
  className: $
373
380
  })] }),
374
- /* @__PURE__ */ v("div", {
381
+ /* @__PURE__ */ m("div", {
375
382
  className: "grid gap-4 sm:grid-cols-2",
376
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
383
+ children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
377
384
  className: "mb-1 block text-sm font-medium text-text-primary",
378
- children: S("healthybowl.financial.budgetManagement.form.category.label", "Category *")
379
- }), /* @__PURE__ */ _("select", {
385
+ children: w("healthybowl.financial.budgetManagement.form.category.label", "Category *")
386
+ }), /* @__PURE__ */ m(g, {
380
387
  value: G.category,
381
- onChange: (e) => Q("category", e.target.value),
382
- className: e($, "cursor-pointer"),
383
- children: ce.map((e) => /* @__PURE__ */ _("option", {
388
+ onValueChange: (e) => Q("category", e),
389
+ children: [/* @__PURE__ */ p(y, {
390
+ className: "w-full",
391
+ children: /* @__PURE__ */ p(b, {})
392
+ }), /* @__PURE__ */ p(_, { children: fe.map((e) => /* @__PURE__ */ p(v, {
384
393
  value: e,
385
- children: F[e]
386
- }, e))
387
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
394
+ children: I[e]
395
+ }, e)) })]
396
+ })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
388
397
  className: "mb-1 block text-sm font-medium text-text-primary",
389
- children: S("healthybowl.financial.budgetManagement.form.period.label", "Period *")
390
- }), /* @__PURE__ */ _("select", {
398
+ children: w("healthybowl.financial.budgetManagement.form.period.label", "Period *")
399
+ }), /* @__PURE__ */ m(g, {
391
400
  value: G.period,
392
- onChange: (e) => Q("period", e.target.value),
393
- className: e($, "cursor-pointer"),
394
- children: b.map((e) => /* @__PURE__ */ _("option", {
401
+ onValueChange: (e) => Q("period", e),
402
+ children: [/* @__PURE__ */ p(y, {
403
+ className: "w-full",
404
+ children: /* @__PURE__ */ p(b, {})
405
+ }), /* @__PURE__ */ p(_, { children: S.map((e) => /* @__PURE__ */ p(v, {
395
406
  value: e,
396
407
  children: e
397
- }, e))
408
+ }, e)) })]
398
409
  })] })]
399
410
  }),
400
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
411
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
401
412
  className: "mb-1 block text-sm font-medium text-text-primary",
402
- children: S("healthybowl.financial.budgetManagement.form.allocated.label", "Allocated Amount *")
403
- }), /* @__PURE__ */ _("input", {
413
+ children: w("healthybowl.financial.budgetManagement.form.allocated.label", "Allocated Amount *")
414
+ }), /* @__PURE__ */ p("input", {
404
415
  type: "number",
405
416
  value: G.allocated,
406
417
  onChange: (e) => Q("allocated", e.target.value),
@@ -412,14 +423,14 @@ var se = (e) => e === "on_track" ? "success" : e === "warning" ? "warning" : "er
412
423
  ]
413
424
  })
414
425
  }),
415
- /* @__PURE__ */ _(te, {
416
- toasts: k,
417
- onDismiss: j
426
+ /* @__PURE__ */ p(te, {
427
+ toasts: A,
428
+ onDismiss: M
418
429
  })
419
430
  ]
420
431
  });
421
432
  };
422
433
  //#endregion
423
- export { S as BudgetManagementPage };
434
+ export { w as BudgetManagementPage };
424
435
 
425
436
  //# sourceMappingURL=BudgetManagementPage.js.map