@burdenoff/microfe-healthybowl 2026.801.2 → 2026.801.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.
|
@@ -3,250 +3,268 @@ import { useBasePath as n } from "../../hooks/useBasePath.js";
|
|
|
3
3
|
import { PageLayout as r } from "../../components/PageLayout.js";
|
|
4
4
|
import { StatusBadge as i } 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 { useToast as
|
|
13
|
-
import { FieldMap as
|
|
14
|
-
import { CreateFarmTaskButton as
|
|
6
|
+
import { ErrorState as a } from "../../components/ErrorState.js";
|
|
7
|
+
import { ToastContainer as te } from "../../components/Toast.js";
|
|
8
|
+
import { useConfirm as ne } from "../../components/ConfirmDialog.js";
|
|
9
|
+
import { Breadcrumbs as re } from "../../components/Breadcrumbs.js";
|
|
10
|
+
import { PageLoader as ie } from "../../components/PageLoader.js";
|
|
11
|
+
import { Modal as ae } from "../../components/Modal.js";
|
|
12
|
+
import { useToast as oe } from "../../hooks/useToast.js";
|
|
13
|
+
import { FieldMap as se } from "../../components/FieldMap.js";
|
|
14
|
+
import { CreateFarmTaskButton as ce } from "../../components/CreateFarmTaskButton.js";
|
|
15
15
|
import "../../components/index.js";
|
|
16
|
-
import { useHealthyBowlData as
|
|
17
|
-
import { usePlantCatalog as
|
|
18
|
-
import { DEFAULT_BED_WIDTH_M as
|
|
16
|
+
import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
|
|
17
|
+
import { usePlantCatalog as ue } from "../../hooks/usePlantCatalog.js";
|
|
18
|
+
import { DEFAULT_BED_WIDTH_M as de, DEFAULT_CROP_SPACING_PRESET as fe, DEFAULT_PATH_WIDTH_M as pe, estimatePlantingCapacity as me, getCropSpacingPreset as he } from "../../utils/plantingCapacity.js";
|
|
19
19
|
import { useSuccessionPlanning as ge } from "../../hooks/useSuccessionPlanning.js";
|
|
20
20
|
import { computeSeedRate as _e } from "../../utils/seedRate.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
21
|
+
import { buildCropComparison as ve, sortCropComparison as ye } from "../../utils/cropComparison.js";
|
|
22
|
+
import { useCallback as be, useEffect as xe, useMemo as o, useState as s } from "react";
|
|
23
|
+
import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
24
|
+
import { Activity as Ce, ArrowLeft as we, BarChart3 as Te, Calendar as Ee, ChevronDown as c, ChevronUp as De, CloudRain as Oe, Droplets as ke, Edit as Ae, Eye as je, Leaf as Me, Map as Ne, Plus as Pe, Sprout as Fe, Sun as Ie, Table2 as Le, Thermometer as Re, Trash2 as ze, TrendingUp as Be, Wind as Ve } from "lucide-react";
|
|
25
|
+
import { useNavigate as He, useParams as Ue } from "react-router";
|
|
26
|
+
import { Fragment as We, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
27
|
+
import { Button as d, GlassCard as Ge, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g } from "@burdenoff/fe-libs/ui";
|
|
27
28
|
//#region src/healthybowl/pages/crops/FieldDetailsPage.tsx
|
|
28
|
-
var
|
|
29
|
+
var Ke = (e) => {
|
|
29
30
|
switch (e) {
|
|
30
31
|
case "active": return "success";
|
|
31
32
|
case "fallow": return "muted";
|
|
32
33
|
case "preparation": return "warning";
|
|
33
34
|
default: return "default";
|
|
34
35
|
}
|
|
35
|
-
},
|
|
36
|
+
}, qe = (e) => {
|
|
36
37
|
switch (e) {
|
|
37
38
|
case "optimal": return "success";
|
|
38
39
|
case "acceptable": return "info";
|
|
39
40
|
case "needs_attention": return "warning";
|
|
40
41
|
default: return "error";
|
|
41
42
|
}
|
|
42
|
-
},
|
|
43
|
+
}, _ = (e, t) => {
|
|
43
44
|
let n = Number(e);
|
|
44
45
|
return Number.isFinite(n) && n > 0 ? n : t;
|
|
45
|
-
},
|
|
46
|
+
}, Je = (e, t) => {
|
|
46
47
|
let n = Number(e);
|
|
47
48
|
return Number.isFinite(n) && n >= 0 ? n : t;
|
|
48
|
-
},
|
|
49
|
-
let { t:
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
if (
|
|
53
|
-
if (!
|
|
49
|
+
}, v = (e, t = 1) => new Intl.NumberFormat("en-US", { maximumFractionDigits: t }).format(e), Ye = () => {
|
|
50
|
+
let { t: c } = Se(), De = ne(), { fields: Ye, crops: S, soilTests: Xe, weatherData: Ze, errors: Qe, loadings: $e, updateField: et, deleteField: tt, refetch: nt } = le(), { fieldId: rt } = Ue(), C = He(), { buildPath: w } = n(), { toasts: it, toast: T, dismiss: at } = oe(), [ot, E] = s(!1), [st, D] = s(!1), O = Ye.find((e) => e.id === rt), [k, ct] = s(""), [lt, ut] = s(""), [dt, ft] = s("acres"), [pt, mt] = s(""), [ht, gt] = s(""), [_t, vt] = s("active"), [yt, bt] = s(!1), [A, xt] = s(""), { entries: j } = ue(), [M, St] = s(""), [N, P] = s(String(fe.plantSpacingCm)), [Ct, F] = s(String(fe.rowSpacingCm)), [I, wt] = s(String(de)), [L, Tt] = s(String(pe)), [R, Et] = s(null), Dt = () => {
|
|
51
|
+
O && (ct(O.name), ut(String(O.area)), ft(O.unit ?? "acres"), mt(O.soilType), gt(O.irrigationType), vt(O.status), bt(O.organicCertified), E(!0));
|
|
52
|
+
}, Ot = async () => {
|
|
53
|
+
if (O) {
|
|
54
|
+
if (!k.trim() || !lt) {
|
|
54
55
|
T({
|
|
55
|
-
title:
|
|
56
|
-
description:
|
|
56
|
+
title: c("healthybowl.crops.fieldDetail.toast.missingFields.title", "Missing required fields"),
|
|
57
|
+
description: c("healthybowl.crops.fieldDetail.toast.missingFields.description", "Name and area are required."),
|
|
57
58
|
variant: "warning"
|
|
58
59
|
});
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
+
D(!0);
|
|
62
63
|
try {
|
|
63
|
-
await
|
|
64
|
-
id:
|
|
65
|
-
name:
|
|
66
|
-
area: Number(
|
|
67
|
-
unit:
|
|
68
|
-
soilType:
|
|
69
|
-
irrigationType:
|
|
70
|
-
status:
|
|
71
|
-
organicCertified:
|
|
64
|
+
await et({
|
|
65
|
+
id: O.id,
|
|
66
|
+
name: k.trim(),
|
|
67
|
+
area: Number(lt),
|
|
68
|
+
unit: dt,
|
|
69
|
+
soilType: pt.trim() || "Unknown",
|
|
70
|
+
irrigationType: ht.trim() || "None",
|
|
71
|
+
status: _t,
|
|
72
|
+
organicCertified: yt
|
|
72
73
|
}), T({
|
|
73
|
-
title:
|
|
74
|
-
description:
|
|
74
|
+
title: c("healthybowl.crops.fieldDetail.toast.updated.title", "Field updated"),
|
|
75
|
+
description: c("healthybowl.crops.fieldDetail.toast.updated.description", "{{name}} has been saved.", { name: k.trim() }),
|
|
75
76
|
variant: "success"
|
|
76
77
|
}), E(!1);
|
|
77
78
|
} catch (e) {
|
|
78
79
|
T({
|
|
79
|
-
title:
|
|
80
|
+
title: c("healthybowl.crops.fieldDetail.toast.updateFailed.title", "Update failed"),
|
|
80
81
|
description: String(e),
|
|
81
82
|
variant: "error"
|
|
82
83
|
});
|
|
83
84
|
} finally {
|
|
84
|
-
|
|
85
|
+
D(!1);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
},
|
|
88
|
-
if (
|
|
89
|
-
title:
|
|
90
|
-
message:
|
|
91
|
-
okButtonTitle:
|
|
92
|
-
cancelButtonTitle:
|
|
88
|
+
}, kt = async () => {
|
|
89
|
+
if (O && await De({
|
|
90
|
+
title: c("healthybowl.crops.fieldDetail.deleteConfirm.title", "Delete field?"),
|
|
91
|
+
message: c("healthybowl.crops.fieldDetail.deleteConfirm.message", "{{name}} will be permanently removed.", { name: O.name }),
|
|
92
|
+
okButtonTitle: c("healthybowl.common.delete", "Delete"),
|
|
93
|
+
cancelButtonTitle: c("healthybowl.common.cancel", "Cancel")
|
|
93
94
|
}) !== !1) {
|
|
94
|
-
|
|
95
|
+
D(!0);
|
|
95
96
|
try {
|
|
96
|
-
await
|
|
97
|
-
title:
|
|
98
|
-
description:
|
|
97
|
+
await tt(O.id), T({
|
|
98
|
+
title: c("healthybowl.crops.fieldDetail.toast.deleted.title", "Field deleted"),
|
|
99
|
+
description: c("healthybowl.crops.fieldDetail.toast.deleted.description", "{{name}} has been removed.", { name: O.name }),
|
|
99
100
|
variant: "success"
|
|
100
101
|
}), C(w("crops/fields"));
|
|
101
102
|
} catch (e) {
|
|
102
103
|
T({
|
|
103
|
-
title:
|
|
104
|
+
title: c("healthybowl.crops.fieldDetail.toast.deleteFailed.title", "Delete failed"),
|
|
104
105
|
description: String(e),
|
|
105
106
|
variant: "error"
|
|
106
|
-
}),
|
|
107
|
+
}), D(!1);
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
|
-
},
|
|
110
|
+
}, z = o(() => O ? S.filter((e) => e.field === O.id || e.fieldName === O.name) : [], [S, O]), B = o(() => {
|
|
110
111
|
let e = /* @__PURE__ */ new Set();
|
|
111
|
-
return [...
|
|
112
|
-
}, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
]),
|
|
117
|
-
fieldArea:
|
|
118
|
-
fieldUnit:
|
|
119
|
-
bedWidthM:
|
|
120
|
-
pathWidthM:
|
|
121
|
-
plantSpacingCm:
|
|
122
|
-
rowSpacingCm:
|
|
112
|
+
return [...z, ...S].filter((t) => !e.has(t.id) && !!e.add(t.id));
|
|
113
|
+
}, [S, z]), At = o(() => z[0] ?? B[0] ?? null, [B, z]), V = o(() => B.find((e) => e.id === A) ?? At, [
|
|
114
|
+
A,
|
|
115
|
+
B,
|
|
116
|
+
At
|
|
117
|
+
]), H = o(() => he(V), [V]), U = R != null && R > 0 ? R : O?.area ?? 0, jt = R != null && R > 0, W = o(() => O ? me({
|
|
118
|
+
fieldArea: U,
|
|
119
|
+
fieldUnit: O.unit,
|
|
120
|
+
bedWidthM: _(I, de),
|
|
121
|
+
pathWidthM: Je(L, pe),
|
|
122
|
+
plantSpacingCm: _(N, H.plantSpacingCm),
|
|
123
|
+
rowSpacingCm: _(Ct, H.rowSpacingCm)
|
|
123
124
|
}) : null, [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
H,
|
|
125
|
+
I,
|
|
126
|
+
U,
|
|
127
|
+
O,
|
|
128
128
|
L,
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
N,
|
|
130
|
+
Ct,
|
|
131
|
+
H
|
|
131
132
|
]);
|
|
132
|
-
|
|
133
|
-
if (!
|
|
134
|
-
let e =
|
|
135
|
-
|
|
136
|
-
}, [
|
|
137
|
-
let
|
|
138
|
-
let t =
|
|
139
|
-
|
|
140
|
-
let n =
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
if (
|
|
144
|
-
|
|
133
|
+
xe(() => {
|
|
134
|
+
if (!V || A === V.id) return;
|
|
135
|
+
let e = he(V);
|
|
136
|
+
xt(V.id), P(String(e.plantSpacingCm)), F(String(e.rowSpacingCm));
|
|
137
|
+
}, [A, V]);
|
|
138
|
+
let Mt = (e) => {
|
|
139
|
+
let t = B.find((t) => t.id === e);
|
|
140
|
+
xt(e), St("");
|
|
141
|
+
let n = he(t);
|
|
142
|
+
P(String(n.plantSpacingCm)), F(String(n.rowSpacingCm));
|
|
143
|
+
}, Nt = (e) => {
|
|
144
|
+
if (St(e), e === "none") {
|
|
145
|
+
St("");
|
|
145
146
|
return;
|
|
146
147
|
}
|
|
147
|
-
let t =
|
|
148
|
-
t && (t.plantSpacingCm != null &&
|
|
149
|
-
},
|
|
150
|
-
let e =
|
|
148
|
+
let t = j.find((t) => t.id === e);
|
|
149
|
+
t && (t.plantSpacingCm != null && P(String(t.plantSpacingCm)), t.rowSpacingCm != null && F(String(t.rowSpacingCm)));
|
|
150
|
+
}, G = o(() => {
|
|
151
|
+
let e = M ? j.find((e) => e.id === M) : void 0;
|
|
151
152
|
if (e) return e;
|
|
152
|
-
if (!
|
|
153
|
-
let t = (
|
|
153
|
+
if (!V) return;
|
|
154
|
+
let t = (V.name ?? "").trim().toLowerCase();
|
|
154
155
|
if (!t) return;
|
|
155
|
-
let n = (
|
|
156
|
-
return
|
|
156
|
+
let n = (V.variety ?? "").trim().toLowerCase();
|
|
157
|
+
return j.find((e) => (e.name ?? "").trim().toLowerCase() === t && (e.variety ?? "").trim().toLowerCase() === n) ?? j.find((e) => (e.name ?? "").trim().toLowerCase() === t);
|
|
157
158
|
}, [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
]),
|
|
162
|
-
plantsNeeded:
|
|
163
|
-
seedsPerGram:
|
|
164
|
-
germinationRate:
|
|
165
|
-
seedsPerCell:
|
|
166
|
-
}) : null, [
|
|
159
|
+
M,
|
|
160
|
+
j,
|
|
161
|
+
V
|
|
162
|
+
]), K = o(() => W ? _e({
|
|
163
|
+
plantsNeeded: W.totalPlants,
|
|
164
|
+
seedsPerGram: G?.seedsPerGram,
|
|
165
|
+
germinationRate: G?.germinationRate,
|
|
166
|
+
seedsPerCell: G?.seedsPerCell
|
|
167
|
+
}) : null, [W, G]), [q, Pt] = s("label"), [J, Ft] = s("asc"), It = o(() => !O || j.length === 0 ? [] : ve(j, {
|
|
168
|
+
fieldArea: U,
|
|
169
|
+
fieldUnit: O.unit,
|
|
170
|
+
bedWidthM: _(I, de),
|
|
171
|
+
pathWidthM: Je(L, pe)
|
|
172
|
+
}), [
|
|
173
|
+
I,
|
|
174
|
+
U,
|
|
175
|
+
O,
|
|
176
|
+
L,
|
|
177
|
+
j
|
|
178
|
+
]), Y = o(() => ye(It, q, J), [
|
|
179
|
+
It,
|
|
180
|
+
q,
|
|
181
|
+
J
|
|
182
|
+
]), X = be((e) => {
|
|
183
|
+
Pt((t) => t === e ? (Ft((e) => e === "asc" ? "desc" : "asc"), t) : (Ft(e === "label" ? "asc" : "desc"), e));
|
|
184
|
+
}, []), { successionPlans: Lt, beds: Rt, createSuccession: zt, deletePlan: Bt } = ge(O?.id), [Z, Vt] = s(() => (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), [Ht, Ut] = s("14"), [Wt, Gt] = s("4"), [Kt, qt] = s(""), [Jt, Yt] = s(!1), Xt = o(() => {
|
|
167
185
|
let e = /* @__PURE__ */ new Map();
|
|
168
|
-
for (let t of
|
|
186
|
+
for (let t of Lt) {
|
|
169
187
|
let n = String(t.successionGroupId), r = e.get(n);
|
|
170
188
|
r ? r.push(t) : e.set(n, [t]);
|
|
171
189
|
}
|
|
172
190
|
return Array.from(e.entries());
|
|
173
|
-
}, [
|
|
174
|
-
let t = e.cropId ?
|
|
191
|
+
}, [Lt]), Zt = be((e) => {
|
|
192
|
+
let t = e.cropId ? S.find((t) => t.id === e.cropId) : void 0;
|
|
175
193
|
if (t) return t.variety ? `${t.name} - ${t.variety}` : t.name;
|
|
176
|
-
let n = e.plantCatalogId ?
|
|
194
|
+
let n = e.plantCatalogId ? j.find((t) => t.id === e.plantCatalogId) : void 0;
|
|
177
195
|
if (n?.name?.trim()) return n.variety ? `${n.name} - ${n.variety}` : n.name;
|
|
178
196
|
let r = e.cropName?.trim();
|
|
179
197
|
if (r && !/^unknown(\s+crop)?$/i.test(r)) return r;
|
|
180
|
-
let i =
|
|
198
|
+
let i = z[0];
|
|
181
199
|
return i ? i.variety ? `${i.name} - ${i.variety}` : i.name : "—";
|
|
182
200
|
}, [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
]),
|
|
187
|
-
if (!
|
|
188
|
-
let e = Number(
|
|
201
|
+
S,
|
|
202
|
+
j,
|
|
203
|
+
z
|
|
204
|
+
]), Qt = async () => {
|
|
205
|
+
if (!O) return;
|
|
206
|
+
let e = Number(Ht), t = Number(Wt);
|
|
189
207
|
if (!Z || !Number.isFinite(e) || e < 1 || !Number.isFinite(t) || t < 1) {
|
|
190
208
|
T({
|
|
191
|
-
title:
|
|
192
|
-
description:
|
|
209
|
+
title: c("healthybowl.crops.fieldDetail.succession.toast.invalid.title", "Check the schedule inputs"),
|
|
210
|
+
description: c("healthybowl.crops.fieldDetail.succession.toast.invalid.description", "A start date, an interval of at least 1 day and at least 1 sowing are required."),
|
|
193
211
|
variant: "warning"
|
|
194
212
|
});
|
|
195
213
|
return;
|
|
196
214
|
}
|
|
197
|
-
|
|
215
|
+
Yt(!0);
|
|
198
216
|
try {
|
|
199
|
-
let n = await
|
|
200
|
-
fieldId:
|
|
201
|
-
bedId:
|
|
202
|
-
cropId:
|
|
203
|
-
plantCatalogId:
|
|
204
|
-
season:
|
|
217
|
+
let n = await zt({
|
|
218
|
+
fieldId: O.id,
|
|
219
|
+
bedId: Kt || void 0,
|
|
220
|
+
cropId: V?.id ?? void 0,
|
|
221
|
+
plantCatalogId: M || void 0,
|
|
222
|
+
season: V?.season ? V.season.toUpperCase() : void 0,
|
|
205
223
|
year: new Date(Z).getFullYear(),
|
|
206
224
|
startDate: Z,
|
|
207
225
|
intervalDays: e,
|
|
208
226
|
count: t,
|
|
209
|
-
plantsNeeded:
|
|
210
|
-
seedGrams:
|
|
211
|
-
seedlingsToRaise:
|
|
212
|
-
density:
|
|
227
|
+
plantsNeeded: W?.totalPlants,
|
|
228
|
+
seedGrams: K?.seedGrams ?? void 0,
|
|
229
|
+
seedlingsToRaise: K?.seedlingsToRaise,
|
|
230
|
+
density: W?.densityPlantsPerSqm
|
|
213
231
|
});
|
|
214
232
|
T({
|
|
215
|
-
title:
|
|
216
|
-
description:
|
|
233
|
+
title: c("healthybowl.crops.fieldDetail.succession.toast.created.title", "Succession schedule created"),
|
|
234
|
+
description: c("healthybowl.crops.fieldDetail.succession.toast.created.description", "{{count}} sowings scheduled.", { count: n.length || t }),
|
|
217
235
|
variant: "success"
|
|
218
236
|
});
|
|
219
237
|
} catch (e) {
|
|
220
238
|
T({
|
|
221
|
-
title:
|
|
239
|
+
title: c("healthybowl.crops.fieldDetail.succession.toast.failed.title", "Could not create schedule"),
|
|
222
240
|
description: e instanceof Error ? e.message : String(e),
|
|
223
241
|
variant: "error"
|
|
224
242
|
});
|
|
225
243
|
} finally {
|
|
226
|
-
|
|
244
|
+
Yt(!1);
|
|
227
245
|
}
|
|
228
|
-
},
|
|
229
|
-
if (await
|
|
230
|
-
title:
|
|
231
|
-
message:
|
|
232
|
-
okButtonTitle:
|
|
233
|
-
cancelButtonTitle:
|
|
246
|
+
}, $t = async (e) => {
|
|
247
|
+
if (await De({
|
|
248
|
+
title: c("healthybowl.crops.fieldDetail.succession.deleteConfirm.title", "Delete this sowing?"),
|
|
249
|
+
message: c("healthybowl.crops.fieldDetail.succession.deleteConfirm.message", "This sowing will be permanently removed from the schedule."),
|
|
250
|
+
okButtonTitle: c("healthybowl.common.delete", "Delete"),
|
|
251
|
+
cancelButtonTitle: c("healthybowl.common.cancel", "Cancel")
|
|
234
252
|
}) !== !1) try {
|
|
235
|
-
await
|
|
236
|
-
title:
|
|
237
|
-
description:
|
|
253
|
+
await Bt(e.id), T({
|
|
254
|
+
title: c("healthybowl.crops.fieldDetail.succession.toast.deleted.title", "Sowing removed"),
|
|
255
|
+
description: c("healthybowl.crops.fieldDetail.succession.toast.deleted.description", "The sowing was deleted."),
|
|
238
256
|
variant: "success"
|
|
239
257
|
});
|
|
240
258
|
} catch (e) {
|
|
241
259
|
T({
|
|
242
|
-
title:
|
|
260
|
+
title: c("healthybowl.crops.fieldDetail.succession.toast.deleteFailed.title", "Could not delete sowing"),
|
|
243
261
|
description: e instanceof Error ? e.message : String(e),
|
|
244
262
|
variant: "error"
|
|
245
263
|
});
|
|
246
264
|
}
|
|
247
|
-
}, Q =
|
|
248
|
-
location:
|
|
249
|
-
current:
|
|
265
|
+
}, Q = O ? Xe.find((e) => e.fieldName === O.name) : void 0, $ = {
|
|
266
|
+
location: Ze?.location ?? "",
|
|
267
|
+
current: Ze?.current ?? {
|
|
250
268
|
temperature: 0,
|
|
251
269
|
condition: "N/A",
|
|
252
270
|
feelsLike: 0,
|
|
@@ -256,85 +274,85 @@ var He = (e) => {
|
|
|
256
274
|
pressure: 0,
|
|
257
275
|
visibility: 0
|
|
258
276
|
},
|
|
259
|
-
forecast:
|
|
260
|
-
},
|
|
277
|
+
forecast: Ze?.forecast ?? []
|
|
278
|
+
}, en = o(() => {
|
|
261
279
|
let e = [];
|
|
262
|
-
return
|
|
280
|
+
return z.forEach((t) => {
|
|
263
281
|
t.plantingDate && e.push({
|
|
264
282
|
date: t.plantingDate,
|
|
265
|
-
action:
|
|
283
|
+
action: c("healthybowl.crops.fieldDetail.timeline.planted", "{{name}} ({{variety}}) planted", {
|
|
266
284
|
name: t.name,
|
|
267
285
|
variety: t.variety
|
|
268
286
|
}),
|
|
269
287
|
type: "planting"
|
|
270
288
|
}), t.expectedHarvestDate && e.push({
|
|
271
289
|
date: t.expectedHarvestDate,
|
|
272
|
-
action:
|
|
290
|
+
action: c("healthybowl.crops.fieldDetail.timeline.expectedHarvest", "{{name}} expected harvest", { name: t.name }),
|
|
273
291
|
type: "harvest"
|
|
274
292
|
});
|
|
275
293
|
}), Q && e.push({
|
|
276
294
|
date: Q.date,
|
|
277
|
-
action:
|
|
295
|
+
action: c("healthybowl.crops.fieldDetail.timeline.soilTestConducted", "Soil test conducted"),
|
|
278
296
|
type: "testing"
|
|
279
297
|
}), e.sort((e, t) => new Date(t.date).getTime() - new Date(e.date).getTime()), e.length === 0 ? [{
|
|
280
298
|
date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
281
|
-
action:
|
|
299
|
+
action: c("healthybowl.crops.fieldDetail.timeline.noActivity", "No activity recorded yet"),
|
|
282
300
|
type: "info"
|
|
283
301
|
}] : e.slice(0, 5);
|
|
284
302
|
}, [
|
|
285
|
-
|
|
303
|
+
z,
|
|
286
304
|
Q,
|
|
287
|
-
|
|
288
|
-
]),
|
|
289
|
-
season:
|
|
290
|
-
crop:
|
|
305
|
+
c
|
|
306
|
+
]), tn = o(() => z.length === 0 ? [{
|
|
307
|
+
season: c("healthybowl.crops.fieldDetail.cropHistory.currentSeason", "Current"),
|
|
308
|
+
crop: c("healthybowl.crops.fieldDetail.cropHistory.noCropsPlanted", "No crops planted"),
|
|
291
309
|
status: "fallow"
|
|
292
|
-
}] :
|
|
310
|
+
}] : z.map((e) => ({
|
|
293
311
|
season: `${e.season.charAt(0).toUpperCase() + e.season.slice(1)} - ${e.plantingDate ? new Date(e.plantingDate).getFullYear() : "N/A"}`,
|
|
294
312
|
crop: `${e.name} (${e.variety})`,
|
|
295
313
|
status: e.status === "harvested" ? "completed" : "active"
|
|
296
|
-
})), [
|
|
297
|
-
return
|
|
298
|
-
title:
|
|
299
|
-
description:
|
|
300
|
-
area:
|
|
301
|
-
unit:
|
|
302
|
-
soilType:
|
|
314
|
+
})), [z, c]);
|
|
315
|
+
return O ? /* @__PURE__ */ u(r, {
|
|
316
|
+
title: O.name,
|
|
317
|
+
description: c("healthybowl.crops.fieldDetail.header.description", "{{area}} {{unit}} - {{soilType}}", {
|
|
318
|
+
area: O.area,
|
|
319
|
+
unit: O.unit,
|
|
320
|
+
soilType: O.soilType
|
|
303
321
|
}),
|
|
304
|
-
actions: /* @__PURE__ */
|
|
322
|
+
actions: /* @__PURE__ */ u("div", {
|
|
305
323
|
className: "flex items-center gap-2",
|
|
306
324
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ l(ce, {
|
|
308
326
|
entityType: "FIELD",
|
|
309
|
-
entityId:
|
|
310
|
-
entityLabel:
|
|
327
|
+
entityId: O.id,
|
|
328
|
+
entityLabel: O.name
|
|
311
329
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ u(d, {
|
|
313
331
|
variant: "outline",
|
|
314
332
|
onClick: () => C(w("crops/fields")),
|
|
315
333
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ l(we, { className: "h-4 w-4" }),
|
|
317
335
|
" ",
|
|
318
|
-
|
|
336
|
+
c("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
|
|
319
337
|
]
|
|
320
338
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ u(d, {
|
|
322
340
|
variant: "outline",
|
|
323
|
-
onClick:
|
|
341
|
+
onClick: Dt,
|
|
324
342
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ l(Ae, { className: "h-4 w-4" }),
|
|
326
344
|
" ",
|
|
327
|
-
|
|
345
|
+
c("healthybowl.crops.fieldDetail.actions.editField", "Edit Field")
|
|
328
346
|
]
|
|
329
347
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ u(d, {
|
|
331
349
|
variant: "destructive",
|
|
332
|
-
onClick:
|
|
333
|
-
disabled:
|
|
350
|
+
onClick: kt,
|
|
351
|
+
disabled: st,
|
|
334
352
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ l(ze, { className: "h-4 w-4" }),
|
|
336
354
|
" ",
|
|
337
|
-
|
|
355
|
+
c("healthybowl.common.delete", "Delete")
|
|
338
356
|
]
|
|
339
357
|
})
|
|
340
358
|
]
|
|
@@ -343,150 +361,150 @@ var He = (e) => {
|
|
|
343
361
|
nextSteps: [
|
|
344
362
|
{
|
|
345
363
|
id: "edit",
|
|
346
|
-
label:
|
|
347
|
-
description:
|
|
348
|
-
onClick:
|
|
364
|
+
label: c("healthybowl.crops.fieldDetail.nextSteps.edit.label", "Update field details"),
|
|
365
|
+
description: c("healthybowl.crops.fieldDetail.nextSteps.edit.desc", "Keep area, soil type and irrigation info current."),
|
|
366
|
+
onClick: Dt
|
|
349
367
|
},
|
|
350
368
|
{
|
|
351
369
|
id: "soil",
|
|
352
|
-
label:
|
|
353
|
-
description:
|
|
370
|
+
label: c("healthybowl.crops.fieldDetail.nextSteps.soil.label", "Run a soil test"),
|
|
371
|
+
description: c("healthybowl.crops.fieldDetail.nextSteps.soil.desc", "Check fertility before you plant or fertilise this field."),
|
|
354
372
|
href: w("soil/tests")
|
|
355
373
|
},
|
|
356
374
|
{
|
|
357
375
|
id: "plan",
|
|
358
|
-
label:
|
|
359
|
-
description:
|
|
376
|
+
label: c("healthybowl.crops.fieldDetail.nextSteps.plan.label", "Plan what to plant here"),
|
|
377
|
+
description: c("healthybowl.crops.fieldDetail.nextSteps.plan.desc", "Add a planting plan so this field is working toward your goals."),
|
|
360
378
|
href: w("crops/planning")
|
|
361
379
|
}
|
|
362
380
|
],
|
|
363
381
|
nextStepsKey: "healthybowl-field-detail",
|
|
364
382
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ l(re, { items: [
|
|
366
384
|
{
|
|
367
|
-
label:
|
|
385
|
+
label: c("healthybowl.crops.fieldDetail.breadcrumbs.crops", "Crops"),
|
|
368
386
|
href: w("crops")
|
|
369
387
|
},
|
|
370
388
|
{
|
|
371
|
-
label:
|
|
389
|
+
label: c("healthybowl.crops.fieldDetail.breadcrumbs.fields", "Fields"),
|
|
372
390
|
href: w("crops/fields")
|
|
373
391
|
},
|
|
374
|
-
{ label:
|
|
392
|
+
{ label: O.name }
|
|
375
393
|
] }),
|
|
376
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ u("div", {
|
|
377
395
|
className: "flex flex-wrap items-center gap-3",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
379
|
-
label:
|
|
380
|
-
variant:
|
|
396
|
+
children: [/* @__PURE__ */ l(i, {
|
|
397
|
+
label: O.status,
|
|
398
|
+
variant: Ke(O.status),
|
|
381
399
|
dot: !0
|
|
382
|
-
}),
|
|
383
|
-
label:
|
|
400
|
+
}), O.organicCertified ? /* @__PURE__ */ l(i, {
|
|
401
|
+
label: c("healthybowl.crops.fieldDetail.badges.organicCertified", "Organic Certified"),
|
|
384
402
|
variant: "success"
|
|
385
|
-
}) : /* @__PURE__ */
|
|
386
|
-
label:
|
|
403
|
+
}) : /* @__PURE__ */ l(i, {
|
|
404
|
+
label: c("healthybowl.crops.fieldDetail.badges.notCertified", "Not Certified"),
|
|
387
405
|
variant: "muted"
|
|
388
406
|
})]
|
|
389
407
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ u("div", {
|
|
391
409
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ u("div", {
|
|
393
411
|
className: "space-y-6 lg:col-span-2",
|
|
394
412
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ u(Ge, {
|
|
396
414
|
treatment: "glass",
|
|
397
415
|
glow: !0,
|
|
398
416
|
className: "border-border-seam p-6",
|
|
399
417
|
children: [
|
|
400
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ l("h3", {
|
|
401
419
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
402
|
-
children:
|
|
420
|
+
children: c("healthybowl.crops.fieldDetail.info.heading", "Field Information")
|
|
403
421
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ u("div", {
|
|
405
423
|
className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ u("div", {
|
|
407
425
|
className: "space-y-4",
|
|
408
426
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
410
428
|
className: "text-xs text-text-secondary",
|
|
411
|
-
children:
|
|
412
|
-
}), /* @__PURE__ */
|
|
429
|
+
children: c("healthybowl.crops.fieldDetail.info.fieldName", "Field Name")
|
|
430
|
+
}), /* @__PURE__ */ l("p", {
|
|
413
431
|
className: "text-sm font-semibold text-text-primary",
|
|
414
|
-
children:
|
|
432
|
+
children: O.name
|
|
415
433
|
})] }),
|
|
416
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
417
435
|
className: "text-xs text-text-secondary",
|
|
418
|
-
children:
|
|
419
|
-
}), /* @__PURE__ */
|
|
436
|
+
children: c("healthybowl.crops.fieldDetail.info.area", "Area")
|
|
437
|
+
}), /* @__PURE__ */ u("p", {
|
|
420
438
|
className: "text-sm font-semibold text-text-primary",
|
|
421
439
|
children: [
|
|
422
|
-
|
|
440
|
+
O.area,
|
|
423
441
|
" ",
|
|
424
|
-
|
|
442
|
+
O.unit
|
|
425
443
|
]
|
|
426
444
|
})] }),
|
|
427
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
428
446
|
className: "text-xs text-text-secondary",
|
|
429
|
-
children:
|
|
430
|
-
}), /* @__PURE__ */
|
|
447
|
+
children: c("healthybowl.crops.fieldDetail.info.status", "Status")
|
|
448
|
+
}), /* @__PURE__ */ l("div", {
|
|
431
449
|
className: "mt-1",
|
|
432
|
-
children: /* @__PURE__ */
|
|
433
|
-
label:
|
|
434
|
-
variant:
|
|
450
|
+
children: /* @__PURE__ */ l(i, {
|
|
451
|
+
label: O.status,
|
|
452
|
+
variant: Ke(O.status)
|
|
435
453
|
})
|
|
436
454
|
})] })
|
|
437
455
|
]
|
|
438
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ u("div", {
|
|
439
457
|
className: "space-y-4",
|
|
440
458
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
442
460
|
className: "text-xs text-text-secondary",
|
|
443
|
-
children:
|
|
444
|
-
}), /* @__PURE__ */
|
|
461
|
+
children: c("healthybowl.crops.fieldDetail.info.soilType", "Soil Type")
|
|
462
|
+
}), /* @__PURE__ */ l("p", {
|
|
445
463
|
className: "text-sm font-semibold text-text-primary",
|
|
446
|
-
children:
|
|
464
|
+
children: O.soilType
|
|
447
465
|
})] }),
|
|
448
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
449
467
|
className: "text-xs text-text-secondary",
|
|
450
|
-
children:
|
|
451
|
-
}), /* @__PURE__ */
|
|
468
|
+
children: c("healthybowl.crops.fieldDetail.info.irrigation", "Irrigation")
|
|
469
|
+
}), /* @__PURE__ */ l("p", {
|
|
452
470
|
className: "text-sm font-semibold text-text-primary",
|
|
453
|
-
children:
|
|
471
|
+
children: O.irrigationType
|
|
454
472
|
})] }),
|
|
455
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
456
474
|
className: "text-xs text-text-secondary",
|
|
457
|
-
children:
|
|
458
|
-
}), /* @__PURE__ */
|
|
475
|
+
children: c("healthybowl.crops.fieldDetail.info.currentCrops", "Current Crops")
|
|
476
|
+
}), /* @__PURE__ */ l("p", {
|
|
459
477
|
className: "text-sm font-semibold text-text-primary",
|
|
460
|
-
children: (
|
|
478
|
+
children: (O.crops ?? []).length > 0 ? (O.crops ?? []).join(", ") : c("healthybowl.crops.fieldDetail.info.noneValue", "None")
|
|
461
479
|
})] })
|
|
462
480
|
]
|
|
463
481
|
})]
|
|
464
482
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ u("div", {
|
|
466
484
|
className: "mt-6 border-t border-border-subtle pt-4",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ l("span", {
|
|
468
486
|
className: "text-xs text-text-secondary",
|
|
469
|
-
children:
|
|
470
|
-
}), /* @__PURE__ */
|
|
487
|
+
children: c("healthybowl.crops.fieldDetail.info.gpsCoordinates", "GPS Coordinates")
|
|
488
|
+
}), /* @__PURE__ */ u("div", {
|
|
471
489
|
className: "mt-1 flex items-center gap-4",
|
|
472
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ u("span", {
|
|
473
491
|
className: "text-xs text-text-secondary",
|
|
474
492
|
children: [
|
|
475
|
-
|
|
493
|
+
c("healthybowl.crops.fieldDetail.info.latLabel", "Lat:"),
|
|
476
494
|
" ",
|
|
477
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ l("span", {
|
|
478
496
|
className: "font-mono text-sm text-text-primary",
|
|
479
|
-
children:
|
|
497
|
+
children: O.location?.lat ?? 0
|
|
480
498
|
})
|
|
481
499
|
]
|
|
482
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ u("span", {
|
|
483
501
|
className: "text-xs text-text-secondary",
|
|
484
502
|
children: [
|
|
485
|
-
|
|
503
|
+
c("healthybowl.crops.fieldDetail.info.lngLabel", "Lng:"),
|
|
486
504
|
" ",
|
|
487
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ l("span", {
|
|
488
506
|
className: "font-mono text-sm text-text-primary",
|
|
489
|
-
children:
|
|
507
|
+
children: O.location?.lng ?? 0
|
|
490
508
|
})
|
|
491
509
|
]
|
|
492
510
|
})]
|
|
@@ -494,453 +512,589 @@ var He = (e) => {
|
|
|
494
512
|
})
|
|
495
513
|
]
|
|
496
514
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ u("div", {
|
|
498
516
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
499
517
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ u("div", {
|
|
501
519
|
className: "mb-4",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
503
521
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
504
522
|
children: [
|
|
505
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ l(Ne, { className: "h-4 w-4 text-success" }),
|
|
506
524
|
" ",
|
|
507
|
-
|
|
525
|
+
c("healthybowl.crops.fieldDetail.boundary.heading", "Field Boundary")
|
|
508
526
|
]
|
|
509
|
-
}), /* @__PURE__ */
|
|
527
|
+
}), /* @__PURE__ */ l("p", {
|
|
510
528
|
className: "mt-1 text-xs text-text-secondary",
|
|
511
|
-
children:
|
|
529
|
+
children: c("healthybowl.crops.fieldDetail.boundary.description", "Draw or import this field’s boundary on the satellite map. Saving updates the field area automatically.")
|
|
512
530
|
})]
|
|
513
531
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
fieldId:
|
|
516
|
-
unit:
|
|
517
|
-
center:
|
|
518
|
-
initialBoundary:
|
|
519
|
-
onSaved:
|
|
520
|
-
onAreaChange:
|
|
532
|
+
/* @__PURE__ */ l(se, {
|
|
533
|
+
fieldId: O.id,
|
|
534
|
+
unit: O.unit ?? "acres",
|
|
535
|
+
center: O.location,
|
|
536
|
+
initialBoundary: O.boundary,
|
|
537
|
+
onSaved: nt,
|
|
538
|
+
onAreaChange: Et
|
|
521
539
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ u("div", {
|
|
523
541
|
className: "mt-5 border-t border-border-subtle pt-5",
|
|
524
542
|
children: [
|
|
525
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ u("div", {
|
|
526
544
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
545
|
+
children: [/* @__PURE__ */ u("h4", {
|
|
528
546
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
529
|
-
children: [
|
|
547
|
+
children: [c("healthybowl.crops.fieldDetail.capacity.heading", "Planting capacity"), jt && /* @__PURE__ */ l("span", {
|
|
530
548
|
className: "rounded-full bg-success/10 px-2 py-0.5 text-[11px] font-medium text-success",
|
|
531
|
-
children:
|
|
549
|
+
children: c("healthybowl.crops.fieldDetail.capacity.fromBoundary", "from drawn boundary")
|
|
532
550
|
})]
|
|
533
|
-
}), /* @__PURE__ */
|
|
534
|
-
label:
|
|
551
|
+
}), /* @__PURE__ */ l(i, {
|
|
552
|
+
label: H.label,
|
|
535
553
|
variant: "muted"
|
|
536
554
|
})]
|
|
537
555
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ u("div", {
|
|
539
557
|
className: "mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-6",
|
|
540
558
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ u("div", {
|
|
542
560
|
className: "xl:col-span-2",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
561
|
+
children: [/* @__PURE__ */ l("label", {
|
|
544
562
|
className: "text-xs font-medium text-text-secondary",
|
|
545
|
-
children:
|
|
546
|
-
}), /* @__PURE__ */
|
|
547
|
-
value:
|
|
548
|
-
onValueChange:
|
|
549
|
-
children: [/* @__PURE__ */
|
|
563
|
+
children: c("healthybowl.crops.fieldDetail.capacity.crop", "Crop")
|
|
564
|
+
}), /* @__PURE__ */ u(f, {
|
|
565
|
+
value: A,
|
|
566
|
+
onValueChange: Mt,
|
|
567
|
+
children: [/* @__PURE__ */ l(h, {
|
|
550
568
|
className: "mt-1 w-full",
|
|
551
|
-
children: /* @__PURE__ */
|
|
552
|
-
}), /* @__PURE__ */
|
|
569
|
+
children: /* @__PURE__ */ l(g, { placeholder: c("healthybowl.crops.fieldDetail.capacity.cropPlaceholder", "Select crop") })
|
|
570
|
+
}), /* @__PURE__ */ l(p, { children: B.map((e) => /* @__PURE__ */ l(m, {
|
|
553
571
|
value: e.id,
|
|
554
572
|
children: e.variety ? `${e.name} - ${e.variety}` : e.name
|
|
555
573
|
}, e.id)) })]
|
|
556
574
|
})]
|
|
557
575
|
}),
|
|
558
|
-
|
|
576
|
+
j.length > 0 && /* @__PURE__ */ u("div", {
|
|
559
577
|
className: "xl:col-span-2",
|
|
560
|
-
children: [/* @__PURE__ */
|
|
578
|
+
children: [/* @__PURE__ */ l("label", {
|
|
561
579
|
className: "text-xs font-medium text-text-secondary",
|
|
562
|
-
children:
|
|
563
|
-
}), /* @__PURE__ */
|
|
564
|
-
value:
|
|
565
|
-
onValueChange:
|
|
566
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: c("healthybowl.crops.fieldDetail.capacity.catalog", "Master Plant List")
|
|
581
|
+
}), /* @__PURE__ */ u(f, {
|
|
582
|
+
value: M || "none",
|
|
583
|
+
onValueChange: Nt,
|
|
584
|
+
children: [/* @__PURE__ */ l(h, {
|
|
567
585
|
className: "mt-1 w-full",
|
|
568
|
-
children: /* @__PURE__ */
|
|
569
|
-
}), /* @__PURE__ */
|
|
586
|
+
children: /* @__PURE__ */ l(g, { placeholder: c("healthybowl.crops.fieldDetail.capacity.catalogPlaceholder", "Fill spacing from catalog") })
|
|
587
|
+
}), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
|
|
570
588
|
value: "none",
|
|
571
|
-
children:
|
|
572
|
-
}),
|
|
589
|
+
children: c("healthybowl.crops.fieldDetail.capacity.catalogNone", "None")
|
|
590
|
+
}), j.map((e) => /* @__PURE__ */ l(m, {
|
|
573
591
|
value: e.id,
|
|
574
592
|
children: e.variety ? `${e.name} - ${e.variety}` : e.name
|
|
575
593
|
}, e.id))] })]
|
|
576
594
|
})]
|
|
577
595
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
label:
|
|
596
|
+
/* @__PURE__ */ l(y, {
|
|
597
|
+
label: c("healthybowl.crops.fieldDetail.capacity.plantSpacing", "Plant spacing"),
|
|
580
598
|
unit: "cm",
|
|
581
|
-
value:
|
|
599
|
+
value: N,
|
|
582
600
|
min: "1",
|
|
583
601
|
step: "1",
|
|
584
|
-
onChange:
|
|
602
|
+
onChange: P
|
|
585
603
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
587
|
-
label:
|
|
604
|
+
/* @__PURE__ */ l(y, {
|
|
605
|
+
label: c("healthybowl.crops.fieldDetail.capacity.rowSpacing", "Row spacing"),
|
|
588
606
|
unit: "cm",
|
|
589
|
-
value:
|
|
607
|
+
value: Ct,
|
|
590
608
|
min: "1",
|
|
591
609
|
step: "1",
|
|
592
|
-
onChange:
|
|
610
|
+
onChange: F
|
|
593
611
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
label:
|
|
612
|
+
/* @__PURE__ */ l(y, {
|
|
613
|
+
label: c("healthybowl.crops.fieldDetail.capacity.bedWidth", "Bed width"),
|
|
596
614
|
unit: "m",
|
|
597
|
-
value:
|
|
615
|
+
value: I,
|
|
598
616
|
min: "0.1",
|
|
599
617
|
step: "0.1",
|
|
600
|
-
onChange:
|
|
618
|
+
onChange: wt
|
|
601
619
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
603
|
-
label:
|
|
620
|
+
/* @__PURE__ */ l(y, {
|
|
621
|
+
label: c("healthybowl.crops.fieldDetail.capacity.pathWidth", "Path width"),
|
|
604
622
|
unit: "m",
|
|
605
|
-
value:
|
|
623
|
+
value: L,
|
|
606
624
|
min: "0",
|
|
607
625
|
step: "0.05",
|
|
608
|
-
onChange:
|
|
626
|
+
onChange: Tt
|
|
609
627
|
})
|
|
610
628
|
]
|
|
611
629
|
}),
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
630
|
+
W ? /* @__PURE__ */ u(We, { children: [
|
|
631
|
+
/* @__PURE__ */ u("div", {
|
|
632
|
+
className: "mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",
|
|
633
|
+
children: [
|
|
634
|
+
/* @__PURE__ */ l(b, {
|
|
635
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.beds", "Beds"),
|
|
636
|
+
value: t(W.bedCount)
|
|
637
|
+
}),
|
|
638
|
+
/* @__PURE__ */ l(b, {
|
|
639
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.rowsPerBed", "Rows / bed"),
|
|
640
|
+
value: t(W.rowsPerBed)
|
|
641
|
+
}),
|
|
642
|
+
/* @__PURE__ */ l(b, {
|
|
643
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.plantsPerBed", "Plants / bed"),
|
|
644
|
+
value: t(W.plantsPerBed)
|
|
645
|
+
}),
|
|
646
|
+
/* @__PURE__ */ l(b, {
|
|
647
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.totalPlants", "Total plants"),
|
|
648
|
+
value: t(W.totalPlants)
|
|
649
|
+
}),
|
|
650
|
+
/* @__PURE__ */ l(b, {
|
|
651
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.seedlings", "Seedlings"),
|
|
652
|
+
value: t(W.seedlingTarget)
|
|
653
|
+
}),
|
|
654
|
+
/* @__PURE__ */ l(b, {
|
|
655
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.bedLength", "Bed length"),
|
|
656
|
+
value: v(W.bedLengthM),
|
|
657
|
+
unit: "m"
|
|
658
|
+
}),
|
|
659
|
+
/* @__PURE__ */ l(b, {
|
|
660
|
+
label: c("healthybowl.crops.fieldDetail.capacity.metrics.density", "Density"),
|
|
661
|
+
value: v(W.densityPlantsPerSqm, 2),
|
|
662
|
+
unit: c("healthybowl.crops.fieldDetail.capacity.metrics.densityUnit", "plants/m²")
|
|
663
|
+
})
|
|
664
|
+
]
|
|
665
|
+
}),
|
|
666
|
+
K && /* @__PURE__ */ u("div", {
|
|
667
|
+
className: "mt-5 border-t border-border-subtle pt-4",
|
|
668
|
+
children: [
|
|
669
|
+
/* @__PURE__ */ u("h5", {
|
|
670
|
+
className: "mb-3 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
671
|
+
children: [
|
|
672
|
+
/* @__PURE__ */ l(Fe, { className: "h-3.5 w-3.5 text-success" }),
|
|
673
|
+
c("healthybowl.crops.fieldDetail.seedRate.heading", "Seed rate"),
|
|
674
|
+
G && /* @__PURE__ */ l("span", {
|
|
675
|
+
className: "rounded-full bg-success/10 px-2 py-0.5 text-[11px] font-medium normal-case text-success",
|
|
676
|
+
children: c("healthybowl.crops.fieldDetail.seedRate.fromCatalog", "from catalog")
|
|
677
|
+
})
|
|
678
|
+
]
|
|
679
|
+
}),
|
|
680
|
+
/* @__PURE__ */ u("div", {
|
|
681
|
+
className: "grid grid-cols-2 gap-3 md:grid-cols-3",
|
|
682
|
+
children: [
|
|
683
|
+
/* @__PURE__ */ l(b, {
|
|
684
|
+
label: c("healthybowl.crops.fieldDetail.seedRate.seedNeeded", "Seed needed"),
|
|
685
|
+
value: K.seedGrams == null ? "—" : v(K.seedGrams, 2),
|
|
686
|
+
unit: K.seedGrams == null ? void 0 : "g"
|
|
687
|
+
}),
|
|
688
|
+
/* @__PURE__ */ l(b, {
|
|
689
|
+
label: c("healthybowl.crops.fieldDetail.seedRate.seedlings", "Seedlings to raise"),
|
|
690
|
+
value: t(K.seedlingsToRaise)
|
|
691
|
+
}),
|
|
692
|
+
/* @__PURE__ */ l(b, {
|
|
693
|
+
label: c("healthybowl.crops.fieldDetail.seedRate.trays", "Trays"),
|
|
694
|
+
value: K.trays == null ? "—" : t(K.trays)
|
|
695
|
+
})
|
|
696
|
+
]
|
|
697
|
+
}),
|
|
698
|
+
K.seedGrams == null && /* @__PURE__ */ l("p", {
|
|
699
|
+
className: "mt-3 text-xs text-text-secondary",
|
|
700
|
+
children: c("healthybowl.crops.fieldDetail.seedRate.noSeedsPerGram", "Set “seeds per gram” for this variety in the Master Plant List to calculate seed weight in grams.")
|
|
701
|
+
})
|
|
702
|
+
]
|
|
703
|
+
}),
|
|
704
|
+
/* @__PURE__ */ u("div", {
|
|
705
|
+
className: "mt-5 border-t border-border-subtle pt-4",
|
|
706
|
+
children: [/* @__PURE__ */ u("div", {
|
|
707
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
708
|
+
children: [/* @__PURE__ */ u("h5", {
|
|
709
|
+
className: "flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
710
|
+
children: [/* @__PURE__ */ l(Le, { className: "h-3.5 w-3.5 text-success" }), c("healthybowl.crops.fieldDetail.compare.heading", "Compare crops for this field")]
|
|
711
|
+
}), Y.length > 0 && /* @__PURE__ */ u("span", {
|
|
712
|
+
className: "text-xs text-text-secondary",
|
|
713
|
+
children: [
|
|
714
|
+
t(Y.length),
|
|
715
|
+
" ",
|
|
716
|
+
c("healthybowl.crops.fieldDetail.compare.varieties", "varieties")
|
|
717
|
+
]
|
|
718
|
+
})]
|
|
719
|
+
}), Y.length > 0 ? /* @__PURE__ */ u(We, { children: [
|
|
720
|
+
/* @__PURE__ */ l("p", {
|
|
721
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
722
|
+
children: c("healthybowl.crops.fieldDetail.compare.description", "What each variety in your Master Plant List would need on this field, at the bed and path widths above.")
|
|
723
|
+
}),
|
|
724
|
+
/* @__PURE__ */ l("div", {
|
|
725
|
+
className: "mt-3 overflow-x-auto rounded-md border border-border-subtle",
|
|
726
|
+
children: /* @__PURE__ */ u("table", {
|
|
727
|
+
className: "w-full min-w-[680px] border-collapse text-sm",
|
|
728
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", {
|
|
729
|
+
className: "border-b border-border-subtle bg-bg-sunken/60",
|
|
730
|
+
children: [
|
|
731
|
+
/* @__PURE__ */ l(x, {
|
|
732
|
+
label: c("healthybowl.crops.fieldDetail.compare.crop", "Crop"),
|
|
733
|
+
sortKey: "label",
|
|
734
|
+
activeKey: q,
|
|
735
|
+
direction: J,
|
|
736
|
+
onSort: X
|
|
737
|
+
}),
|
|
738
|
+
/* @__PURE__ */ l("th", {
|
|
739
|
+
scope: "col",
|
|
740
|
+
className: "whitespace-nowrap px-3 py-2 text-right text-xs font-medium text-text-secondary",
|
|
741
|
+
children: c("healthybowl.crops.fieldDetail.compare.spacing", "Spacing")
|
|
742
|
+
}),
|
|
743
|
+
/* @__PURE__ */ l("th", {
|
|
744
|
+
scope: "col",
|
|
745
|
+
className: "whitespace-nowrap px-3 py-2 text-right text-xs font-medium text-text-secondary",
|
|
746
|
+
children: c("healthybowl.crops.fieldDetail.compare.beds", "Beds")
|
|
747
|
+
}),
|
|
748
|
+
/* @__PURE__ */ l(x, {
|
|
749
|
+
label: c("healthybowl.crops.fieldDetail.compare.totalPlants", "Total plants"),
|
|
750
|
+
sortKey: "totalPlants",
|
|
751
|
+
activeKey: q,
|
|
752
|
+
direction: J,
|
|
753
|
+
onSort: X,
|
|
754
|
+
align: "right"
|
|
755
|
+
}),
|
|
756
|
+
/* @__PURE__ */ l(x, {
|
|
757
|
+
label: c("healthybowl.crops.fieldDetail.compare.seed", "Seed needed"),
|
|
758
|
+
sortKey: "seedGrams",
|
|
759
|
+
activeKey: q,
|
|
760
|
+
direction: J,
|
|
761
|
+
onSort: X,
|
|
762
|
+
align: "right"
|
|
763
|
+
}),
|
|
764
|
+
/* @__PURE__ */ l(x, {
|
|
765
|
+
label: c("healthybowl.crops.fieldDetail.compare.trays", "Trays"),
|
|
766
|
+
sortKey: "trays",
|
|
767
|
+
activeKey: q,
|
|
768
|
+
direction: J,
|
|
769
|
+
onSort: X,
|
|
770
|
+
align: "right"
|
|
771
|
+
}),
|
|
772
|
+
/* @__PURE__ */ l(x, {
|
|
773
|
+
label: c("healthybowl.crops.fieldDetail.compare.maturity", "Days to maturity"),
|
|
774
|
+
sortKey: "daysToMaturity",
|
|
775
|
+
activeKey: q,
|
|
776
|
+
direction: J,
|
|
777
|
+
onSort: X,
|
|
778
|
+
align: "right"
|
|
779
|
+
})
|
|
780
|
+
]
|
|
781
|
+
}) }), /* @__PURE__ */ l("tbody", { children: Y.map((e) => /* @__PURE__ */ u("tr", {
|
|
782
|
+
className: `border-b border-border-subtle last:border-b-0 ${G?.id === e.id ? "bg-success/5" : ""}`,
|
|
783
|
+
children: [
|
|
784
|
+
/* @__PURE__ */ u("td", {
|
|
785
|
+
className: "px-3 py-2",
|
|
786
|
+
children: [/* @__PURE__ */ l("span", {
|
|
787
|
+
className: "font-medium text-text-primary",
|
|
788
|
+
children: e.label
|
|
789
|
+
}), !e.spacingFromCatalog && /* @__PURE__ */ l("span", {
|
|
790
|
+
className: "ml-2 whitespace-nowrap rounded-full bg-bg-sunken px-1.5 py-0.5 text-[10px] text-text-secondary",
|
|
791
|
+
title: e.presetLabel,
|
|
792
|
+
children: c("healthybowl.crops.fieldDetail.compare.presetSpacing", "preset spacing")
|
|
793
|
+
})]
|
|
794
|
+
}),
|
|
795
|
+
/* @__PURE__ */ u("td", {
|
|
796
|
+
className: "whitespace-nowrap px-3 py-2 text-right tabular-nums text-text-secondary",
|
|
797
|
+
children: [
|
|
798
|
+
e.plantSpacingCm,
|
|
799
|
+
"×",
|
|
800
|
+
e.rowSpacingCm,
|
|
801
|
+
" cm"
|
|
802
|
+
]
|
|
803
|
+
}),
|
|
804
|
+
/* @__PURE__ */ l("td", {
|
|
805
|
+
className: "px-3 py-2 text-right tabular-nums text-text-secondary",
|
|
806
|
+
children: t(e.capacity.bedCount)
|
|
807
|
+
}),
|
|
808
|
+
/* @__PURE__ */ l("td", {
|
|
809
|
+
className: "px-3 py-2 text-right font-medium tabular-nums text-text-primary",
|
|
810
|
+
children: t(e.capacity.totalPlants)
|
|
811
|
+
}),
|
|
812
|
+
/* @__PURE__ */ l("td", {
|
|
813
|
+
className: "whitespace-nowrap px-3 py-2 text-right tabular-nums text-text-secondary",
|
|
814
|
+
children: e.seed.seedGrams == null ? "—" : `${v(e.seed.seedGrams, 2)} g`
|
|
815
|
+
}),
|
|
816
|
+
/* @__PURE__ */ l("td", {
|
|
817
|
+
className: "px-3 py-2 text-right tabular-nums text-text-secondary",
|
|
818
|
+
children: e.seed.trays == null ? "—" : t(e.seed.trays)
|
|
819
|
+
}),
|
|
820
|
+
/* @__PURE__ */ l("td", {
|
|
821
|
+
className: "px-3 py-2 text-right tabular-nums text-text-secondary",
|
|
822
|
+
children: e.daysToMaturity == null ? "—" : t(e.daysToMaturity)
|
|
823
|
+
})
|
|
824
|
+
]
|
|
825
|
+
}, e.id)) })]
|
|
675
826
|
})
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
})
|
|
682
|
-
|
|
683
|
-
|
|
827
|
+
}),
|
|
828
|
+
/* @__PURE__ */ l("p", {
|
|
829
|
+
className: "mt-2 text-xs text-text-secondary",
|
|
830
|
+
children: c("healthybowl.crops.fieldDetail.compare.footnote", "A dash means the variety has no seeds-per-gram recorded yet. “Preset spacing” means the figures use a crop-family default rather than spacing you have recorded.")
|
|
831
|
+
})
|
|
832
|
+
] }) : /* @__PURE__ */ l("p", {
|
|
833
|
+
className: "mt-3 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-xs text-text-secondary",
|
|
834
|
+
children: c("healthybowl.crops.fieldDetail.compare.empty", "Add varieties to your Master Plant List to compare beds and seed across crops for this field.")
|
|
835
|
+
})]
|
|
836
|
+
})
|
|
837
|
+
] }) : /* @__PURE__ */ l("p", {
|
|
684
838
|
className: "mt-4 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-sm text-text-secondary",
|
|
685
|
-
children:
|
|
839
|
+
children: c("healthybowl.crops.fieldDetail.capacity.empty", "Draw a boundary on the map above, or set this field’s area, to calculate beds and plants.")
|
|
686
840
|
})
|
|
687
841
|
]
|
|
688
842
|
})
|
|
689
843
|
]
|
|
690
844
|
}),
|
|
691
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ u("div", {
|
|
692
846
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
693
847
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ u("div", {
|
|
695
849
|
className: "mb-4",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
850
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
697
851
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
698
852
|
children: [
|
|
699
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ l(Fe, { className: "h-4 w-4 text-success" }),
|
|
700
854
|
" ",
|
|
701
|
-
|
|
855
|
+
c("healthybowl.crops.fieldDetail.succession.heading", "Succession planting")
|
|
702
856
|
]
|
|
703
|
-
}), /* @__PURE__ */
|
|
857
|
+
}), /* @__PURE__ */ l("p", {
|
|
704
858
|
className: "mt-1 text-xs text-text-secondary",
|
|
705
|
-
children:
|
|
859
|
+
children: c("healthybowl.crops.fieldDetail.succession.description", "Generate a series of staggered sowings for a steady, continuous harvest. Uses the crop and seed-rate above.")
|
|
706
860
|
})]
|
|
707
861
|
}),
|
|
708
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ u("div", {
|
|
709
863
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
710
864
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
712
866
|
className: "text-xs font-medium text-text-secondary",
|
|
713
|
-
children:
|
|
714
|
-
}), /* @__PURE__ */
|
|
867
|
+
children: c("healthybowl.crops.fieldDetail.succession.startDate", "Start date")
|
|
868
|
+
}), /* @__PURE__ */ l("input", {
|
|
715
869
|
type: "date",
|
|
716
870
|
value: Z,
|
|
717
|
-
onChange: (e) =>
|
|
871
|
+
onChange: (e) => Vt(e.target.value),
|
|
718
872
|
className: "mt-1 h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
719
873
|
})] }),
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
label:
|
|
722
|
-
unit:
|
|
723
|
-
value:
|
|
874
|
+
/* @__PURE__ */ l(y, {
|
|
875
|
+
label: c("healthybowl.crops.fieldDetail.succession.interval", "Interval"),
|
|
876
|
+
unit: c("healthybowl.crops.fieldDetail.succession.days", "days"),
|
|
877
|
+
value: Ht,
|
|
724
878
|
min: "1",
|
|
725
879
|
step: "1",
|
|
726
|
-
onChange:
|
|
880
|
+
onChange: Ut
|
|
727
881
|
}),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
label:
|
|
730
|
-
unit:
|
|
731
|
-
value:
|
|
882
|
+
/* @__PURE__ */ l(y, {
|
|
883
|
+
label: c("healthybowl.crops.fieldDetail.succession.count", "Number of sowings"),
|
|
884
|
+
unit: c("healthybowl.crops.fieldDetail.succession.sowings", "sowings"),
|
|
885
|
+
value: Wt,
|
|
732
886
|
min: "1",
|
|
733
887
|
step: "1",
|
|
734
|
-
onChange:
|
|
888
|
+
onChange: Gt
|
|
735
889
|
}),
|
|
736
|
-
|
|
890
|
+
Rt.length > 0 && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
737
891
|
className: "text-xs font-medium text-text-secondary",
|
|
738
|
-
children:
|
|
739
|
-
}), /* @__PURE__ */
|
|
740
|
-
value:
|
|
741
|
-
onValueChange: (e) =>
|
|
742
|
-
children: [/* @__PURE__ */
|
|
892
|
+
children: c("healthybowl.crops.fieldDetail.succession.bed", "Bed (optional)")
|
|
893
|
+
}), /* @__PURE__ */ u(f, {
|
|
894
|
+
value: Kt || "none",
|
|
895
|
+
onValueChange: (e) => qt(e === "none" ? "" : e),
|
|
896
|
+
children: [/* @__PURE__ */ l(h, {
|
|
743
897
|
className: "mt-1 w-full",
|
|
744
|
-
children: /* @__PURE__ */
|
|
745
|
-
}), /* @__PURE__ */
|
|
898
|
+
children: /* @__PURE__ */ l(g, { placeholder: c("healthybowl.crops.fieldDetail.succession.bedPlaceholder", "No specific bed") })
|
|
899
|
+
}), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
|
|
746
900
|
value: "none",
|
|
747
|
-
children:
|
|
748
|
-
}),
|
|
901
|
+
children: c("healthybowl.crops.fieldDetail.succession.bedNone", "No specific bed")
|
|
902
|
+
}), Rt.map((e) => /* @__PURE__ */ l(m, {
|
|
749
903
|
value: e.id,
|
|
750
904
|
children: e.name
|
|
751
905
|
}, e.id))] })]
|
|
752
906
|
})] })
|
|
753
907
|
]
|
|
754
908
|
}),
|
|
755
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ u("div", {
|
|
756
910
|
className: "mt-4 flex flex-wrap items-center justify-between gap-3",
|
|
757
|
-
children: [/* @__PURE__ */
|
|
911
|
+
children: [/* @__PURE__ */ l("p", {
|
|
758
912
|
className: "text-xs text-text-secondary",
|
|
759
|
-
children:
|
|
760
|
-
}), /* @__PURE__ */
|
|
761
|
-
onClick:
|
|
762
|
-
disabled:
|
|
763
|
-
children: [/* @__PURE__ */
|
|
913
|
+
children: V ? c("healthybowl.crops.fieldDetail.succession.forCrop", "For: {{crop}}", { crop: V.variety ? `${V.name} - ${V.variety}` : V.name }) : c("healthybowl.crops.fieldDetail.succession.noCrop", "Select a crop in the capacity planner above.")
|
|
914
|
+
}), /* @__PURE__ */ u(d, {
|
|
915
|
+
onClick: Qt,
|
|
916
|
+
disabled: Jt,
|
|
917
|
+
children: [/* @__PURE__ */ l(Pe, { className: "h-4 w-4" }), Jt ? c("healthybowl.crops.fieldDetail.succession.generating", "Generating...") : c("healthybowl.crops.fieldDetail.succession.generate", "Generate schedule")]
|
|
764
918
|
})]
|
|
765
919
|
}),
|
|
766
|
-
|
|
920
|
+
Xt.length > 0 ? /* @__PURE__ */ l("div", {
|
|
767
921
|
className: "mt-5 space-y-5 border-t border-border-subtle pt-5",
|
|
768
|
-
children:
|
|
922
|
+
children: Xt.map(([n, r]) => /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("div", {
|
|
769
923
|
className: "mb-2 flex items-center justify-between",
|
|
770
|
-
children: [/* @__PURE__ */
|
|
924
|
+
children: [/* @__PURE__ */ l("h4", {
|
|
771
925
|
className: "text-sm font-semibold text-text-primary",
|
|
772
|
-
children: r[0] ?
|
|
773
|
-
}), /* @__PURE__ */
|
|
926
|
+
children: r[0] ? Zt(r[0]) : c("healthybowl.crops.fieldDetail.succession.series", "Succession series")
|
|
927
|
+
}), /* @__PURE__ */ l("span", {
|
|
774
928
|
className: "text-xs text-text-secondary",
|
|
775
|
-
children:
|
|
929
|
+
children: c("healthybowl.crops.fieldDetail.succession.sowingCount", "{{count}} sowings", { count: r.length })
|
|
776
930
|
})]
|
|
777
|
-
}), /* @__PURE__ */
|
|
931
|
+
}), /* @__PURE__ */ l("div", {
|
|
778
932
|
className: "space-y-2",
|
|
779
|
-
children: r.map((n, r) => /* @__PURE__ */
|
|
933
|
+
children: r.map((n, r) => /* @__PURE__ */ u("div", {
|
|
780
934
|
className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
|
|
781
|
-
children: [/* @__PURE__ */
|
|
935
|
+
children: [/* @__PURE__ */ u("div", {
|
|
782
936
|
className: "flex items-center gap-3",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
937
|
+
children: [/* @__PURE__ */ l("div", {
|
|
784
938
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-success/10 text-xs font-semibold text-success",
|
|
785
939
|
children: (n.successionIndex ?? r) + 1
|
|
786
|
-
}), /* @__PURE__ */
|
|
940
|
+
}), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("p", {
|
|
787
941
|
className: "text-sm font-medium text-text-primary",
|
|
788
942
|
children: [
|
|
789
|
-
|
|
943
|
+
c("healthybowl.crops.fieldDetail.succession.sowingLabel", "Sowing {{n}}", { n: (n.successionIndex ?? r) + 1 }),
|
|
790
944
|
" ",
|
|
791
945
|
"— ",
|
|
792
946
|
e(n.sowDate ?? n.startDate)
|
|
793
947
|
]
|
|
794
|
-
}), n.seedlingsToRaise != null && /* @__PURE__ */
|
|
948
|
+
}), n.seedlingsToRaise != null && /* @__PURE__ */ l("p", {
|
|
795
949
|
className: "text-xs text-text-secondary",
|
|
796
|
-
children:
|
|
950
|
+
children: c("healthybowl.crops.fieldDetail.succession.sowingMeta", "{{seedlings}} seedlings{{grams}}", {
|
|
797
951
|
seedlings: t(n.seedlingsToRaise),
|
|
798
|
-
grams: n.seedGrams == null ? "" : ` · ${
|
|
952
|
+
grams: n.seedGrams == null ? "" : ` · ${v(n.seedGrams, 2)} g seed`
|
|
799
953
|
})
|
|
800
954
|
})] })]
|
|
801
|
-
}), /* @__PURE__ */
|
|
955
|
+
}), /* @__PURE__ */ l(d, {
|
|
802
956
|
variant: "ghost",
|
|
803
957
|
size: "icon-sm",
|
|
804
|
-
onClick: () => void
|
|
805
|
-
"aria-label":
|
|
958
|
+
onClick: () => void $t(n),
|
|
959
|
+
"aria-label": c("healthybowl.common.delete", "Delete"),
|
|
806
960
|
className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
|
|
807
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ l(ze, { className: "h-4 w-4" })
|
|
808
962
|
})]
|
|
809
963
|
}, n.id))
|
|
810
964
|
})] }, n))
|
|
811
|
-
}) : /* @__PURE__ */
|
|
965
|
+
}) : /* @__PURE__ */ l("p", {
|
|
812
966
|
className: "mt-5 rounded-md border border-border-subtle bg-bg-sunken/60 p-3 text-sm text-text-secondary",
|
|
813
|
-
children:
|
|
967
|
+
children: c("healthybowl.crops.fieldDetail.succession.empty", "No succession schedules yet. Set a start date, interval and number of sowings, then generate a series.")
|
|
814
968
|
})
|
|
815
969
|
]
|
|
816
970
|
}),
|
|
817
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ u("div", {
|
|
818
972
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
819
|
-
children: [/* @__PURE__ */
|
|
973
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
820
974
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
821
975
|
children: [
|
|
822
|
-
/* @__PURE__ */
|
|
976
|
+
/* @__PURE__ */ l(Me, { className: "h-4 w-4 text-success" }),
|
|
823
977
|
" ",
|
|
824
|
-
|
|
978
|
+
c("healthybowl.crops.fieldDetail.currentCrops.heading", "Current Crops")
|
|
825
979
|
]
|
|
826
|
-
}),
|
|
980
|
+
}), z.length > 0 ? /* @__PURE__ */ l("div", {
|
|
827
981
|
className: "flex flex-col gap-3",
|
|
828
|
-
children:
|
|
982
|
+
children: z.map((e) => /* @__PURE__ */ u("div", {
|
|
829
983
|
onClick: () => C(w(`crops/${e.id}`)),
|
|
830
984
|
className: "flex cursor-pointer items-center justify-between rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
|
|
831
|
-
children: [/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
985
|
+
children: [/* @__PURE__ */ u("div", { children: [
|
|
986
|
+
/* @__PURE__ */ l("span", {
|
|
833
987
|
className: "text-sm font-medium text-text-primary",
|
|
834
988
|
children: e.name
|
|
835
989
|
}),
|
|
836
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ l("span", {
|
|
837
991
|
className: "ml-2 text-xs text-text-secondary",
|
|
838
992
|
children: e.variety
|
|
839
993
|
}),
|
|
840
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ u("div", {
|
|
841
995
|
className: "mt-1 flex items-center gap-2",
|
|
842
|
-
children: [/* @__PURE__ */
|
|
996
|
+
children: [/* @__PURE__ */ l("div", {
|
|
843
997
|
className: "h-1.5 w-24 rounded-full bg-bg-sunken",
|
|
844
|
-
children: /* @__PURE__ */
|
|
998
|
+
children: /* @__PURE__ */ l("div", {
|
|
845
999
|
className: "h-1.5 rounded-full bg-action-primary-bg",
|
|
846
1000
|
style: { width: `${e.progress}%` }
|
|
847
1001
|
})
|
|
848
|
-
}), /* @__PURE__ */
|
|
1002
|
+
}), /* @__PURE__ */ u("span", {
|
|
849
1003
|
className: "text-xs text-text-secondary",
|
|
850
1004
|
children: [e.progress, "%"]
|
|
851
1005
|
})]
|
|
852
1006
|
})
|
|
853
|
-
] }), /* @__PURE__ */
|
|
1007
|
+
] }), /* @__PURE__ */ u("div", {
|
|
854
1008
|
className: "flex items-center gap-2",
|
|
855
|
-
children: [/* @__PURE__ */
|
|
1009
|
+
children: [/* @__PURE__ */ l(i, {
|
|
856
1010
|
label: e.growthStage,
|
|
857
1011
|
variant: "info"
|
|
858
|
-
}), /* @__PURE__ */
|
|
1012
|
+
}), /* @__PURE__ */ u("span", {
|
|
859
1013
|
className: "text-xs text-text-secondary",
|
|
860
1014
|
children: [e.daysToHarvest, "d"]
|
|
861
1015
|
})]
|
|
862
1016
|
})]
|
|
863
1017
|
}, e.id))
|
|
864
|
-
}) : /* @__PURE__ */
|
|
1018
|
+
}) : /* @__PURE__ */ l("p", {
|
|
865
1019
|
className: "text-sm text-text-secondary",
|
|
866
|
-
children:
|
|
1020
|
+
children: c("healthybowl.crops.fieldDetail.currentCrops.empty", "No crops currently planted.")
|
|
867
1021
|
})]
|
|
868
1022
|
}),
|
|
869
|
-
Q && /* @__PURE__ */
|
|
1023
|
+
Q && /* @__PURE__ */ u("div", {
|
|
870
1024
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
871
1025
|
children: [
|
|
872
|
-
/* @__PURE__ */
|
|
1026
|
+
/* @__PURE__ */ u("div", {
|
|
873
1027
|
className: "mb-4 flex items-center justify-between",
|
|
874
|
-
children: [/* @__PURE__ */
|
|
1028
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
875
1029
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
876
1030
|
children: [
|
|
877
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ l(Ce, { className: "h-4 w-4 text-warning" }),
|
|
878
1032
|
" ",
|
|
879
|
-
|
|
1033
|
+
c("healthybowl.crops.fieldDetail.soilHealth.heading", "Soil Health")
|
|
880
1034
|
]
|
|
881
|
-
}), /* @__PURE__ */
|
|
1035
|
+
}), /* @__PURE__ */ l(i, {
|
|
882
1036
|
label: (Q.status ?? "unknown").replace("_", " "),
|
|
883
|
-
variant:
|
|
1037
|
+
variant: qe(Q.status ?? "unknown")
|
|
884
1038
|
})]
|
|
885
1039
|
}),
|
|
886
|
-
/* @__PURE__ */
|
|
1040
|
+
/* @__PURE__ */ l("div", {
|
|
887
1041
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
|
|
888
1042
|
children: [
|
|
889
1043
|
{
|
|
890
1044
|
key: "pH",
|
|
891
|
-
label:
|
|
1045
|
+
label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.ph", "pH"),
|
|
892
1046
|
value: Q.ph.toString(),
|
|
893
1047
|
good: Q.ph >= 6 && Q.ph <= 7.5
|
|
894
1048
|
},
|
|
895
1049
|
{
|
|
896
1050
|
key: "Nitrogen",
|
|
897
|
-
label:
|
|
1051
|
+
label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.nitrogen", "Nitrogen"),
|
|
898
1052
|
value: `${Q.nitrogen} ppm`,
|
|
899
1053
|
good: Q.nitrogen >= 30
|
|
900
1054
|
},
|
|
901
1055
|
{
|
|
902
1056
|
key: "Phosphorus",
|
|
903
|
-
label:
|
|
1057
|
+
label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.phosphorus", "Phosphorus"),
|
|
904
1058
|
value: `${Q.phosphorus} ppm`,
|
|
905
1059
|
good: Q.phosphorus >= 25
|
|
906
1060
|
},
|
|
907
1061
|
{
|
|
908
1062
|
key: "Potassium",
|
|
909
|
-
label:
|
|
1063
|
+
label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.potassium", "Potassium"),
|
|
910
1064
|
value: `${Q.potassium} ppm`,
|
|
911
1065
|
good: Q.potassium >= 150
|
|
912
1066
|
},
|
|
913
1067
|
{
|
|
914
1068
|
key: "Organic Matter",
|
|
915
|
-
label:
|
|
1069
|
+
label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.organicMatter", "Organic Matter"),
|
|
916
1070
|
value: `${Q.organicMatter}%`,
|
|
917
1071
|
good: Q.organicMatter >= 3
|
|
918
1072
|
},
|
|
919
1073
|
{
|
|
920
1074
|
key: "Moisture",
|
|
921
|
-
label:
|
|
1075
|
+
label: c("healthybowl.crops.fieldDetail.soilHealth.metrics.moisture", "Moisture"),
|
|
922
1076
|
value: `${Q.moisture}%`,
|
|
923
1077
|
good: Q.moisture >= 20 && Q.moisture <= 40
|
|
924
1078
|
}
|
|
925
|
-
].map(({ key: e, label: t, value: n, good: r }) => /* @__PURE__ */
|
|
1079
|
+
].map(({ key: e, label: t, value: n, good: r }) => /* @__PURE__ */ u("div", {
|
|
926
1080
|
className: "text-center",
|
|
927
|
-
children: [/* @__PURE__ */
|
|
1081
|
+
children: [/* @__PURE__ */ l("span", {
|
|
928
1082
|
className: "text-xs text-text-secondary",
|
|
929
1083
|
children: t
|
|
930
|
-
}), /* @__PURE__ */
|
|
1084
|
+
}), /* @__PURE__ */ l("p", {
|
|
931
1085
|
className: `text-sm font-semibold ${r ? "text-success" : "text-warning"}`,
|
|
932
1086
|
children: n
|
|
933
1087
|
})]
|
|
934
1088
|
}, e))
|
|
935
1089
|
}),
|
|
936
|
-
Q.recommendations.length > 0 && /* @__PURE__ */
|
|
1090
|
+
Q.recommendations.length > 0 && /* @__PURE__ */ u("div", {
|
|
937
1091
|
className: "mt-4 border-t border-border-subtle pt-4",
|
|
938
|
-
children: [/* @__PURE__ */
|
|
1092
|
+
children: [/* @__PURE__ */ l("h4", {
|
|
939
1093
|
className: "mb-2 text-xs font-medium text-text-secondary",
|
|
940
|
-
children:
|
|
941
|
-
}), /* @__PURE__ */
|
|
1094
|
+
children: c("healthybowl.crops.fieldDetail.soilHealth.recommendations", "Recommendations")
|
|
1095
|
+
}), /* @__PURE__ */ l("ul", {
|
|
942
1096
|
className: "space-y-1",
|
|
943
|
-
children: Q.recommendations.map((e, t) => /* @__PURE__ */
|
|
1097
|
+
children: Q.recommendations.map((e, t) => /* @__PURE__ */ u("li", {
|
|
944
1098
|
className: "text-xs text-text-primary",
|
|
945
1099
|
children: ["- ", e]
|
|
946
1100
|
}, t))
|
|
@@ -948,26 +1102,26 @@ var He = (e) => {
|
|
|
948
1102
|
})
|
|
949
1103
|
]
|
|
950
1104
|
}),
|
|
951
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ u("div", {
|
|
952
1106
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
953
|
-
children: [/* @__PURE__ */
|
|
1107
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
954
1108
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
955
1109
|
children: [
|
|
956
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ l(Ee, { className: "h-4 w-4 text-info" }),
|
|
957
1111
|
" ",
|
|
958
|
-
|
|
1112
|
+
c("healthybowl.crops.fieldDetail.cropHistory.heading", "Crop History")
|
|
959
1113
|
]
|
|
960
|
-
}), /* @__PURE__ */
|
|
1114
|
+
}), /* @__PURE__ */ l("div", {
|
|
961
1115
|
className: "space-y-3",
|
|
962
|
-
children:
|
|
1116
|
+
children: tn.map((e, t) => /* @__PURE__ */ u("div", {
|
|
963
1117
|
className: "flex items-center justify-between rounded-md border border-border-subtle p-3",
|
|
964
|
-
children: [/* @__PURE__ */
|
|
1118
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("span", {
|
|
965
1119
|
className: "text-sm font-medium text-text-primary",
|
|
966
1120
|
children: e.crop
|
|
967
|
-
}), /* @__PURE__ */
|
|
1121
|
+
}), /* @__PURE__ */ l("p", {
|
|
968
1122
|
className: "text-xs text-text-secondary",
|
|
969
1123
|
children: e.season
|
|
970
|
-
})] }), /* @__PURE__ */
|
|
1124
|
+
})] }), /* @__PURE__ */ l(i, {
|
|
971
1125
|
label: e.status,
|
|
972
1126
|
variant: e.status === "active" ? "success" : "muted"
|
|
973
1127
|
})]
|
|
@@ -975,87 +1129,87 @@ var He = (e) => {
|
|
|
975
1129
|
})]
|
|
976
1130
|
})
|
|
977
1131
|
]
|
|
978
|
-
}), /* @__PURE__ */
|
|
1132
|
+
}), /* @__PURE__ */ u("div", {
|
|
979
1133
|
className: "space-y-6",
|
|
980
1134
|
children: [
|
|
981
|
-
/* @__PURE__ */
|
|
1135
|
+
/* @__PURE__ */ u("div", {
|
|
982
1136
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
983
|
-
children: [/* @__PURE__ */
|
|
1137
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
984
1138
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
985
1139
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ l(Oe, { className: "h-4 w-4 text-info" }),
|
|
987
1141
|
" ",
|
|
988
|
-
|
|
1142
|
+
c("healthybowl.crops.fieldDetail.weather.heading", "Current Conditions")
|
|
989
1143
|
]
|
|
990
|
-
}), /* @__PURE__ */
|
|
1144
|
+
}), /* @__PURE__ */ u("div", {
|
|
991
1145
|
className: "space-y-3",
|
|
992
1146
|
children: [
|
|
993
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ u("div", {
|
|
994
1148
|
className: "flex items-center justify-between",
|
|
995
|
-
children: [/* @__PURE__ */
|
|
1149
|
+
children: [/* @__PURE__ */ u("span", {
|
|
996
1150
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
997
1151
|
children: [
|
|
998
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ l(Re, { className: "h-3.5 w-3.5" }),
|
|
999
1153
|
" ",
|
|
1000
|
-
|
|
1154
|
+
c("healthybowl.crops.fieldDetail.weather.temperature", "Temperature")
|
|
1001
1155
|
]
|
|
1002
|
-
}), /* @__PURE__ */
|
|
1156
|
+
}), /* @__PURE__ */ u("span", {
|
|
1003
1157
|
className: "text-sm font-medium text-text-primary",
|
|
1004
1158
|
children: [$.current.temperature, "°C"]
|
|
1005
1159
|
})]
|
|
1006
1160
|
}),
|
|
1007
|
-
/* @__PURE__ */
|
|
1161
|
+
/* @__PURE__ */ u("div", {
|
|
1008
1162
|
className: "flex items-center justify-between",
|
|
1009
|
-
children: [/* @__PURE__ */
|
|
1163
|
+
children: [/* @__PURE__ */ u("span", {
|
|
1010
1164
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
1011
1165
|
children: [
|
|
1012
|
-
/* @__PURE__ */
|
|
1166
|
+
/* @__PURE__ */ l(ke, { className: "h-3.5 w-3.5" }),
|
|
1013
1167
|
" ",
|
|
1014
|
-
|
|
1168
|
+
c("healthybowl.crops.fieldDetail.weather.humidity", "Humidity")
|
|
1015
1169
|
]
|
|
1016
|
-
}), /* @__PURE__ */
|
|
1170
|
+
}), /* @__PURE__ */ u("span", {
|
|
1017
1171
|
className: "text-sm font-medium text-text-primary",
|
|
1018
1172
|
children: [$.current.humidity, "%"]
|
|
1019
1173
|
})]
|
|
1020
1174
|
}),
|
|
1021
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ u("div", {
|
|
1022
1176
|
className: "flex items-center justify-between",
|
|
1023
|
-
children: [/* @__PURE__ */
|
|
1177
|
+
children: [/* @__PURE__ */ u("span", {
|
|
1024
1178
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
1025
1179
|
children: [
|
|
1026
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ l(Ve, { className: "h-3.5 w-3.5" }),
|
|
1027
1181
|
" ",
|
|
1028
|
-
|
|
1182
|
+
c("healthybowl.crops.fieldDetail.weather.wind", "Wind")
|
|
1029
1183
|
]
|
|
1030
|
-
}), /* @__PURE__ */
|
|
1184
|
+
}), /* @__PURE__ */ u("span", {
|
|
1031
1185
|
className: "text-sm font-medium text-text-primary",
|
|
1032
1186
|
children: [$.current.windSpeed, " km/h"]
|
|
1033
1187
|
})]
|
|
1034
1188
|
}),
|
|
1035
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ u("div", {
|
|
1036
1190
|
className: "flex items-center justify-between",
|
|
1037
|
-
children: [/* @__PURE__ */
|
|
1191
|
+
children: [/* @__PURE__ */ u("span", {
|
|
1038
1192
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
1039
1193
|
children: [
|
|
1040
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ l(Ie, { className: "h-3.5 w-3.5" }),
|
|
1041
1195
|
" ",
|
|
1042
|
-
|
|
1196
|
+
c("healthybowl.crops.fieldDetail.weather.uvIndex", "UV Index")
|
|
1043
1197
|
]
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1198
|
+
}), /* @__PURE__ */ l("span", {
|
|
1045
1199
|
className: "text-sm font-medium text-text-primary",
|
|
1046
1200
|
children: $.current.uvIndex
|
|
1047
1201
|
})]
|
|
1048
1202
|
}),
|
|
1049
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ u("div", {
|
|
1050
1204
|
className: "flex items-center justify-between",
|
|
1051
|
-
children: [/* @__PURE__ */
|
|
1205
|
+
children: [/* @__PURE__ */ u("span", {
|
|
1052
1206
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
1053
1207
|
children: [
|
|
1054
|
-
/* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ l(je, { className: "h-3.5 w-3.5" }),
|
|
1055
1209
|
" ",
|
|
1056
|
-
|
|
1210
|
+
c("healthybowl.crops.fieldDetail.weather.visibility", "Visibility")
|
|
1057
1211
|
]
|
|
1058
|
-
}), /* @__PURE__ */
|
|
1212
|
+
}), /* @__PURE__ */ u("span", {
|
|
1059
1213
|
className: "text-sm font-medium text-text-primary",
|
|
1060
1214
|
children: [$.current.visibility, " km"]
|
|
1061
1215
|
})]
|
|
@@ -1063,75 +1217,75 @@ var He = (e) => {
|
|
|
1063
1217
|
]
|
|
1064
1218
|
})]
|
|
1065
1219
|
}),
|
|
1066
|
-
/* @__PURE__ */
|
|
1220
|
+
/* @__PURE__ */ u("div", {
|
|
1067
1221
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1222
|
+
children: [/* @__PURE__ */ l("h3", {
|
|
1069
1223
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
1070
|
-
children:
|
|
1071
|
-
}), /* @__PURE__ */
|
|
1224
|
+
children: c("healthybowl.crops.fieldDetail.quickActions.heading", "Quick Actions")
|
|
1225
|
+
}), /* @__PURE__ */ u("div", {
|
|
1072
1226
|
className: "space-y-2",
|
|
1073
1227
|
children: [
|
|
1074
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ u(d, {
|
|
1075
1229
|
variant: "outline",
|
|
1076
1230
|
onClick: () => C(w("weather")),
|
|
1077
1231
|
className: "w-full justify-start",
|
|
1078
1232
|
children: [
|
|
1079
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ l(Ie, { className: "h-4 w-4 text-text-secondary" }),
|
|
1080
1234
|
" ",
|
|
1081
|
-
|
|
1235
|
+
c("healthybowl.crops.fieldDetail.quickActions.weatherData", "Weather Data")
|
|
1082
1236
|
]
|
|
1083
1237
|
}),
|
|
1084
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ u(d, {
|
|
1085
1239
|
variant: "outline",
|
|
1086
1240
|
onClick: () => C(w("soil-health")),
|
|
1087
1241
|
className: "w-full justify-start",
|
|
1088
1242
|
children: [
|
|
1089
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ l(Te, { className: "h-4 w-4 text-text-secondary" }),
|
|
1090
1244
|
" ",
|
|
1091
|
-
|
|
1245
|
+
c("healthybowl.crops.fieldDetail.quickActions.soilAnalysis", "Soil Analysis")
|
|
1092
1246
|
]
|
|
1093
1247
|
}),
|
|
1094
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ u(d, {
|
|
1095
1249
|
variant: "outline",
|
|
1096
1250
|
onClick: () => C(w("crops")),
|
|
1097
1251
|
className: "w-full justify-start",
|
|
1098
1252
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ l(Be, { className: "h-4 w-4 text-text-secondary" }),
|
|
1100
1254
|
" ",
|
|
1101
|
-
|
|
1255
|
+
c("healthybowl.crops.fieldDetail.quickActions.cropHistory", "Crop History")
|
|
1102
1256
|
]
|
|
1103
1257
|
}),
|
|
1104
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ u(d, {
|
|
1105
1259
|
variant: "outline",
|
|
1106
1260
|
onClick: () => C(w("analytics")),
|
|
1107
1261
|
className: "w-full justify-start",
|
|
1108
1262
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ l(Ce, { className: "h-4 w-4 text-text-secondary" }),
|
|
1110
1264
|
" ",
|
|
1111
|
-
|
|
1265
|
+
c("healthybowl.crops.fieldDetail.quickActions.generateReport", "Generate Report")
|
|
1112
1266
|
]
|
|
1113
1267
|
})
|
|
1114
1268
|
]
|
|
1115
1269
|
})]
|
|
1116
1270
|
}),
|
|
1117
|
-
/* @__PURE__ */
|
|
1271
|
+
/* @__PURE__ */ u("div", {
|
|
1118
1272
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
1119
|
-
children: [/* @__PURE__ */
|
|
1273
|
+
children: [/* @__PURE__ */ l("h3", {
|
|
1120
1274
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
1121
|
-
children:
|
|
1122
|
-
}), /* @__PURE__ */
|
|
1275
|
+
children: c("healthybowl.crops.fieldDetail.recentActivity.heading", "Recent Activity")
|
|
1276
|
+
}), /* @__PURE__ */ l("div", {
|
|
1123
1277
|
className: "space-y-4",
|
|
1124
|
-
children:
|
|
1278
|
+
children: en.map((t, n) => /* @__PURE__ */ u("div", {
|
|
1125
1279
|
className: "flex gap-3",
|
|
1126
|
-
children: [/* @__PURE__ */
|
|
1280
|
+
children: [/* @__PURE__ */ u("div", {
|
|
1127
1281
|
className: "relative flex flex-col items-center",
|
|
1128
|
-
children: [/* @__PURE__ */
|
|
1129
|
-
}), /* @__PURE__ */
|
|
1282
|
+
children: [/* @__PURE__ */ l("div", { className: "h-2 w-2 rounded-full bg-action-primary-bg" }), n < en.length - 1 && /* @__PURE__ */ l("div", { className: "w-0.5 flex-1 bg-border" })]
|
|
1283
|
+
}), /* @__PURE__ */ u("div", {
|
|
1130
1284
|
className: "pb-4",
|
|
1131
|
-
children: [/* @__PURE__ */
|
|
1285
|
+
children: [/* @__PURE__ */ l("p", {
|
|
1132
1286
|
className: "text-sm text-text-primary",
|
|
1133
1287
|
children: t.action
|
|
1134
|
-
}), /* @__PURE__ */
|
|
1288
|
+
}), /* @__PURE__ */ l("p", {
|
|
1135
1289
|
className: "text-xs text-text-secondary",
|
|
1136
1290
|
children: e(t.date)
|
|
1137
1291
|
})]
|
|
@@ -1142,163 +1296,179 @@ var He = (e) => {
|
|
|
1142
1296
|
]
|
|
1143
1297
|
})]
|
|
1144
1298
|
}),
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
open:
|
|
1299
|
+
/* @__PURE__ */ l(ae, {
|
|
1300
|
+
open: ot,
|
|
1147
1301
|
onClose: () => E(!1),
|
|
1148
|
-
title:
|
|
1149
|
-
description:
|
|
1302
|
+
title: c("healthybowl.crops.fieldDetail.editModal.title", "Edit Field"),
|
|
1303
|
+
description: c("healthybowl.crops.fieldDetail.editModal.description", "Update details for {{name}}", { name: O.name }),
|
|
1150
1304
|
size: "lg",
|
|
1151
|
-
footer: /* @__PURE__ */
|
|
1305
|
+
footer: /* @__PURE__ */ u(We, { children: [/* @__PURE__ */ l(d, {
|
|
1152
1306
|
variant: "outline",
|
|
1153
1307
|
onClick: () => E(!1),
|
|
1154
|
-
children:
|
|
1155
|
-
}), /* @__PURE__ */
|
|
1156
|
-
onClick:
|
|
1157
|
-
disabled:
|
|
1158
|
-
children:
|
|
1308
|
+
children: c("healthybowl.common.cancel", "Cancel")
|
|
1309
|
+
}), /* @__PURE__ */ l(d, {
|
|
1310
|
+
onClick: Ot,
|
|
1311
|
+
disabled: st,
|
|
1312
|
+
children: st ? c("healthybowl.crops.fieldDetail.editModal.saving", "Saving...") : c("healthybowl.crops.fieldDetail.editModal.saveChanges", "Save Changes")
|
|
1159
1313
|
})] }),
|
|
1160
|
-
children: /* @__PURE__ */
|
|
1314
|
+
children: /* @__PURE__ */ u("div", {
|
|
1161
1315
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1162
1316
|
children: [
|
|
1163
|
-
/* @__PURE__ */
|
|
1317
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1164
1318
|
className: "text-sm font-medium text-text-primary",
|
|
1165
|
-
children:
|
|
1166
|
-
}), /* @__PURE__ */
|
|
1319
|
+
children: c("healthybowl.crops.fieldDetail.form.fieldName.label", "Field Name *")
|
|
1320
|
+
}), /* @__PURE__ */ l("input", {
|
|
1167
1321
|
type: "text",
|
|
1168
|
-
value:
|
|
1169
|
-
onChange: (e) =>
|
|
1322
|
+
value: k,
|
|
1323
|
+
onChange: (e) => ct(e.target.value),
|
|
1170
1324
|
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)]"
|
|
1171
1325
|
})] }),
|
|
1172
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1173
1327
|
className: "text-sm font-medium text-text-primary",
|
|
1174
|
-
children:
|
|
1175
|
-
}), /* @__PURE__ */
|
|
1328
|
+
children: c("healthybowl.crops.fieldDetail.form.area.label", "Area *")
|
|
1329
|
+
}), /* @__PURE__ */ l("input", {
|
|
1176
1330
|
type: "number",
|
|
1177
1331
|
min: 0,
|
|
1178
|
-
value:
|
|
1179
|
-
onChange: (e) =>
|
|
1332
|
+
value: lt,
|
|
1333
|
+
onChange: (e) => ut(e.target.value),
|
|
1180
1334
|
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)]"
|
|
1181
1335
|
})] }),
|
|
1182
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1183
1337
|
className: "text-sm font-medium text-text-primary",
|
|
1184
|
-
children:
|
|
1185
|
-
}), /* @__PURE__ */
|
|
1186
|
-
value:
|
|
1187
|
-
onValueChange: (e) =>
|
|
1188
|
-
children: [/* @__PURE__ */
|
|
1338
|
+
children: c("healthybowl.crops.fieldDetail.form.unit.label", "Unit")
|
|
1339
|
+
}), /* @__PURE__ */ u(f, {
|
|
1340
|
+
value: dt,
|
|
1341
|
+
onValueChange: (e) => ft(e),
|
|
1342
|
+
children: [/* @__PURE__ */ l(h, {
|
|
1189
1343
|
className: "mt-1 w-full",
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1191
|
-
}), /* @__PURE__ */
|
|
1344
|
+
children: /* @__PURE__ */ l(g, {})
|
|
1345
|
+
}), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(m, {
|
|
1192
1346
|
value: "acres",
|
|
1193
|
-
children:
|
|
1194
|
-
}), /* @__PURE__ */
|
|
1347
|
+
children: c("healthybowl.crops.fieldDetail.form.unit.options.acres", "Acres")
|
|
1348
|
+
}), /* @__PURE__ */ l(m, {
|
|
1195
1349
|
value: "hectares",
|
|
1196
|
-
children:
|
|
1350
|
+
children: c("healthybowl.crops.fieldDetail.form.unit.options.hectares", "Hectares")
|
|
1197
1351
|
})] })]
|
|
1198
1352
|
})] }),
|
|
1199
|
-
/* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1200
1354
|
className: "text-sm font-medium text-text-primary",
|
|
1201
|
-
children:
|
|
1202
|
-
}), /* @__PURE__ */
|
|
1203
|
-
value:
|
|
1204
|
-
onValueChange:
|
|
1205
|
-
children: [/* @__PURE__ */
|
|
1355
|
+
children: c("healthybowl.crops.fieldDetail.form.status.label", "Status")
|
|
1356
|
+
}), /* @__PURE__ */ u(f, {
|
|
1357
|
+
value: _t,
|
|
1358
|
+
onValueChange: vt,
|
|
1359
|
+
children: [/* @__PURE__ */ l(h, {
|
|
1206
1360
|
className: "mt-1 w-full",
|
|
1207
|
-
children: /* @__PURE__ */
|
|
1208
|
-
}), /* @__PURE__ */
|
|
1209
|
-
/* @__PURE__ */
|
|
1361
|
+
children: /* @__PURE__ */ l(g, {})
|
|
1362
|
+
}), /* @__PURE__ */ u(p, { children: [
|
|
1363
|
+
/* @__PURE__ */ l(m, {
|
|
1210
1364
|
value: "active",
|
|
1211
|
-
children:
|
|
1365
|
+
children: c("healthybowl.crops.fieldDetail.form.status.options.active", "Active")
|
|
1212
1366
|
}),
|
|
1213
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ l(m, {
|
|
1214
1368
|
value: "preparation",
|
|
1215
|
-
children:
|
|
1369
|
+
children: c("healthybowl.crops.fieldDetail.form.status.options.preparation", "Preparation")
|
|
1216
1370
|
}),
|
|
1217
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ l(m, {
|
|
1218
1372
|
value: "fallow",
|
|
1219
|
-
children:
|
|
1373
|
+
children: c("healthybowl.crops.fieldDetail.form.status.options.fallow", "Fallow")
|
|
1220
1374
|
})
|
|
1221
1375
|
] })]
|
|
1222
1376
|
})] }),
|
|
1223
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1224
1378
|
className: "text-sm font-medium text-text-primary",
|
|
1225
|
-
children:
|
|
1226
|
-
}), /* @__PURE__ */
|
|
1379
|
+
children: c("healthybowl.crops.fieldDetail.form.soilType.label", "Soil Type")
|
|
1380
|
+
}), /* @__PURE__ */ l("input", {
|
|
1227
1381
|
type: "text",
|
|
1228
|
-
value:
|
|
1229
|
-
onChange: (e) =>
|
|
1382
|
+
value: pt,
|
|
1383
|
+
onChange: (e) => mt(e.target.value),
|
|
1230
1384
|
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)]"
|
|
1231
1385
|
})] }),
|
|
1232
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1233
1387
|
className: "text-sm font-medium text-text-primary",
|
|
1234
|
-
children:
|
|
1235
|
-
}), /* @__PURE__ */
|
|
1388
|
+
children: c("healthybowl.crops.fieldDetail.form.irrigationType.label", "Irrigation Type")
|
|
1389
|
+
}), /* @__PURE__ */ l("input", {
|
|
1236
1390
|
type: "text",
|
|
1237
|
-
value:
|
|
1238
|
-
onChange: (e) =>
|
|
1391
|
+
value: ht,
|
|
1392
|
+
onChange: (e) => gt(e.target.value),
|
|
1239
1393
|
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)]"
|
|
1240
1394
|
})] }),
|
|
1241
|
-
/* @__PURE__ */
|
|
1395
|
+
/* @__PURE__ */ l("div", {
|
|
1242
1396
|
className: "sm:col-span-2",
|
|
1243
|
-
children: /* @__PURE__ */
|
|
1397
|
+
children: /* @__PURE__ */ u("label", {
|
|
1244
1398
|
className: "flex cursor-pointer items-center gap-2 text-sm font-medium text-text-primary",
|
|
1245
|
-
children: [/* @__PURE__ */
|
|
1399
|
+
children: [/* @__PURE__ */ l("input", {
|
|
1246
1400
|
type: "checkbox",
|
|
1247
|
-
checked:
|
|
1248
|
-
onChange: (e) =>
|
|
1401
|
+
checked: yt,
|
|
1402
|
+
onChange: (e) => bt(e.target.checked),
|
|
1249
1403
|
className: "h-4 w-4 rounded border-border-subtle text-primary focus:ring-[var(--color-focus-ring)]"
|
|
1250
|
-
}),
|
|
1404
|
+
}), c("healthybowl.crops.fieldDetail.form.organicCertified.label", "Organic Certified")]
|
|
1251
1405
|
})
|
|
1252
1406
|
})
|
|
1253
1407
|
]
|
|
1254
1408
|
})
|
|
1255
1409
|
}),
|
|
1256
|
-
/* @__PURE__ */
|
|
1257
|
-
toasts:
|
|
1258
|
-
onDismiss:
|
|
1410
|
+
/* @__PURE__ */ l(te, {
|
|
1411
|
+
toasts: it,
|
|
1412
|
+
onDismiss: at
|
|
1259
1413
|
})
|
|
1260
1414
|
]
|
|
1261
|
-
}) : /* @__PURE__ */
|
|
1262
|
-
title:
|
|
1263
|
-
children:
|
|
1264
|
-
title:
|
|
1265
|
-
description:
|
|
1266
|
-
action: /* @__PURE__ */
|
|
1415
|
+
}) : /* @__PURE__ */ l(r, {
|
|
1416
|
+
title: c("healthybowl.crops.fieldDetail.notFound.pageTitle", "Field Not Found"),
|
|
1417
|
+
children: $e.crops ? /* @__PURE__ */ l(ie, {}) : Qe.crops ? /* @__PURE__ */ l(a, { onRetry: nt }) : /* @__PURE__ */ l(ee, {
|
|
1418
|
+
title: c("healthybowl.crops.fieldDetail.notFound.title", "Field not found"),
|
|
1419
|
+
description: c("healthybowl.crops.fieldDetail.notFound.description", "The field you are looking for does not exist."),
|
|
1420
|
+
action: /* @__PURE__ */ l(d, {
|
|
1267
1421
|
onClick: () => C(w("crops/fields")),
|
|
1268
|
-
children:
|
|
1422
|
+
children: c("healthybowl.crops.fieldDetail.actions.backToFields", "Back to Fields")
|
|
1269
1423
|
})
|
|
1270
1424
|
})
|
|
1271
1425
|
});
|
|
1272
|
-
}, y = ({ label: e, unit: t, value: n, min: r, step: i, onChange: ee }) => /* @__PURE__ */
|
|
1426
|
+
}, y = ({ label: e, unit: t, value: n, min: r, step: i, onChange: ee }) => /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
1273
1427
|
className: "text-xs font-medium text-text-secondary",
|
|
1274
1428
|
children: e
|
|
1275
|
-
}), /* @__PURE__ */
|
|
1429
|
+
}), /* @__PURE__ */ u("div", {
|
|
1276
1430
|
className: "relative mt-1",
|
|
1277
|
-
children: [/* @__PURE__ */
|
|
1431
|
+
children: [/* @__PURE__ */ l("input", {
|
|
1278
1432
|
type: "number",
|
|
1279
1433
|
value: n,
|
|
1280
1434
|
min: r,
|
|
1281
1435
|
step: i,
|
|
1282
1436
|
onChange: (e) => ee(e.target.value),
|
|
1283
1437
|
className: "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 pr-10 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1284
|
-
}), /* @__PURE__ */
|
|
1438
|
+
}), /* @__PURE__ */ l("span", {
|
|
1285
1439
|
className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-xs text-text-secondary",
|
|
1286
1440
|
children: t
|
|
1287
1441
|
})]
|
|
1288
|
-
})] }), b = ({ label: e, value: t, unit: n }) => /* @__PURE__ */
|
|
1442
|
+
})] }), b = ({ label: e, value: t, unit: n }) => /* @__PURE__ */ u("div", {
|
|
1289
1443
|
className: "min-w-0 rounded-md border border-border-subtle bg-bg-sunken/60 p-3",
|
|
1290
|
-
children: [/* @__PURE__ */
|
|
1444
|
+
children: [/* @__PURE__ */ l("span", {
|
|
1291
1445
|
className: "block truncate text-xs text-text-secondary",
|
|
1292
1446
|
children: e
|
|
1293
|
-
}), /* @__PURE__ */
|
|
1447
|
+
}), /* @__PURE__ */ u("p", {
|
|
1294
1448
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
1295
|
-
children: [t, n && /* @__PURE__ */
|
|
1449
|
+
children: [t, n && /* @__PURE__ */ l("span", {
|
|
1296
1450
|
className: "ml-1 text-xs font-medium text-text-secondary",
|
|
1297
1451
|
children: n
|
|
1298
1452
|
})]
|
|
1299
1453
|
})]
|
|
1300
|
-
})
|
|
1454
|
+
}), x = ({ label: e, sortKey: t, activeKey: n, direction: r, onSort: i, align: ee = "left" }) => {
|
|
1455
|
+
let a = n === t;
|
|
1456
|
+
return /* @__PURE__ */ l("th", {
|
|
1457
|
+
scope: "col",
|
|
1458
|
+
"aria-sort": a ? r === "asc" ? "ascending" : "descending" : "none",
|
|
1459
|
+
className: `whitespace-nowrap px-3 py-2 text-xs font-medium ${ee === "right" ? "text-right" : "text-left"}`,
|
|
1460
|
+
children: /* @__PURE__ */ u("button", {
|
|
1461
|
+
type: "button",
|
|
1462
|
+
onClick: () => i(t),
|
|
1463
|
+
className: `inline-flex items-center gap-1 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] ${a ? "text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
|
|
1464
|
+
children: [e, a && l(r === "asc" ? De : c, {
|
|
1465
|
+
className: "h-3 w-3",
|
|
1466
|
+
"aria-hidden": "true"
|
|
1467
|
+
})]
|
|
1468
|
+
})
|
|
1469
|
+
});
|
|
1470
|
+
};
|
|
1301
1471
|
//#endregion
|
|
1302
|
-
export {
|
|
1472
|
+
export { Ye as FieldDetailsPage };
|
|
1303
1473
|
|
|
1304
1474
|
//# sourceMappingURL=FieldDetailsPage.js.map
|