@burdenoff/microfe-healthybowl 2026.625.6 → 2026.625.8

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 (43) hide show
  1. package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js +260 -251
  2. package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js.map +1 -1
  3. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +220 -207
  4. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js.map +1 -1
  5. package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js +233 -225
  6. package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js.map +1 -1
  7. package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js +232 -226
  8. package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js.map +1 -1
  9. package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js +193 -204
  10. package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js.map +1 -1
  11. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +1 -1
  12. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
  13. package/dist/healthybowl/pages/farm/FarmProfilePage.js +155 -153
  14. package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
  15. package/dist/healthybowl/pages/financial/FinancierAccessPage.js +191 -201
  16. package/dist/healthybowl/pages/financial/FinancierAccessPage.js.map +1 -1
  17. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +500 -509
  18. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
  19. package/dist/healthybowl/pages/network/CohortsPage.js +143 -155
  20. package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
  21. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +208 -201
  22. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js.map +1 -1
  23. package/dist/healthybowl/pages/pest-management/PestOverviewPage.js +2 -0
  24. package/dist/healthybowl/pages/pest-management/PestOverviewPage.js.map +1 -1
  25. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +209 -201
  26. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
  27. package/dist/healthybowl/pages/production/RecipeManagementPage.js +3 -3
  28. package/dist/healthybowl/pages/production/RecipeManagementPage.js.map +1 -1
  29. package/dist/healthybowl/pages/products/BatchesPage.js +312 -302
  30. package/dist/healthybowl/pages/products/BatchesPage.js.map +1 -1
  31. package/dist/healthybowl/pages/products/InventoryPage.js +236 -228
  32. package/dist/healthybowl/pages/products/InventoryPage.js.map +1 -1
  33. package/dist/healthybowl/pages/products/ProductsOverviewPage.js +373 -357
  34. package/dist/healthybowl/pages/products/ProductsOverviewPage.js.map +1 -1
  35. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +184 -182
  36. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js.map +1 -1
  37. package/dist/healthybowl/pages/traceability/QRCodesPage.js +49 -45
  38. package/dist/healthybowl/pages/traceability/QRCodesPage.js.map +1 -1
  39. package/dist/healthybowl/pages/traceability/SupplyChainPage.js +1 -0
  40. package/dist/healthybowl/pages/traceability/SupplyChainPage.js.map +1 -1
  41. package/dist/healthybowl/pages/traceability/TraceTrackingPage.js +53 -52
  42. package/dist/healthybowl/pages/traceability/TraceTrackingPage.js.map +1 -1
  43. package/package.json +1 -1
@@ -13,10 +13,11 @@ import { useHealthyBowlData as u } from "../../hooks/useHealthyBowlData.js";
13
13
  import { useToast as d } from "../../hooks/useToast.js";
14
14
  import { useState as f } from "react";
15
15
  import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
- import { ClipboardCheck as m, Plus as h, Trash2 as g } from "lucide-react";
17
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
16
+ import { ClipboardCheck as ee, Plus as m, Trash2 as h } from "lucide-react";
17
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
18
+ import { Button as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w } from "@burdenoff/fe-libs/ui";
18
19
  //#region src/healthybowl/pages/compliance/ComplianceAuditsPage.tsx
