@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.
- package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js +260 -251
- package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +220 -207
- package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js +233 -225
- package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js.map +1 -1
- package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js +232 -226
- package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js.map +1 -1
- package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js +193 -204
- package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +1 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js +155 -153
- package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancierAccessPage.js +191 -201
- package/dist/healthybowl/pages/financial/FinancierAccessPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +500 -509
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/CohortsPage.js +143 -155
- package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
- package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +208 -201
- package/dist/healthybowl/pages/pest-management/PestIssuesPage.js.map +1 -1
- package/dist/healthybowl/pages/pest-management/PestOverviewPage.js +2 -0
- package/dist/healthybowl/pages/pest-management/PestOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +209 -201
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
- package/dist/healthybowl/pages/production/RecipeManagementPage.js +3 -3
- package/dist/healthybowl/pages/production/RecipeManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/products/BatchesPage.js +312 -302
- package/dist/healthybowl/pages/products/BatchesPage.js.map +1 -1
- package/dist/healthybowl/pages/products/InventoryPage.js +236 -228
- package/dist/healthybowl/pages/products/InventoryPage.js.map +1 -1
- package/dist/healthybowl/pages/products/ProductsOverviewPage.js +373 -357
- package/dist/healthybowl/pages/products/ProductsOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +184 -182
- package/dist/healthybowl/pages/traceability/BatchTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/traceability/QRCodesPage.js +49 -45
- package/dist/healthybowl/pages/traceability/QRCodesPage.js.map +1 -1
- package/dist/healthybowl/pages/traceability/SupplyChainPage.js +1 -0
- package/dist/healthybowl/pages/traceability/SupplyChainPage.js.map +1 -1
- package/dist/healthybowl/pages/traceability/TraceTrackingPage.js +53 -52
- package/dist/healthybowl/pages/traceability/TraceTrackingPage.js.map +1 -1
- 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
|
|
17
|
-
import { Fragment as
|
|
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
|
|
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
|
-
},
|
|
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
|
-
},
|
|
35
|
+
}, D = {
|
|
35
36
|
title: "",
|
|
36
37
|
type: "internal",
|
|
37
38
|
auditor: "",
|
|
38
39
|
scheduledDate: ""
|
|
39
|
-
},
|
|
40
|
-
let { t:
|
|
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
|
-
}), [
|
|
47
|
-
if (await
|
|
48
|
-
|
|
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
|
|
51
|
-
title:
|
|
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
|
-
|
|
56
|
-
title:
|
|
57
|
-
description: e instanceof Error ? e.message :
|
|
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
|
-
|
|
62
|
+
z(null);
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
},
|
|
65
|
-
if (e.preventDefault(), !
|
|
66
|
-
|
|
67
|
-
title:
|
|
68
|
-
description:
|
|
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
|
|
75
|
-
title:
|
|
76
|
-
type:
|
|
77
|
-
auditor:
|
|
78
|
-
scheduledDate:
|
|
79
|
-
}),
|
|
80
|
-
title:
|
|
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
|
-
|
|
85
|
-
title:
|
|
86
|
-
description: e instanceof Error ? e.message :
|
|
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
|
-
},
|
|
91
|
-
|
|
92
|
-
status:
|
|
93
|
-
score:
|
|
94
|
-
findings: String(
|
|
95
|
-
criticalFindings: String(
|
|
96
|
-
completedDate:
|
|
97
|
-
}),
|
|
98
|
-
},
|
|
99
|
-
if (
|
|
100
|
-
|
|
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 =
|
|
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
|
-
|
|
105
|
-
title:
|
|
105
|
+
Z({
|
|
106
|
+
title: O("healthybowl.compliance.audits.toast.scoreRange", "Score must be 0–100"),
|
|
106
107
|
variant: "warning"
|
|
107
|
-
}),
|
|
108
|
+
}), Y(!1);
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
111
|
if (t != null && (isNaN(t) || !Number.isInteger(t) || t < 0)) {
|
|
111
|
-
|
|
112
|
-
title:
|
|
112
|
+
Z({
|
|
113
|
+
title: O("healthybowl.compliance.audits.toast.findingsInteger", "Findings must be a non-negative integer"),
|
|
113
114
|
variant: "warning"
|
|
114
|
-
}),
|
|
115
|
+
}), Y(!1);
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
118
|
if (n != null && (isNaN(n) || !Number.isInteger(n) || n < 0)) {
|
|
118
|
-
|
|
119
|
-
title:
|
|
119
|
+
Z({
|
|
120
|
+
title: O("healthybowl.compliance.audits.toast.criticalFindingsInteger", "Critical findings must be a non-negative integer"),
|
|
120
121
|
variant: "warning"
|
|
121
|
-
}),
|
|
122
|
+
}), Y(!1);
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
125
|
if (t != null && n != null && n > t) {
|
|
125
|
-
|
|
126
|
-
title:
|
|
126
|
+
Z({
|
|
127
|
+
title: O("healthybowl.compliance.audits.toast.criticalExceeds", "Critical findings cannot exceed total findings"),
|
|
127
128
|
variant: "warning"
|
|
128
|
-
}),
|
|
129
|
+
}), Y(!1);
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
|
-
await
|
|
132
|
-
id:
|
|
133
|
-
status:
|
|
134
|
-
completedDate:
|
|
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
|
-
}),
|
|
139
|
-
title:
|
|
140
|
-
description:
|
|
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
|
-
}),
|
|
143
|
+
}), G(!1);
|
|
143
144
|
} catch (e) {
|
|
144
|
-
|
|
145
|
-
title:
|
|
146
|
-
description: e instanceof Error ? e.message :
|
|
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
|
-
|
|
151
|
+
Y(!1);
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
|
-
},
|
|
154
|
+
}, oe = [
|
|
154
155
|
{
|
|
155
156
|
key: "title",
|
|
156
|
-
header:
|
|
157
|
-
render: (e) => /* @__PURE__ */
|
|
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__ */
|
|
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:
|
|
168
|
-
render: (e) => /* @__PURE__ */
|
|
168
|
+
header: O("healthybowl.compliance.audits.table.headers.type", "Type"),
|
|
169
|
+
render: (e) => /* @__PURE__ */ _(r, {
|
|
169
170
|
label: e.type,
|
|
170
|
-
variant:
|
|
171
|
+
variant: E(e.type)
|
|
171
172
|
})
|
|
172
173
|
},
|
|
173
174
|
{
|
|
174
175
|
key: "auditor",
|
|
175
|
-
header:
|
|
176
|
+
header: O("healthybowl.compliance.audits.table.headers.auditor", "Auditor")
|
|
176
177
|
},
|
|
177
178
|
{
|
|
178
179
|
key: "scheduledDate",
|
|
179
|
-
header:
|
|
180
|
-
render: (t) => /* @__PURE__ */
|
|
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:
|
|
185
|
-
render: (e) => /* @__PURE__ */
|
|
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:
|
|
188
|
+
variant: T(e.status ?? "unknown")
|
|
188
189
|
})
|
|
189
190
|
},
|
|
190
191
|
{
|
|
191
192
|
key: "findings",
|
|
192
|
-
header:
|
|
193
|
-
render: (e) => /* @__PURE__ */
|
|
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:
|
|
198
|
-
render: (e) => /* @__PURE__ */
|
|
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:
|
|
206
|
-
render: (e) => e.score == null ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
218
|
+
render: (e) => /* @__PURE__ */ _(y, {
|
|
219
|
+
variant: "ghost",
|
|
220
|
+
size: "icon-sm",
|
|
218
221
|
onClick: (t) => {
|
|
219
|
-
t.stopPropagation(),
|
|
222
|
+
t.stopPropagation(), re(e.id, e.title);
|
|
220
223
|
},
|
|
221
|
-
disabled:
|
|
222
|
-
className: "
|
|
223
|
-
title:
|
|
224
|
-
|
|
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__ */
|
|
229
|
-
title:
|
|
230
|
-
description:
|
|
231
|
-
actions: /* @__PURE__ */ y
|
|
232
|
-
onClick: () =>
|
|
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__ */
|
|
238
|
+
/* @__PURE__ */ _(m, { className: "h-4 w-4" }),
|
|
236
239
|
" ",
|
|
237
|
-
|
|
240
|
+
O("healthybowl.compliance.audits.actions.schedule", "Schedule Audit")
|
|
238
241
|
]
|
|
239
242
|
}),
|
|
240
243
|
children: [
|
|
241
|
-
|
|
242
|
-
columns:
|
|
243
|
-
data:
|
|
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) =>
|
|
246
|
-
emptyMessage:
|
|
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__ */
|
|
249
|
-
|
|
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__ */
|
|
254
|
+
children: [/* @__PURE__ */ v("div", {
|
|
252
255
|
className: "flex items-center justify-between mb-3",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ _("h3", {
|
|
254
257
|
className: "text-sm font-semibold text-text-primary",
|
|
255
|
-
children:
|
|
256
|
-
}), /* @__PURE__ */
|
|
258
|
+
children: Q.title
|
|
259
|
+
}), /* @__PURE__ */ v("div", {
|
|
257
260
|
className: "flex items-center gap-3",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
children:
|
|
262
|
-
}), /* @__PURE__ */
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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__ */
|
|
273
|
+
}), /* @__PURE__ */ v("div", {
|
|
269
274
|
className: "grid grid-cols-2 gap-3 text-sm",
|
|
270
275
|
children: [
|
|
271
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
272
277
|
className: "text-text-secondary",
|
|
273
|
-
children:
|
|
274
|
-
}), /* @__PURE__ */
|
|
278
|
+
children: O("healthybowl.compliance.audits.detail.type", "Type: ")
|
|
279
|
+
}), /* @__PURE__ */ _("span", {
|
|
275
280
|
className: "text-text-primary",
|
|
276
|
-
children:
|
|
281
|
+
children: Q.type
|
|
277
282
|
})] }),
|
|
278
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
279
284
|
className: "text-text-secondary",
|
|
280
|
-
children:
|
|
281
|
-
}), /* @__PURE__ */
|
|
285
|
+
children: O("healthybowl.compliance.audits.detail.auditor", "Auditor: ")
|
|
286
|
+
}), /* @__PURE__ */ _("span", {
|
|
282
287
|
className: "text-text-primary",
|
|
283
|
-
children:
|
|
288
|
+
children: Q.auditor
|
|
284
289
|
})] }),
|
|
285
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
286
291
|
className: "text-text-secondary",
|
|
287
|
-
children:
|
|
288
|
-
}), /* @__PURE__ */
|
|
292
|
+
children: O("healthybowl.compliance.audits.detail.date", "Date: ")
|
|
293
|
+
}), /* @__PURE__ */ _("span", {
|
|
289
294
|
className: "text-text-primary",
|
|
290
|
-
children: e(
|
|
295
|
+
children: e(Q.scheduledDate)
|
|
291
296
|
})] }),
|
|
292
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
293
298
|
className: "text-text-secondary",
|
|
294
|
-
children:
|
|
295
|
-
}), /* @__PURE__ */
|
|
299
|
+
children: O("healthybowl.compliance.audits.detail.score", "Score: ")
|
|
300
|
+
}), /* @__PURE__ */ _("span", {
|
|
296
301
|
className: "text-text-primary",
|
|
297
|
-
children:
|
|
302
|
+
children: Q.score == null ? O("healthybowl.compliance.audits.detail.notAvailable", "N/A") : `${Q.score}%`
|
|
298
303
|
})] }),
|
|
299
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
300
305
|
className: "text-text-secondary",
|
|
301
|
-
children:
|
|
302
|
-
}), /* @__PURE__ */
|
|
306
|
+
children: O("healthybowl.compliance.audits.detail.findings", "Findings: ")
|
|
307
|
+
}), /* @__PURE__ */ _("span", {
|
|
303
308
|
className: "text-text-primary",
|
|
304
|
-
children:
|
|
309
|
+
children: Q.findings
|
|
305
310
|
})] }),
|
|
306
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
307
312
|
className: "text-text-secondary",
|
|
308
|
-
children:
|
|
309
|
-
}), /* @__PURE__ */
|
|
310
|
-
className:
|
|
311
|
-
children:
|
|
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__ */
|
|
317
|
-
open:
|
|
318
|
-
onClose: () =>
|
|
319
|
-
title:
|
|
320
|
-
description:
|
|
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__ */
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
children:
|
|
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__ */
|
|
337
|
+
children: /* @__PURE__ */ v("div", {
|
|
333
338
|
className: "grid gap-4 sm:grid-cols-2",
|
|
334
339
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
336
341
|
htmlFor: "outcome-status",
|
|
337
342
|
className: "text-sm font-medium text-text-primary",
|
|
338
|
-
children:
|
|
339
|
-
}), /* @__PURE__ */
|
|
340
|
-
|
|
341
|
-
|
|
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
|
|
348
|
+
status: e
|
|
345
349
|
})),
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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:
|
|
357
|
+
children: O("healthybowl.compliance.audits.status.scheduled", "Scheduled")
|
|
351
358
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ _(S, {
|
|
353
360
|
value: "in_progress",
|
|
354
|
-
children:
|
|
361
|
+
children: O("healthybowl.compliance.audits.status.inProgress", "In Progress")
|
|
355
362
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ _(S, {
|
|
357
364
|
value: "completed",
|
|
358
|
-
children:
|
|
365
|
+
children: O("healthybowl.compliance.audits.status.completed", "Completed")
|
|
359
366
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ _(S, {
|
|
361
368
|
value: "failed",
|
|
362
|
-
children:
|
|
369
|
+
children: O("healthybowl.compliance.audits.status.failed", "Failed")
|
|
363
370
|
})
|
|
364
|
-
]
|
|
371
|
+
] })]
|
|
365
372
|
})] }),
|
|
366
|
-
/* @__PURE__ */
|
|
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:
|
|
370
|
-
}), /* @__PURE__ */
|
|
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:
|
|
374
|
-
onChange: (e) =>
|
|
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__ */
|
|
387
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
381
388
|
htmlFor: "outcome-score",
|
|
382
389
|
className: "text-sm font-medium text-text-primary",
|
|
383
|
-
children:
|
|
384
|
-
}), /* @__PURE__ */
|
|
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:
|
|
390
|
-
onChange: (e) =>
|
|
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__ */
|
|
403
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
397
404
|
htmlFor: "outcome-findings",
|
|
398
405
|
className: "text-sm font-medium text-text-primary",
|
|
399
|
-
children:
|
|
400
|
-
}), /* @__PURE__ */
|
|
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:
|
|
405
|
-
onChange: (e) =>
|
|
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__ */
|
|
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:
|
|
415
|
-
}), /* @__PURE__ */
|
|
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:
|
|
420
|
-
onChange: (e) =>
|
|
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__ */
|
|
430
|
-
open:
|
|
436
|
+
/* @__PURE__ */ _(c, {
|
|
437
|
+
open: B,
|
|
431
438
|
onClose: () => {
|
|
432
|
-
|
|
439
|
+
V(!1), U(D);
|
|
433
440
|
},
|
|
434
|
-
title:
|
|
435
|
-
description:
|
|
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__ */
|
|
444
|
+
footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(y, {
|
|
445
|
+
variant: "outline",
|
|
438
446
|
onClick: () => {
|
|
439
|
-
|
|
447
|
+
V(!1), U(D);
|
|
440
448
|
},
|
|
441
|
-
className: "
|
|
442
|
-
children:
|
|
443
|
-
}), /* @__PURE__ */
|
|
444
|
-
onClick:
|
|
445
|
-
|
|
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__ */
|
|
449
|
-
onSubmit:
|
|
455
|
+
children: /* @__PURE__ */ v("form", {
|
|
456
|
+
onSubmit: $,
|
|
450
457
|
className: "grid gap-4 sm:grid-cols-2",
|
|
451
458
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ v("div", {
|
|
453
460
|
className: "sm:col-span-2",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
461
|
+
children: [/* @__PURE__ */ _("label", {
|
|
455
462
|
className: "text-sm font-medium text-text-primary",
|
|
456
|
-
children:
|
|
457
|
-
}), /* @__PURE__ */
|
|
463
|
+
children: O("healthybowl.compliance.audits.form.fields.title.label", "Title *")
|
|
464
|
+
}), /* @__PURE__ */ _("input", {
|
|
458
465
|
type: "text",
|
|
459
|
-
value:
|
|
460
|
-
onChange: (e) =>
|
|
466
|
+
value: H.title,
|
|
467
|
+
onChange: (e) => U((t) => ({
|
|
461
468
|
...t,
|
|
462
469
|
title: e.target.value
|
|
463
470
|
})),
|
|
464
|
-
placeholder:
|
|
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__ */
|
|
475
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
469
476
|
className: "text-sm font-medium text-text-primary",
|
|
470
|
-
children:
|
|
471
|
-
}), /* @__PURE__ */
|
|
472
|
-
value:
|
|
473
|
-
|
|
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
|
|
482
|
+
type: e
|
|
476
483
|
})),
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
/* @__PURE__ */
|
|
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:
|
|
490
|
+
children: O("healthybowl.compliance.audits.type.internal", "Internal")
|
|
482
491
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ _(S, {
|
|
484
493
|
value: "external",
|
|
485
|
-
children:
|
|
494
|
+
children: O("healthybowl.compliance.audits.type.external", "External")
|
|
486
495
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ _(S, {
|
|
488
497
|
value: "certification",
|
|
489
|
-
children:
|
|
498
|
+
children: O("healthybowl.compliance.audits.type.certification", "Certification")
|
|
490
499
|
})
|
|
491
|
-
]
|
|
500
|
+
] })]
|
|
492
501
|
})] }),
|
|
493
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
494
503
|
className: "text-sm font-medium text-text-primary",
|
|
495
|
-
children:
|
|
496
|
-
}), /* @__PURE__ */
|
|
504
|
+
children: O("healthybowl.compliance.audits.form.fields.auditor.label", "Auditor *")
|
|
505
|
+
}), /* @__PURE__ */ _("input", {
|
|
497
506
|
type: "text",
|
|
498
|
-
value:
|
|
499
|
-
onChange: (e) =>
|
|
507
|
+
value: H.auditor,
|
|
508
|
+
onChange: (e) => U((t) => ({
|
|
500
509
|
...t,
|
|
501
510
|
auditor: e.target.value
|
|
502
511
|
})),
|
|
503
|
-
placeholder:
|
|
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__ */
|
|
515
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
507
516
|
className: "text-sm font-medium text-text-primary",
|
|
508
|
-
children:
|
|
509
|
-
}), /* @__PURE__ */
|
|
517
|
+
children: O("healthybowl.compliance.audits.form.fields.scheduledDate.label", "Scheduled Date *")
|
|
518
|
+
}), /* @__PURE__ */ _("input", {
|
|
510
519
|
type: "date",
|
|
511
|
-
value:
|
|
512
|
-
onChange: (e) =>
|
|
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__ */
|
|
522
|
-
toasts:
|
|
523
|
-
onDismiss:
|
|
530
|
+
/* @__PURE__ */ _(a, {
|
|
531
|
+
toasts: X,
|
|
532
|
+
onDismiss: ne
|
|
524
533
|
})
|
|
525
534
|
]
|
|
526
535
|
});
|
|
527
536
|
};
|
|
528
537
|
//#endregion
|
|
529
|
-
export {
|
|
538
|
+
export { O as ComplianceAuditsPage };
|
|
530
539
|
|
|
531
540
|
//# sourceMappingURL=ComplianceAuditsPage.js.map
|