@burdenoff/microfe-healthybowl 2026.710.21 → 2026.710.22
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/HealthyBowlRoot.js +93 -85
- package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoutes.js +98 -86
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlWithdrawal.js +237 -0
- package/dist/healthybowl/hooks/useHealthyBowlWithdrawal.js.map +1 -0
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +532 -527
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/MedicationLibraryPage.js +387 -0
- package/dist/healthybowl/pages/livestock/MedicationLibraryPage.js.map +1 -0
- package/dist/healthybowl/pages/livestock/WithdrawalAlertsPage.js +286 -0
- package/dist/healthybowl/pages/livestock/WithdrawalAlertsPage.js.map +1 -0
- package/dist/healthybowl/pages/livestock/WithdrawalCalendarPage.js +182 -0
- package/dist/healthybowl/pages/livestock/WithdrawalCalendarPage.js.map +1 -0
- package/dist/healthybowl/pages/livestock/withdrawal/AnimalWithdrawalCard.js +166 -0
- package/dist/healthybowl/pages/livestock/withdrawal/AnimalWithdrawalCard.js.map +1 -0
- package/dist/healthybowl/pages/livestock/withdrawal/LogTreatmentModal.js +274 -0
- package/dist/healthybowl/pages/livestock/withdrawal/LogTreatmentModal.js.map +1 -0
- package/dist/healthybowl/pages/livestock/withdrawal/WithdrawalNav.js +40 -0
- package/dist/healthybowl/pages/livestock/withdrawal/WithdrawalNav.js.map +1 -0
- package/dist/healthybowl/pages/livestock/withdrawal/status.js +53 -0
- package/dist/healthybowl/pages/livestock/withdrawal/status.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,19 +9,20 @@ import { ToastContainer as re } from "../../components/Toast.js";
|
|
|
9
9
|
import { useConfirm as ie } from "../../components/ConfirmDialog.js";
|
|
10
10
|
import { PageLoader as ae } from "../../components/PageLoader.js";
|
|
11
11
|
import { Modal as oe } from "../../components/Modal.js";
|
|
12
|
-
import { HBEntityImages as
|
|
13
|
-
import { useToast as
|
|
14
|
-
import { CreateFarmTaskButton as
|
|
12
|
+
import { HBEntityImages as se } from "../../components/HBEntityImages.js";
|
|
13
|
+
import { useToast as ce } from "../../hooks/useToast.js";
|
|
14
|
+
import { CreateFarmTaskButton as le } from "../../components/CreateFarmTaskButton.js";
|
|
15
15
|
import "../../components/index.js";
|
|
16
|
-
import { useHealthyBowlData as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
16
|
+
import { useHealthyBowlData as ue } from "../../hooks/useHealthyBowlData.js";
|
|
17
|
+
import { AnimalWithdrawalCard as de } from "./withdrawal/AnimalWithdrawalCard.js";
|
|
18
|
+
import { useMemo as a, useState as o } from "react";
|
|
19
|
+
import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
|
+
import { ArrowLeft as pe, Calendar as me, ChevronRight as he, Edit as ge, Heart as s, Milk as c, Plus as l, Stethoscope as _e, Syringe as ve, Trash2 as ye, TrendingUp as be, Weight as xe } from "lucide-react";
|
|
21
|
+
import { useNavigate as Se, useParams as Ce } from "react-router-dom";
|
|
22
|
+
import { Fragment as we, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
23
|
+
import { Button as f, ResponsiveTable as Te, Select as p, SelectContent as m, SelectItem as h, SelectTrigger as g, SelectValue as _ } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
//#region src/healthybowl/pages/livestock/AnimalDetailsPage.tsx
|
|
24
|
-
var
|
|
25
|
+
var Ee = (e) => {
|
|
25
26
|
switch (e) {
|
|
26
27
|
case "healthy": return "success";
|
|
27
28
|
case "pregnant": return "info";
|
|
@@ -30,7 +31,7 @@ var y = (e) => {
|
|
|
30
31
|
case "quarantine": return "error";
|
|
31
32
|
default: return "muted";
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
+
}, De = (e) => {
|
|
34
35
|
switch (e) {
|
|
35
36
|
case "cattle":
|
|
36
37
|
case "buffalo": return "🐄";
|
|
@@ -40,86 +41,86 @@ var y = (e) => {
|
|
|
40
41
|
case "poultry": return "🐔";
|
|
41
42
|
default: return "🐾";
|
|
42
43
|
}
|
|
43
|
-
},
|
|
44
|
-
let { animals:
|
|
45
|
-
|
|
44
|
+
}, v = () => {
|
|
45
|
+
let { animals: v, healthRecords: y, vaccinations: b, breedingRecords: Oe, productionRecords: ke, updateAnimal: Ae, deleteAnimal: je, errors: Me, loadings: Ne, refetch: Pe } = ue(), { t: x } = fe(), Fe = ie(), { animalId: S } = Ce(), C = Se(), { buildPath: w } = ee(), [T, E] = o("overview"), [Ie, D] = o(!1), [O, k] = o(!1), { toasts: Le, toast: A, dismiss: Re } = ce(), j = v.find((e) => e.id === S), [M, N] = o(""), [P, F] = o(""), [I, L] = o(""), [R, z] = o(""), [B, V] = o(""), [H, U] = o(""), [W, ze] = o(""), [Be, Ve] = o(""), [G, He] = o(""), [K, Ue] = o(""), [q, We] = o(""), [Ge, Ke] = o([]), qe = () => {
|
|
46
|
+
j && (N(j.name), F(j.type), L(j.breed), z(j.gender), V(j.healthStatus), U(j.tagNumber), ze(String(j.vaccinations ?? 0)), Ve(String(j.weight ?? 0)), He(j.dateOfBirth ?? ""), Ue(j.lastCheckup ?? ""), We(j.productionType ?? ""), Ke(j.imageIds ?? []), D(!0));
|
|
46
47
|
}, Je = async () => {
|
|
47
|
-
if (
|
|
48
|
-
if (!
|
|
49
|
-
|
|
50
|
-
title:
|
|
51
|
-
description:
|
|
48
|
+
if (j) {
|
|
49
|
+
if (!M.trim() || !H.trim()) {
|
|
50
|
+
A({
|
|
51
|
+
title: x("healthybowl.livestock.animalDetails.toast.missingFields.title", "Missing required fields"),
|
|
52
|
+
description: x("healthybowl.livestock.animalDetails.toast.missingFields.description", "Name and tag number are required."),
|
|
52
53
|
variant: "warning"
|
|
53
54
|
});
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
+
k(!0);
|
|
57
58
|
try {
|
|
58
|
-
await
|
|
59
|
-
id:
|
|
60
|
-
name:
|
|
61
|
-
type:
|
|
62
|
-
breed:
|
|
63
|
-
gender:
|
|
64
|
-
healthStatus:
|
|
59
|
+
await Ae({
|
|
60
|
+
id: j.id,
|
|
61
|
+
name: M.trim(),
|
|
62
|
+
type: P.trim() || "unknown",
|
|
63
|
+
breed: I.trim() || "Unknown",
|
|
64
|
+
gender: R.trim() || "unknown",
|
|
65
|
+
healthStatus: B.trim() || "healthy",
|
|
65
66
|
tagNumber: H.trim(),
|
|
66
|
-
vaccinations: Number(
|
|
67
|
-
weight: Number(
|
|
67
|
+
vaccinations: Number(W) || 0,
|
|
68
|
+
weight: Number(Be) || 0,
|
|
68
69
|
imageIds: Ge,
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
...
|
|
72
|
-
}),
|
|
73
|
-
title:
|
|
74
|
-
description:
|
|
70
|
+
...G ? { dateOfBirth: G } : {},
|
|
71
|
+
...K ? { lastCheckup: K } : {},
|
|
72
|
+
...q.trim() ? { productionType: q.trim() } : {}
|
|
73
|
+
}), A({
|
|
74
|
+
title: x("healthybowl.livestock.animalDetails.toast.updated.title", "Animal updated"),
|
|
75
|
+
description: x("healthybowl.livestock.animalDetails.toast.updated.description", "{{name}} has been saved.", { name: M.trim() }),
|
|
75
76
|
variant: "success"
|
|
76
|
-
}),
|
|
77
|
+
}), D(!1);
|
|
77
78
|
} catch (e) {
|
|
78
|
-
|
|
79
|
-
title:
|
|
79
|
+
A({
|
|
80
|
+
title: x("healthybowl.livestock.animalDetails.toast.updateFailed.title", "Update failed"),
|
|
80
81
|
description: String(e),
|
|
81
82
|
variant: "error"
|
|
82
83
|
});
|
|
83
84
|
} finally {
|
|
84
|
-
|
|
85
|
+
k(!1);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
}, Ye = async () => {
|
|
88
|
-
if (
|
|
89
|
-
title:
|
|
90
|
-
message:
|
|
91
|
-
name:
|
|
92
|
-
tagNumber:
|
|
89
|
+
if (j && await Fe({
|
|
90
|
+
title: x("healthybowl.livestock.animalDetails.confirmDelete.title", "Delete animal?"),
|
|
91
|
+
message: x("healthybowl.livestock.animalDetails.confirmDelete.message", "{{name}} ({{tagNumber}}) will be permanently removed.", {
|
|
92
|
+
name: j.name,
|
|
93
|
+
tagNumber: j.tagNumber
|
|
93
94
|
}),
|
|
94
|
-
okButtonTitle:
|
|
95
|
-
cancelButtonTitle:
|
|
95
|
+
okButtonTitle: x("healthybowl.common.delete", "Delete"),
|
|
96
|
+
cancelButtonTitle: x("healthybowl.common.cancel", "Cancel")
|
|
96
97
|
}) !== !1) {
|
|
97
|
-
|
|
98
|
+
k(!0);
|
|
98
99
|
try {
|
|
99
|
-
await
|
|
100
|
-
title:
|
|
101
|
-
description:
|
|
100
|
+
await je(j.id), A({
|
|
101
|
+
title: x("healthybowl.livestock.animalDetails.toast.deleted.title", "Animal deleted"),
|
|
102
|
+
description: x("healthybowl.livestock.animalDetails.toast.deleted.description", "{{name}} has been removed.", { name: j.name }),
|
|
102
103
|
variant: "success"
|
|
103
|
-
}),
|
|
104
|
+
}), C(w("livestock/animals"));
|
|
104
105
|
} catch (e) {
|
|
105
|
-
|
|
106
|
-
title:
|
|
106
|
+
A({
|
|
107
|
+
title: x("healthybowl.livestock.animalDetails.toast.deleteFailed.title", "Delete failed"),
|
|
107
108
|
description: String(e),
|
|
108
109
|
variant: "error"
|
|
109
|
-
}),
|
|
110
|
+
}), k(!1);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
},
|
|
113
|
+
}, J = a(() => j ? y.filter((e) => e.animalId === j.id) : [], [y, j]), Y = a(() => j ? b.filter((e) => e.animalId === j.id) : [], [b, j]), X = a(() => j ? Oe.filter((e) => e.femaleId === j.id || e.maleId === j.id) : [], [Oe, j]), Z = a(() => j ? ke.filter((e) => e.animalId === j.id) : [], [ke, j]), Q = Z.filter((e) => e.type === "milk"), Xe = Q.length > 0 ? Q.reduce((e, t) => e + t.quantity, 0) / Q.length : 0, Ze = J.length > 0 ? Math.max(0, 100 - J.filter((e) => e.status === "active" || e.status === "monitoring").length * 15) : 100, $ = Z.length > 0 ? Z[0] : null, Qe = a(() => [
|
|
113
114
|
{
|
|
114
115
|
key: "date",
|
|
115
|
-
header:
|
|
116
|
+
header: x("healthybowl.livestock.animalDetails.production.table.date", "Date"),
|
|
116
117
|
cell: (t) => e(t.date),
|
|
117
118
|
priority: "primary"
|
|
118
119
|
},
|
|
119
120
|
{
|
|
120
121
|
key: "type",
|
|
121
|
-
header:
|
|
122
|
-
cell: (e) => /* @__PURE__ */
|
|
122
|
+
header: x("healthybowl.livestock.animalDetails.production.table.type", "Type"),
|
|
123
|
+
cell: (e) => /* @__PURE__ */ u("span", {
|
|
123
124
|
className: "capitalize",
|
|
124
125
|
children: e.type
|
|
125
126
|
}),
|
|
@@ -127,8 +128,8 @@ var y = (e) => {
|
|
|
127
128
|
},
|
|
128
129
|
{
|
|
129
130
|
key: "quantity",
|
|
130
|
-
header:
|
|
131
|
-
cell: (e) => /* @__PURE__ */
|
|
131
|
+
header: x("healthybowl.livestock.animalDetails.production.table.quantity", "Quantity"),
|
|
132
|
+
cell: (e) => /* @__PURE__ */ d("span", {
|
|
132
133
|
className: "tabular-nums",
|
|
133
134
|
children: [
|
|
134
135
|
e.quantity,
|
|
@@ -142,115 +143,115 @@ var y = (e) => {
|
|
|
142
143
|
},
|
|
143
144
|
{
|
|
144
145
|
key: "quality",
|
|
145
|
-
header:
|
|
146
|
-
cell: (e) => /* @__PURE__ */
|
|
146
|
+
header: x("healthybowl.livestock.animalDetails.production.table.quality", "Quality"),
|
|
147
|
+
cell: (e) => /* @__PURE__ */ u(i, {
|
|
147
148
|
label: (e.quality ?? "").replace("_", " "),
|
|
148
149
|
variant: e.quality === "premium" ? "success" : e.quality === "standard" ? "info" : "warning"
|
|
149
150
|
}),
|
|
150
151
|
priority: "secondary"
|
|
151
152
|
}
|
|
152
|
-
], [
|
|
153
|
+
], [x]), $e = a(() => {
|
|
153
154
|
let e = [];
|
|
154
|
-
for (let t of
|
|
155
|
+
for (let t of J) e.push({
|
|
155
156
|
id: t.id,
|
|
156
157
|
date: t.date,
|
|
157
158
|
category: "Health",
|
|
158
|
-
categoryLabel:
|
|
159
|
+
categoryLabel: x("healthybowl.livestock.animalDetails.timeline.category.health", "Health"),
|
|
159
160
|
title: `${t.type} - ${t.diagnosis}`,
|
|
160
161
|
detail: t.veterinarian
|
|
161
162
|
});
|
|
162
|
-
for (let t of
|
|
163
|
+
for (let t of Y) e.push({
|
|
163
164
|
id: t.id,
|
|
164
165
|
date: t.administrationDate,
|
|
165
166
|
category: "Vaccination",
|
|
166
|
-
categoryLabel:
|
|
167
|
+
categoryLabel: x("healthybowl.livestock.animalDetails.timeline.category.vaccination", "Vaccination"),
|
|
167
168
|
title: t.vaccineName,
|
|
168
169
|
detail: t.veterinarian
|
|
169
170
|
});
|
|
170
|
-
for (let t of
|
|
171
|
+
for (let t of Z) e.push({
|
|
171
172
|
id: t.id,
|
|
172
173
|
date: t.date,
|
|
173
174
|
category: "Production",
|
|
174
|
-
categoryLabel:
|
|
175
|
+
categoryLabel: x("healthybowl.livestock.animalDetails.timeline.category.production", "Production"),
|
|
175
176
|
title: `${t.type} - ${t.quantity} ${t.unit}`,
|
|
176
177
|
detail: t.quality
|
|
177
178
|
});
|
|
178
179
|
return e.sort((e, t) => new Date(t.date).getTime() - new Date(e.date).getTime()), e;
|
|
179
180
|
}, [
|
|
180
|
-
q,
|
|
181
181
|
J,
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
Y,
|
|
183
|
+
Z,
|
|
184
|
+
x
|
|
184
185
|
]);
|
|
185
|
-
if (!
|
|
186
|
-
title:
|
|
187
|
-
children:
|
|
188
|
-
title:
|
|
189
|
-
description:
|
|
190
|
-
action: /* @__PURE__ */
|
|
191
|
-
onClick: () =>
|
|
192
|
-
children:
|
|
186
|
+
if (!j) return /* @__PURE__ */ u(n, {
|
|
187
|
+
title: x("healthybowl.livestock.animalDetails.notFound.pageTitle", "Animal Not Found"),
|
|
188
|
+
children: Ne.livestock ? /* @__PURE__ */ u(ae, {}) : Me.livestock ? /* @__PURE__ */ u(ne, { onRetry: Pe }) : /* @__PURE__ */ u(te, {
|
|
189
|
+
title: x("healthybowl.livestock.animalDetails.notFound.title", "Animal not found"),
|
|
190
|
+
description: x("healthybowl.livestock.animalDetails.notFound.description", "The animal you are looking for does not exist."),
|
|
191
|
+
action: /* @__PURE__ */ u(f, {
|
|
192
|
+
onClick: () => C(w("livestock/animals")),
|
|
193
|
+
children: x("healthybowl.livestock.animalDetails.notFound.backToRegistry", "Back to Registry")
|
|
193
194
|
})
|
|
194
195
|
})
|
|
195
196
|
});
|
|
196
|
-
let
|
|
197
|
+
let et = [
|
|
197
198
|
{
|
|
198
199
|
id: "overview",
|
|
199
|
-
label:
|
|
200
|
+
label: x("healthybowl.livestock.animalDetails.tabs.overview", "Overview")
|
|
200
201
|
},
|
|
201
202
|
{
|
|
202
203
|
id: "health",
|
|
203
|
-
label:
|
|
204
|
+
label: x("healthybowl.livestock.animalDetails.tabs.health", "Health")
|
|
204
205
|
},
|
|
205
206
|
{
|
|
206
207
|
id: "breeding",
|
|
207
|
-
label:
|
|
208
|
+
label: x("healthybowl.livestock.animalDetails.tabs.breeding", "Breeding")
|
|
208
209
|
},
|
|
209
210
|
{
|
|
210
211
|
id: "production",
|
|
211
|
-
label:
|
|
212
|
+
label: x("healthybowl.livestock.animalDetails.tabs.production", "Production")
|
|
212
213
|
},
|
|
213
214
|
{
|
|
214
215
|
id: "timeline",
|
|
215
|
-
label:
|
|
216
|
+
label: x("healthybowl.livestock.animalDetails.tabs.timeline", "Timeline")
|
|
216
217
|
}
|
|
217
218
|
];
|
|
218
|
-
return /* @__PURE__ */
|
|
219
|
-
title: `${
|
|
220
|
-
description: `${
|
|
221
|
-
actions: /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ d(n, {
|
|
220
|
+
title: `${j.name} (${j.tagNumber})`,
|
|
221
|
+
description: `${j.breed} ${j.type}`,
|
|
222
|
+
actions: /* @__PURE__ */ d("div", {
|
|
222
223
|
className: "flex items-center gap-2",
|
|
223
224
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ u(le, {
|
|
225
226
|
entityType: "ANIMAL",
|
|
226
|
-
entityId:
|
|
227
|
-
entityLabel: `${
|
|
227
|
+
entityId: j.id,
|
|
228
|
+
entityLabel: `${j.name} (${j.tagNumber})`
|
|
228
229
|
}),
|
|
229
|
-
/* @__PURE__ */ f
|
|
230
|
+
/* @__PURE__ */ d(f, {
|
|
230
231
|
variant: "outline",
|
|
231
|
-
onClick: () =>
|
|
232
|
+
onClick: () => C(w("livestock/animals")),
|
|
232
233
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ u(pe, { className: "h-4 w-4" }),
|
|
234
235
|
" ",
|
|
235
|
-
|
|
236
|
+
x("healthybowl.common.back", "Back")
|
|
236
237
|
]
|
|
237
238
|
}),
|
|
238
|
-
/* @__PURE__ */ f
|
|
239
|
+
/* @__PURE__ */ d(f, {
|
|
239
240
|
onClick: qe,
|
|
240
241
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ u(ge, { className: "h-4 w-4" }),
|
|
242
243
|
" ",
|
|
243
|
-
|
|
244
|
+
x("healthybowl.livestock.animalDetails.actions.editDetails", "Edit Details")
|
|
244
245
|
]
|
|
245
246
|
}),
|
|
246
|
-
/* @__PURE__ */ f
|
|
247
|
+
/* @__PURE__ */ d(f, {
|
|
247
248
|
variant: "destructive",
|
|
248
249
|
onClick: Ye,
|
|
249
|
-
disabled:
|
|
250
|
+
disabled: O,
|
|
250
251
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ u(ye, { className: "h-4 w-4" }),
|
|
252
253
|
" ",
|
|
253
|
-
|
|
254
|
+
x("healthybowl.common.delete", "Delete")
|
|
254
255
|
]
|
|
255
256
|
})
|
|
256
257
|
]
|
|
@@ -259,314 +260,318 @@ var y = (e) => {
|
|
|
259
260
|
nextSteps: [
|
|
260
261
|
{
|
|
261
262
|
id: "health",
|
|
262
|
-
label:
|
|
263
|
-
description:
|
|
264
|
-
onClick: () =>
|
|
263
|
+
label: x("healthybowl.livestock.animalDetails.nextSteps.health.label", "Review health records"),
|
|
264
|
+
description: x("healthybowl.livestock.animalDetails.nextSteps.health.desc", "Check treatments, vaccinations and any concerns for this animal."),
|
|
265
|
+
onClick: () => E("health")
|
|
265
266
|
},
|
|
266
267
|
{
|
|
267
268
|
id: "breeding",
|
|
268
|
-
label:
|
|
269
|
-
description:
|
|
270
|
-
onClick: () =>
|
|
269
|
+
label: x("healthybowl.livestock.animalDetails.nextSteps.breeding.label", "Check breeding history"),
|
|
270
|
+
description: x("healthybowl.livestock.animalDetails.nextSteps.breeding.desc", "See matings, pregnancies and offspring for this animal."),
|
|
271
|
+
onClick: () => E("breeding")
|
|
271
272
|
},
|
|
272
273
|
{
|
|
273
274
|
id: "production",
|
|
274
|
-
label:
|
|
275
|
-
description:
|
|
276
|
-
onClick: () =>
|
|
275
|
+
label: x("healthybowl.livestock.animalDetails.nextSteps.production.label", "Log production output"),
|
|
276
|
+
description: x("healthybowl.livestock.animalDetails.nextSteps.production.desc", "Record milk, eggs, wool or other output this animal produces."),
|
|
277
|
+
onClick: () => E("production")
|
|
277
278
|
}
|
|
278
279
|
],
|
|
279
280
|
nextStepsKey: "healthybowl-animal-detail",
|
|
280
281
|
children: [
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ d("div", {
|
|
282
283
|
className: "flex flex-wrap items-center gap-3",
|
|
283
284
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
label: (
|
|
286
|
-
variant:
|
|
285
|
+
/* @__PURE__ */ u(i, {
|
|
286
|
+
label: (j.healthStatus ?? "").replace("_", " "),
|
|
287
|
+
variant: Ee(j.healthStatus),
|
|
287
288
|
dot: !0
|
|
288
289
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
label:
|
|
290
|
+
/* @__PURE__ */ u(i, {
|
|
291
|
+
label: j.gender,
|
|
291
292
|
variant: "muted"
|
|
292
293
|
}),
|
|
293
|
-
|
|
294
|
-
label:
|
|
294
|
+
j.productionType && /* @__PURE__ */ u(i, {
|
|
295
|
+
label: j.productionType,
|
|
295
296
|
variant: "info"
|
|
296
297
|
})
|
|
297
298
|
]
|
|
298
299
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ u("div", {
|
|
300
301
|
className: "border-b border-border-subtle",
|
|
301
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ u("nav", {
|
|
302
303
|
className: "-mb-px flex gap-6 overflow-x-auto",
|
|
303
|
-
children:
|
|
304
|
+
children: et.map((e) => /* @__PURE__ */ u("button", {
|
|
304
305
|
type: "button",
|
|
305
|
-
onClick: () =>
|
|
306
|
-
className: `whitespace-nowrap border-b-2 py-2 px-1 text-sm font-medium ${
|
|
306
|
+
onClick: () => E(e.id),
|
|
307
|
+
className: `whitespace-nowrap border-b-2 py-2 px-1 text-sm font-medium ${T === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-subtle"}`,
|
|
307
308
|
children: e.label
|
|
308
309
|
}, e.id))
|
|
309
310
|
})
|
|
310
311
|
}),
|
|
311
|
-
|
|
312
|
+
T === "overview" && /* @__PURE__ */ d("div", {
|
|
312
313
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ d("div", {
|
|
314
315
|
className: "lg:col-span-2 space-y-6",
|
|
315
|
-
children: [
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
children:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
className: "text-
|
|
332
|
-
children:
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
children:
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
children:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
children:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
children:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
className: "
|
|
376
|
-
children:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
316
|
+
children: [
|
|
317
|
+
S ? /* @__PURE__ */ u(de, { animalId: S }) : null,
|
|
318
|
+
/* @__PURE__ */ d("div", {
|
|
319
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ u("h3", {
|
|
322
|
+
className: "mb-4 text-sm font-medium text-text-primary",
|
|
323
|
+
children: x("healthybowl.livestock.animalDetails.basicInfo.title", "Basic Information")
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ d("div", {
|
|
326
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
329
|
+
className: "text-xs text-text-secondary",
|
|
330
|
+
children: x("healthybowl.livestock.animalDetails.fields.type", "Type")
|
|
331
|
+
}), /* @__PURE__ */ d("p", {
|
|
332
|
+
className: "mt-1 flex items-center gap-2 text-sm font-medium capitalize text-text-primary",
|
|
333
|
+
children: [/* @__PURE__ */ u("span", {
|
|
334
|
+
className: "text-xl",
|
|
335
|
+
children: De(j.type)
|
|
336
|
+
}), j.type]
|
|
337
|
+
})] }),
|
|
338
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
339
|
+
className: "text-xs text-text-secondary",
|
|
340
|
+
children: x("healthybowl.livestock.animalDetails.fields.breed", "Breed")
|
|
341
|
+
}), /* @__PURE__ */ u("p", {
|
|
342
|
+
className: "mt-1 text-sm font-medium text-text-primary",
|
|
343
|
+
children: j.breed
|
|
344
|
+
})] }),
|
|
345
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
346
|
+
className: "text-xs text-text-secondary",
|
|
347
|
+
children: x("healthybowl.livestock.animalDetails.fields.gender", "Gender")
|
|
348
|
+
}), /* @__PURE__ */ u("p", {
|
|
349
|
+
className: "mt-1 text-sm font-medium capitalize text-text-primary",
|
|
350
|
+
children: j.gender
|
|
351
|
+
})] }),
|
|
352
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
353
|
+
className: "text-xs text-text-secondary",
|
|
354
|
+
children: x("healthybowl.livestock.animalDetails.fields.dateOfBirth", "Date of Birth")
|
|
355
|
+
}), /* @__PURE__ */ u("p", {
|
|
356
|
+
className: "mt-1 text-sm font-medium text-text-primary",
|
|
357
|
+
children: e(j.dateOfBirth)
|
|
358
|
+
})] }),
|
|
359
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
360
|
+
className: "text-xs text-text-secondary",
|
|
361
|
+
children: x("healthybowl.livestock.animalDetails.fields.currentWeight", "Current Weight")
|
|
362
|
+
}), /* @__PURE__ */ d("p", {
|
|
363
|
+
className: "mt-1 text-sm font-medium text-text-primary",
|
|
364
|
+
children: [t(j.weight ?? 0), " kg"]
|
|
365
|
+
})] }),
|
|
366
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
367
|
+
className: "text-xs text-text-secondary",
|
|
368
|
+
children: x("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
|
|
369
|
+
}), /* @__PURE__ */ u("p", {
|
|
370
|
+
className: "mt-1 text-sm font-medium text-text-primary",
|
|
371
|
+
children: e(j.lastCheckup)
|
|
372
|
+
})] })
|
|
373
|
+
]
|
|
374
|
+
}),
|
|
375
|
+
(j.imageIds ?? []).length > 0 && /* @__PURE__ */ d("div", {
|
|
376
|
+
className: "mt-4",
|
|
377
|
+
children: [/* @__PURE__ */ u("p", {
|
|
378
|
+
className: "mb-2 text-xs text-text-secondary",
|
|
379
|
+
children: x("healthybowl.livestock.animalDetails.fields.photos", "Photos")
|
|
380
|
+
}), /* @__PURE__ */ u(se, {
|
|
381
|
+
entity: "Animal",
|
|
382
|
+
imageIds: j.imageIds ?? [],
|
|
383
|
+
onChange: () => {},
|
|
384
|
+
readOnly: !0
|
|
385
|
+
})]
|
|
386
|
+
})
|
|
387
|
+
]
|
|
388
|
+
}),
|
|
389
|
+
/* @__PURE__ */ d("div", {
|
|
390
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
391
|
+
children: [/* @__PURE__ */ d("div", {
|
|
392
|
+
className: "mb-4 flex items-center justify-between",
|
|
393
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
394
|
+
className: "text-sm font-medium text-text-primary",
|
|
395
|
+
children: x("healthybowl.livestock.animalDetails.recentActivity.title", "Recent Activity")
|
|
396
|
+
}), /* @__PURE__ */ u(f, {
|
|
397
|
+
variant: "link",
|
|
398
|
+
size: "sm",
|
|
399
|
+
onClick: () => E("health"),
|
|
400
|
+
className: "text-xs",
|
|
401
|
+
children: x("healthybowl.livestock.animalDetails.recentActivity.viewAll", "View All")
|
|
382
402
|
})]
|
|
383
|
-
})
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
children: [/* @__PURE__ */ f("div", {
|
|
388
|
-
className: "mb-4 flex items-center justify-between",
|
|
389
|
-
children: [/* @__PURE__ */ d("h3", {
|
|
390
|
-
className: "text-sm font-medium text-text-primary",
|
|
391
|
-
children: T("healthybowl.livestock.animalDetails.recentActivity.title", "Recent Activity")
|
|
392
|
-
}), /* @__PURE__ */ d(p, {
|
|
393
|
-
variant: "link",
|
|
394
|
-
size: "sm",
|
|
395
|
-
onClick: () => k("health"),
|
|
396
|
-
className: "text-xs",
|
|
397
|
-
children: T("healthybowl.livestock.animalDetails.recentActivity.viewAll", "View All")
|
|
398
|
-
})]
|
|
399
|
-
}), q.length > 0 ? /* @__PURE__ */ d("div", {
|
|
400
|
-
className: "flex flex-col gap-3",
|
|
401
|
-
children: q.map((t) => /* @__PURE__ */ f("div", {
|
|
402
|
-
className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
|
|
403
|
-
children: [/* @__PURE__ */ f("div", {
|
|
404
|
-
className: "flex items-center gap-3",
|
|
403
|
+
}), J.length > 0 ? /* @__PURE__ */ u("div", {
|
|
404
|
+
className: "flex flex-col gap-3",
|
|
405
|
+
children: J.map((t) => /* @__PURE__ */ d("div", {
|
|
406
|
+
className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
|
|
405
407
|
children: [/* @__PURE__ */ d("div", {
|
|
406
|
-
className: "
|
|
407
|
-
children: /* @__PURE__ */
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
children: [
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
408
|
+
className: "flex items-center gap-3",
|
|
409
|
+
children: [/* @__PURE__ */ u("div", {
|
|
410
|
+
className: "rounded-full bg-bg-sunken p-2",
|
|
411
|
+
children: /* @__PURE__ */ u(s, { className: "h-4 w-4 text-text-secondary" })
|
|
412
|
+
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("p", {
|
|
413
|
+
className: "text-sm font-medium text-text-primary",
|
|
414
|
+
children: [
|
|
415
|
+
t.type,
|
|
416
|
+
" - ",
|
|
417
|
+
t.diagnosis
|
|
418
|
+
]
|
|
419
|
+
}), /* @__PURE__ */ d("p", {
|
|
420
|
+
className: "text-xs text-text-secondary",
|
|
421
|
+
children: [
|
|
422
|
+
e(t.date),
|
|
423
|
+
" · ",
|
|
424
|
+
t.veterinarian
|
|
425
|
+
]
|
|
426
|
+
})] })]
|
|
427
|
+
}), /* @__PURE__ */ u(he, { className: "h-4 w-4 text-text-secondary" })]
|
|
428
|
+
}, t.id))
|
|
429
|
+
}) : /* @__PURE__ */ u("p", {
|
|
430
|
+
className: "py-4 text-center text-sm text-text-secondary",
|
|
431
|
+
children: x("healthybowl.livestock.animalDetails.recentActivity.empty", "No recent activity")
|
|
432
|
+
})]
|
|
433
|
+
})
|
|
434
|
+
]
|
|
435
|
+
}), /* @__PURE__ */ d("div", {
|
|
431
436
|
className: "space-y-6",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
437
|
+
children: [/* @__PURE__ */ d("div", {
|
|
433
438
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
435
440
|
className: "mb-4 text-sm font-medium text-text-primary",
|
|
436
|
-
children:
|
|
437
|
-
}), /* @__PURE__ */
|
|
441
|
+
children: x("healthybowl.livestock.animalDetails.quickStats.title", "Quick Stats")
|
|
442
|
+
}), /* @__PURE__ */ d("div", {
|
|
438
443
|
className: "space-y-4",
|
|
439
444
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
441
446
|
className: "text-xs text-text-secondary",
|
|
442
|
-
children:
|
|
443
|
-
}), /* @__PURE__ */
|
|
447
|
+
children: x("healthybowl.livestock.animalDetails.quickStats.avgDailyMilk", "Average Daily Milk")
|
|
448
|
+
}), /* @__PURE__ */ d("p", {
|
|
444
449
|
className: "text-xl font-bold text-text-primary",
|
|
445
450
|
children: [Xe.toFixed(1), " L"]
|
|
446
451
|
})] }),
|
|
447
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
448
453
|
className: "text-xs text-text-secondary",
|
|
449
|
-
children:
|
|
450
|
-
}), /* @__PURE__ */
|
|
454
|
+
children: x("healthybowl.livestock.animalDetails.quickStats.totalVaccinations", "Total Vaccinations")
|
|
455
|
+
}), /* @__PURE__ */ u("p", {
|
|
451
456
|
className: "text-xl font-bold text-text-primary",
|
|
452
|
-
children:
|
|
457
|
+
children: Y.length
|
|
453
458
|
})] }),
|
|
454
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
455
460
|
className: "text-xs text-text-secondary",
|
|
456
|
-
children:
|
|
457
|
-
}), /* @__PURE__ */
|
|
461
|
+
children: x("healthybowl.livestock.animalDetails.quickStats.breedingRecords", "Breeding Records")
|
|
462
|
+
}), /* @__PURE__ */ u("p", {
|
|
458
463
|
className: "text-xl font-bold text-text-primary",
|
|
459
|
-
children:
|
|
464
|
+
children: X.length
|
|
460
465
|
})] }),
|
|
461
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
462
467
|
className: "text-xs text-text-secondary",
|
|
463
|
-
children:
|
|
464
|
-
}), /* @__PURE__ */
|
|
468
|
+
children: x("healthybowl.livestock.animalDetails.quickStats.healthScore", "Health Score")
|
|
469
|
+
}), /* @__PURE__ */ d("div", {
|
|
465
470
|
className: "mt-1",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ u("div", {
|
|
467
472
|
className: "h-2 w-full rounded-full bg-bg-sunken",
|
|
468
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ u("div", {
|
|
469
474
|
className: "h-2 rounded-full bg-action-primary-bg",
|
|
470
475
|
style: { width: `${Ze}%` }
|
|
471
476
|
})
|
|
472
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ d("p", {
|
|
473
478
|
className: "mt-1 text-xs text-text-secondary",
|
|
474
479
|
children: [Ze, "/100"]
|
|
475
480
|
})]
|
|
476
481
|
})] })
|
|
477
482
|
]
|
|
478
483
|
})]
|
|
479
|
-
}), /* @__PURE__ */
|
|
484
|
+
}), /* @__PURE__ */ d("div", {
|
|
480
485
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
482
487
|
className: "mb-4 text-sm font-medium text-text-primary",
|
|
483
|
-
children:
|
|
484
|
-
}), /* @__PURE__ */
|
|
488
|
+
children: x("healthybowl.livestock.animalDetails.quickActions.title", "Quick Actions")
|
|
489
|
+
}), /* @__PURE__ */ u("div", {
|
|
485
490
|
className: "flex flex-col gap-2",
|
|
486
491
|
children: [
|
|
487
492
|
{
|
|
488
493
|
id: "recordHealthCheck",
|
|
489
|
-
label:
|
|
490
|
-
icon:
|
|
494
|
+
label: x("healthybowl.livestock.animalDetails.quickActions.recordHealthCheck", "Record Health Check"),
|
|
495
|
+
icon: s,
|
|
491
496
|
path: "livestock/health"
|
|
492
497
|
},
|
|
493
498
|
{
|
|
494
499
|
id: "addVaccination",
|
|
495
|
-
label:
|
|
496
|
-
icon:
|
|
500
|
+
label: x("healthybowl.livestock.animalDetails.quickActions.addVaccination", "Add Vaccination"),
|
|
501
|
+
icon: ve,
|
|
497
502
|
path: "livestock/vaccinations"
|
|
498
503
|
},
|
|
499
504
|
{
|
|
500
505
|
id: "updateWeight",
|
|
501
|
-
label:
|
|
502
|
-
icon:
|
|
503
|
-
path: `livestock/animals/${
|
|
506
|
+
label: x("healthybowl.livestock.animalDetails.quickActions.updateWeight", "Update Weight"),
|
|
507
|
+
icon: xe,
|
|
508
|
+
path: `livestock/animals/${j.id}`
|
|
504
509
|
},
|
|
505
510
|
{
|
|
506
511
|
id: "recordProduction",
|
|
507
|
-
label:
|
|
508
|
-
icon:
|
|
512
|
+
label: x("healthybowl.livestock.animalDetails.quickActions.recordProduction", "Record Production"),
|
|
513
|
+
icon: c,
|
|
509
514
|
path: "livestock/production"
|
|
510
515
|
}
|
|
511
|
-
].map((e) => /* @__PURE__ */ f
|
|
516
|
+
].map((e) => /* @__PURE__ */ d(f, {
|
|
512
517
|
variant: "outline",
|
|
513
|
-
onClick: () =>
|
|
518
|
+
onClick: () => C(w(e.path)),
|
|
514
519
|
className: "justify-start",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ u(e.icon, { className: "h-4 w-4 text-text-secondary" }), e.label]
|
|
516
521
|
}, e.id))
|
|
517
522
|
})]
|
|
518
523
|
})]
|
|
519
524
|
})]
|
|
520
525
|
}),
|
|
521
|
-
|
|
526
|
+
T === "health" && /* @__PURE__ */ d("div", {
|
|
522
527
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
523
|
-
children: [/* @__PURE__ */
|
|
528
|
+
children: [/* @__PURE__ */ d("div", {
|
|
524
529
|
className: "lg:col-span-2 space-y-6",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ d("div", {
|
|
526
531
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ d("div", {
|
|
528
533
|
className: "mb-4 flex items-center justify-between",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
534
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
530
535
|
className: "text-sm font-medium text-text-primary",
|
|
531
|
-
children:
|
|
532
|
-
}), /* @__PURE__ */ f
|
|
536
|
+
children: x("healthybowl.livestock.animalDetails.healthRecords.title", "Health Records")
|
|
537
|
+
}), /* @__PURE__ */ d(f, {
|
|
533
538
|
size: "sm",
|
|
534
|
-
onClick: () =>
|
|
539
|
+
onClick: () => C(w("livestock/health")),
|
|
535
540
|
className: "text-xs",
|
|
536
541
|
children: [
|
|
537
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ u(l, { className: "h-3.5 w-3.5" }),
|
|
538
543
|
" ",
|
|
539
|
-
|
|
544
|
+
x("healthybowl.livestock.animalDetails.healthRecords.add", "Add Record")
|
|
540
545
|
]
|
|
541
546
|
})]
|
|
542
|
-
}),
|
|
547
|
+
}), J.length > 0 ? /* @__PURE__ */ u("div", {
|
|
543
548
|
className: "flex flex-col gap-3",
|
|
544
|
-
children:
|
|
549
|
+
children: J.map((t) => /* @__PURE__ */ u("div", {
|
|
545
550
|
className: "rounded-lg border border-border-subtle p-4",
|
|
546
|
-
children: /* @__PURE__ */
|
|
551
|
+
children: /* @__PURE__ */ u("div", {
|
|
547
552
|
className: "flex items-start justify-between",
|
|
548
|
-
children: /* @__PURE__ */
|
|
553
|
+
children: /* @__PURE__ */ d("div", {
|
|
549
554
|
className: "space-y-1.5",
|
|
550
555
|
children: [
|
|
551
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ d("div", {
|
|
552
557
|
className: "flex items-center gap-2",
|
|
553
|
-
children: [/* @__PURE__ */
|
|
558
|
+
children: [/* @__PURE__ */ u(i, {
|
|
554
559
|
label: t.type,
|
|
555
560
|
variant: "info"
|
|
556
|
-
}), /* @__PURE__ */
|
|
561
|
+
}), /* @__PURE__ */ u(i, {
|
|
557
562
|
label: t.status,
|
|
558
563
|
variant: t.status === "resolved" ? "success" : t.status === "active" ? "warning" : "info"
|
|
559
564
|
})]
|
|
560
565
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ u("p", {
|
|
562
567
|
className: "text-sm font-medium text-text-primary",
|
|
563
568
|
children: t.diagnosis
|
|
564
569
|
}),
|
|
565
|
-
t.treatment && /* @__PURE__ */
|
|
570
|
+
t.treatment && /* @__PURE__ */ u("p", {
|
|
566
571
|
className: "text-xs text-text-secondary",
|
|
567
|
-
children:
|
|
572
|
+
children: x("healthybowl.livestock.animalDetails.healthRecords.treatment", "Treatment: {{treatment}}", { treatment: t.treatment })
|
|
568
573
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ d("p", {
|
|
570
575
|
className: "text-xs text-text-secondary",
|
|
571
576
|
children: [
|
|
572
577
|
e(t.date),
|
|
@@ -578,255 +583,255 @@ var y = (e) => {
|
|
|
578
583
|
})
|
|
579
584
|
})
|
|
580
585
|
}, t.id))
|
|
581
|
-
}) : /* @__PURE__ */
|
|
586
|
+
}) : /* @__PURE__ */ u("p", {
|
|
582
587
|
className: "py-4 text-center text-sm text-text-secondary",
|
|
583
|
-
children:
|
|
588
|
+
children: x("healthybowl.livestock.animalDetails.healthRecords.empty", "No health records")
|
|
584
589
|
})]
|
|
585
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ d("div", {
|
|
586
591
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ d("div", {
|
|
588
593
|
className: "mb-4 flex items-center justify-between",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
594
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
590
595
|
className: "text-sm font-medium text-text-primary",
|
|
591
|
-
children:
|
|
592
|
-
}), /* @__PURE__ */ f
|
|
596
|
+
children: x("healthybowl.livestock.animalDetails.vaccinations.title", "Vaccination History")
|
|
597
|
+
}), /* @__PURE__ */ d(f, {
|
|
593
598
|
variant: "outline",
|
|
594
599
|
size: "sm",
|
|
595
|
-
onClick: () =>
|
|
600
|
+
onClick: () => C(w("livestock/vaccinations")),
|
|
596
601
|
className: "text-xs",
|
|
597
602
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ u(me, { className: "h-3.5 w-3.5" }),
|
|
599
604
|
" ",
|
|
600
|
-
|
|
605
|
+
x("healthybowl.livestock.animalDetails.vaccinations.schedule", "Schedule")
|
|
601
606
|
]
|
|
602
607
|
})]
|
|
603
|
-
}),
|
|
608
|
+
}), Y.length > 0 ? /* @__PURE__ */ u("div", {
|
|
604
609
|
className: "flex flex-col gap-3",
|
|
605
|
-
children:
|
|
610
|
+
children: Y.map((t) => /* @__PURE__ */ d("div", {
|
|
606
611
|
className: "flex items-center justify-between border-b border-border-subtle pb-3 last:border-0 last:pb-0",
|
|
607
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
608
613
|
className: "text-sm font-medium text-text-primary",
|
|
609
614
|
children: t.vaccineName
|
|
610
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ u("p", {
|
|
611
616
|
className: "text-xs text-text-secondary",
|
|
612
|
-
children:
|
|
613
|
-
})] }), /* @__PURE__ */
|
|
617
|
+
children: x("healthybowl.livestock.animalDetails.vaccinations.givenOn", "Given on {{date}}", { date: e(t.administrationDate) })
|
|
618
|
+
})] }), /* @__PURE__ */ d("div", {
|
|
614
619
|
className: "text-right",
|
|
615
|
-
children: [/* @__PURE__ */
|
|
620
|
+
children: [/* @__PURE__ */ u("p", {
|
|
616
621
|
className: "text-xs text-text-secondary",
|
|
617
|
-
children:
|
|
618
|
-
}), /* @__PURE__ */
|
|
622
|
+
children: x("healthybowl.livestock.animalDetails.vaccinations.nextDue", "Next due")
|
|
623
|
+
}), /* @__PURE__ */ u("p", {
|
|
619
624
|
className: "text-sm font-medium text-text-primary",
|
|
620
625
|
children: e(t.nextDueDate)
|
|
621
626
|
})]
|
|
622
627
|
})]
|
|
623
628
|
}, t.id))
|
|
624
|
-
}) : /* @__PURE__ */
|
|
629
|
+
}) : /* @__PURE__ */ u("p", {
|
|
625
630
|
className: "py-4 text-center text-sm text-text-secondary",
|
|
626
|
-
children:
|
|
631
|
+
children: x("healthybowl.livestock.animalDetails.vaccinations.empty", "No vaccination records")
|
|
627
632
|
})]
|
|
628
633
|
})]
|
|
629
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ u("div", {
|
|
630
635
|
className: "space-y-6",
|
|
631
|
-
children: /* @__PURE__ */
|
|
636
|
+
children: /* @__PURE__ */ d("div", {
|
|
632
637
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
633
|
-
children: [/* @__PURE__ */
|
|
638
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
634
639
|
className: "mb-4 text-sm font-medium text-text-primary",
|
|
635
|
-
children:
|
|
636
|
-
}), /* @__PURE__ */
|
|
640
|
+
children: x("healthybowl.livestock.animalDetails.healthSummary.title", "Health Summary")
|
|
641
|
+
}), /* @__PURE__ */ d("div", {
|
|
637
642
|
className: "space-y-4",
|
|
638
643
|
children: [
|
|
639
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
640
645
|
className: "text-xs text-text-secondary",
|
|
641
|
-
children:
|
|
642
|
-
}), /* @__PURE__ */
|
|
646
|
+
children: x("healthybowl.livestock.animalDetails.healthSummary.currentStatus", "Current Status")
|
|
647
|
+
}), /* @__PURE__ */ u("div", {
|
|
643
648
|
className: "mt-1",
|
|
644
|
-
children: /* @__PURE__ */
|
|
645
|
-
label: (
|
|
646
|
-
variant:
|
|
649
|
+
children: /* @__PURE__ */ u(i, {
|
|
650
|
+
label: (j.healthStatus ?? "").replace("_", " "),
|
|
651
|
+
variant: Ee(j.healthStatus),
|
|
647
652
|
dot: !0
|
|
648
653
|
})
|
|
649
654
|
})] }),
|
|
650
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
651
656
|
className: "text-xs text-text-secondary",
|
|
652
|
-
children:
|
|
653
|
-
}), /* @__PURE__ */
|
|
657
|
+
children: x("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
|
|
658
|
+
}), /* @__PURE__ */ u("p", {
|
|
654
659
|
className: "text-sm font-medium text-text-primary",
|
|
655
|
-
children: e(
|
|
660
|
+
children: e(j.lastCheckup)
|
|
656
661
|
})] }),
|
|
657
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
658
663
|
className: "text-xs text-text-secondary",
|
|
659
|
-
children:
|
|
660
|
-
}), /* @__PURE__ */
|
|
664
|
+
children: x("healthybowl.livestock.animalDetails.healthSummary.nextVaccination", "Next Vaccination")
|
|
665
|
+
}), /* @__PURE__ */ u("p", {
|
|
661
666
|
className: "text-sm font-medium text-text-primary",
|
|
662
|
-
children:
|
|
667
|
+
children: Y.find((e) => e.status === "scheduled") ? `${Y.find((e) => e.status === "scheduled").vaccineName} - ${e(Y.find((e) => e.status === "scheduled").nextDueDate)}` : x("healthybowl.livestock.animalDetails.healthSummary.noneScheduled", "None scheduled")
|
|
663
668
|
})] }),
|
|
664
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
665
670
|
className: "text-xs text-text-secondary",
|
|
666
|
-
children:
|
|
667
|
-
}), /* @__PURE__ */
|
|
671
|
+
children: x("healthybowl.livestock.animalDetails.quickStats.totalVaccinations", "Total Vaccinations")
|
|
672
|
+
}), /* @__PURE__ */ u("p", {
|
|
668
673
|
className: "text-xl font-bold text-text-primary",
|
|
669
|
-
children:
|
|
674
|
+
children: j.vaccinations ?? 0
|
|
670
675
|
})] })
|
|
671
676
|
]
|
|
672
677
|
})]
|
|
673
678
|
})
|
|
674
679
|
})]
|
|
675
680
|
}),
|
|
676
|
-
|
|
681
|
+
T === "breeding" && /* @__PURE__ */ u("div", {
|
|
677
682
|
className: "space-y-6",
|
|
678
|
-
children: /* @__PURE__ */
|
|
683
|
+
children: /* @__PURE__ */ d("div", {
|
|
679
684
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
680
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ d("div", {
|
|
681
686
|
className: "mb-4 flex items-center justify-between",
|
|
682
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
683
688
|
className: "text-sm font-medium text-text-primary",
|
|
684
|
-
children:
|
|
685
|
-
}), /* @__PURE__ */ f
|
|
689
|
+
children: x("healthybowl.livestock.animalDetails.breeding.title", "Breeding History")
|
|
690
|
+
}), /* @__PURE__ */ d(f, {
|
|
686
691
|
size: "sm",
|
|
687
|
-
onClick: () =>
|
|
692
|
+
onClick: () => C(w("livestock/breeding")),
|
|
688
693
|
className: "text-xs",
|
|
689
694
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ u(l, { className: "h-3.5 w-3.5" }),
|
|
691
696
|
" ",
|
|
692
|
-
|
|
697
|
+
x("healthybowl.livestock.animalDetails.healthRecords.add", "Add Record")
|
|
693
698
|
]
|
|
694
699
|
})]
|
|
695
|
-
}),
|
|
700
|
+
}), X.length > 0 ? /* @__PURE__ */ u("div", {
|
|
696
701
|
className: "flex flex-col gap-3",
|
|
697
|
-
children:
|
|
702
|
+
children: X.map((t) => /* @__PURE__ */ u("div", {
|
|
698
703
|
className: "rounded-lg border border-border-subtle p-4",
|
|
699
|
-
children: /* @__PURE__ */
|
|
704
|
+
children: /* @__PURE__ */ d("div", {
|
|
700
705
|
className: "grid grid-cols-1 gap-4 md:grid-cols-4",
|
|
701
706
|
children: [
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ d("div", { children: [
|
|
708
|
+
/* @__PURE__ */ u("p", {
|
|
704
709
|
className: "text-xs text-text-secondary",
|
|
705
|
-
children:
|
|
710
|
+
children: x("healthybowl.livestock.animalDetails.breeding.matingDate", "Mating Date")
|
|
706
711
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ u("p", {
|
|
708
713
|
className: "text-sm font-medium text-text-primary",
|
|
709
714
|
children: e(t.matingDate)
|
|
710
715
|
}),
|
|
711
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ u("p", {
|
|
712
717
|
className: "text-xs capitalize text-text-secondary",
|
|
713
718
|
children: t.matingType
|
|
714
719
|
})
|
|
715
720
|
] }),
|
|
716
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
717
722
|
className: "text-xs text-text-secondary",
|
|
718
|
-
children:
|
|
719
|
-
}), /* @__PURE__ */
|
|
723
|
+
children: x("healthybowl.livestock.animalDetails.breeding.female", "Female")
|
|
724
|
+
}), /* @__PURE__ */ u("p", {
|
|
720
725
|
className: "text-sm font-medium text-text-primary",
|
|
721
726
|
children: t.femaleName
|
|
722
727
|
})] }),
|
|
723
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
724
729
|
className: "text-xs text-text-secondary",
|
|
725
|
-
children:
|
|
726
|
-
}), /* @__PURE__ */
|
|
730
|
+
children: x("healthybowl.livestock.animalDetails.breeding.male", "Male")
|
|
731
|
+
}), /* @__PURE__ */ u("p", {
|
|
727
732
|
className: "text-sm font-medium text-text-primary",
|
|
728
733
|
children: t.maleName
|
|
729
734
|
})] }),
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ d("div", { children: [
|
|
736
|
+
/* @__PURE__ */ u("p", {
|
|
732
737
|
className: "text-xs text-text-secondary",
|
|
733
|
-
children:
|
|
738
|
+
children: x("healthybowl.livestock.animalDetails.breeding.status", "Status")
|
|
734
739
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ u(i, {
|
|
736
741
|
label: t.status,
|
|
737
742
|
variant: t.status === "confirmed" || t.status === "delivered" ? "success" : t.status === "failed" ? "error" : "info"
|
|
738
743
|
}),
|
|
739
|
-
t.expectedDeliveryDate && /* @__PURE__ */
|
|
744
|
+
t.expectedDeliveryDate && /* @__PURE__ */ u("p", {
|
|
740
745
|
className: "mt-1 text-xs text-text-secondary",
|
|
741
|
-
children:
|
|
746
|
+
children: x("healthybowl.livestock.animalDetails.breeding.expected", "Expected: {{date}}", { date: e(t.expectedDeliveryDate) })
|
|
742
747
|
})
|
|
743
748
|
] })
|
|
744
749
|
]
|
|
745
750
|
})
|
|
746
751
|
}, t.id))
|
|
747
|
-
}) : /* @__PURE__ */
|
|
752
|
+
}) : /* @__PURE__ */ u("p", {
|
|
748
753
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
749
|
-
children:
|
|
754
|
+
children: x("healthybowl.livestock.animalDetails.breeding.empty", "No breeding records for this animal")
|
|
750
755
|
})]
|
|
751
756
|
})
|
|
752
757
|
}),
|
|
753
|
-
|
|
758
|
+
T === "production" && /* @__PURE__ */ d("div", {
|
|
754
759
|
className: "space-y-6",
|
|
755
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ d("div", {
|
|
756
761
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
757
762
|
children: [
|
|
758
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ u(r, {
|
|
759
764
|
hero: !0,
|
|
760
|
-
label:
|
|
761
|
-
value:
|
|
762
|
-
unit:
|
|
763
|
-
icon: /* @__PURE__ */
|
|
765
|
+
label: x("healthybowl.livestock.animalDetails.production.stats.latest", "Latest Production"),
|
|
766
|
+
value: $ ? $.quantity : 0,
|
|
767
|
+
unit: $ ? $.unit : "",
|
|
768
|
+
icon: /* @__PURE__ */ u(c, { className: "h-4 w-4" })
|
|
764
769
|
}),
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
label:
|
|
767
|
-
value:
|
|
768
|
-
unit:
|
|
769
|
-
icon: /* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ u(r, {
|
|
771
|
+
label: x("healthybowl.livestock.animalDetails.production.stats.avg", "Avg Production"),
|
|
772
|
+
value: Z.length > 0 ? parseFloat((Z.reduce((e, t) => e + t.quantity, 0) / Z.length).toFixed(1)) : 0,
|
|
773
|
+
unit: Z.length > 0 ? Z[0].unit : "",
|
|
774
|
+
icon: /* @__PURE__ */ u(be, { className: "h-4 w-4" })
|
|
770
775
|
}),
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
label:
|
|
773
|
-
value:
|
|
774
|
-
icon: /* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ u(r, {
|
|
777
|
+
label: x("healthybowl.livestock.animalDetails.production.stats.totalRecords", "Total Records"),
|
|
778
|
+
value: Z.length,
|
|
779
|
+
icon: /* @__PURE__ */ u(_e, { className: "h-4 w-4" })
|
|
775
780
|
})
|
|
776
781
|
]
|
|
777
|
-
}), /* @__PURE__ */
|
|
782
|
+
}), /* @__PURE__ */ d("div", {
|
|
778
783
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
779
|
-
children: [/* @__PURE__ */
|
|
784
|
+
children: [/* @__PURE__ */ d("div", {
|
|
780
785
|
className: "mb-4 flex items-center justify-between",
|
|
781
|
-
children: [/* @__PURE__ */
|
|
786
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
782
787
|
className: "text-sm font-medium text-text-primary",
|
|
783
|
-
children:
|
|
784
|
-
}), /* @__PURE__ */ f
|
|
788
|
+
children: x("healthybowl.livestock.animalDetails.production.recent.title", "Recent Production")
|
|
789
|
+
}), /* @__PURE__ */ d(f, {
|
|
785
790
|
size: "sm",
|
|
786
|
-
onClick: () =>
|
|
791
|
+
onClick: () => C(w("livestock/production")),
|
|
787
792
|
className: "text-xs",
|
|
788
793
|
children: [
|
|
789
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ u(l, { className: "h-3.5 w-3.5" }),
|
|
790
795
|
" ",
|
|
791
|
-
|
|
796
|
+
x("healthybowl.livestock.animalDetails.production.recordProduction", "Record Production")
|
|
792
797
|
]
|
|
793
798
|
})]
|
|
794
|
-
}),
|
|
799
|
+
}), Z.length > 0 ? /* @__PURE__ */ u(Te, {
|
|
795
800
|
columns: Qe,
|
|
796
|
-
data:
|
|
801
|
+
data: Z,
|
|
797
802
|
rowKey: (e) => String(e.id)
|
|
798
|
-
}) : /* @__PURE__ */
|
|
803
|
+
}) : /* @__PURE__ */ u("p", {
|
|
799
804
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
800
|
-
children:
|
|
805
|
+
children: x("healthybowl.livestock.animalDetails.production.empty", "No production records for this animal")
|
|
801
806
|
})]
|
|
802
807
|
})]
|
|
803
808
|
}),
|
|
804
|
-
|
|
809
|
+
T === "timeline" && /* @__PURE__ */ u("div", {
|
|
805
810
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
806
|
-
children:
|
|
811
|
+
children: $e.length > 0 ? /* @__PURE__ */ d("div", {
|
|
807
812
|
className: "relative",
|
|
808
|
-
children: [/* @__PURE__ */
|
|
813
|
+
children: [/* @__PURE__ */ u("div", { className: "absolute left-4 top-0 bottom-0 w-px bg-border" }), /* @__PURE__ */ u("div", {
|
|
809
814
|
className: "flex flex-col gap-4",
|
|
810
|
-
children:
|
|
815
|
+
children: $e.map((t) => /* @__PURE__ */ d("div", {
|
|
811
816
|
className: "relative flex items-start gap-4 pl-10",
|
|
812
|
-
children: [/* @__PURE__ */
|
|
817
|
+
children: [/* @__PURE__ */ u("div", { className: `absolute left-2.5 top-1.5 h-3 w-3 rounded-full border-2 border-background ${t.category === "Health" ? "bg-status-error-bg" : t.category === "Vaccination" ? "bg-info" : "bg-success"}` }), /* @__PURE__ */ d("div", {
|
|
813
818
|
className: "flex-1 rounded-md border border-border-subtle p-3",
|
|
814
819
|
children: [
|
|
815
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ d("div", {
|
|
816
821
|
className: "flex items-center gap-2",
|
|
817
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: [/* @__PURE__ */ u(i, {
|
|
818
823
|
label: t.categoryLabel,
|
|
819
824
|
variant: t.category === "Health" ? "warning" : t.category === "Vaccination" ? "info" : "success"
|
|
820
|
-
}), /* @__PURE__ */
|
|
825
|
+
}), /* @__PURE__ */ u("span", {
|
|
821
826
|
className: "text-xs text-text-secondary",
|
|
822
827
|
children: e(t.date)
|
|
823
828
|
})]
|
|
824
829
|
}),
|
|
825
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ u("p", {
|
|
826
831
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
827
832
|
children: t.title
|
|
828
833
|
}),
|
|
829
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ u("p", {
|
|
830
835
|
className: "text-xs text-text-secondary",
|
|
831
836
|
children: t.detail
|
|
832
837
|
})
|
|
@@ -834,200 +839,200 @@ var y = (e) => {
|
|
|
834
839
|
})]
|
|
835
840
|
}, t.id))
|
|
836
841
|
})]
|
|
837
|
-
}) : /* @__PURE__ */
|
|
842
|
+
}) : /* @__PURE__ */ u("p", {
|
|
838
843
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
839
|
-
children:
|
|
844
|
+
children: x("healthybowl.livestock.animalDetails.timeline.empty", "No timeline records for this animal")
|
|
840
845
|
})
|
|
841
846
|
}),
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
open:
|
|
844
|
-
onClose: () =>
|
|
845
|
-
title:
|
|
846
|
-
description:
|
|
847
|
+
/* @__PURE__ */ u(oe, {
|
|
848
|
+
open: Ie,
|
|
849
|
+
onClose: () => D(!1),
|
|
850
|
+
title: x("healthybowl.livestock.animalDetails.editModal.title", "Edit Animal Details"),
|
|
851
|
+
description: x("healthybowl.livestock.animalDetails.editModal.description", "Update details for {{name}}", { name: j.name }),
|
|
847
852
|
size: "lg",
|
|
848
|
-
footer: /* @__PURE__ */
|
|
853
|
+
footer: /* @__PURE__ */ d(we, { children: [/* @__PURE__ */ u(f, {
|
|
849
854
|
variant: "outline",
|
|
850
|
-
onClick: () =>
|
|
851
|
-
children:
|
|
852
|
-
}), /* @__PURE__ */
|
|
855
|
+
onClick: () => D(!1),
|
|
856
|
+
children: x("healthybowl.common.cancel", "Cancel")
|
|
857
|
+
}), /* @__PURE__ */ u(f, {
|
|
853
858
|
onClick: Je,
|
|
854
|
-
disabled:
|
|
855
|
-
children:
|
|
859
|
+
disabled: O,
|
|
860
|
+
children: O ? x("healthybowl.common.saving", "Saving...") : x("healthybowl.livestock.animalDetails.editModal.save", "Save Changes")
|
|
856
861
|
})] }),
|
|
857
|
-
children: /* @__PURE__ */
|
|
862
|
+
children: /* @__PURE__ */ d("div", {
|
|
858
863
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
859
864
|
children: [
|
|
860
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
|
|
861
866
|
className: "text-sm font-medium text-text-primary",
|
|
862
|
-
children: [
|
|
863
|
-
}), /* @__PURE__ */
|
|
867
|
+
children: [x("healthybowl.livestock.animalDetails.form.name", "Name"), " *"]
|
|
868
|
+
}), /* @__PURE__ */ u("input", {
|
|
864
869
|
type: "text",
|
|
865
|
-
value:
|
|
866
|
-
onChange: (e) =>
|
|
870
|
+
value: M,
|
|
871
|
+
onChange: (e) => N(e.target.value),
|
|
867
872
|
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)]"
|
|
868
873
|
})] }),
|
|
869
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
|
|
870
875
|
className: "text-sm font-medium text-text-primary",
|
|
871
|
-
children: [
|
|
872
|
-
}), /* @__PURE__ */
|
|
876
|
+
children: [x("healthybowl.livestock.animalDetails.form.tagNumber", "Tag Number"), " *"]
|
|
877
|
+
}), /* @__PURE__ */ u("input", {
|
|
873
878
|
type: "text",
|
|
874
879
|
value: H,
|
|
875
|
-
onChange: (e) =>
|
|
880
|
+
onChange: (e) => U(e.target.value),
|
|
876
881
|
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)]"
|
|
877
882
|
})] }),
|
|
878
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
879
884
|
className: "text-sm font-medium text-text-primary",
|
|
880
|
-
children:
|
|
881
|
-
}), /* @__PURE__ */
|
|
882
|
-
value:
|
|
883
|
-
onValueChange:
|
|
884
|
-
children: [/* @__PURE__ */
|
|
885
|
+
children: x("healthybowl.livestock.animalDetails.fields.type", "Type")
|
|
886
|
+
}), /* @__PURE__ */ d(p, {
|
|
887
|
+
value: P,
|
|
888
|
+
onValueChange: F,
|
|
889
|
+
children: [/* @__PURE__ */ u(g, {
|
|
885
890
|
className: "mt-1 w-full",
|
|
886
|
-
children: /* @__PURE__ */
|
|
887
|
-
}), /* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ u(_, { placeholder: x("healthybowl.livestock.animalDetails.fields.type", "Type") })
|
|
892
|
+
}), /* @__PURE__ */ d(m, { children: [
|
|
893
|
+
/* @__PURE__ */ u(h, {
|
|
889
894
|
value: "cattle",
|
|
890
|
-
children:
|
|
895
|
+
children: x("healthybowl.livestock.animalDetails.types.cattle", "Cattle")
|
|
891
896
|
}),
|
|
892
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ u(h, {
|
|
893
898
|
value: "buffalo",
|
|
894
|
-
children:
|
|
899
|
+
children: x("healthybowl.livestock.animalDetails.types.buffalo", "Buffalo")
|
|
895
900
|
}),
|
|
896
|
-
/* @__PURE__ */
|
|
901
|
+
/* @__PURE__ */ u(h, {
|
|
897
902
|
value: "goat",
|
|
898
|
-
children:
|
|
903
|
+
children: x("healthybowl.livestock.animalDetails.types.goat", "Goat")
|
|
899
904
|
}),
|
|
900
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ u(h, {
|
|
901
906
|
value: "sheep",
|
|
902
|
-
children:
|
|
907
|
+
children: x("healthybowl.livestock.animalDetails.types.sheep", "Sheep")
|
|
903
908
|
}),
|
|
904
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ u(h, {
|
|
905
910
|
value: "pig",
|
|
906
|
-
children:
|
|
911
|
+
children: x("healthybowl.livestock.animalDetails.types.pig", "Pig")
|
|
907
912
|
}),
|
|
908
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ u(h, {
|
|
909
914
|
value: "poultry",
|
|
910
|
-
children:
|
|
915
|
+
children: x("healthybowl.livestock.animalDetails.types.poultry", "Poultry")
|
|
911
916
|
})
|
|
912
917
|
] })]
|
|
913
918
|
})] }),
|
|
914
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
915
920
|
className: "text-sm font-medium text-text-primary",
|
|
916
|
-
children:
|
|
917
|
-
}), /* @__PURE__ */
|
|
921
|
+
children: x("healthybowl.livestock.animalDetails.fields.breed", "Breed")
|
|
922
|
+
}), /* @__PURE__ */ u("input", {
|
|
918
923
|
type: "text",
|
|
919
|
-
value:
|
|
920
|
-
onChange: (e) =>
|
|
924
|
+
value: I,
|
|
925
|
+
onChange: (e) => L(e.target.value),
|
|
921
926
|
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)]"
|
|
922
927
|
})] }),
|
|
923
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
924
929
|
className: "text-sm font-medium text-text-primary",
|
|
925
|
-
children:
|
|
926
|
-
}), /* @__PURE__ */
|
|
927
|
-
value:
|
|
928
|
-
onValueChange:
|
|
929
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: x("healthybowl.livestock.animalDetails.fields.gender", "Gender")
|
|
931
|
+
}), /* @__PURE__ */ d(p, {
|
|
932
|
+
value: R,
|
|
933
|
+
onValueChange: z,
|
|
934
|
+
children: [/* @__PURE__ */ u(g, {
|
|
930
935
|
className: "mt-1 w-full",
|
|
931
|
-
children: /* @__PURE__ */
|
|
932
|
-
}), /* @__PURE__ */
|
|
936
|
+
children: /* @__PURE__ */ u(_, { placeholder: x("healthybowl.livestock.animalDetails.fields.gender", "Gender") })
|
|
937
|
+
}), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(h, {
|
|
933
938
|
value: "male",
|
|
934
|
-
children:
|
|
935
|
-
}), /* @__PURE__ */
|
|
939
|
+
children: x("healthybowl.livestock.animalDetails.genders.male", "Male")
|
|
940
|
+
}), /* @__PURE__ */ u(h, {
|
|
936
941
|
value: "female",
|
|
937
|
-
children:
|
|
942
|
+
children: x("healthybowl.livestock.animalDetails.genders.female", "Female")
|
|
938
943
|
})] })]
|
|
939
944
|
})] }),
|
|
940
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
941
946
|
className: "text-sm font-medium text-text-primary",
|
|
942
|
-
children:
|
|
943
|
-
}), /* @__PURE__ */
|
|
944
|
-
value:
|
|
945
|
-
onValueChange:
|
|
946
|
-
children: [/* @__PURE__ */
|
|
947
|
+
children: x("healthybowl.livestock.animalDetails.form.healthStatus", "Health Status")
|
|
948
|
+
}), /* @__PURE__ */ d(p, {
|
|
949
|
+
value: B,
|
|
950
|
+
onValueChange: V,
|
|
951
|
+
children: [/* @__PURE__ */ u(g, {
|
|
947
952
|
className: "mt-1 w-full",
|
|
948
|
-
children: /* @__PURE__ */
|
|
949
|
-
}), /* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
953
|
+
children: /* @__PURE__ */ u(_, { placeholder: x("healthybowl.livestock.animalDetails.form.healthStatus", "Health Status") })
|
|
954
|
+
}), /* @__PURE__ */ d(m, { children: [
|
|
955
|
+
/* @__PURE__ */ u(h, {
|
|
951
956
|
value: "healthy",
|
|
952
|
-
children:
|
|
957
|
+
children: x("healthybowl.livestock.animalDetails.healthStatuses.healthy", "Healthy")
|
|
953
958
|
}),
|
|
954
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ u(h, {
|
|
955
960
|
value: "pregnant",
|
|
956
|
-
children:
|
|
961
|
+
children: x("healthybowl.livestock.animalDetails.healthStatuses.pregnant", "Pregnant")
|
|
957
962
|
}),
|
|
958
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ u(h, {
|
|
959
964
|
value: "under_treatment",
|
|
960
|
-
children:
|
|
965
|
+
children: x("healthybowl.livestock.animalDetails.healthStatuses.underTreatment", "Under Treatment")
|
|
961
966
|
}),
|
|
962
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ u(h, {
|
|
963
968
|
value: "sick",
|
|
964
|
-
children:
|
|
969
|
+
children: x("healthybowl.livestock.animalDetails.healthStatuses.sick", "Sick")
|
|
965
970
|
}),
|
|
966
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ u(h, {
|
|
967
972
|
value: "quarantine",
|
|
968
|
-
children:
|
|
973
|
+
children: x("healthybowl.livestock.animalDetails.healthStatuses.quarantine", "Quarantine")
|
|
969
974
|
})
|
|
970
975
|
] })]
|
|
971
976
|
})] }),
|
|
972
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
973
978
|
className: "text-sm font-medium text-text-primary",
|
|
974
|
-
children:
|
|
975
|
-
}), /* @__PURE__ */
|
|
979
|
+
children: x("healthybowl.livestock.animalDetails.form.weight", "Weight (kg)")
|
|
980
|
+
}), /* @__PURE__ */ u("input", {
|
|
976
981
|
type: "number",
|
|
977
982
|
min: 0,
|
|
978
|
-
value:
|
|
979
|
-
onChange: (e) =>
|
|
983
|
+
value: Be,
|
|
984
|
+
onChange: (e) => Ve(e.target.value),
|
|
980
985
|
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)]"
|
|
981
986
|
})] }),
|
|
982
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
983
988
|
className: "text-sm font-medium text-text-primary",
|
|
984
|
-
children:
|
|
985
|
-
}), /* @__PURE__ */
|
|
989
|
+
children: x("healthybowl.livestock.animalDetails.form.vaccinations", "Vaccinations")
|
|
990
|
+
}), /* @__PURE__ */ u("input", {
|
|
986
991
|
type: "number",
|
|
987
992
|
min: 0,
|
|
988
|
-
value:
|
|
989
|
-
onChange: (e) =>
|
|
993
|
+
value: W,
|
|
994
|
+
onChange: (e) => ze(e.target.value),
|
|
990
995
|
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)]"
|
|
991
996
|
})] }),
|
|
992
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
993
998
|
className: "text-sm font-medium text-text-primary",
|
|
994
|
-
children:
|
|
995
|
-
}), /* @__PURE__ */
|
|
999
|
+
children: x("healthybowl.livestock.animalDetails.fields.dateOfBirth", "Date of Birth")
|
|
1000
|
+
}), /* @__PURE__ */ u("input", {
|
|
996
1001
|
type: "date",
|
|
997
|
-
value:
|
|
998
|
-
onChange: (e) =>
|
|
1002
|
+
value: G,
|
|
1003
|
+
onChange: (e) => He(e.target.value),
|
|
999
1004
|
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)]"
|
|
1000
1005
|
})] }),
|
|
1001
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
1002
1007
|
className: "text-sm font-medium text-text-primary",
|
|
1003
|
-
children:
|
|
1004
|
-
}), /* @__PURE__ */
|
|
1008
|
+
children: x("healthybowl.livestock.animalDetails.fields.lastCheckup", "Last Checkup")
|
|
1009
|
+
}), /* @__PURE__ */ u("input", {
|
|
1005
1010
|
type: "date",
|
|
1006
|
-
value:
|
|
1007
|
-
onChange: (e) =>
|
|
1011
|
+
value: K,
|
|
1012
|
+
onChange: (e) => Ue(e.target.value),
|
|
1008
1013
|
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)]"
|
|
1009
1014
|
})] }),
|
|
1010
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ d("div", {
|
|
1011
1016
|
className: "sm:col-span-2",
|
|
1012
|
-
children: [/* @__PURE__ */
|
|
1017
|
+
children: [/* @__PURE__ */ u("label", {
|
|
1013
1018
|
className: "text-sm font-medium text-text-primary",
|
|
1014
|
-
children:
|
|
1015
|
-
}), /* @__PURE__ */
|
|
1019
|
+
children: x("healthybowl.livestock.animalDetails.form.productionType", "Production Type")
|
|
1020
|
+
}), /* @__PURE__ */ u("input", {
|
|
1016
1021
|
type: "text",
|
|
1017
|
-
value:
|
|
1018
|
-
onChange: (e) =>
|
|
1019
|
-
placeholder:
|
|
1022
|
+
value: q,
|
|
1023
|
+
onChange: (e) => We(e.target.value),
|
|
1024
|
+
placeholder: x("healthybowl.livestock.animalDetails.form.productionTypePlaceholder", "e.g. dairy, meat, eggs"),
|
|
1020
1025
|
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)]"
|
|
1021
1026
|
})]
|
|
1022
1027
|
}),
|
|
1023
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ d("div", {
|
|
1024
1029
|
className: "sm:col-span-2",
|
|
1025
|
-
children: [/* @__PURE__ */
|
|
1030
|
+
children: [/* @__PURE__ */ u("label", {
|
|
1026
1031
|
className: "text-sm font-medium text-text-primary",
|
|
1027
|
-
children:
|
|
1028
|
-
}), /* @__PURE__ */
|
|
1032
|
+
children: x("healthybowl.livestock.animalDetails.form.photos", "Photos")
|
|
1033
|
+
}), /* @__PURE__ */ u("div", {
|
|
1029
1034
|
className: "mt-1",
|
|
1030
|
-
children: /* @__PURE__ */
|
|
1035
|
+
children: /* @__PURE__ */ u(se, {
|
|
1031
1036
|
entity: "Animal",
|
|
1032
1037
|
imageIds: Ge,
|
|
1033
1038
|
onChange: Ke
|
|
@@ -1037,14 +1042,14 @@ var y = (e) => {
|
|
|
1037
1042
|
]
|
|
1038
1043
|
})
|
|
1039
1044
|
}),
|
|
1040
|
-
/* @__PURE__ */
|
|
1041
|
-
toasts:
|
|
1042
|
-
onDismiss:
|
|
1045
|
+
/* @__PURE__ */ u(re, {
|
|
1046
|
+
toasts: Le,
|
|
1047
|
+
onDismiss: Re
|
|
1043
1048
|
})
|
|
1044
1049
|
]
|
|
1045
1050
|
});
|
|
1046
1051
|
};
|
|
1047
1052
|
//#endregion
|
|
1048
|
-
export {
|
|
1053
|
+
export { v as AnimalDetailsPage };
|
|
1049
1054
|
|
|
1050
1055
|
//# sourceMappingURL=AnimalDetailsPage.js.map
|