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