19
- var b = (e) => {
20
+ var T = (e) => {
20
21
  switch (e) {
21
22
  case "completed": return "success";
22
23
  case "scheduled": return "info";
@@ -24,139 +25,139 @@ var b = (e) => {
24
25
  case "failed": return "error";
25
26
  default: return "default";
26
27
  }
27
- }, x = (e) => {
28
+ }, E = (e) => {
28
29
  switch (e) {
29
30
  case "certification": return "default";
30
31
  case "internal": return "info";
31
32
  case "external": return "warning";
32
33
  default: return "muted";
33
34
  }
34
- }, S = {
35
+ }, D = {
35
36
  title: "",
36
37
  type: "internal",
37
38
  auditor: "",
38
39
  scheduledDate: ""
39
- }, C = () => {
40
- let { t: C } = p(), w = o(), { audits: T, createAudit: E, updateAudit: D, deleteAudit: O, errors: k, loadings: A, refetch: j } = u(), [M, N] = f(null), [P, F] = f(null), [I, L] = f(!1), [R, z] = f(S), [B, V] = f(!1), [H, U] = f({
40
+ }, O = () => {
41
+ let { t: O } = p(), k = o(), { audits: A, createAudit: j, updateAudit: te, deleteAudit: M, errors: N, loadings: P, refetch: F } = u(), [I, L] = f(null), [R, z] = f(null), [B, V] = f(!1), [H, U] = f(D), [W, G] = f(!1), [K, q] = f({
41
42
  status: "completed",
42
43
  score: "",
43
44
  findings: "",
44
45
  criticalFindings: "",
45
46
  completedDate: ""
46
- }), [W, G] = f(!1), { toasts: K, toast: q, dismiss: J } = d(), Y = T.find((e) => e.id === M), X = async (e, t) => {
47
- if (await w({ message: C("healthybowl.compliance.audits.confirm.delete", "Delete the audit \"{{title}}\"? This cannot be undone.", { title: t }) })) {
48
- F(e);
47
+ }), [J, Y] = f(!1), { toasts: X, toast: Z, dismiss: ne } = d(), Q = A.find((e) => e.id === I), re = async (e, t) => {
48
+ if (await k({ message: O("healthybowl.compliance.audits.confirm.delete", "Delete the audit \"{{title}}\"? This cannot be undone.", { title: t }) })) {
49
+ z(e);
49
50
  try {
50
- await O(e), M === e && N(null), q({
51
- title: C("healthybowl.compliance.audits.toast.deleted", "Audit deleted"),
51
+ await M(e), I === e && L(null), Z({
52
+ title: O("healthybowl.compliance.audits.toast.deleted", "Audit deleted"),
52
53
  variant: "success"
53
54
  });
54
55
  } catch (e) {
55
- q({
56
- title: C("healthybowl.compliance.audits.toast.deleteFailed", "Failed to delete audit"),
57
- description: e instanceof Error ? e.message : C("healthybowl.compliance.audits.error.unknown", "Unknown error"),
56
+ Z({
57
+ title: O("healthybowl.compliance.audits.toast.deleteFailed", "Failed to delete audit"),
58
+ description: e instanceof Error ? e.message : O("healthybowl.compliance.audits.error.unknown", "Unknown error"),
58
59
  variant: "error"
59
60
  });
60
61
  } finally {
61
- F(null);
62
+ z(null);
62
63
  }
63
64
  }
64
- }, Z = async (e) => {
65
- if (e.preventDefault(), !R.title || !R.auditor || !R.scheduledDate) {
66
- q({
67
- title: C("healthybowl.compliance.audits.toast.missingFields", "Missing required fields"),
68
- description: C("healthybowl.compliance.audits.toast.missingFieldsDesc", "Please fill in title, auditor, and date."),
65
+ }, $ = async (e) => {
66
+ if (e.preventDefault(), !H.title || !H.auditor || !H.scheduledDate) {
67
+ Z({
68
+ title: O("healthybowl.compliance.audits.toast.missingFields", "Missing required fields"),
69
+ description: O("healthybowl.compliance.audits.toast.missingFieldsDesc", "Please fill in title, auditor, and date."),
69
70
  variant: "warning"
70
71
  });
71
72
  return;
72
73
  }
73
74
  try {
74
- await E({
75
- title: R.title,
76
- type: R.type,
77
- auditor: R.auditor,
78
- scheduledDate: R.scheduledDate
79
- }), L(!1), z(S), q({
80
- title: C("healthybowl.compliance.audits.toast.scheduled", "Audit scheduled successfully."),
75
+ await j({
76
+ title: H.title,
77
+ type: H.type,
78
+ auditor: H.auditor,
79
+ scheduledDate: H.scheduledDate
80
+ }), V(!1), U(D), Z({
81
+ title: O("healthybowl.compliance.audits.toast.scheduled", "Audit scheduled successfully."),
81
82
  variant: "success"
82
83
  });
83
84
  } catch (e) {
84
- q({
85
- title: C("healthybowl.compliance.audits.toast.scheduleFailed", "Failed to schedule audit"),
86
- description: e instanceof Error ? e.message : C("healthybowl.compliance.audits.error.unknown", "Unknown error"),
85
+ Z({
86
+ title: O("healthybowl.compliance.audits.toast.scheduleFailed", "Failed to schedule audit"),
87
+ description: e instanceof Error ? e.message : O("healthybowl.compliance.audits.error.unknown", "Unknown error"),
87
88
  variant: "error"
88
89
  });
89
90
  }
90
- }, Q = () => {
91
- Y && (U({
92
- status: Y.status === "scheduled" ? "completed" : Y.status,
93
- score: Y.score == null ? "" : String(Y.score),
94
- findings: String(Y.findings ?? 0),
95
- criticalFindings: String(Y.criticalFindings ?? 0),
96
- completedDate: Y.completedDate ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]
97
- }), V(!0));
98
- }, $ = async () => {
99
- if (Y) {
100
- G(!0);
91
+ }, ie = () => {
92
+ Q && (q({
93
+ status: Q.status === "scheduled" ? "completed" : Q.status,
94
+ score: Q.score == null ? "" : String(Q.score),
95
+ findings: String(Q.findings ?? 0),
96
+ criticalFindings: String(Q.criticalFindings ?? 0),
97
+ completedDate: Q.completedDate ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]
98
+ }), G(!0));
99
+ }, ae = async () => {
100
+ if (Q) {
101
+ Y(!0);
101
102
  try {
102
- let e = H.score === "" ? void 0 : Number(H.score), t = H.findings === "" ? void 0 : Number(H.findings), n = H.criticalFindings === "" ? void 0 : Number(H.criticalFindings);
103
+ let e = K.score === "" ? void 0 : Number(K.score), t = K.findings === "" ? void 0 : Number(K.findings), n = K.criticalFindings === "" ? void 0 : Number(K.criticalFindings);
103
104
  if (e != null && (isNaN(e) || e < 0 || e > 100)) {
104
- q({
105
- title: C("healthybowl.compliance.audits.toast.scoreRange", "Score must be 0–100"),
105
+ Z({
106
+ title: O("healthybowl.compliance.audits.toast.scoreRange", "Score must be 0–100"),
106
107
  variant: "warning"
107
- }), G(!1);
108
+ }), Y(!1);
108
109
  return;
109
110
  }
110
111
  if (t != null && (isNaN(t) || !Number.isInteger(t) || t < 0)) {
111
- q({
112
- title: C("healthybowl.compliance.audits.toast.findingsInteger", "Findings must be a non-negative integer"),
112
+ Z({
113
+ title: O("healthybowl.compliance.audits.toast.findingsInteger", "Findings must be a non-negative integer"),
113
114
  variant: "warning"
114
- }), G(!1);
115
+ }), Y(!1);
115
116
  return;
116
117
  }
117
118
  if (n != null && (isNaN(n) || !Number.isInteger(n) || n < 0)) {
118
- q({
119
- title: C("healthybowl.compliance.audits.toast.criticalFindingsInteger", "Critical findings must be a non-negative integer"),
119
+ Z({
120
+ title: O("healthybowl.compliance.audits.toast.criticalFindingsInteger", "Critical findings must be a non-negative integer"),
120
121
  variant: "warning"
121
- }), G(!1);
122
+ }), Y(!1);
122
123
  return;
123
124
  }
124
125
  if (t != null && n != null && n > t) {
125
- q({
126
- title: C("healthybowl.compliance.audits.toast.criticalExceeds", "Critical findings cannot exceed total findings"),
126
+ Z({
127
+ title: O("healthybowl.compliance.audits.toast.criticalExceeds", "Critical findings cannot exceed total findings"),
127
128
  variant: "warning"
128
- }), G(!1);
129
+ }), Y(!1);
129
130
  return;
130
131
  }
131
- await D({
132
- id: Y.id,
133
- status: H.status,
134
- completedDate: H.completedDate || void 0,
132
+ await te({
133
+ id: Q.id,
134
+ status: K.status,
135
+ completedDate: K.completedDate || void 0,
135
136
  score: e,
136
137
  findings: t == null ? void 0 : Math.round(t),
137
138
  criticalFindings: n == null ? void 0 : Math.round(n)
138
- }), q({
139
- title: C("healthybowl.compliance.audits.toast.outcomeRecorded", "Outcome recorded"),
140
- description: C("healthybowl.compliance.audits.toast.outcomeRecordedDesc", "{{title}} has been updated.", { title: Y.title }),
139
+ }), Z({
140
+ title: O("healthybowl.compliance.audits.toast.outcomeRecorded", "Outcome recorded"),
141
+ description: O("healthybowl.compliance.audits.toast.outcomeRecordedDesc", "{{title}} has been updated.", { title: Q.title }),
141
142
  variant: "success"
142
- }), V(!1);
143
+ }), G(!1);
143
144
  } catch (e) {
144
- q({
145
- title: C("healthybowl.compliance.audits.toast.outcomeFailed", "Failed to record outcome"),
146
- description: e instanceof Error ? e.message : C("healthybowl.compliance.audits.error.unknown", "Unknown error"),
145
+ Z({
146
+ title: O("healthybowl.compliance.audits.toast.outcomeFailed", "Failed to record outcome"),
147
+ description: e instanceof Error ? e.message : O("healthybowl.compliance.audits.error.unknown", "Unknown error"),
147
148
  variant: "error"
148
149
  });
149
150
  } finally {
150
- G(!1);
151
+ Y(!1);
151
152
  }
152
153
  }
153
- }, ee = [
154
+ }, oe = [
154
155
  {
155
156
  key: "title",
156
- header: C("healthybowl.compliance.audits.table.headers.audit", "Audit"),
157
- render: (e) => /* @__PURE__ */ y("div", {
157
+ header: O("healthybowl.compliance.audits.table.headers.audit", "Audit"),
158
+ render: (e) => /* @__PURE__ */ v("div", {
158
159
  className: "flex items-center gap-2",
159
- children: [/* @__PURE__ */ v(m, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ v("span", {
160
+ children: [/* @__PURE__ */ _(ee, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("span", {
160
161
  className: "font-medium",
161
162
  children: e.title
162
163
  })]
@@ -164,49 +165,49 @@ var b = (e) => {
164
165
  },
165
166
  {
166
167
  key: "type",
167
- header: C("healthybowl.compliance.audits.table.headers.type", "Type"),
168
- render: (e) => /* @__PURE__ */ v(r, {
168
+ header: O("healthybowl.compliance.audits.table.headers.type", "Type"),
169
+ render: (e) => /* @__PURE__ */ _(r, {
169
170
  label: e.type,
170
- variant: x(e.type)
171
+ variant: E(e.type)
171
172
  })
172
173
  },
173
174
  {
174
175
  key: "auditor",
175
- header: C("healthybowl.compliance.audits.table.headers.auditor", "Auditor")
176
+ header: O("healthybowl.compliance.audits.table.headers.auditor", "Auditor")
176
177
  },
177
178
  {
178
179
  key: "scheduledDate",
179
- header: C("healthybowl.compliance.audits.table.headers.date", "Date"),
180
- render: (t) => /* @__PURE__ */ v("span", { children: e(t.scheduledDate) })
180
+ header: O("healthybowl.compliance.audits.table.headers.date", "Date"),
181
+ render: (t) => /* @__PURE__ */ _("span", { children: e(t.scheduledDate) })
181
182
  },
182
183
  {
183
184
  key: "status",
184
- header: C("healthybowl.compliance.audits.table.headers.status", "Status"),
185
- render: (e) => /* @__PURE__ */ v(r, {
185
+ header: O("healthybowl.compliance.audits.table.headers.status", "Status"),
186
+ render: (e) => /* @__PURE__ */ _(r, {
186
187
  label: (e.status ?? "unknown").replace(/_/g, " "),
187
- variant: b(e.status ?? "unknown")
188
+ variant: T(e.status ?? "unknown")
188
189
  })
189
190
  },
190
191
  {
191
192
  key: "findings",
192
- header: C("healthybowl.compliance.audits.table.headers.findings", "Findings"),
193
- render: (e) => /* @__PURE__ */ v("span", { children: e.findings })
193
+ header: O("healthybowl.compliance.audits.table.headers.findings", "Findings"),
194
+ render: (e) => /* @__PURE__ */ _("span", { children: e.findings })
194
195
  },
195
196
  {
196
197
  key: "criticalFindings",
197
- header: C("healthybowl.compliance.audits.table.headers.critical", "Critical"),
198
- render: (e) => /* @__PURE__ */ v("span", {
198
+ header: O("healthybowl.compliance.audits.table.headers.critical", "Critical"),
199
+ render: (e) => /* @__PURE__ */ _("span", {
199
200
  className: e.criticalFindings > 0 ? "font-medium text-status-error-text" : "text-text-primary",
200
201
  children: e.criticalFindings
201
202
  })
202
203
  },
203
204
  {
204
205
  key: "score",
205
- header: C("healthybowl.compliance.audits.table.headers.score", "Score"),
206
- render: (e) => e.score == null ? /* @__PURE__ */ v("span", {
206
+ header: O("healthybowl.compliance.audits.table.headers.score", "Score"),
207
+ render: (e) => e.score == null ? /* @__PURE__ */ _("span", {
207
208
  className: "text-text-secondary",
208
209
  children: "-"
209
- }) : /* @__PURE__ */ y("span", {
210
+ }) : /* @__PURE__ */ v("span", {
210
211
  className: e.score >= 90 ? "font-medium text-success" : "text-text-primary",
211
212
  children: [e.score, "%"]
212
213
  })
@@ -214,210 +215,216 @@ var b = (e) => {
214
215
  {
215
216
  key: "actions",
216
217
  header: "",
217
- render: (e) => /* @__PURE__ */ v("button", {
218
+ render: (e) => /* @__PURE__ */ _(y, {
219
+ variant: "ghost",
220
+ size: "icon-sm",
218
221
  onClick: (t) => {
219
- t.stopPropagation(), X(e.id, e.title);
222
+ t.stopPropagation(), re(e.id, e.title);
220
223
  },
221
- disabled: P === e.id,
222
- className: "rounded-md p-1 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-status-error-text disabled:opacity-50",
223
- title: C("healthybowl.compliance.audits.actions.delete", "Delete audit"),
224
- children: /* @__PURE__ */ v(g, { className: "h-3.5 w-3.5" })
224
+ disabled: R === e.id,
225
+ className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
226
+ title: O("healthybowl.compliance.audits.actions.delete", "Delete audit"),
227
+ "aria-label": O("healthybowl.compliance.audits.actions.delete", "Delete audit"),
228
+ children: /* @__PURE__ */ _(h, { className: "h-3.5 w-3.5" })
225
229
  })
226
230
  }
227
231
  ];
228
- return /* @__PURE__ */ y(t, {
229
- title: C("healthybowl.compliance.audits.title", "Compliance Audits"),
230
- description: C("healthybowl.compliance.audits.description", "Track audit schedules and results"),
231
- actions: /* @__PURE__ */ y("button", {
232
- onClick: () => L(!0),
233
- className: "flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
232
+ return /* @__PURE__ */ v(t, {
233
+ title: O("healthybowl.compliance.audits.title", "Compliance Audits"),
234
+ description: O("healthybowl.compliance.audits.description", "Track audit schedules and results"),
235
+ actions: /* @__PURE__ */ v(y, {
236
+ onClick: () => V(!0),
234
237
  children: [
235
- /* @__PURE__ */ v(h, { className: "h-4 w-4" }),
238
+ /* @__PURE__ */ _(m, { className: "h-4 w-4" }),
236
239
  " ",
237
- C("healthybowl.compliance.audits.actions.schedule", "Schedule Audit")
240
+ O("healthybowl.compliance.audits.actions.schedule", "Schedule Audit")
238
241
  ]
239
242
  }),
240
243
  children: [
241
- A.compliance ? /* @__PURE__ */ v(s, {}) : k.compliance ? /* @__PURE__ */ v(i, { onRetry: j }) : /* @__PURE__ */ v(n, {
242
- columns: ee,
243
- data: T,
244
+ P.compliance ? /* @__PURE__ */ _(s, {}) : N.compliance ? /* @__PURE__ */ _(i, { onRetry: F }) : /* @__PURE__ */ _(n, {
245
+ columns: oe,
246
+ data: A,
244
247
  keyField: "id",
245
- onRowClick: (e) => N(M === e.id ? null : e.id),
246
- emptyMessage: C("healthybowl.compliance.audits.emptyState.message", "No audits found")
248
+ onRowClick: (e) => L(I === e.id ? null : e.id),
249
+ emptyMessage: O("healthybowl.compliance.audits.emptyState.message", "No audits found")
247
250
  }),
248
- /* @__PURE__ */ v(l, {}),
249
- Y && /* @__PURE__ */ y("div", {
251
+ /* @__PURE__ */ _(l, {}),
252
+ Q && /* @__PURE__ */ v("div", {
250
253
  className: "rounded-lg border border-primary/30 bg-bg-surface p-5",
251
- children: [/* @__PURE__ */ y("div", {
254
+ children: [/* @__PURE__ */ v("div", {
252
255
  className: "flex items-center justify-between mb-3",
253
- children: [/* @__PURE__ */ v("h3", {
256
+ children: [/* @__PURE__ */ _("h3", {
254
257
  className: "text-sm font-semibold text-text-primary",
255
- children: Y.title
256
- }), /* @__PURE__ */ y("div", {
258
+ children: Q.title
259
+ }), /* @__PURE__ */ v("div", {
257
260
  className: "flex items-center gap-3",
258
- children: [/* @__PURE__ */ v("button", {
259
- onClick: Q,
260
- className: "rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90",
261
- children: C("healthybowl.compliance.audits.actions.recordOutcome", "Record Outcome")
262
- }), /* @__PURE__ */ v("button", {
263
- onClick: () => N(null),
264
- className: "text-xs text-text-secondary hover:text-text-primary",
265
- children: C("healthybowl.common.close", "Close")
261
+ children: [/* @__PURE__ */ _(y, {
262
+ size: "sm",
263
+ onClick: ie,
264
+ children: O("healthybowl.compliance.audits.actions.recordOutcome", "Record Outcome")
265
+ }), /* @__PURE__ */ _(y, {
266
+ variant: "ghost",
267
+ size: "sm",
268
+ onClick: () => L(null),
269
+ className: "text-text-secondary",
270
+ children: O("healthybowl.common.close", "Close")
266
271
  })]
267
272
  })]
268
- }), /* @__PURE__ */ y("div", {
273
+ }), /* @__PURE__ */ v("div", {
269
274
  className: "grid grid-cols-2 gap-3 text-sm",
270
275
  children: [
271
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
276
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
272
277
  className: "text-text-secondary",
273
- children: C("healthybowl.compliance.audits.detail.type", "Type: ")
274
- }), /* @__PURE__ */ v("span", {
278
+ children: O("healthybowl.compliance.audits.detail.type", "Type: ")
279
+ }), /* @__PURE__ */ _("span", {
275
280
  className: "text-text-primary",
276
- children: Y.type
281
+ children: Q.type
277
282
  })] }),
278
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
283
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
279
284
  className: "text-text-secondary",
280
- children: C("healthybowl.compliance.audits.detail.auditor", "Auditor: ")
281
- }), /* @__PURE__ */ v("span", {
285
+ children: O("healthybowl.compliance.audits.detail.auditor", "Auditor: ")
286
+ }), /* @__PURE__ */ _("span", {
282
287
  className: "text-text-primary",
283
- children: Y.auditor
288
+ children: Q.auditor
284
289
  })] }),
285
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
290
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
286
291
  className: "text-text-secondary",
287
- children: C("healthybowl.compliance.audits.detail.date", "Date: ")
288
- }), /* @__PURE__ */ v("span", {
292
+ children: O("healthybowl.compliance.audits.detail.date", "Date: ")
293
+ }), /* @__PURE__ */ _("span", {
289
294
  className: "text-text-primary",
290
- children: e(Y.scheduledDate)
295
+ children: e(Q.scheduledDate)
291
296
  })] }),
292
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
297
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
293
298
  className: "text-text-secondary",
294
- children: C("healthybowl.compliance.audits.detail.score", "Score: ")
295
- }), /* @__PURE__ */ v("span", {
299
+ children: O("healthybowl.compliance.audits.detail.score", "Score: ")
300
+ }), /* @__PURE__ */ _("span", {
296
301
  className: "text-text-primary",
297
- children: Y.score == null ? C("healthybowl.compliance.audits.detail.notAvailable", "N/A") : `${Y.score}%`
302
+ children: Q.score == null ? O("healthybowl.compliance.audits.detail.notAvailable", "N/A") : `${Q.score}%`
298
303
  })] }),
299
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
304
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
300
305
  className: "text-text-secondary",
301
- children: C("healthybowl.compliance.audits.detail.findings", "Findings: ")
302
- }), /* @__PURE__ */ v("span", {
306
+ children: O("healthybowl.compliance.audits.detail.findings", "Findings: ")
307
+ }), /* @__PURE__ */ _("span", {
303
308
  className: "text-text-primary",
304
- children: Y.findings
309
+ children: Q.findings
305
310
  })] }),
306
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
311
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
307
312
  className: "text-text-secondary",
308
- children: C("healthybowl.compliance.audits.detail.critical", "Critical: ")
309
- }), /* @__PURE__ */ v("span", {
310
- className: Y.criticalFindings > 0 ? "font-medium text-status-error-text" : "text-text-primary",
311
- children: Y.criticalFindings
313
+ children: O("healthybowl.compliance.audits.detail.critical", "Critical: ")
314
+ }), /* @__PURE__ */ _("span", {
315
+ className: Q.criticalFindings > 0 ? "font-medium text-status-error-text" : "text-text-primary",
316
+ children: Q.criticalFindings
312
317
  })] })
313
318
  ]
314
319
  })]
315
320
  }),
316
- /* @__PURE__ */ v(c, {
317
- open: B,
318
- onClose: () => V(!1),
319
- title: C("healthybowl.compliance.audits.outcomeModal.title", "Record Audit Outcome"),
320
- description: C("healthybowl.compliance.audits.outcomeModal.description", "Record the result for {{title}}", { title: Y?.title ?? C("healthybowl.compliance.audits.outcomeModal.thisAudit", "this audit") }),
321
+ /* @__PURE__ */ _(c, {
322
+ open: W,
323
+ onClose: () => G(!1),
324
+ title: O("healthybowl.compliance.audits.outcomeModal.title", "Record Audit Outcome"),
325
+ description: O("healthybowl.compliance.audits.outcomeModal.description", "Record the result for {{title}}", { title: Q?.title ?? O("healthybowl.compliance.audits.outcomeModal.thisAudit", "this audit") }),
321
326
  size: "lg",
322
- footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
323
- onClick: () => V(!1),
324
- className: "rounded-md border border-border-subtle px-4 py-2 text-sm text-text-secondary hover:text-text-primary",
325
- children: C("healthybowl.common.cancel", "Cancel")
326
- }), /* @__PURE__ */ v("button", {
327
- onClick: $,
328
- disabled: W,
329
- className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
330
- children: W ? C("healthybowl.compliance.audits.outcomeModal.saving", "Saving...") : C("healthybowl.compliance.audits.outcomeModal.save", "Save Outcome")
327
+ footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(y, {
328
+ variant: "outline",
329
+ onClick: () => G(!1),
330
+ className: "text-text-secondary",
331
+ children: O("healthybowl.common.cancel", "Cancel")
332
+ }), /* @__PURE__ */ _(y, {
333
+ onClick: ae,
334
+ disabled: J,
335
+ children: J ? O("healthybowl.compliance.audits.outcomeModal.saving", "Saving...") : O("healthybowl.compliance.audits.outcomeModal.save", "Save Outcome")
331
336
  })] }),
332
- children: /* @__PURE__ */ y("div", {
337
+ children: /* @__PURE__ */ v("div", {
333
338
  className: "grid gap-4 sm:grid-cols-2",
334
339
  children: [
335
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
340
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
336
341
  htmlFor: "outcome-status",
337
342
  className: "text-sm font-medium text-text-primary",
338
- children: C("healthybowl.compliance.audits.form.fields.status.label", "Status")
339
- }), /* @__PURE__ */ y("select", {
340
- id: "outcome-status",
341
- value: H.status,
342
- onChange: (e) => U((t) => ({
343
+ children: O("healthybowl.compliance.audits.form.fields.status.label", "Status")
344
+ }), /* @__PURE__ */ v(b, {
345
+ value: K.status,
346
+ onValueChange: (e) => q((t) => ({
343
347
  ...t,
344
- status: e.target.value
348
+ status: e
345
349
  })),
346
- className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
347
- children: [
348
- /* @__PURE__ */ v("option", {
350
+ children: [/* @__PURE__ */ _(C, {
351
+ id: "outcome-status",
352
+ className: "mt-1 w-full",
353
+ children: /* @__PURE__ */ _(w, {})
354
+ }), /* @__PURE__ */ v(x, { children: [
355
+ /* @__PURE__ */ _(S, {
349
356
  value: "scheduled",
350
- children: C("healthybowl.compliance.audits.status.scheduled", "Scheduled")
357
+ children: O("healthybowl.compliance.audits.status.scheduled", "Scheduled")
351
358
  }),
352
- /* @__PURE__ */ v("option", {
359
+ /* @__PURE__ */ _(S, {
353
360
  value: "in_progress",
354
- children: C("healthybowl.compliance.audits.status.inProgress", "In Progress")
361
+ children: O("healthybowl.compliance.audits.status.inProgress", "In Progress")
355
362
  }),
356
- /* @__PURE__ */ v("option", {
363
+ /* @__PURE__ */ _(S, {
357
364
  value: "completed",
358
- children: C("healthybowl.compliance.audits.status.completed", "Completed")
365
+ children: O("healthybowl.compliance.audits.status.completed", "Completed")
359
366
  }),
360
- /* @__PURE__ */ v("option", {
367
+ /* @__PURE__ */ _(S, {
361
368
  value: "failed",
362
- children: C("healthybowl.compliance.audits.status.failed", "Failed")
369
+ children: O("healthybowl.compliance.audits.status.failed", "Failed")
363
370
  })
364
- ]
371
+ ] })]
365
372
  })] }),
366
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
373
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
367
374
  htmlFor: "outcome-completed-date",
368
375
  className: "text-sm font-medium text-text-primary",
369
- children: C("healthybowl.compliance.audits.form.fields.completedDate.label", "Completed Date")
370
- }), /* @__PURE__ */ v("input", {
376
+ children: O("healthybowl.compliance.audits.form.fields.completedDate.label", "Completed Date")
377
+ }), /* @__PURE__ */ _("input", {
371
378
  id: "outcome-completed-date",
372
379
  type: "date",
373
- value: H.completedDate,
374
- onChange: (e) => U((t) => ({
380
+ value: K.completedDate,
381
+ onChange: (e) => q((t) => ({
375
382
  ...t,
376
383
  completedDate: e.target.value
377
384
  })),
378
385
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
379
386
  })] }),
380
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
387
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
381
388
  htmlFor: "outcome-score",
382
389
  className: "text-sm font-medium text-text-primary",
383
- children: C("healthybowl.compliance.audits.form.fields.score.label", "Score (%)")
384
- }), /* @__PURE__ */ v("input", {
390
+ children: O("healthybowl.compliance.audits.form.fields.score.label", "Score (%)")
391
+ }), /* @__PURE__ */ _("input", {
385
392
  id: "outcome-score",
386
393
  type: "number",
387
394
  min: 0,
388
395
  max: 100,
389
- value: H.score,
390
- onChange: (e) => U((t) => ({
396
+ value: K.score,
397
+ onChange: (e) => q((t) => ({
391
398
  ...t,
392
399
  score: e.target.value
393
400
  })),
394
401
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
395
402
  })] }),
396
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
403
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
397
404
  htmlFor: "outcome-findings",
398
405
  className: "text-sm font-medium text-text-primary",
399
- children: C("healthybowl.compliance.audits.form.fields.findings.label", "Findings")
400
- }), /* @__PURE__ */ v("input", {
406
+ children: O("healthybowl.compliance.audits.form.fields.findings.label", "Findings")
407
+ }), /* @__PURE__ */ _("input", {
401
408
  id: "outcome-findings",
402
409
  type: "number",
403
410
  min: 0,
404
- value: H.findings,
405
- onChange: (e) => U((t) => ({
411
+ value: K.findings,
412
+ onChange: (e) => q((t) => ({
406
413
  ...t,
407
414
  findings: e.target.value
408
415
  })),
409
416
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
410
417
  })] }),
411
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
418
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
412
419
  htmlFor: "outcome-critical-findings",
413
420
  className: "text-sm font-medium text-text-primary",
414
- children: C("healthybowl.compliance.audits.form.fields.criticalFindings.label", "Critical Findings")
415
- }), /* @__PURE__ */ v("input", {
421
+ children: O("healthybowl.compliance.audits.form.fields.criticalFindings.label", "Critical Findings")
422
+ }), /* @__PURE__ */ _("input", {
416
423
  id: "outcome-critical-findings",
417
424
  type: "number",
418
425
  min: 0,
419
- value: H.criticalFindings,
420
- onChange: (e) => U((t) => ({
426
+ value: K.criticalFindings,
427
+ onChange: (e) => q((t) => ({
421
428
  ...t,
422
429
  criticalFindings: e.target.value
423
430
  })),
@@ -426,90 +433,92 @@ var b = (e) => {
426
433
  ]
427
434
  })
428
435
  }),
429
- /* @__PURE__ */ v(c, {
430
- open: I,
436
+ /* @__PURE__ */ _(c, {
437
+ open: B,
431
438
  onClose: () => {
432
- L(!1), z(S);
439
+ V(!1), U(D);
433
440
  },
434
- title: C("healthybowl.compliance.audits.scheduleModal.title", "Schedule Audit"),
435
- description: C("healthybowl.compliance.audits.scheduleModal.description", "Schedule a new compliance audit."),
441
+ title: O("healthybowl.compliance.audits.scheduleModal.title", "Schedule Audit"),
442
+ description: O("healthybowl.compliance.audits.scheduleModal.description", "Schedule a new compliance audit."),
436
443
  size: "lg",
437
- footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
444
+ footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(y, {
445
+ variant: "outline",
438
446
  onClick: () => {
439
- L(!1), z(S);
447
+ V(!1), U(D);
440
448
  },
441
- className: "rounded-md border border-border-subtle px-4 py-2 text-sm text-text-secondary hover:text-text-primary",
442
- children: C("healthybowl.common.cancel", "Cancel")
443
- }), /* @__PURE__ */ v("button", {
444
- onClick: Z,
445
- className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
446
- children: C("healthybowl.compliance.audits.actions.schedule", "Schedule Audit")
449
+ className: "text-text-secondary",
450
+ children: O("healthybowl.common.cancel", "Cancel")
451
+ }), /* @__PURE__ */ _(y, {
452
+ onClick: $,
453
+ children: O("healthybowl.compliance.audits.actions.schedule", "Schedule Audit")
447
454
  })] }),
448
- children: /* @__PURE__ */ y("form", {
449
- onSubmit: Z,
455
+ children: /* @__PURE__ */ v("form", {
456
+ onSubmit: $,
450
457
  className: "grid gap-4 sm:grid-cols-2",
451
458
  children: [
452
- /* @__PURE__ */ y("div", {
459
+ /* @__PURE__ */ v("div", {
453
460
  className: "sm:col-span-2",
454
- children: [/* @__PURE__ */ v("label", {
461
+ children: [/* @__PURE__ */ _("label", {
455
462
  className: "text-sm font-medium text-text-primary",
456
- children: C("healthybowl.compliance.audits.form.fields.title.label", "Title *")
457
- }), /* @__PURE__ */ v("input", {
463
+ children: O("healthybowl.compliance.audits.form.fields.title.label", "Title *")
464
+ }), /* @__PURE__ */ _("input", {
458
465
  type: "text",
459
- value: R.title,
460
- onChange: (e) => z((t) => ({
466
+ value: H.title,
467
+ onChange: (e) => U((t) => ({
461
468
  ...t,
462
469
  title: e.target.value
463
470
  })),
464
- placeholder: C("healthybowl.compliance.audits.form.fields.title.placeholder", "e.g., Annual Organic Certification Audit"),
471
+ placeholder: O("healthybowl.compliance.audits.form.fields.title.placeholder", "e.g., Annual Organic Certification Audit"),
465
472
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
466
473
  })]
467
474
  }),
468
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
475
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
469
476
  className: "text-sm font-medium text-text-primary",
470
- children: C("healthybowl.compliance.audits.form.fields.type.label", "Type *")
471
- }), /* @__PURE__ */ y("select", {
472
- value: R.type,
473
- onChange: (e) => z((t) => ({
477
+ children: O("healthybowl.compliance.audits.form.fields.type.label", "Type *")
478
+ }), /* @__PURE__ */ v(b, {
479
+ value: H.type,
480
+ onValueChange: (e) => U((t) => ({
474
481
  ...t,
475
- type: e.target.value
482
+ type: e
476
483
  })),
477
- className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
478
- children: [
479
- /* @__PURE__ */ v("option", {
484
+ children: [/* @__PURE__ */ _(C, {
485
+ className: "mt-1 w-full",
486
+ children: /* @__PURE__ */ _(w, {})
487
+ }), /* @__PURE__ */ v(x, { children: [
488
+ /* @__PURE__ */ _(S, {
480
489
  value: "internal",
481
- children: C("healthybowl.compliance.audits.type.internal", "Internal")
490
+ children: O("healthybowl.compliance.audits.type.internal", "Internal")
482
491
  }),
483
- /* @__PURE__ */ v("option", {
492
+ /* @__PURE__ */ _(S, {
484
493
  value: "external",
485
- children: C("healthybowl.compliance.audits.type.external", "External")
494
+ children: O("healthybowl.compliance.audits.type.external", "External")
486
495
  }),
487
- /* @__PURE__ */ v("option", {
496
+ /* @__PURE__ */ _(S, {
488
497
  value: "certification",
489
- children: C("healthybowl.compliance.audits.type.certification", "Certification")
498
+ children: O("healthybowl.compliance.audits.type.certification", "Certification")
490
499
  })
491
- ]
500
+ ] })]
492
501
  })] }),
493
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
502
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
494
503
  className: "text-sm font-medium text-text-primary",
495
- children: C("healthybowl.compliance.audits.form.fields.auditor.label", "Auditor *")
496
- }), /* @__PURE__ */ v("input", {
504
+ children: O("healthybowl.compliance.audits.form.fields.auditor.label", "Auditor *")
505
+ }), /* @__PURE__ */ _("input", {
497
506
  type: "text",
498
- value: R.auditor,
499
- onChange: (e) => z((t) => ({
507
+ value: H.auditor,
508
+ onChange: (e) => U((t) => ({
500
509
  ...t,
501
510
  auditor: e.target.value
502
511
  })),
503
- placeholder: C("healthybowl.compliance.audits.form.fields.auditor.placeholder", "e.g., John Smith"),
512
+ placeholder: O("healthybowl.compliance.audits.form.fields.auditor.placeholder", "e.g., John Smith"),
504
513
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
505
514
  })] }),
506
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
515
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
507
516
  className: "text-sm font-medium text-text-primary",
508
- children: C("healthybowl.compliance.audits.form.fields.scheduledDate.label", "Scheduled Date *")
509
- }), /* @__PURE__ */ v("input", {
517
+ children: O("healthybowl.compliance.audits.form.fields.scheduledDate.label", "Scheduled Date *")
518
+ }), /* @__PURE__ */ _("input", {
510
519
  type: "date",
511
- value: R.scheduledDate,
512
- onChange: (e) => z((t) => ({
520
+ value: H.scheduledDate,
521
+ onChange: (e) => U((t) => ({
513
522
  ...t,
514
523
  scheduledDate: e.target.value
515
524
  })),
@@ -518,14 +527,14 @@ var b = (e) => {
518
527
  ]
519
528
  })
520
529
  }),
521
- /* @__PURE__ */ v(a, {
522
- toasts: K,
523
- onDismiss: J
530
+ /* @__PURE__ */ _(a, {
531
+ toasts: X,
532
+ onDismiss: ne
524
533
  })
525
534
  ]
526
535
  });
527
536
  };
528
537
  //#endregion
529
- export { C as ComplianceAuditsPage };
538
+ export { O as ComplianceAuditsPage };
530
539
 
531
540
  //# sourceMappingURL=ComplianceAuditsPage.js.map