@burdenoff/microfe-healthybowl 2026.625.2 → 2026.625.4
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/crops/CropDetailsPage.js +286 -281
- package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +209 -201
- package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +199 -195
- package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +209 -205
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropsPage.js +5 -3
- package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +309 -302
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +373 -365
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +403 -392
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/AccessibilitySettingsPage.js +88 -82
- package/dist/healthybowl/pages/government-schemes/AccessibilitySettingsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +60 -56
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +237 -235
- package/dist/healthybowl/pages/government-schemes/CommunicationPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/GovernmentDashboardPage.js +73 -68
- package/dist/healthybowl/pages/government-schemes/GovernmentDashboardPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +119 -117
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDiscoveryPage.js +131 -125
- package/dist/healthybowl/pages/government-schemes/SchemeDiscoveryPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemesOverviewPage.js +112 -105
- package/dist/healthybowl/pages/government-schemes/SchemesOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +214 -206
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
- 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
|
@@ -3,32 +3,33 @@ import { useBasePath as t } from "../../hooks/useBasePath.js";
|
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { StatusBadge as r } from "../../components/StatusBadge.js";
|
|
5
5
|
import { EmptyState as ee } from "../../components/EmptyState.js";
|
|
6
|
-
import { ErrorState as
|
|
7
|
-
import { ToastContainer as
|
|
8
|
-
import { useConfirm as
|
|
9
|
-
import { Breadcrumbs as
|
|
10
|
-
import { PageLoader as
|
|
11
|
-
import { Modal as
|
|
12
|
-
import { HBEntityTags as
|
|
13
|
-
import { HBEntityImages as
|
|
6
|
+
import { ErrorState as te } from "../../components/ErrorState.js";
|
|
7
|
+
import { ToastContainer as ne } from "../../components/Toast.js";
|
|
8
|
+
import { useConfirm as re } from "../../components/ConfirmDialog.js";
|
|
9
|
+
import { Breadcrumbs as ie } from "../../components/Breadcrumbs.js";
|
|
10
|
+
import { PageLoader as ae } from "../../components/PageLoader.js";
|
|
11
|
+
import { Modal as oe } from "../../components/Modal.js";
|
|
12
|
+
import { HBEntityTags as se } from "../../components/HBEntityTags.js";
|
|
13
|
+
import { HBEntityImages as i } from "../../components/HBEntityImages.js";
|
|
14
14
|
import "../../components/index.js";
|
|
15
|
-
import { useHealthyBowlData as
|
|
16
|
-
import { useToast as
|
|
17
|
-
import { isNative as
|
|
15
|
+
import { useHealthyBowlData as ce } from "../../hooks/useHealthyBowlData.js";
|
|
16
|
+
import { useToast as le } from "../../hooks/useToast.js";
|
|
17
|
+
import { isNative as a, nativeNotify as o, nativeToast as s } from "../../../utils/nativeBridge.js";
|
|
18
18
|
import { useEffect as c, useState as l } from "react";
|
|
19
|
-
import { useI18n as
|
|
20
|
-
import { AlertTriangle as
|
|
21
|
-
import { useNavigate as
|
|
22
|
-
import { Fragment as
|
|
19
|
+
import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
|
+
import { AlertTriangle as de, ArrowLeft as fe, Calendar as u, Droplets as pe, Edit as me, Leaf as he, MapPin as d, Sprout as f, Sun as ge, Trash2 as _e, TrendingUp as p } from "lucide-react";
|
|
21
|
+
import { useNavigate as ve, useParams as ye } from "react-router-dom";
|
|
22
|
+
import { Fragment as be, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
23
|
+
import { Button as g, Select as xe, SelectContent as Se, SelectItem as _, SelectTrigger as Ce, SelectValue as we } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
//#region src/healthybowl/pages/crops/CropDetailsPage.tsx
|
|
24
|
-
var
|
|
25
|
+
var v = (e) => {
|
|
25
26
|
switch (e) {
|
|
26
27
|
case "excellent": return "success";
|
|
27
28
|
case "good": return "info";
|
|
28
29
|
case "fair": return "warning";
|
|
29
30
|
default: return "error";
|
|
30
31
|
}
|
|
31
|
-
},
|
|
32
|
+
}, Te = (e) => {
|
|
32
33
|
switch (e) {
|
|
33
34
|
case "harvest_ready": return "success";
|
|
34
35
|
case "growing":
|
|
@@ -36,76 +37,76 @@ var _ = (e) => {
|
|
|
36
37
|
case "planted": return "muted";
|
|
37
38
|
default: return "default";
|
|
38
39
|
}
|
|
39
|
-
},
|
|
40
|
+
}, y = [
|
|
40
41
|
"Seedling",
|
|
41
42
|
"Vegetative",
|
|
42
43
|
"Flowering",
|
|
43
44
|
"Fruiting",
|
|
44
45
|
"Mature"
|
|
45
|
-
],
|
|
46
|
-
let { t:
|
|
47
|
-
Seedling:
|
|
48
|
-
Vegetative:
|
|
49
|
-
Flowering:
|
|
50
|
-
Fruiting:
|
|
51
|
-
Mature:
|
|
52
|
-
}, { cropId:
|
|
46
|
+
], b = () => {
|
|
47
|
+
let { t: b } = ue(), x = re(), { crops: S, fields: C, errors: w, loadings: T, updateCrop: E, deleteCrop: D, refetch: O } = ce(), Ee = {
|
|
48
|
+
Seedling: b("healthybowl.crops.detail.stages.seedling", "Seedling"),
|
|
49
|
+
Vegetative: b("healthybowl.crops.detail.stages.vegetative", "Vegetative"),
|
|
50
|
+
Flowering: b("healthybowl.crops.detail.stages.flowering", "Flowering"),
|
|
51
|
+
Fruiting: b("healthybowl.crops.detail.stages.fruiting", "Fruiting"),
|
|
52
|
+
Mature: b("healthybowl.crops.detail.stages.mature", "Mature")
|
|
53
|
+
}, { cropId: k } = ye(), A = ve(), { buildPath: j } = t(), { toasts: De, toast: M, dismiss: Oe } = le(), [ke, N] = l(!1), [P, F] = l(!1), [I, Ae] = l(() => S.find((e) => e.id === k));
|
|
53
54
|
c(() => {
|
|
54
|
-
let e =
|
|
55
|
-
e &&
|
|
56
|
-
}, [
|
|
57
|
-
let [L, R] = l(""), [z, B] = l(""), [V, H] = l(""), [U, W] = l(""), [G, K] = l(""), [q, J] = l("good"), [Y, X] = l([]),
|
|
55
|
+
let e = S.find((e) => e.id === k);
|
|
56
|
+
e && Ae(e);
|
|
57
|
+
}, [S, k]);
|
|
58
|
+
let [L, R] = l(""), [z, B] = l(""), [V, H] = l(""), [U, W] = l(""), [G, K] = l(""), [q, J] = l("good"), [Y, X] = l([]), je = () => {
|
|
58
59
|
I && (R(I.name), B(I.variety), H(I.category), W(String(I.yieldEstimate)), K(I.expectedHarvestDate), J(I.healthStatus), X(I.imageIds ?? []), N(!0));
|
|
59
60
|
};
|
|
60
|
-
if (!I) return /* @__PURE__ */
|
|
61
|
-
title:
|
|
62
|
-
children:
|
|
63
|
-
title:
|
|
64
|
-
description:
|
|
65
|
-
action: /* @__PURE__ */
|
|
66
|
-
onClick: () =>
|
|
67
|
-
|
|
68
|
-
children: y("healthybowl.crops.detail.actions.backToCrops", "Back to Crops")
|
|
61
|
+
if (!I) return /* @__PURE__ */ m(n, {
|
|
62
|
+
title: b("healthybowl.crops.detail.notFound.pageTitle", "Crop Not Found"),
|
|
63
|
+
children: T.crops ? /* @__PURE__ */ m(ae, {}) : w.crops ? /* @__PURE__ */ m(te, { onRetry: O }) : /* @__PURE__ */ m(ee, {
|
|
64
|
+
title: b("healthybowl.crops.detail.notFound.title", "Crop not found"),
|
|
65
|
+
description: b("healthybowl.crops.detail.notFound.description", "The crop you are looking for does not exist."),
|
|
66
|
+
action: /* @__PURE__ */ m(g, {
|
|
67
|
+
onClick: () => A(j("crops")),
|
|
68
|
+
children: b("healthybowl.crops.detail.actions.backToCrops", "Back to Crops")
|
|
69
69
|
})
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
|
-
let Z =
|
|
73
|
-
return I ? /* @__PURE__ */
|
|
72
|
+
let Z = C.find((e) => e.id === I.field || e.name === I.fieldName), Q = y.indexOf(I.growthStage), $ = I.daysToHarvest, Me = Z ? Math.round(I.yieldEstimate / Z.area) : I.yieldEstimate;
|
|
73
|
+
return I ? /* @__PURE__ */ h(n, {
|
|
74
74
|
title: I.name,
|
|
75
|
-
description:
|
|
75
|
+
description: b("healthybowl.crops.detail.headerSubtitle", "{{variety}} - {{category}}", {
|
|
76
76
|
variety: I.variety,
|
|
77
77
|
category: I.category
|
|
78
78
|
}),
|
|
79
|
-
actions: /* @__PURE__ */
|
|
79
|
+
actions: /* @__PURE__ */ h("div", {
|
|
80
80
|
className: "flex items-center gap-2",
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */ g
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
/* @__PURE__ */ h(g, {
|
|
83
|
+
variant: "outline",
|
|
84
|
+
onClick: je,
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ m(me, { className: "h-4 w-4" }),
|
|
87
87
|
" ",
|
|
88
|
-
|
|
88
|
+
b("healthybowl.common.edit", "Edit")
|
|
89
89
|
]
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */ g
|
|
91
|
+
/* @__PURE__ */ h(g, {
|
|
92
|
+
variant: "destructive",
|
|
92
93
|
onClick: async () => {
|
|
93
|
-
if (I && await
|
|
94
|
-
title:
|
|
95
|
-
message:
|
|
96
|
-
okButtonTitle:
|
|
97
|
-
cancelButtonTitle:
|
|
94
|
+
if (I && await x({
|
|
95
|
+
title: b("healthybowl.crops.detail.delete.confirmTitle", "Delete crop?"),
|
|
96
|
+
message: b("healthybowl.crops.detail.delete.confirmMessage", "{{name}} will be permanently removed.", { name: I.name }),
|
|
97
|
+
okButtonTitle: b("healthybowl.common.delete", "Delete"),
|
|
98
|
+
cancelButtonTitle: b("healthybowl.common.cancel", "Cancel")
|
|
98
99
|
}) !== !1) {
|
|
99
100
|
F(!0);
|
|
100
101
|
try {
|
|
101
|
-
await
|
|
102
|
-
title:
|
|
103
|
-
description:
|
|
102
|
+
await D(I.id), M({
|
|
103
|
+
title: b("healthybowl.crops.detail.toast.deleted.title", "Crop deleted"),
|
|
104
|
+
description: b("healthybowl.crops.detail.toast.deleted.description", "{{name}} has been removed.", { name: I.name }),
|
|
104
105
|
variant: "success"
|
|
105
|
-
}),
|
|
106
|
+
}), a() && (s(b("healthybowl.crops.detail.toast.deleted.title", "Crop deleted")), o("success")), A(j("crops"));
|
|
106
107
|
} catch (e) {
|
|
107
108
|
M({
|
|
108
|
-
title:
|
|
109
|
+
title: b("healthybowl.crops.detail.toast.deleteFailed.title", "Delete failed"),
|
|
109
110
|
description: String(e),
|
|
110
111
|
variant: "error"
|
|
111
112
|
}), F(!1);
|
|
@@ -113,141 +114,140 @@ var _ = (e) => {
|
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
116
|
disabled: P,
|
|
116
|
-
className: "inline-flex items-center gap-1.5 rounded-md border border-status-error-border px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg/10 disabled:opacity-60",
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ m(_e, { className: "h-4 w-4" }),
|
|
119
119
|
" ",
|
|
120
|
-
|
|
120
|
+
b("healthybowl.common.delete", "Delete")
|
|
121
121
|
]
|
|
122
122
|
}),
|
|
123
|
-
/* @__PURE__ */ g
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
/* @__PURE__ */ h(g, {
|
|
124
|
+
variant: "outline",
|
|
125
|
+
onClick: () => A(j("crops")),
|
|
126
126
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ m(fe, { className: "h-4 w-4" }),
|
|
128
128
|
" ",
|
|
129
|
-
|
|
129
|
+
b("healthybowl.common.back", "Back")
|
|
130
130
|
]
|
|
131
131
|
})
|
|
132
132
|
]
|
|
133
133
|
}),
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
label:
|
|
137
|
-
href:
|
|
135
|
+
/* @__PURE__ */ m(ie, { items: [{
|
|
136
|
+
label: b("healthybowl.crops.detail.breadcrumb.crops", "Crops"),
|
|
137
|
+
href: j("crops")
|
|
138
138
|
}, { label: I.name }] }),
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ h("div", {
|
|
140
140
|
className: "flex flex-wrap items-center gap-3",
|
|
141
141
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ m(r, {
|
|
143
143
|
label: (I.status ?? "unknown").replace("_", " "),
|
|
144
|
-
variant:
|
|
144
|
+
variant: Te(I.status ?? "unknown"),
|
|
145
145
|
dot: !0
|
|
146
146
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ m(r, {
|
|
148
148
|
label: I.healthStatus,
|
|
149
|
-
variant:
|
|
149
|
+
variant: v(I.healthStatus),
|
|
150
150
|
dot: !0
|
|
151
151
|
}),
|
|
152
|
-
I.organicCertified && /* @__PURE__ */
|
|
153
|
-
label:
|
|
152
|
+
I.organicCertified && /* @__PURE__ */ m(r, {
|
|
153
|
+
label: b("healthybowl.crops.detail.badge.organicCertified", "Organic Certified"),
|
|
154
154
|
variant: "success"
|
|
155
155
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ m(r, {
|
|
157
157
|
label: I.season,
|
|
158
158
|
variant: "muted"
|
|
159
159
|
})
|
|
160
160
|
]
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ m(se, {
|
|
163
163
|
entityType: "CROP",
|
|
164
164
|
entityId: I.id,
|
|
165
165
|
tags: I.entityTags ?? [],
|
|
166
166
|
className: "mt-1"
|
|
167
167
|
}),
|
|
168
|
-
(I.imageIds ?? []).length > 0 && /* @__PURE__ */
|
|
168
|
+
(I.imageIds ?? []).length > 0 && /* @__PURE__ */ m(i, {
|
|
169
169
|
entity: "Crop",
|
|
170
170
|
imageIds: I.imageIds ?? [],
|
|
171
171
|
onChange: () => {},
|
|
172
172
|
readOnly: !0,
|
|
173
173
|
className: "mt-1"
|
|
174
174
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ h("div", {
|
|
176
176
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ h("div", {
|
|
178
178
|
className: "space-y-6 lg:col-span-2",
|
|
179
179
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ h("div", {
|
|
181
181
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
183
183
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
184
184
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ m(ge, { className: "h-4 w-4 text-warning" }),
|
|
186
186
|
" ",
|
|
187
|
-
|
|
187
|
+
b("healthybowl.crops.detail.overview.title", "Crop Overview")
|
|
188
188
|
]
|
|
189
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ m("div", {
|
|
190
190
|
className: "grid grid-cols-2 gap-4 md:grid-cols-4",
|
|
191
191
|
children: [
|
|
192
192
|
{
|
|
193
193
|
key: "category",
|
|
194
|
-
icon:
|
|
195
|
-
label:
|
|
194
|
+
icon: f,
|
|
195
|
+
label: b("healthybowl.crops.detail.overview.category", "Category"),
|
|
196
196
|
value: I.category
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
key: "season",
|
|
200
|
-
icon:
|
|
201
|
-
label:
|
|
200
|
+
icon: u,
|
|
201
|
+
label: b("healthybowl.crops.detail.overview.season", "Season"),
|
|
202
202
|
value: I.season
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
key: "growthStage",
|
|
206
|
-
icon:
|
|
207
|
-
label:
|
|
206
|
+
icon: he,
|
|
207
|
+
label: b("healthybowl.crops.detail.overview.growthStage", "Growth Stage"),
|
|
208
208
|
value: I.growthStage
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
key: "field",
|
|
212
|
-
icon:
|
|
213
|
-
label:
|
|
212
|
+
icon: d,
|
|
213
|
+
label: b("healthybowl.crops.detail.overview.field", "Field"),
|
|
214
214
|
value: I.fieldName
|
|
215
215
|
}
|
|
216
|
-
].map(({ key: e, icon: t, label: n, value: r }) => /* @__PURE__ */
|
|
216
|
+
].map(({ key: e, icon: t, label: n, value: r }) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", {
|
|
217
217
|
className: "flex items-center gap-1 text-text-secondary",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ m(t, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ m("span", {
|
|
219
219
|
className: "text-xs",
|
|
220
220
|
children: n
|
|
221
221
|
})]
|
|
222
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ m("p", {
|
|
223
223
|
className: "mt-1 text-sm font-semibold capitalize text-text-primary",
|
|
224
224
|
children: r
|
|
225
225
|
})] }, e))
|
|
226
226
|
})]
|
|
227
227
|
}),
|
|
228
|
-
Z && /* @__PURE__ */
|
|
228
|
+
Z && /* @__PURE__ */ h("div", {
|
|
229
229
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
231
231
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
232
232
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ m(d, { className: "h-4 w-4 text-success" }),
|
|
234
234
|
" ",
|
|
235
|
-
|
|
235
|
+
b("healthybowl.crops.detail.fieldDetails.title", "Field Details")
|
|
236
236
|
]
|
|
237
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ h("div", {
|
|
238
238
|
className: "grid grid-cols-2 gap-4 md:grid-cols-4",
|
|
239
239
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
|
|
241
241
|
className: "text-xs text-text-secondary",
|
|
242
|
-
children:
|
|
243
|
-
}), /* @__PURE__ */
|
|
242
|
+
children: b("healthybowl.crops.detail.fieldDetails.field", "Field")
|
|
243
|
+
}), /* @__PURE__ */ m("p", {
|
|
244
244
|
className: "text-sm font-semibold text-text-primary",
|
|
245
245
|
children: Z.name
|
|
246
246
|
})] }),
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
|
|
248
248
|
className: "text-xs text-text-secondary",
|
|
249
|
-
children:
|
|
250
|
-
}), /* @__PURE__ */
|
|
249
|
+
children: b("healthybowl.crops.detail.fieldDetails.area", "Area")
|
|
250
|
+
}), /* @__PURE__ */ h("p", {
|
|
251
251
|
className: "text-sm font-semibold text-text-primary",
|
|
252
252
|
children: [
|
|
253
253
|
Z.area,
|
|
@@ -255,120 +255,120 @@ var _ = (e) => {
|
|
|
255
255
|
Z.unit
|
|
256
256
|
]
|
|
257
257
|
})] }),
|
|
258
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
|
|
259
259
|
className: "text-xs text-text-secondary",
|
|
260
|
-
children:
|
|
261
|
-
}), /* @__PURE__ */
|
|
260
|
+
children: b("healthybowl.crops.detail.fieldDetails.soilType", "Soil Type")
|
|
261
|
+
}), /* @__PURE__ */ m("p", {
|
|
262
262
|
className: "text-sm font-semibold text-text-primary",
|
|
263
263
|
children: Z.soilType
|
|
264
264
|
})] }),
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
|
|
266
266
|
className: "text-xs text-text-secondary",
|
|
267
|
-
children:
|
|
268
|
-
}), /* @__PURE__ */
|
|
267
|
+
children: b("healthybowl.crops.detail.fieldDetails.irrigation", "Irrigation")
|
|
268
|
+
}), /* @__PURE__ */ m("p", {
|
|
269
269
|
className: "text-sm font-semibold text-text-primary",
|
|
270
270
|
children: Z.irrigationType
|
|
271
271
|
})] })
|
|
272
272
|
]
|
|
273
273
|
})]
|
|
274
274
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ h("div", {
|
|
276
276
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
277
277
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ h("h3", {
|
|
279
279
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
280
280
|
children: [
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ m(u, { className: "h-4 w-4 text-info" }),
|
|
282
282
|
" ",
|
|
283
|
-
|
|
283
|
+
b("healthybowl.crops.detail.timeline.title", "Timeline")
|
|
284
284
|
]
|
|
285
285
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ h("div", {
|
|
287
287
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
|
|
289
289
|
className: "text-xs text-text-secondary",
|
|
290
|
-
children:
|
|
291
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: b("healthybowl.crops.detail.timeline.plantedOn", "Planted On")
|
|
291
|
+
}), /* @__PURE__ */ m("p", {
|
|
292
292
|
className: "text-sm font-semibold text-text-primary",
|
|
293
293
|
children: e(I.plantingDate)
|
|
294
|
-
})] }), /* @__PURE__ */
|
|
294
|
+
})] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
|
|
295
295
|
className: "text-xs text-text-secondary",
|
|
296
|
-
children:
|
|
297
|
-
}), /* @__PURE__ */
|
|
296
|
+
children: b("healthybowl.crops.detail.timeline.expectedHarvest", "Expected Harvest")
|
|
297
|
+
}), /* @__PURE__ */ m("p", {
|
|
298
298
|
className: "text-sm font-semibold text-text-primary",
|
|
299
299
|
children: e(I.expectedHarvestDate)
|
|
300
300
|
})] })]
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ m("div", {
|
|
303
303
|
className: "mt-4",
|
|
304
|
-
children: $ > 0 ? /* @__PURE__ */
|
|
304
|
+
children: $ > 0 ? /* @__PURE__ */ m("div", {
|
|
305
305
|
className: "rounded-lg bg-info/10 p-3",
|
|
306
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ h("p", {
|
|
307
307
|
className: "text-sm text-info",
|
|
308
308
|
children: [
|
|
309
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ m("span", {
|
|
310
310
|
className: "font-bold",
|
|
311
|
-
children:
|
|
311
|
+
children: b("healthybowl.crops.detail.timeline.daysCount", "{{count}} days", { count: $ })
|
|
312
312
|
}),
|
|
313
313
|
" ",
|
|
314
|
-
|
|
314
|
+
b("healthybowl.crops.detail.timeline.untilHarvest", "until expected harvest")
|
|
315
315
|
]
|
|
316
316
|
})
|
|
317
|
-
}) : /* @__PURE__ */
|
|
317
|
+
}) : /* @__PURE__ */ m("div", {
|
|
318
318
|
className: "rounded-lg bg-success-subtle p-3",
|
|
319
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ m("p", {
|
|
320
320
|
className: "text-sm font-bold text-success",
|
|
321
|
-
children:
|
|
321
|
+
children: b("healthybowl.crops.detail.timeline.readyForHarvest", "Ready for harvest!")
|
|
322
322
|
})
|
|
323
323
|
})
|
|
324
324
|
})
|
|
325
325
|
]
|
|
326
326
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ h("div", {
|
|
328
328
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
329
329
|
children: [
|
|
330
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ h("div", {
|
|
331
331
|
className: "flex items-center justify-between",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
333
333
|
className: "text-sm font-semibold text-text-primary",
|
|
334
|
-
children:
|
|
335
|
-
}), /* @__PURE__ */
|
|
334
|
+
children: b("healthybowl.crops.detail.growthProgress.title", "Growth Progress")
|
|
335
|
+
}), /* @__PURE__ */ h("span", {
|
|
336
336
|
className: "text-lg font-bold text-text-primary",
|
|
337
337
|
children: [I.progress, "%"]
|
|
338
338
|
})]
|
|
339
339
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ m("div", {
|
|
341
341
|
className: "mt-3 h-4 rounded-full bg-bg-sunken",
|
|
342
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ m("div", {
|
|
343
343
|
className: "h-4 rounded-full bg-action-primary-bg transition-all",
|
|
344
344
|
style: { width: `${I.progress}%` }
|
|
345
345
|
})
|
|
346
346
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ h("div", {
|
|
348
348
|
className: "mt-6",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ m("h4", {
|
|
350
350
|
className: "mb-3 text-xs font-medium text-text-secondary",
|
|
351
|
-
children:
|
|
352
|
-
}), /* @__PURE__ */
|
|
351
|
+
children: b("healthybowl.crops.detail.growthProgress.stageLabel", "Growth Stage")
|
|
352
|
+
}), /* @__PURE__ */ m("div", {
|
|
353
353
|
className: "flex items-center",
|
|
354
|
-
children:
|
|
354
|
+
children: y.map((e, t) => /* @__PURE__ */ h("div", {
|
|
355
355
|
className: "flex flex-1 flex-col items-center gap-1.5",
|
|
356
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ h("div", {
|
|
357
357
|
className: "flex w-full items-center",
|
|
358
358
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ m("div", { className: `h-0.5 flex-1 ${t === 0 ? "bg-transparent" : t <= Q ? "bg-action-primary-bg" : "bg-bg-sunken"}` }),
|
|
360
|
+
/* @__PURE__ */ m("div", {
|
|
361
361
|
className: `h-4 w-4 shrink-0 rounded-full border-2 ${t <= Q ? "border-primary bg-action-primary-bg" : "border-muted bg-bg-surface"}`,
|
|
362
|
-
children: t <= Q && /* @__PURE__ */
|
|
362
|
+
children: t <= Q && /* @__PURE__ */ m("div", {
|
|
363
363
|
className: "flex h-full items-center justify-center",
|
|
364
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ m("div", { className: "h-1.5 w-1.5 rounded-full bg-primary-foreground" })
|
|
365
365
|
})
|
|
366
366
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ m("div", { className: `h-0.5 flex-1 ${t === y.length - 1 ? "bg-transparent" : t < Q ? "bg-action-primary-bg" : "bg-bg-sunken"}` })
|
|
368
368
|
]
|
|
369
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ m("span", {
|
|
370
370
|
className: `text-center text-xs ${t <= Q ? "font-medium text-text-primary" : "text-text-secondary"}`,
|
|
371
|
-
children:
|
|
371
|
+
children: Ee[e] ?? e
|
|
372
372
|
})]
|
|
373
373
|
}, e))
|
|
374
374
|
})]
|
|
@@ -376,87 +376,87 @@ var _ = (e) => {
|
|
|
376
376
|
]
|
|
377
377
|
})
|
|
378
378
|
]
|
|
379
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ h("div", {
|
|
380
380
|
className: "space-y-6",
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ h("div", {
|
|
383
383
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
384
384
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ m("h3", {
|
|
386
386
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
387
|
-
children:
|
|
387
|
+
children: b("healthybowl.crops.detail.currentStatus.title", "Current Status")
|
|
388
388
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ h("div", {
|
|
390
390
|
className: "space-y-3",
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ h("div", {
|
|
393
393
|
className: "flex items-center justify-between",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ m("span", {
|
|
395
395
|
className: "text-xs text-text-secondary",
|
|
396
|
-
children:
|
|
397
|
-
}), /* @__PURE__ */
|
|
396
|
+
children: b("healthybowl.crops.detail.currentStatus.health", "Health")
|
|
397
|
+
}), /* @__PURE__ */ m(r, {
|
|
398
398
|
label: I.healthStatus,
|
|
399
|
-
variant:
|
|
399
|
+
variant: v(I.healthStatus)
|
|
400
400
|
})]
|
|
401
401
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ h("div", {
|
|
403
403
|
className: "flex items-center justify-between",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ m("span", {
|
|
405
405
|
className: "text-xs text-text-secondary",
|
|
406
|
-
children:
|
|
407
|
-
}), /* @__PURE__ */
|
|
406
|
+
children: b("healthybowl.crops.detail.currentStatus.growthStage", "Growth Stage")
|
|
407
|
+
}), /* @__PURE__ */ m("span", {
|
|
408
408
|
className: "text-xs font-medium text-text-primary",
|
|
409
409
|
children: I.growthStage
|
|
410
410
|
})]
|
|
411
411
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ h("div", {
|
|
413
413
|
className: "flex items-center justify-between",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ m("span", {
|
|
415
415
|
className: "text-xs text-text-secondary",
|
|
416
|
-
children:
|
|
417
|
-
}), /* @__PURE__ */
|
|
416
|
+
children: b("healthybowl.crops.detail.currentStatus.organic", "Organic")
|
|
417
|
+
}), /* @__PURE__ */ m("span", {
|
|
418
418
|
className: "text-xs font-medium text-text-primary",
|
|
419
|
-
children: I.organicCertified ?
|
|
419
|
+
children: I.organicCertified ? b("healthybowl.common.yes", "Yes") : b("healthybowl.common.no", "No")
|
|
420
420
|
})]
|
|
421
421
|
})
|
|
422
422
|
]
|
|
423
423
|
}),
|
|
424
|
-
I.healthStatus === "fair" && /* @__PURE__ */
|
|
424
|
+
I.healthStatus === "fair" && /* @__PURE__ */ m("div", {
|
|
425
425
|
className: "mt-3 rounded-lg bg-warning/10 p-3",
|
|
426
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ h("div", {
|
|
427
427
|
className: "flex items-start gap-2",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ m(de, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), /* @__PURE__ */ m("p", {
|
|
429
429
|
className: "text-xs text-warning",
|
|
430
|
-
children:
|
|
430
|
+
children: b("healthybowl.crops.detail.currentStatus.attentionWarning", "This crop needs attention. Check for potential issues.")
|
|
431
431
|
})]
|
|
432
432
|
})
|
|
433
433
|
})
|
|
434
434
|
]
|
|
435
435
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ h("div", {
|
|
437
437
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
439
439
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
440
440
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ m(p, { className: "h-4 w-4 text-success" }),
|
|
442
442
|
" ",
|
|
443
|
-
|
|
443
|
+
b("healthybowl.crops.detail.yield.title", "Yield Estimation")
|
|
444
444
|
]
|
|
445
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ h("div", {
|
|
446
446
|
className: "text-center",
|
|
447
447
|
children: [
|
|
448
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ m("p", {
|
|
449
449
|
className: "text-3xl font-bold text-success",
|
|
450
450
|
children: (I.yieldEstimate ?? 0).toLocaleString()
|
|
451
451
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ m("p", {
|
|
453
453
|
className: "text-xs text-text-secondary",
|
|
454
|
-
children:
|
|
454
|
+
children: b("healthybowl.crops.detail.yield.expected", "{{unit}} expected", { unit: I.yieldUnit ?? b("healthybowl.crops.detail.yield.unitsFallback", "units") })
|
|
455
455
|
}),
|
|
456
|
-
Z && /* @__PURE__ */
|
|
456
|
+
Z && /* @__PURE__ */ m("p", {
|
|
457
457
|
className: "mt-2 text-xs text-text-secondary",
|
|
458
|
-
children:
|
|
459
|
-
amount:
|
|
458
|
+
children: b("healthybowl.crops.detail.yield.perUnit", "~{{amount}} {{unit}} per {{denominator}}", {
|
|
459
|
+
amount: Me,
|
|
460
460
|
unit: I.yieldUnit,
|
|
461
461
|
denominator: (Z.unit ?? "").replace(/s$/, "")
|
|
462
462
|
})
|
|
@@ -464,48 +464,52 @@ var _ = (e) => {
|
|
|
464
464
|
]
|
|
465
465
|
})]
|
|
466
466
|
}),
|
|
467
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ h("div", {
|
|
468
468
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
469
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
470
470
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
471
|
-
children:
|
|
472
|
-
}), /* @__PURE__ */
|
|
471
|
+
children: b("healthybowl.crops.detail.quickActions.title", "Quick Actions")
|
|
472
|
+
}), /* @__PURE__ */ h("div", {
|
|
473
473
|
className: "space-y-2",
|
|
474
474
|
children: [
|
|
475
|
-
/* @__PURE__ */ g
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
/* @__PURE__ */ h(g, {
|
|
476
|
+
variant: "outline",
|
|
477
|
+
onClick: () => A(j("analytics")),
|
|
478
|
+
className: "w-full justify-start",
|
|
478
479
|
children: [
|
|
479
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ m(p, { className: "h-4 w-4 text-text-secondary" }),
|
|
480
481
|
" ",
|
|
481
|
-
|
|
482
|
+
b("healthybowl.crops.detail.quickActions.viewAnalytics", "View Analytics")
|
|
482
483
|
]
|
|
483
484
|
}),
|
|
484
|
-
/* @__PURE__ */ g
|
|
485
|
-
|
|
486
|
-
|
|
485
|
+
/* @__PURE__ */ h(g, {
|
|
486
|
+
variant: "outline",
|
|
487
|
+
onClick: () => A(j("weather")),
|
|
488
|
+
className: "w-full justify-start",
|
|
487
489
|
children: [
|
|
488
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ m(pe, { className: "h-4 w-4 text-text-secondary" }),
|
|
489
491
|
" ",
|
|
490
|
-
|
|
492
|
+
b("healthybowl.crops.detail.quickActions.checkWeather", "Check Weather")
|
|
491
493
|
]
|
|
492
494
|
}),
|
|
493
|
-
Z && /* @__PURE__ */ g
|
|
494
|
-
|
|
495
|
-
|
|
495
|
+
Z && /* @__PURE__ */ h(g, {
|
|
496
|
+
variant: "outline",
|
|
497
|
+
onClick: () => A(j(`crops/fields/${Z.id}`)),
|
|
498
|
+
className: "w-full justify-start",
|
|
496
499
|
children: [
|
|
497
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ m(d, { className: "h-4 w-4 text-text-secondary" }),
|
|
498
501
|
" ",
|
|
499
|
-
|
|
502
|
+
b("healthybowl.crops.detail.quickActions.viewField", "View Field")
|
|
500
503
|
]
|
|
501
504
|
}),
|
|
502
|
-
/* @__PURE__ */ g
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
/* @__PURE__ */ h(g, {
|
|
506
|
+
variant: "outline",
|
|
507
|
+
onClick: () => A(j("crops")),
|
|
508
|
+
className: "w-full justify-start",
|
|
505
509
|
children: [
|
|
506
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ m(f, { className: "h-4 w-4 text-text-secondary" }),
|
|
507
511
|
" ",
|
|
508
|
-
|
|
512
|
+
b("healthybowl.crops.detail.quickActions.allCrops", "All Crops")
|
|
509
513
|
]
|
|
510
514
|
})
|
|
511
515
|
]
|
|
@@ -514,30 +518,30 @@ var _ = (e) => {
|
|
|
514
518
|
]
|
|
515
519
|
})]
|
|
516
520
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
open:
|
|
521
|
+
/* @__PURE__ */ m(oe, {
|
|
522
|
+
open: ke,
|
|
519
523
|
onClose: () => N(!1),
|
|
520
|
-
title:
|
|
521
|
-
description:
|
|
524
|
+
title: b("healthybowl.crops.detail.editModal.title", "Edit {{name}}", { name: I.name }),
|
|
525
|
+
description: b("healthybowl.crops.detail.editModal.description", "Update crop details"),
|
|
522
526
|
size: "lg",
|
|
523
|
-
footer: /* @__PURE__ */
|
|
527
|
+
footer: /* @__PURE__ */ h(be, { children: [/* @__PURE__ */ m(g, {
|
|
528
|
+
variant: "outline",
|
|
524
529
|
onClick: () => N(!1),
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}), /* @__PURE__ */ h("button", {
|
|
530
|
+
children: b("healthybowl.common.cancel", "Cancel")
|
|
531
|
+
}), /* @__PURE__ */ m(g, {
|
|
528
532
|
onClick: async () => {
|
|
529
533
|
if (I) {
|
|
530
534
|
if (!L.trim()) {
|
|
531
535
|
M({
|
|
532
|
-
title:
|
|
533
|
-
description:
|
|
536
|
+
title: b("healthybowl.crops.detail.toast.missingFields.title", "Missing required fields"),
|
|
537
|
+
description: b("healthybowl.crops.detail.toast.missingFields.description", "Crop name is required."),
|
|
534
538
|
variant: "warning"
|
|
535
539
|
});
|
|
536
540
|
return;
|
|
537
541
|
}
|
|
538
542
|
F(!0);
|
|
539
543
|
try {
|
|
540
|
-
await
|
|
544
|
+
await E({
|
|
541
545
|
id: I.id,
|
|
542
546
|
name: L.trim(),
|
|
543
547
|
variety: z,
|
|
@@ -547,13 +551,13 @@ var _ = (e) => {
|
|
|
547
551
|
healthStatus: q,
|
|
548
552
|
imageIds: Y
|
|
549
553
|
}), M({
|
|
550
|
-
title:
|
|
551
|
-
description:
|
|
554
|
+
title: b("healthybowl.crops.detail.toast.updated.title", "Crop updated"),
|
|
555
|
+
description: b("healthybowl.crops.detail.toast.updated.description", "{{name}} details have been saved.", { name: L.trim() }),
|
|
552
556
|
variant: "success"
|
|
553
557
|
}), N(!1);
|
|
554
558
|
} catch (e) {
|
|
555
559
|
M({
|
|
556
|
-
title:
|
|
560
|
+
title: b("healthybowl.crops.detail.toast.updateFailed.title", "Update failed"),
|
|
557
561
|
description: String(e),
|
|
558
562
|
variant: "error"
|
|
559
563
|
});
|
|
@@ -563,92 +567,93 @@ var _ = (e) => {
|
|
|
563
567
|
}
|
|
564
568
|
},
|
|
565
569
|
disabled: P,
|
|
566
|
-
|
|
567
|
-
children: P ? y("healthybowl.crops.detail.editModal.saving", "Saving...") : y("healthybowl.crops.detail.editModal.saveChanges", "Save Changes")
|
|
570
|
+
children: P ? b("healthybowl.crops.detail.editModal.saving", "Saving...") : b("healthybowl.crops.detail.editModal.saveChanges", "Save Changes")
|
|
568
571
|
})] }),
|
|
569
|
-
children: /* @__PURE__ */
|
|
572
|
+
children: /* @__PURE__ */ h("div", {
|
|
570
573
|
className: "grid gap-4 sm:grid-cols-2",
|
|
571
574
|
children: [
|
|
572
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
573
576
|
className: "text-sm font-medium text-text-primary",
|
|
574
|
-
children:
|
|
575
|
-
}), /* @__PURE__ */
|
|
577
|
+
children: b("healthybowl.crops.detail.form.cropName", "Crop Name")
|
|
578
|
+
}), /* @__PURE__ */ m("input", {
|
|
576
579
|
value: L,
|
|
577
580
|
onChange: (e) => R(e.target.value),
|
|
578
581
|
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)]"
|
|
579
582
|
})] }),
|
|
580
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
581
584
|
className: "text-sm font-medium text-text-primary",
|
|
582
|
-
children:
|
|
583
|
-
}), /* @__PURE__ */
|
|
585
|
+
children: b("healthybowl.crops.detail.form.variety", "Variety")
|
|
586
|
+
}), /* @__PURE__ */ m("input", {
|
|
584
587
|
value: z,
|
|
585
588
|
onChange: (e) => B(e.target.value),
|
|
586
589
|
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)]"
|
|
587
590
|
})] }),
|
|
588
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
589
592
|
className: "text-sm font-medium text-text-primary",
|
|
590
|
-
children:
|
|
591
|
-
}), /* @__PURE__ */
|
|
593
|
+
children: b("healthybowl.crops.detail.form.category", "Category")
|
|
594
|
+
}), /* @__PURE__ */ m("input", {
|
|
592
595
|
value: V,
|
|
593
596
|
onChange: (e) => H(e.target.value),
|
|
594
597
|
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)]"
|
|
595
598
|
})] }),
|
|
596
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
597
600
|
className: "text-sm font-medium text-text-primary",
|
|
598
|
-
children:
|
|
599
|
-
}), /* @__PURE__ */
|
|
601
|
+
children: b("healthybowl.crops.detail.form.yieldEstimate", "Yield Estimate ({{unit}})", { unit: I.yieldUnit })
|
|
602
|
+
}), /* @__PURE__ */ m("input", {
|
|
600
603
|
type: "number",
|
|
601
604
|
value: U,
|
|
602
605
|
onChange: (e) => W(e.target.value),
|
|
603
606
|
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)]"
|
|
604
607
|
})] }),
|
|
605
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
606
609
|
className: "text-sm font-medium text-text-primary",
|
|
607
|
-
children:
|
|
608
|
-
}), /* @__PURE__ */
|
|
610
|
+
children: b("healthybowl.crops.detail.form.expectedHarvest", "Expected Harvest")
|
|
611
|
+
}), /* @__PURE__ */ m("input", {
|
|
609
612
|
type: "date",
|
|
610
613
|
value: G,
|
|
611
614
|
onChange: (e) => K(e.target.value),
|
|
612
615
|
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)]"
|
|
613
616
|
})] }),
|
|
614
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
615
618
|
className: "text-sm font-medium text-text-primary",
|
|
616
|
-
children:
|
|
617
|
-
}), /* @__PURE__ */
|
|
619
|
+
children: b("healthybowl.crops.detail.form.healthStatus", "Health Status")
|
|
620
|
+
}), /* @__PURE__ */ h(xe, {
|
|
618
621
|
value: q,
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
/* @__PURE__ */
|
|
622
|
+
onValueChange: (e) => J(e),
|
|
623
|
+
children: [/* @__PURE__ */ m(Ce, {
|
|
624
|
+
className: "mt-1 w-full",
|
|
625
|
+
children: /* @__PURE__ */ m(we, {})
|
|
626
|
+
}), /* @__PURE__ */ h(Se, { children: [
|
|
627
|
+
/* @__PURE__ */ m(_, {
|
|
623
628
|
value: "excellent",
|
|
624
|
-
children:
|
|
629
|
+
children: b("healthybowl.crops.detail.form.healthOptions.excellent", "Excellent")
|
|
625
630
|
}),
|
|
626
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ m(_, {
|
|
627
632
|
value: "good",
|
|
628
|
-
children:
|
|
633
|
+
children: b("healthybowl.crops.detail.form.healthOptions.good", "Good")
|
|
629
634
|
}),
|
|
630
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ m(_, {
|
|
631
636
|
value: "fair",
|
|
632
|
-
children:
|
|
637
|
+
children: b("healthybowl.crops.detail.form.healthOptions.fair", "Fair")
|
|
633
638
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ m(_, {
|
|
635
640
|
value: "poor",
|
|
636
|
-
children:
|
|
641
|
+
children: b("healthybowl.crops.detail.form.healthOptions.poor", "Poor")
|
|
637
642
|
}),
|
|
638
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ m(_, {
|
|
639
644
|
value: "critical",
|
|
640
|
-
children:
|
|
645
|
+
children: b("healthybowl.crops.detail.form.healthOptions.critical", "Critical")
|
|
641
646
|
})
|
|
642
|
-
]
|
|
647
|
+
] })]
|
|
643
648
|
})] }),
|
|
644
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ h("div", {
|
|
645
650
|
className: "sm:col-span-2",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ m("label", {
|
|
647
652
|
className: "text-sm font-medium text-text-primary",
|
|
648
|
-
children:
|
|
649
|
-
}), /* @__PURE__ */
|
|
653
|
+
children: b("healthybowl.crops.detail.form.photos", "Photos")
|
|
654
|
+
}), /* @__PURE__ */ m("div", {
|
|
650
655
|
className: "mt-1",
|
|
651
|
-
children: /* @__PURE__ */
|
|
656
|
+
children: /* @__PURE__ */ m(i, {
|
|
652
657
|
entity: "Crop",
|
|
653
658
|
imageIds: Y,
|
|
654
659
|
onChange: X
|
|
@@ -658,28 +663,28 @@ var _ = (e) => {
|
|
|
658
663
|
]
|
|
659
664
|
})
|
|
660
665
|
}),
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
toasts:
|
|
663
|
-
onDismiss:
|
|
666
|
+
/* @__PURE__ */ m(ne, {
|
|
667
|
+
toasts: De,
|
|
668
|
+
onDismiss: Oe
|
|
664
669
|
})
|
|
665
670
|
]
|
|
666
|
-
}) : /* @__PURE__ */
|
|
667
|
-
title:
|
|
668
|
-
description:
|
|
669
|
-
children: /* @__PURE__ */
|
|
671
|
+
}) : /* @__PURE__ */ m(n, {
|
|
672
|
+
title: b("healthybowl.crops.detail.notFound.pageTitle", "Crop Not Found"),
|
|
673
|
+
description: b("healthybowl.crops.detail.notFound.altDescription", "The requested crop could not be found."),
|
|
674
|
+
children: /* @__PURE__ */ h("div", {
|
|
670
675
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
671
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ m("p", {
|
|
672
677
|
className: "text-text-secondary",
|
|
673
|
-
children:
|
|
674
|
-
}), /* @__PURE__ */
|
|
675
|
-
onClick: () =>
|
|
676
|
-
className: "mt-4
|
|
677
|
-
children:
|
|
678
|
+
children: b("healthybowl.crops.detail.notFound.altHint", "This crop may have been removed or the ID is invalid.")
|
|
679
|
+
}), /* @__PURE__ */ m(g, {
|
|
680
|
+
onClick: () => A(j("crops")),
|
|
681
|
+
className: "mt-4",
|
|
682
|
+
children: b("healthybowl.crops.detail.actions.backToCrops", "Back to Crops")
|
|
678
683
|
})]
|
|
679
684
|
})
|
|
680
685
|
});
|
|
681
686
|
};
|
|
682
687
|
//#endregion
|
|
683
|
-
export {
|
|
688
|
+
export { b as CropDetailsPage };
|
|
684
689
|
|
|
685
690
|
//# sourceMappingURL=CropDetailsPage.js.map
|