@burdenoff/microfe-healthybowl 2026.1005.2 → 2026.1007.2
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/components/BedLayoutGrid.js +128 -115
- package/dist/healthybowl/components/BedLayoutGrid.js.map +1 -1
- package/dist/healthybowl/components/CropPicker.js +37 -0
- package/dist/healthybowl/components/CropPicker.js.map +1 -0
- package/dist/healthybowl/components/DataTable.js +125 -108
- package/dist/healthybowl/components/DataTable.js.map +1 -1
- package/dist/healthybowl/components/FilterBar.js +9 -6
- package/dist/healthybowl/components/FilterBar.js.map +1 -1
- package/dist/healthybowl/components/PlantCatalogPicker.js +32 -0
- package/dist/healthybowl/components/PlantCatalogPicker.js.map +1 -0
- package/dist/healthybowl/components/WorkspaceRecordPicker.js +164 -0
- package/dist/healthybowl/components/WorkspaceRecordPicker.js.map +1 -0
- package/dist/healthybowl/components/index.js +3 -1
- package/dist/healthybowl/hooks/useCropPage.js +71 -0
- package/dist/healthybowl/hooks/useCropPage.js.map +1 -0
- package/dist/healthybowl/hooks/usePlantCatalog.js +133 -44
- package/dist/healthybowl/hooks/usePlantCatalog.js.map +1 -1
- package/dist/healthybowl/hooks/usePlantingEstimate.js +6 -6
- package/dist/healthybowl/hooks/usePlantingEstimate.js.map +1 -1
- package/dist/healthybowl/hooks/useWorkspaceRead.js +46 -0
- package/dist/healthybowl/hooks/useWorkspaceRead.js.map +1 -0
- package/dist/healthybowl/pages/HomePage.js +143 -142
- package/dist/healthybowl/pages/HomePage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/ReportsPage.js +8 -8
- package/dist/healthybowl/pages/catalog/PlantCatalogPage.js +266 -192
- package/dist/healthybowl/pages/catalog/PlantCatalogPage.js.map +1 -1
- package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js +58 -0
- package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js.map +1 -0
- package/dist/healthybowl/pages/catalog/browsePagination.js +24 -0
- package/dist/healthybowl/pages/catalog/browsePagination.js.map +1 -0
- package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +6 -6
- package/dist/healthybowl/pages/crops/CropDetailsPage.js +340 -348
- package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +468 -434
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropsPage.js +633 -542
- package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +875 -800
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +459 -448
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/SuccessionCropLabel.js +21 -0
- package/dist/healthybowl/pages/crops/SuccessionCropLabel.js.map +1 -0
- package/dist/healthybowl/pages/crops/planningEdit.js +30 -0
- package/dist/healthybowl/pages/crops/planningEdit.js.map +1 -0
- package/dist/healthybowl/pages/fields/FieldMapPage.js +989 -941
- package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/GeneralLedgerPage.js +6 -6
- package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +7 -7
- package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/TransactionsPage.js +541 -541
- package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +10 -10
- package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +207 -207
- package/dist/healthybowl/pages/government-schemes/CommunicationPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +38 -38
- package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +15 -15
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalRegistryPage.js +4 -4
- package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +4 -4
- package/dist/healthybowl/pages/livestock/FeedManagementPage.js +4 -4
- package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +16 -16
- package/dist/healthybowl/pages/livestock/HealthRecordsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +4 -4
- package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +4 -4
- package/dist/healthybowl/pages/market/MarketPricesPage.js +305 -305
- package/dist/healthybowl/pages/market/MarketPricesPage.js.map +1 -1
- package/dist/healthybowl/pages/network/CohortsPage.js +107 -107
- package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/CommunityPage.js +247 -247
- package/dist/healthybowl/pages/network/CommunityPage.js.map +1 -1
- package/dist/healthybowl/pages/network/EventsPage.js +16 -16
- package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +470 -470
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/MentorsPage.js +6 -6
- package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +8 -8
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +7 -7
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
- package/dist/healthybowl/pages/production/ProductionBatchesPage.js +7 -7
- package/dist/healthybowl/pages/production/RecipeManagementPage.js +5 -5
- package/dist/healthybowl/pages/production/ValueAddedProductsPage.js +7 -7
- package/dist/healthybowl/pages/soil/SoilTestsPage.js +6 -6
- package/dist/healthybowl/pages/soil/SoilTestsPage.js.map +1 -1
- package/dist/healthybowl/pages/suppliers/SuppliersPage.js +10 -10
- package/dist/healthybowl/pages/sustainability/CarbonCreditLedgerPage.js +6 -6
- package/dist/healthybowl/pages/terrace/PlantingFormModal.js +151 -131
- package/dist/healthybowl/pages/terrace/PlantingFormModal.js.map +1 -1
- package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +6 -6
- package/dist/healthybowl/utils/cropComparison.js +1 -1
- package/dist/healthybowl/utils/cropComparison.js.map +1 -1
- package/dist/healthybowl/utils/cropPicker.js +35 -0
- package/dist/healthybowl/utils/cropPicker.js.map +1 -0
- package/dist/healthybowl/utils/plantingCapacity.js +2 -2
- package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
- package/dist/healthybowl/utils/quotaLabels.js +8 -0
- package/dist/healthybowl/utils/quotaLabels.js.map +1 -0
- package/dist/healthybowl/utils/seedRate.js +1 -8
- package/dist/healthybowl/utils/seedRate.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useHealthyBowl as e } from "../../context/HealthyBowlContext.js";
|
|
2
|
+
import { formatDate as t, formatNumber as n } from "../../utils/helpers.js";
|
|
3
|
+
import { PageLayout as r } from "../../components/PageLayout.js";
|
|
3
4
|
import { useBasePath as ee } from "../../hooks/useBasePath.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { useCropDetail as te } from "../../hooks/useCropPage.js";
|
|
6
|
+
import { CropPicker as ne } from "../../components/CropPicker.js";
|
|
7
|
+
import { StatusBadge as i } from "../../components/StatusBadge.js";
|
|
8
|
+
import { EmptyState as re } from "../../components/EmptyState.js";
|
|
9
|
+
import { ErrorState as ie } from "../../components/ErrorState.js";
|
|
10
|
+
import { ToastContainer as ae } from "../../components/Toast.js";
|
|
11
|
+
import { useConfirm as oe } from "../../components/ConfirmDialog.js";
|
|
12
|
+
import { Breadcrumbs as se } from "../../components/Breadcrumbs.js";
|
|
13
|
+
import { PageLoader as ce } from "../../components/PageLoader.js";
|
|
14
|
+
import { Modal as le } from "../../components/Modal.js";
|
|
15
|
+
import { useToast as ue } from "../../hooks/useToast.js";
|
|
13
16
|
import "../../components/index.js";
|
|
14
|
-
import { useHealthyBowlData as
|
|
15
|
-
import { isNative as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
17
|
+
import { useHealthyBowlData as de } from "../../hooks/useHealthyBowlData.js";
|
|
18
|
+
import { isNative as fe, nativeNotify as pe, nativeToast as me } from "../../../utils/nativeBridge.js";
|
|
19
|
+
import { buildPlanningEditInput as he, initialPlanAssociations as ge } from "./planningEdit.js";
|
|
20
|
+
import { PlanExecutionPanel as _e } from "../../components/PlanExecutionPanel.js";
|
|
21
|
+
import { useState as a } from "react";
|
|
22
|
+
import { useI18n as ve } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
|
+
import { AlertTriangle as ye, ArrowLeft as be, Beaker as o, Calendar as xe, ClipboardList as Se, Clock as s, CloudRain as c, Edit as Ce, Leaf as we, MapPin as l, Sprout as u, Target as Te, Trash2 as Ee, TrendingUp as d } from "lucide-react";
|
|
24
|
+
import { useNavigate as De, useParams as f } from "react-router";
|
|
25
|
+
import { Fragment as Oe, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
26
|
+
import { Button as h, GlassCard as ke, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b } from "@burdenoff/fe-libs/ui";
|
|
23
27
|
//#region src/healthybowl/pages/crops/PlanningDetailsPage.tsx
|
|
24
|
-
var
|
|
28
|
+
var x = (e) => {
|
|
25
29
|
switch (e) {
|
|
26
30
|
case "active": return "success";
|
|
27
31
|
case "approved": return "info";
|
|
@@ -29,107 +33,114 @@ var _ = (e) => {
|
|
|
29
33
|
case "completed": return "default";
|
|
30
34
|
default: return "muted";
|
|
31
35
|
}
|
|
32
|
-
},
|
|
36
|
+
}, S = (e) => {
|
|
33
37
|
switch (e) {
|
|
34
38
|
case "high": return "error";
|
|
35
39
|
case "medium": return "warning";
|
|
36
40
|
default: return "success";
|
|
37
41
|
}
|
|
38
|
-
},
|
|
42
|
+
}, C = (e) => {
|
|
39
43
|
switch (e) {
|
|
40
44
|
case "high": return "error";
|
|
41
45
|
case "medium": return "warning";
|
|
42
46
|
default: return "success";
|
|
43
47
|
}
|
|
44
|
-
},
|
|
45
|
-
let {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
}, w = (e) => (e ?? "").trim().toLowerCase(), T = () => {
|
|
49
|
+
let { workspaceId: t } = e(), { planId: n } = f();
|
|
50
|
+
return t ? /* @__PURE__ */ p(E, {}, `${t}:${n ?? ""}`) : /* @__PURE__ */ p(r, {
|
|
51
|
+
title: "Planting plan details",
|
|
52
|
+
children: /* @__PURE__ */ p("p", {
|
|
53
|
+
className: "text-sm text-text-secondary",
|
|
54
|
+
children: "Choose a workspace to view its planting plans."
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}, E = () => {
|
|
58
|
+
let { t: e } = ve(), T = oe(), E = (t) => {
|
|
59
|
+
switch (t) {
|
|
60
|
+
case "kharif": return e("healthybowl.crops.planningDetail.season.kharif", "Kharif");
|
|
61
|
+
case "rabi": return e("healthybowl.crops.planningDetail.season.rabi", "Rabi");
|
|
62
|
+
case "zaid": return e("healthybowl.crops.planningDetail.season.zaid", "Zaid");
|
|
63
|
+
case "perennial": return e("healthybowl.crops.planningDetail.season.perennial", "Perennial");
|
|
64
|
+
default: return t;
|
|
52
65
|
}
|
|
53
|
-
}, { plantingPlans:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
let e = T.find((e) => e.id === P.cropId) ?? T.find((e) => b(e.name) === b(P.cropName)), t = w.find((e) => e.id === P.fieldId) ?? w.find((e) => b(e.name) === b(P.fieldName));
|
|
61
|
-
I(e?.id ?? ""), R(t?.id ?? ""), B(P.startDate), H(P.endDate), W(String(P.expectedYield)), K(String(P.seedRequired)), J(P.priority), X(P.status), j(!0);
|
|
66
|
+
}, { plantingPlans: Ae, fields: D, crops: O, errors: je, loadings: Me, updatePlantingPlan: Ne, deletePlantingPlan: Pe, refetch: k } = de(), { planId: Fe } = f(), A = De(), { buildPath: j } = ee(), { toasts: Ie, toast: M, dismiss: Le } = ue(), [N, P] = a(!1), [F, I] = a(!1), L = Ae.find((e) => e.id === Fe), [R, z] = a(""), [B, V] = a(""), [Re, ze] = a({
|
|
67
|
+
cropId: "",
|
|
68
|
+
fieldId: ""
|
|
69
|
+
}), { crop: Be } = te(R, { skip: !N }), [H, U] = a(""), [W, G] = a(""), [K, q] = a(""), [J, Y] = a(""), [X, Ve] = a("low"), [He, Ue] = a("draft"), Z = () => {
|
|
70
|
+
if (!L) return;
|
|
71
|
+
let e = ge(L, O, D);
|
|
72
|
+
ze(e), z(e.cropId), V(e.fieldId), U(L.startDate), G(L.endDate), q(String(L.expectedYield)), Y(String(L.seedRequired)), Ve(L.priority), Ue(L.status), P(!0);
|
|
62
73
|
};
|
|
63
|
-
if (!
|
|
64
|
-
title:
|
|
65
|
-
children: Me.crops ? /* @__PURE__ */
|
|
66
|
-
title:
|
|
67
|
-
description:
|
|
68
|
-
action: /* @__PURE__ */
|
|
69
|
-
onClick: () =>
|
|
70
|
-
children:
|
|
74
|
+
if (!L) return /* @__PURE__ */ p(r, {
|
|
75
|
+
title: e("healthybowl.crops.planningDetail.notFound.title", "Plan Not Found"),
|
|
76
|
+
children: Me.crops ? /* @__PURE__ */ p(ce, {}) : je.crops ? /* @__PURE__ */ p(ie, { onRetry: k }) : /* @__PURE__ */ p(re, {
|
|
77
|
+
title: e("healthybowl.crops.planningDetail.notFound.emptyTitle", "Plan not found"),
|
|
78
|
+
description: e("healthybowl.crops.planningDetail.notFound.description", "The planting plan you are looking for does not exist."),
|
|
79
|
+
action: /* @__PURE__ */ p(h, {
|
|
80
|
+
onClick: () => A(j("crops/planning")),
|
|
81
|
+
children: e("healthybowl.crops.planningDetail.actions.backToPlans", "Back to Plans")
|
|
71
82
|
})
|
|
72
83
|
})
|
|
73
84
|
});
|
|
74
|
-
let
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
title: `${
|
|
77
|
-
description:
|
|
78
|
-
actions: /* @__PURE__ */
|
|
85
|
+
let Q = D.find((e) => L.fieldId ? e.id === L.fieldId : w(e.name) === w(L.fieldName)), We = /* @__PURE__ */ new Date(), Ge = new Date(L.startDate), $ = new Date(L.endDate).getTime() - Ge.getTime(), Ke = We.getTime() - Ge.getTime(), qe = $ > 0 ? Math.max(0, Math.min(100, Math.round(Ke / $ * 100))) : 0, Je = Math.ceil($ / (1e3 * 60 * 60 * 24)), Ye = Math.max(0, Math.ceil(Ke / (1e3 * 60 * 60 * 24))), Xe = Math.max(0, Je - Ye);
|
|
86
|
+
return /* @__PURE__ */ m(r, {
|
|
87
|
+
title: `${L.cropName} - ${L.fieldName}`,
|
|
88
|
+
description: e("healthybowl.crops.planningDetail.subtitle", "Planting plan for {{season}} season", { season: E(L.season) }),
|
|
89
|
+
actions: /* @__PURE__ */ m("div", {
|
|
79
90
|
className: "flex items-center gap-2",
|
|
80
91
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ m(h, {
|
|
82
93
|
variant: "outline",
|
|
83
|
-
onClick:
|
|
94
|
+
onClick: Z,
|
|
84
95
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ p(Ce, { className: "h-4 w-4" }),
|
|
86
97
|
" ",
|
|
87
|
-
|
|
98
|
+
e("healthybowl.common.edit", "Edit")
|
|
88
99
|
]
|
|
89
100
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ m(h, {
|
|
91
102
|
variant: "destructive",
|
|
92
103
|
onClick: async () => {
|
|
93
|
-
if (
|
|
94
|
-
title:
|
|
95
|
-
message:
|
|
96
|
-
crop:
|
|
97
|
-
field:
|
|
104
|
+
if (L && await T({
|
|
105
|
+
title: e("healthybowl.crops.planningDetail.deleteConfirm.title", "Delete planting plan?"),
|
|
106
|
+
message: e("healthybowl.crops.planningDetail.deleteConfirm.message", "{{crop}} plan for {{field}} will be permanently removed.", {
|
|
107
|
+
crop: L.cropName,
|
|
108
|
+
field: L.fieldName
|
|
98
109
|
}),
|
|
99
|
-
okButtonTitle:
|
|
100
|
-
cancelButtonTitle:
|
|
110
|
+
okButtonTitle: e("healthybowl.common.delete", "Delete"),
|
|
111
|
+
cancelButtonTitle: e("healthybowl.common.cancel", "Cancel")
|
|
101
112
|
}) !== !1) {
|
|
102
|
-
|
|
113
|
+
I(!0);
|
|
103
114
|
try {
|
|
104
|
-
await Pe(
|
|
105
|
-
title:
|
|
106
|
-
description:
|
|
115
|
+
await Pe(L.id), M({
|
|
116
|
+
title: e("healthybowl.crops.planningDetail.toast.deleted.title", "Plan deleted"),
|
|
117
|
+
description: e("healthybowl.crops.planningDetail.toast.deleted.description", "{{crop}} plan has been removed.", { crop: L.cropName }),
|
|
107
118
|
variant: "success"
|
|
108
|
-
}),
|
|
109
|
-
} catch (
|
|
110
|
-
|
|
111
|
-
title:
|
|
112
|
-
description: String(
|
|
119
|
+
}), fe() && (me(e("healthybowl.crops.planningDetail.toast.deleted.title", "Plan deleted")), pe("success")), A(j("crops/planning"));
|
|
120
|
+
} catch (t) {
|
|
121
|
+
M({
|
|
122
|
+
title: e("healthybowl.crops.planningDetail.toast.deleteFailed.title", "Delete failed"),
|
|
123
|
+
description: String(t),
|
|
113
124
|
variant: "error"
|
|
114
|
-
}),
|
|
125
|
+
}), I(!1);
|
|
115
126
|
}
|
|
116
127
|
}
|
|
117
128
|
},
|
|
118
|
-
disabled:
|
|
129
|
+
disabled: F,
|
|
119
130
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ p(Ee, { className: "h-4 w-4" }),
|
|
121
132
|
" ",
|
|
122
|
-
|
|
133
|
+
e("healthybowl.common.delete", "Delete")
|
|
123
134
|
]
|
|
124
135
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ m(h, {
|
|
126
137
|
variant: "outline",
|
|
127
138
|
size: "sm",
|
|
128
|
-
onClick: () =>
|
|
139
|
+
onClick: () => A(j("crops/planning")),
|
|
129
140
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ p(be, { className: "h-4 w-4" }),
|
|
131
142
|
" ",
|
|
132
|
-
|
|
143
|
+
e("healthybowl.common.back", "Back")
|
|
133
144
|
]
|
|
134
145
|
})
|
|
135
146
|
]
|
|
@@ -138,532 +149,532 @@ var _ = (e) => {
|
|
|
138
149
|
nextSteps: [
|
|
139
150
|
{
|
|
140
151
|
id: "edit",
|
|
141
|
-
label:
|
|
142
|
-
description:
|
|
143
|
-
onClick:
|
|
152
|
+
label: e("healthybowl.crops.planningDetail.nextSteps.edit.label", "Refine this plan"),
|
|
153
|
+
description: e("healthybowl.crops.planningDetail.nextSteps.edit.desc", "Adjust timing, field or priority before you commit to it."),
|
|
154
|
+
onClick: Z
|
|
144
155
|
},
|
|
145
156
|
{
|
|
146
157
|
id: "weather",
|
|
147
|
-
label:
|
|
148
|
-
description:
|
|
149
|
-
href:
|
|
158
|
+
label: e("healthybowl.crops.planningDetail.nextSteps.weather.label", "Check the weather outlook"),
|
|
159
|
+
description: e("healthybowl.crops.planningDetail.nextSteps.weather.desc", "Make sure conditions suit your planned planting window."),
|
|
160
|
+
href: j("weather")
|
|
150
161
|
},
|
|
151
162
|
{
|
|
152
163
|
id: "crops",
|
|
153
|
-
label:
|
|
154
|
-
description:
|
|
155
|
-
href:
|
|
164
|
+
label: e("healthybowl.crops.planningDetail.nextSteps.crops.label", "See your active crops"),
|
|
165
|
+
description: e("healthybowl.crops.planningDetail.nextSteps.crops.desc", "Once planted, track this plan as a living crop."),
|
|
166
|
+
href: j("crops")
|
|
156
167
|
}
|
|
157
168
|
],
|
|
158
169
|
nextStepsKey: "healthybowl-plan-detail",
|
|
159
170
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ p(se, { items: [
|
|
161
172
|
{
|
|
162
|
-
label:
|
|
163
|
-
href:
|
|
173
|
+
label: e("healthybowl.crops.planningDetail.breadcrumbs.crops", "Crops"),
|
|
174
|
+
href: j("crops")
|
|
164
175
|
},
|
|
165
176
|
{
|
|
166
|
-
label:
|
|
167
|
-
href:
|
|
177
|
+
label: e("healthybowl.crops.planningDetail.breadcrumbs.planning", "Planning"),
|
|
178
|
+
href: j("crops/planning")
|
|
168
179
|
},
|
|
169
|
-
{ label:
|
|
180
|
+
{ label: L.cropName }
|
|
170
181
|
] }),
|
|
171
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ m("div", {
|
|
172
183
|
className: "flex flex-wrap items-center gap-3",
|
|
173
184
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
label:
|
|
176
|
-
variant:
|
|
185
|
+
/* @__PURE__ */ p(i, {
|
|
186
|
+
label: L.status,
|
|
187
|
+
variant: x(L.status ?? "unknown"),
|
|
177
188
|
dot: !0
|
|
178
189
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
label:
|
|
181
|
-
variant:
|
|
190
|
+
/* @__PURE__ */ p(i, {
|
|
191
|
+
label: e("healthybowl.crops.planningDetail.badges.priority", "Priority: {{priority}}", { priority: L.priority }),
|
|
192
|
+
variant: S(L.priority)
|
|
182
193
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
label:
|
|
185
|
-
variant:
|
|
194
|
+
/* @__PURE__ */ p(i, {
|
|
195
|
+
label: e("healthybowl.crops.planningDetail.badges.weatherRisk", "Weather Risk: {{risk}}", { risk: L.weatherRisk }),
|
|
196
|
+
variant: C(L.weatherRisk)
|
|
186
197
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
label:
|
|
198
|
+
/* @__PURE__ */ p(i, {
|
|
199
|
+
label: E(L.season),
|
|
189
200
|
variant: "muted"
|
|
190
201
|
})
|
|
191
202
|
]
|
|
192
203
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ m("div", {
|
|
194
205
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ m("div", {
|
|
196
207
|
className: "space-y-6 lg:col-span-2",
|
|
197
208
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ m(ke, {
|
|
199
210
|
treatment: "glass",
|
|
200
211
|
glow: !0,
|
|
201
212
|
className: "border-border-seam p-6",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
203
214
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
204
215
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ p(Se, { className: "h-4 w-4 text-info" }),
|
|
206
217
|
" ",
|
|
207
|
-
|
|
218
|
+
e("healthybowl.crops.planningDetail.overview.title", "Plan Overview")
|
|
208
219
|
]
|
|
209
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ m("div", {
|
|
210
221
|
className: "grid grid-cols-2 gap-4 md:grid-cols-4",
|
|
211
222
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
213
224
|
className: "flex items-center gap-1 text-text-secondary",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ p(u, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", {
|
|
215
226
|
className: "text-xs",
|
|
216
|
-
children:
|
|
227
|
+
children: e("healthybowl.crops.planningDetail.overview.crop", "Crop")
|
|
217
228
|
})]
|
|
218
|
-
}), /* @__PURE__ */
|
|
229
|
+
}), /* @__PURE__ */ p("p", {
|
|
219
230
|
className: "mt-1 text-sm font-semibold text-text-primary",
|
|
220
|
-
children:
|
|
231
|
+
children: L.cropName
|
|
221
232
|
})] }),
|
|
222
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
223
234
|
className: "flex items-center gap-1 text-text-secondary",
|
|
224
|
-
children: [/* @__PURE__ */ l
|
|
235
|
+
children: [/* @__PURE__ */ p(l, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", {
|
|
225
236
|
className: "text-xs",
|
|
226
|
-
children:
|
|
237
|
+
children: e("healthybowl.crops.planningDetail.overview.field", "Field")
|
|
227
238
|
})]
|
|
228
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ p("p", {
|
|
229
240
|
className: "mt-1 text-sm font-semibold text-text-primary",
|
|
230
|
-
children:
|
|
241
|
+
children: L.fieldName
|
|
231
242
|
})] }),
|
|
232
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
233
244
|
className: "flex items-center gap-1 text-text-secondary",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ p(we, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", {
|
|
235
246
|
className: "text-xs",
|
|
236
|
-
children:
|
|
247
|
+
children: e("healthybowl.crops.planningDetail.overview.season", "Season")
|
|
237
248
|
})]
|
|
238
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ p("p", {
|
|
239
250
|
className: "mt-1 text-sm font-semibold capitalize text-text-primary",
|
|
240
|
-
children:
|
|
251
|
+
children: E(L.season)
|
|
241
252
|
})] }),
|
|
242
|
-
|
|
253
|
+
Q && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
243
254
|
className: "flex items-center gap-1 text-text-secondary",
|
|
244
|
-
children: [/* @__PURE__ */ l
|
|
255
|
+
children: [/* @__PURE__ */ p(l, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", {
|
|
245
256
|
className: "text-xs",
|
|
246
|
-
children:
|
|
257
|
+
children: e("healthybowl.crops.planningDetail.overview.fieldArea", "Field Area")
|
|
247
258
|
})]
|
|
248
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ m("p", {
|
|
249
260
|
className: "mt-1 text-sm font-semibold text-text-primary",
|
|
250
261
|
children: [
|
|
251
|
-
|
|
262
|
+
Q.area,
|
|
252
263
|
" ",
|
|
253
|
-
|
|
264
|
+
Q.unit
|
|
254
265
|
]
|
|
255
266
|
})] })
|
|
256
267
|
]
|
|
257
268
|
})]
|
|
258
269
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ m("div", {
|
|
260
271
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
261
272
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ m("h3", {
|
|
263
274
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
264
275
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ p(xe, { className: "h-4 w-4 text-info" }),
|
|
266
277
|
" ",
|
|
267
|
-
|
|
278
|
+
e("healthybowl.crops.planningDetail.timeline.title", "Timeline")
|
|
268
279
|
]
|
|
269
280
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ m("div", {
|
|
271
282
|
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
272
283
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
274
285
|
className: "text-xs text-text-secondary",
|
|
275
|
-
children:
|
|
276
|
-
}), /* @__PURE__ */
|
|
286
|
+
children: e("healthybowl.crops.planningDetail.timeline.startDate", "Start Date")
|
|
287
|
+
}), /* @__PURE__ */ p("p", {
|
|
277
288
|
className: "text-sm font-semibold text-text-primary",
|
|
278
|
-
children:
|
|
289
|
+
children: t(L.startDate)
|
|
279
290
|
})] }),
|
|
280
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
281
292
|
className: "text-xs text-text-secondary",
|
|
282
|
-
children:
|
|
283
|
-
}), /* @__PURE__ */
|
|
293
|
+
children: e("healthybowl.crops.planningDetail.timeline.endDate", "End Date")
|
|
294
|
+
}), /* @__PURE__ */ p("p", {
|
|
284
295
|
className: "text-sm font-semibold text-text-primary",
|
|
285
|
-
children:
|
|
296
|
+
children: t(L.endDate)
|
|
286
297
|
})] }),
|
|
287
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
288
299
|
className: "text-xs text-text-secondary",
|
|
289
|
-
children:
|
|
290
|
-
}), /* @__PURE__ */
|
|
300
|
+
children: e("healthybowl.crops.planningDetail.timeline.duration", "Duration")
|
|
301
|
+
}), /* @__PURE__ */ p("p", {
|
|
291
302
|
className: "text-sm font-semibold text-text-primary",
|
|
292
|
-
children:
|
|
303
|
+
children: e("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: Je })
|
|
293
304
|
})] })
|
|
294
305
|
]
|
|
295
306
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ m("div", {
|
|
297
308
|
className: "mt-5",
|
|
298
309
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ m("div", {
|
|
300
311
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ p("span", { children: e("healthybowl.crops.planningDetail.timeline.progress", "Timeline Progress") }), /* @__PURE__ */ m("span", { children: [qe, "%"] })]
|
|
302
313
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ p("div", {
|
|
304
315
|
className: "mt-2 h-3 rounded-full bg-bg-sunken",
|
|
305
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ p("div", {
|
|
306
317
|
className: "h-3 rounded-full bg-action-primary-bg transition-all",
|
|
307
|
-
style: { width: `${
|
|
318
|
+
style: { width: `${qe}%` }
|
|
308
319
|
})
|
|
309
320
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ m("div", {
|
|
311
322
|
className: "mt-2 flex items-center justify-between text-xs text-text-secondary",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ p("span", { children: t(L.startDate) }), /* @__PURE__ */ p("span", { children: t(L.endDate) })]
|
|
313
324
|
})
|
|
314
325
|
]
|
|
315
326
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ m("div", {
|
|
317
328
|
className: "mt-4 grid grid-cols-2 gap-4",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ m("div", {
|
|
319
330
|
className: "rounded-lg bg-info/10 p-3",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ m("div", {
|
|
321
332
|
className: "flex items-center gap-1.5",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ p(s, { className: "h-3.5 w-3.5 text-info" }), /* @__PURE__ */ p("span", {
|
|
323
334
|
className: "text-xs font-medium text-info",
|
|
324
|
-
children:
|
|
335
|
+
children: e("healthybowl.crops.planningDetail.timeline.elapsed", "Elapsed")
|
|
325
336
|
})]
|
|
326
|
-
}), /* @__PURE__ */
|
|
337
|
+
}), /* @__PURE__ */ p("p", {
|
|
327
338
|
className: "mt-1 text-lg font-bold text-info",
|
|
328
|
-
children:
|
|
339
|
+
children: e("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: Ye })
|
|
329
340
|
})]
|
|
330
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ m("div", {
|
|
331
342
|
className: "rounded-lg bg-warning/10 p-3",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ m("div", {
|
|
333
344
|
className: "flex items-center gap-1.5",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ p(s, { className: "h-3.5 w-3.5 text-warning" }), /* @__PURE__ */ p("span", {
|
|
335
346
|
className: "text-xs font-medium text-warning",
|
|
336
|
-
children:
|
|
347
|
+
children: e("healthybowl.crops.planningDetail.timeline.remaining", "Remaining")
|
|
337
348
|
})]
|
|
338
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ p("p", {
|
|
339
350
|
className: "mt-1 text-lg font-bold text-warning",
|
|
340
|
-
children:
|
|
351
|
+
children: e("healthybowl.crops.planningDetail.timeline.days", "{{count}} days", { count: Xe })
|
|
341
352
|
})]
|
|
342
353
|
})]
|
|
343
354
|
})
|
|
344
355
|
]
|
|
345
356
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ m("div", {
|
|
347
358
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
349
360
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
350
361
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ p(Te, { className: "h-4 w-4 text-success" }),
|
|
352
363
|
" ",
|
|
353
|
-
|
|
364
|
+
e("healthybowl.crops.planningDetail.production.title", "Production Details")
|
|
354
365
|
]
|
|
355
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ m("div", {
|
|
356
367
|
className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
|
|
357
368
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ m("div", {
|
|
359
370
|
className: "rounded-lg border border-border-subtle p-4",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ m("div", {
|
|
361
372
|
className: "flex items-center gap-2",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ p("div", {
|
|
363
374
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-success-subtle",
|
|
364
|
-
children: /* @__PURE__ */
|
|
365
|
-
}), /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ p(d, { className: "h-5 w-5 text-success" })
|
|
376
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
366
377
|
className: "text-xs text-text-secondary",
|
|
367
|
-
children:
|
|
368
|
-
}), /* @__PURE__ */
|
|
378
|
+
children: e("healthybowl.crops.planningDetail.production.expectedYield", "Expected Yield")
|
|
379
|
+
}), /* @__PURE__ */ m("p", {
|
|
369
380
|
className: "text-xl font-bold text-text-primary",
|
|
370
|
-
children: [
|
|
381
|
+
children: [n(L.expectedYield), " kg"]
|
|
371
382
|
})] })]
|
|
372
|
-
}),
|
|
383
|
+
}), Q && /* @__PURE__ */ p("p", {
|
|
373
384
|
className: "mt-2 text-xs text-text-secondary",
|
|
374
|
-
children:
|
|
375
|
-
amount: Math.round(
|
|
376
|
-
unit: (
|
|
385
|
+
children: e("healthybowl.crops.planningDetail.production.yieldPerUnit", "~{{amount}} kg per {{unit}}", {
|
|
386
|
+
amount: Math.round(L.expectedYield / Q.area),
|
|
387
|
+
unit: (Q.unit ?? "").replace(/s$/, "")
|
|
377
388
|
})
|
|
378
389
|
})]
|
|
379
390
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ m("div", {
|
|
381
392
|
className: "rounded-lg border border-border-subtle p-4",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ m("div", {
|
|
383
394
|
className: "flex items-center gap-2",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ p("div", {
|
|
385
396
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-info/10",
|
|
386
|
-
children: /* @__PURE__ */
|
|
387
|
-
}), /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ p(u, { className: "h-5 w-5 text-info" })
|
|
398
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
388
399
|
className: "text-xs text-text-secondary",
|
|
389
|
-
children:
|
|
390
|
-
}), /* @__PURE__ */
|
|
400
|
+
children: e("healthybowl.crops.planningDetail.production.seedRequired", "Seed Required")
|
|
401
|
+
}), /* @__PURE__ */ m("p", {
|
|
391
402
|
className: "text-xl font-bold text-text-primary",
|
|
392
|
-
children: [
|
|
403
|
+
children: [n(L.seedRequired), " kg"]
|
|
393
404
|
})] })]
|
|
394
|
-
}),
|
|
405
|
+
}), Q && /* @__PURE__ */ p("p", {
|
|
395
406
|
className: "mt-2 text-xs text-text-secondary",
|
|
396
|
-
children:
|
|
397
|
-
amount: (
|
|
398
|
-
unit: (
|
|
407
|
+
children: e("healthybowl.crops.planningDetail.production.seedPerUnit", "~{{amount}} kg per {{unit}}", {
|
|
408
|
+
amount: (L.seedRequired / Q.area).toFixed(1),
|
|
409
|
+
unit: (Q.unit ?? "").replace(/s$/, "")
|
|
399
410
|
})
|
|
400
411
|
})]
|
|
401
412
|
}),
|
|
402
|
-
(
|
|
413
|
+
(L.plantsNeeded != null || L.seedGrams != null || L.seedlingsToRaise != null) && /* @__PURE__ */ m("div", {
|
|
403
414
|
className: "rounded-lg border border-border-subtle p-4 sm:col-span-2",
|
|
404
415
|
"data-testid": "planning-detail-seed-rate",
|
|
405
416
|
children: [
|
|
406
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ p("p", {
|
|
407
418
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
408
|
-
children:
|
|
419
|
+
children: e("healthybowl.crops.planningDetail.production.computedHeading", "Computed at planning")
|
|
409
420
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ m("div", {
|
|
411
422
|
className: "mt-3 grid grid-cols-3 gap-3",
|
|
412
423
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
414
425
|
className: "text-xs text-text-secondary",
|
|
415
|
-
children:
|
|
416
|
-
}), /* @__PURE__ */
|
|
426
|
+
children: e("healthybowl.crops.planningDetail.production.plantsNeeded", "Plants needed")
|
|
427
|
+
}), /* @__PURE__ */ p("p", {
|
|
417
428
|
className: "text-lg font-bold text-text-primary",
|
|
418
|
-
children:
|
|
429
|
+
children: L.plantsNeeded == null ? "—" : n(L.plantsNeeded)
|
|
419
430
|
})] }),
|
|
420
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
421
432
|
className: "text-xs text-text-secondary",
|
|
422
|
-
children:
|
|
423
|
-
}), /* @__PURE__ */
|
|
433
|
+
children: e("healthybowl.crops.planningDetail.production.seedGrams", "Seed (g)")
|
|
434
|
+
}), /* @__PURE__ */ p("p", {
|
|
424
435
|
className: "text-lg font-bold text-text-primary",
|
|
425
|
-
children:
|
|
436
|
+
children: L.seedGrams == null ? "—" : L.seedGrams.toFixed(2)
|
|
426
437
|
})] }),
|
|
427
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
428
439
|
className: "text-xs text-text-secondary",
|
|
429
|
-
children:
|
|
430
|
-
}), /* @__PURE__ */
|
|
440
|
+
children: e("healthybowl.crops.planningDetail.production.seedlingsToRaise", "Seedlings to raise")
|
|
441
|
+
}), /* @__PURE__ */ p("p", {
|
|
431
442
|
className: "text-lg font-bold text-text-primary",
|
|
432
|
-
children:
|
|
443
|
+
children: L.seedlingsToRaise == null ? "—" : n(L.seedlingsToRaise)
|
|
433
444
|
})] })
|
|
434
445
|
]
|
|
435
446
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ p("p", {
|
|
437
448
|
className: "mt-3 text-xs text-text-secondary",
|
|
438
|
-
children:
|
|
449
|
+
children: e("healthybowl.crops.planningDetail.production.identitySnapshotNote", "Recorded at planning. Date or priority edits retain these figures; changing the crop or field may recalculate them.")
|
|
439
450
|
})
|
|
440
451
|
]
|
|
441
452
|
})
|
|
442
453
|
]
|
|
443
454
|
})]
|
|
444
455
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ m("div", {
|
|
446
457
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
447
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
448
459
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
449
460
|
children: [
|
|
450
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ p(o, { className: "h-4 w-4 text-primary" }),
|
|
451
462
|
" ",
|
|
452
|
-
|
|
463
|
+
e("healthybowl.crops.planningDetail.fertilizers.title", "Fertilizers")
|
|
453
464
|
]
|
|
454
|
-
}),
|
|
465
|
+
}), L.fertilizers.length > 0 ? /* @__PURE__ */ p("div", {
|
|
455
466
|
className: "flex flex-wrap gap-2",
|
|
456
|
-
children:
|
|
467
|
+
children: L.fertilizers.map((e) => /* @__PURE__ */ m("span", {
|
|
457
468
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle bg-bg-sunken/50 px-3 py-2 text-sm font-medium text-text-primary",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ p(o, { className: "h-3.5 w-3.5 text-primary" }), e]
|
|
459
470
|
}, e))
|
|
460
|
-
}) : /* @__PURE__ */
|
|
471
|
+
}) : /* @__PURE__ */ p("p", {
|
|
461
472
|
className: "text-sm text-text-secondary",
|
|
462
|
-
children:
|
|
473
|
+
children: e("healthybowl.crops.planningDetail.fertilizers.empty", "No fertilizers specified.")
|
|
463
474
|
})]
|
|
464
475
|
})
|
|
465
476
|
]
|
|
466
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ m("div", {
|
|
467
478
|
className: "space-y-6",
|
|
468
479
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ m("div", {
|
|
470
481
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
471
482
|
children: [
|
|
472
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ p("h3", {
|
|
473
484
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
474
|
-
children:
|
|
485
|
+
children: e("healthybowl.crops.planningDetail.statusCard.title", "Plan Status")
|
|
475
486
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ m("div", {
|
|
477
488
|
className: "space-y-3",
|
|
478
489
|
children: [
|
|
479
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ m("div", {
|
|
480
491
|
className: "flex items-center justify-between",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ p("span", {
|
|
482
493
|
className: "text-xs text-text-secondary",
|
|
483
|
-
children:
|
|
484
|
-
}), /* @__PURE__ */
|
|
485
|
-
label:
|
|
486
|
-
variant:
|
|
494
|
+
children: e("healthybowl.crops.planningDetail.statusCard.status", "Status")
|
|
495
|
+
}), /* @__PURE__ */ p(i, {
|
|
496
|
+
label: L.status,
|
|
497
|
+
variant: x(L.status ?? "unknown")
|
|
487
498
|
})]
|
|
488
499
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ m("div", {
|
|
490
501
|
className: "flex items-center justify-between",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ p("span", {
|
|
492
503
|
className: "text-xs text-text-secondary",
|
|
493
|
-
children:
|
|
494
|
-
}), /* @__PURE__ */
|
|
495
|
-
label:
|
|
496
|
-
variant:
|
|
504
|
+
children: e("healthybowl.crops.planningDetail.statusCard.priority", "Priority")
|
|
505
|
+
}), /* @__PURE__ */ p(i, {
|
|
506
|
+
label: L.priority,
|
|
507
|
+
variant: S(L.priority)
|
|
497
508
|
})]
|
|
498
509
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ m("div", {
|
|
500
511
|
className: "flex items-center justify-between",
|
|
501
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ p("span", {
|
|
502
513
|
className: "text-xs text-text-secondary",
|
|
503
|
-
children:
|
|
504
|
-
}), /* @__PURE__ */
|
|
505
|
-
label:
|
|
506
|
-
variant:
|
|
514
|
+
children: e("healthybowl.crops.planningDetail.statusCard.weatherRisk", "Weather Risk")
|
|
515
|
+
}), /* @__PURE__ */ p(i, {
|
|
516
|
+
label: L.weatherRisk,
|
|
517
|
+
variant: C(L.weatherRisk)
|
|
507
518
|
})]
|
|
508
519
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ m("div", {
|
|
510
521
|
className: "flex items-center justify-between",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
522
|
+
children: [/* @__PURE__ */ p("span", {
|
|
512
523
|
className: "text-xs text-text-secondary",
|
|
513
|
-
children:
|
|
514
|
-
}), /* @__PURE__ */
|
|
524
|
+
children: e("healthybowl.crops.planningDetail.statusCard.season", "Season")
|
|
525
|
+
}), /* @__PURE__ */ p("span", {
|
|
515
526
|
className: "text-xs font-medium capitalize text-text-primary",
|
|
516
|
-
children:
|
|
527
|
+
children: E(L.season)
|
|
517
528
|
})]
|
|
518
529
|
})
|
|
519
530
|
]
|
|
520
531
|
}),
|
|
521
|
-
|
|
532
|
+
L.priority === "high" && /* @__PURE__ */ p("div", {
|
|
522
533
|
className: "mt-4 rounded-lg bg-status-error-bg/10 p-3",
|
|
523
|
-
children: /* @__PURE__ */
|
|
534
|
+
children: /* @__PURE__ */ m("div", {
|
|
524
535
|
className: "flex items-start gap-2",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
536
|
+
children: [/* @__PURE__ */ p(ye, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-error-text" }), /* @__PURE__ */ p("p", {
|
|
526
537
|
className: "text-xs text-status-error-text",
|
|
527
|
-
children:
|
|
538
|
+
children: e("healthybowl.crops.planningDetail.alerts.highPriority", "High priority plan. Ensure resources are allocated promptly.")
|
|
528
539
|
})]
|
|
529
540
|
})
|
|
530
541
|
}),
|
|
531
|
-
|
|
542
|
+
L.weatherRisk === "high" && /* @__PURE__ */ p("div", {
|
|
532
543
|
className: "mt-3 rounded-lg bg-warning/10 p-3",
|
|
533
|
-
children: /* @__PURE__ */
|
|
544
|
+
children: /* @__PURE__ */ m("div", {
|
|
534
545
|
className: "flex items-start gap-2",
|
|
535
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ p(c, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), /* @__PURE__ */ p("p", {
|
|
536
547
|
className: "text-xs text-warning",
|
|
537
|
-
children:
|
|
548
|
+
children: e("healthybowl.crops.planningDetail.alerts.highWeatherRisk", "High weather risk. Monitor forecasts closely and prepare contingency plans.")
|
|
538
549
|
})]
|
|
539
550
|
})
|
|
540
551
|
})
|
|
541
552
|
]
|
|
542
553
|
}),
|
|
543
|
-
|
|
554
|
+
Q && /* @__PURE__ */ m("div", {
|
|
544
555
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
545
556
|
children: [
|
|
546
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ p("h3", {
|
|
547
558
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
548
|
-
children:
|
|
559
|
+
children: e("healthybowl.crops.planningDetail.fieldCard.title", "Field Details")
|
|
549
560
|
}),
|
|
550
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ m("div", {
|
|
551
562
|
className: "space-y-3",
|
|
552
563
|
children: [
|
|
553
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ m("div", {
|
|
554
565
|
className: "flex items-center justify-between",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
566
|
+
children: [/* @__PURE__ */ p("span", {
|
|
556
567
|
className: "text-xs text-text-secondary",
|
|
557
|
-
children:
|
|
558
|
-
}), /* @__PURE__ */
|
|
568
|
+
children: e("healthybowl.crops.planningDetail.fieldCard.name", "Name")
|
|
569
|
+
}), /* @__PURE__ */ p("span", {
|
|
559
570
|
className: "text-xs font-medium text-text-primary",
|
|
560
|
-
children:
|
|
571
|
+
children: Q.name
|
|
561
572
|
})]
|
|
562
573
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ m("div", {
|
|
564
575
|
className: "flex items-center justify-between",
|
|
565
|
-
children: [/* @__PURE__ */
|
|
576
|
+
children: [/* @__PURE__ */ p("span", {
|
|
566
577
|
className: "text-xs text-text-secondary",
|
|
567
|
-
children:
|
|
568
|
-
}), /* @__PURE__ */
|
|
578
|
+
children: e("healthybowl.crops.planningDetail.fieldCard.area", "Area")
|
|
579
|
+
}), /* @__PURE__ */ m("span", {
|
|
569
580
|
className: "text-xs font-medium text-text-primary",
|
|
570
581
|
children: [
|
|
571
|
-
|
|
582
|
+
Q.area,
|
|
572
583
|
" ",
|
|
573
|
-
|
|
584
|
+
Q.unit
|
|
574
585
|
]
|
|
575
586
|
})]
|
|
576
587
|
}),
|
|
577
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ m("div", {
|
|
578
589
|
className: "flex items-center justify-between",
|
|
579
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ p("span", {
|
|
580
591
|
className: "text-xs text-text-secondary",
|
|
581
|
-
children:
|
|
582
|
-
}), /* @__PURE__ */
|
|
592
|
+
children: e("healthybowl.crops.planningDetail.fieldCard.soilType", "Soil Type")
|
|
593
|
+
}), /* @__PURE__ */ p("span", {
|
|
583
594
|
className: "text-xs font-medium text-text-primary",
|
|
584
|
-
children:
|
|
595
|
+
children: Q.soilType
|
|
585
596
|
})]
|
|
586
597
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ m("div", {
|
|
588
599
|
className: "flex items-center justify-between",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ p("span", {
|
|
590
601
|
className: "text-xs text-text-secondary",
|
|
591
|
-
children:
|
|
592
|
-
}), /* @__PURE__ */
|
|
602
|
+
children: e("healthybowl.crops.planningDetail.fieldCard.irrigation", "Irrigation")
|
|
603
|
+
}), /* @__PURE__ */ p("span", {
|
|
593
604
|
className: "text-xs font-medium text-text-primary",
|
|
594
|
-
children:
|
|
605
|
+
children: Q.irrigationType
|
|
595
606
|
})]
|
|
596
607
|
}),
|
|
597
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ m("div", {
|
|
598
609
|
className: "flex items-center justify-between",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
610
|
+
children: [/* @__PURE__ */ p("span", {
|
|
600
611
|
className: "text-xs text-text-secondary",
|
|
601
|
-
children:
|
|
602
|
-
}), /* @__PURE__ */
|
|
603
|
-
label:
|
|
604
|
-
variant:
|
|
612
|
+
children: e("healthybowl.crops.planningDetail.fieldCard.status", "Status")
|
|
613
|
+
}), /* @__PURE__ */ p(i, {
|
|
614
|
+
label: Q.status,
|
|
615
|
+
variant: Q.status === "active" ? "success" : "muted"
|
|
605
616
|
})]
|
|
606
617
|
})
|
|
607
618
|
]
|
|
608
619
|
}),
|
|
609
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ m(h, {
|
|
610
621
|
variant: "outline",
|
|
611
|
-
onClick: () =>
|
|
622
|
+
onClick: () => A(j(`crops/fields/${Q.id}`)),
|
|
612
623
|
className: "mt-4 w-full",
|
|
613
624
|
children: [
|
|
614
|
-
/* @__PURE__ */ l
|
|
625
|
+
/* @__PURE__ */ p(l, { className: "h-4 w-4 text-text-secondary" }),
|
|
615
626
|
" ",
|
|
616
|
-
|
|
627
|
+
e("healthybowl.crops.planningDetail.fieldCard.viewField", "View Field")
|
|
617
628
|
]
|
|
618
629
|
})
|
|
619
630
|
]
|
|
620
631
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ m("div", {
|
|
622
633
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
634
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
624
635
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
625
|
-
children:
|
|
626
|
-
}), /* @__PURE__ */
|
|
636
|
+
children: e("healthybowl.crops.planningDetail.quickActions.title", "Quick Actions")
|
|
637
|
+
}), /* @__PURE__ */ m("div", {
|
|
627
638
|
className: "space-y-2",
|
|
628
639
|
children: [
|
|
629
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ m(h, {
|
|
630
641
|
variant: "outline",
|
|
631
|
-
onClick: () =>
|
|
642
|
+
onClick: () => A(j("weather")),
|
|
632
643
|
className: "w-full justify-start",
|
|
633
644
|
children: [
|
|
634
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ p(c, { className: "h-4 w-4 text-text-secondary" }),
|
|
635
646
|
" ",
|
|
636
|
-
|
|
647
|
+
e("healthybowl.crops.planningDetail.quickActions.checkWeather", "Check Weather")
|
|
637
648
|
]
|
|
638
649
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ m(h, {
|
|
640
651
|
variant: "outline",
|
|
641
|
-
onClick: () =>
|
|
652
|
+
onClick: () => A(j("crops")),
|
|
642
653
|
className: "w-full justify-start",
|
|
643
654
|
children: [
|
|
644
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ p(u, { className: "h-4 w-4 text-text-secondary" }),
|
|
645
656
|
" ",
|
|
646
|
-
|
|
657
|
+
e("healthybowl.crops.planningDetail.quickActions.allCrops", "All Crops")
|
|
647
658
|
]
|
|
648
659
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ m(h, {
|
|
650
661
|
variant: "outline",
|
|
651
|
-
onClick: () =>
|
|
662
|
+
onClick: () => A(j("crops/planning")),
|
|
652
663
|
className: "w-full justify-start",
|
|
653
664
|
children: [
|
|
654
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ p(Se, { className: "h-4 w-4 text-text-secondary" }),
|
|
655
666
|
" ",
|
|
656
|
-
|
|
667
|
+
e("healthybowl.crops.planningDetail.quickActions.allPlans", "All Plans")
|
|
657
668
|
]
|
|
658
669
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ m(h, {
|
|
660
671
|
variant: "outline",
|
|
661
|
-
onClick: () =>
|
|
672
|
+
onClick: () => A(j("analytics")),
|
|
662
673
|
className: "w-full justify-start",
|
|
663
674
|
children: [
|
|
664
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ p(d, { className: "h-4 w-4 text-text-secondary" }),
|
|
665
676
|
" ",
|
|
666
|
-
|
|
677
|
+
e("healthybowl.crops.planningDetail.quickActions.analytics", "Analytics")
|
|
667
678
|
]
|
|
668
679
|
})
|
|
669
680
|
]
|
|
@@ -672,193 +683,193 @@ var _ = (e) => {
|
|
|
672
683
|
]
|
|
673
684
|
})]
|
|
674
685
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
plan:
|
|
677
|
-
crops:
|
|
678
|
-
onCropChanged:
|
|
686
|
+
/* @__PURE__ */ p(_e, {
|
|
687
|
+
plan: L,
|
|
688
|
+
crops: O,
|
|
689
|
+
onCropChanged: k
|
|
679
690
|
}),
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
open:
|
|
682
|
-
onClose: () =>
|
|
683
|
-
title:
|
|
684
|
-
description:
|
|
691
|
+
/* @__PURE__ */ p(le, {
|
|
692
|
+
open: N,
|
|
693
|
+
onClose: () => P(!1),
|
|
694
|
+
title: e("healthybowl.crops.planningDetail.editModal.title", "Edit Plan - {{crop}}", { crop: L.cropName }),
|
|
695
|
+
description: e("healthybowl.crops.planningDetail.editModal.description", "Update planting plan details"),
|
|
685
696
|
size: "lg",
|
|
686
|
-
footer: /* @__PURE__ */
|
|
697
|
+
footer: /* @__PURE__ */ m(Oe, { children: [/* @__PURE__ */ p(h, {
|
|
687
698
|
variant: "outline",
|
|
688
|
-
onClick: () =>
|
|
689
|
-
children:
|
|
690
|
-
}), /* @__PURE__ */
|
|
699
|
+
onClick: () => P(!1),
|
|
700
|
+
children: e("healthybowl.common.cancel", "Cancel")
|
|
701
|
+
}), /* @__PURE__ */ p(h, {
|
|
691
702
|
onClick: async () => {
|
|
692
|
-
if (
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
}), j(!1);
|
|
719
|
-
} catch (e) {
|
|
720
|
-
A({
|
|
721
|
-
title: x("healthybowl.crops.planningDetail.toast.updateFailed.title", "Update failed"),
|
|
722
|
-
description: String(e),
|
|
723
|
-
variant: "error"
|
|
724
|
-
});
|
|
725
|
-
} finally {
|
|
726
|
-
N(!1);
|
|
703
|
+
if (L) {
|
|
704
|
+
I(!0);
|
|
705
|
+
try {
|
|
706
|
+
await Ne(he(L, Re, {
|
|
707
|
+
cropId: R,
|
|
708
|
+
fieldId: B,
|
|
709
|
+
startDate: H,
|
|
710
|
+
endDate: W,
|
|
711
|
+
expectedYield: K,
|
|
712
|
+
seedRequired: J,
|
|
713
|
+
priority: X,
|
|
714
|
+
status: He
|
|
715
|
+
})), M({
|
|
716
|
+
title: e("healthybowl.crops.planningDetail.toast.updated.title", "Plan updated"),
|
|
717
|
+
description: e("healthybowl.crops.planningDetail.toast.updated.description", "{{crop}} plan has been saved.", { crop: Be?.name ?? L.cropName }),
|
|
718
|
+
variant: "success"
|
|
719
|
+
}), P(!1);
|
|
720
|
+
} catch (t) {
|
|
721
|
+
M({
|
|
722
|
+
title: e("healthybowl.crops.planningDetail.toast.updateFailed.title", "Update failed"),
|
|
723
|
+
description: String(t),
|
|
724
|
+
variant: "error"
|
|
725
|
+
});
|
|
726
|
+
} finally {
|
|
727
|
+
I(!1);
|
|
728
|
+
}
|
|
727
729
|
}
|
|
728
730
|
},
|
|
729
|
-
disabled:
|
|
730
|
-
children:
|
|
731
|
+
disabled: F,
|
|
732
|
+
children: F ? e("healthybowl.crops.planningDetail.editModal.saving", "Saving...") : e("healthybowl.crops.planningDetail.editModal.save", "Save Changes")
|
|
731
733
|
})] }),
|
|
732
|
-
children: /* @__PURE__ */
|
|
734
|
+
children: /* @__PURE__ */ m("div", {
|
|
733
735
|
className: "grid gap-4 sm:grid-cols-2",
|
|
734
736
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
738
|
+
htmlFor: "plan-edit-crop",
|
|
736
739
|
className: "text-sm font-medium text-text-primary",
|
|
737
|
-
children:
|
|
738
|
-
}), /* @__PURE__ */
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
}, e.id)) })]
|
|
740
|
+
children: e("healthybowl.crops.planningDetail.form.cropName", "Crop Name")
|
|
741
|
+
}), /* @__PURE__ */ p(ne, {
|
|
742
|
+
id: "plan-edit-crop",
|
|
743
|
+
value: R,
|
|
744
|
+
onValueChange: z,
|
|
745
|
+
options: O,
|
|
746
|
+
recordedLabel: R === L.cropId ? `${L.cropName} — recorded crop ID ${R}` : void 0,
|
|
747
|
+
skip: !N,
|
|
748
|
+
disabled: F,
|
|
749
|
+
className: "mt-1"
|
|
748
750
|
})] }),
|
|
749
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
750
752
|
className: "text-sm font-medium text-text-primary",
|
|
751
|
-
children:
|
|
752
|
-
}), /* @__PURE__ */
|
|
753
|
-
value:
|
|
754
|
-
onValueChange:
|
|
755
|
-
children: [/* @__PURE__ */
|
|
753
|
+
children: e("healthybowl.crops.planningDetail.form.field", "Field")
|
|
754
|
+
}), /* @__PURE__ */ m(g, {
|
|
755
|
+
value: B,
|
|
756
|
+
onValueChange: V,
|
|
757
|
+
children: [/* @__PURE__ */ p(y, {
|
|
756
758
|
className: "mt-1 w-full",
|
|
757
|
-
children: /* @__PURE__ */
|
|
758
|
-
}), /* @__PURE__ */
|
|
759
|
+
children: /* @__PURE__ */ p(b, {})
|
|
760
|
+
}), /* @__PURE__ */ m(_, { children: [B && !D.some((e) => e.id === B) && /* @__PURE__ */ m(v, {
|
|
761
|
+
value: B,
|
|
762
|
+
disabled: !0,
|
|
763
|
+
children: [
|
|
764
|
+
L.fieldName,
|
|
765
|
+
" — recorded field ID ",
|
|
766
|
+
B,
|
|
767
|
+
" (unavailable)"
|
|
768
|
+
]
|
|
769
|
+
}), D.map((e) => /* @__PURE__ */ p(v, {
|
|
759
770
|
value: e.id,
|
|
760
771
|
children: e.name
|
|
761
|
-
}, e.id)) })]
|
|
772
|
+
}, e.id))] })]
|
|
762
773
|
})] }),
|
|
763
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
764
775
|
className: "text-sm font-medium text-text-primary",
|
|
765
|
-
children:
|
|
766
|
-
}), /* @__PURE__ */
|
|
776
|
+
children: e("healthybowl.crops.planningDetail.form.startDate", "Start Date")
|
|
777
|
+
}), /* @__PURE__ */ p("input", {
|
|
767
778
|
type: "date",
|
|
768
|
-
value:
|
|
769
|
-
onChange: (e) =>
|
|
779
|
+
value: H,
|
|
780
|
+
onChange: (e) => U(e.target.value),
|
|
770
781
|
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)]"
|
|
771
782
|
})] }),
|
|
772
|
-
/* @__PURE__ */
|
|
783
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
773
784
|
className: "text-sm font-medium text-text-primary",
|
|
774
|
-
children:
|
|
775
|
-
}), /* @__PURE__ */
|
|
785
|
+
children: e("healthybowl.crops.planningDetail.form.endDate", "End Date")
|
|
786
|
+
}), /* @__PURE__ */ p("input", {
|
|
776
787
|
type: "date",
|
|
777
|
-
value:
|
|
778
|
-
onChange: (e) =>
|
|
788
|
+
value: W,
|
|
789
|
+
onChange: (e) => G(e.target.value),
|
|
779
790
|
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)]"
|
|
780
791
|
})] }),
|
|
781
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
782
793
|
className: "text-sm font-medium text-text-primary",
|
|
783
|
-
children:
|
|
784
|
-
}), /* @__PURE__ */
|
|
794
|
+
children: e("healthybowl.crops.planningDetail.form.expectedYield", "Expected Yield (kg)")
|
|
795
|
+
}), /* @__PURE__ */ p("input", {
|
|
785
796
|
type: "number",
|
|
786
|
-
value:
|
|
787
|
-
onChange: (e) =>
|
|
797
|
+
value: K,
|
|
798
|
+
onChange: (e) => q(e.target.value),
|
|
788
799
|
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)]"
|
|
789
800
|
})] }),
|
|
790
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
791
802
|
className: "text-sm font-medium text-text-primary",
|
|
792
|
-
children:
|
|
793
|
-
}), /* @__PURE__ */
|
|
803
|
+
children: e("healthybowl.crops.planningDetail.form.seedRequired", "Seed Required (kg)")
|
|
804
|
+
}), /* @__PURE__ */ p("input", {
|
|
794
805
|
type: "number",
|
|
795
|
-
value:
|
|
796
|
-
onChange: (e) =>
|
|
806
|
+
value: J,
|
|
807
|
+
onChange: (e) => Y(e.target.value),
|
|
797
808
|
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)]"
|
|
798
809
|
})] }),
|
|
799
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
800
811
|
className: "text-sm font-medium text-text-primary",
|
|
801
|
-
children:
|
|
802
|
-
}), /* @__PURE__ */
|
|
803
|
-
value:
|
|
804
|
-
onValueChange: (e) =>
|
|
805
|
-
children: [/* @__PURE__ */
|
|
812
|
+
children: e("healthybowl.crops.planningDetail.form.priority", "Priority")
|
|
813
|
+
}), /* @__PURE__ */ m(g, {
|
|
814
|
+
value: X,
|
|
815
|
+
onValueChange: (e) => Ve(e),
|
|
816
|
+
children: [/* @__PURE__ */ p(y, {
|
|
806
817
|
className: "mt-1 w-full",
|
|
807
|
-
children: /* @__PURE__ */
|
|
808
|
-
}), /* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ p(b, {})
|
|
819
|
+
}), /* @__PURE__ */ m(_, { children: [
|
|
820
|
+
/* @__PURE__ */ p(v, {
|
|
810
821
|
value: "low",
|
|
811
|
-
children:
|
|
822
|
+
children: e("healthybowl.crops.planningDetail.priorityOptions.low", "Low")
|
|
812
823
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ p(v, {
|
|
814
825
|
value: "medium",
|
|
815
|
-
children:
|
|
826
|
+
children: e("healthybowl.crops.planningDetail.priorityOptions.medium", "Medium")
|
|
816
827
|
}),
|
|
817
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ p(v, {
|
|
818
829
|
value: "high",
|
|
819
|
-
children:
|
|
830
|
+
children: e("healthybowl.crops.planningDetail.priorityOptions.high", "High")
|
|
820
831
|
})
|
|
821
832
|
] })]
|
|
822
833
|
})] }),
|
|
823
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
824
835
|
className: "text-sm font-medium text-text-primary",
|
|
825
|
-
children:
|
|
826
|
-
}), /* @__PURE__ */
|
|
827
|
-
value:
|
|
828
|
-
onValueChange: (e) =>
|
|
829
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: e("healthybowl.crops.planningDetail.form.status", "Status")
|
|
837
|
+
}), /* @__PURE__ */ m(g, {
|
|
838
|
+
value: He,
|
|
839
|
+
onValueChange: (e) => Ue(e),
|
|
840
|
+
children: [/* @__PURE__ */ p(y, {
|
|
830
841
|
className: "mt-1 w-full",
|
|
831
|
-
children: /* @__PURE__ */
|
|
832
|
-
}), /* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
842
|
+
children: /* @__PURE__ */ p(b, {})
|
|
843
|
+
}), /* @__PURE__ */ m(_, { children: [
|
|
844
|
+
/* @__PURE__ */ p(v, {
|
|
834
845
|
value: "draft",
|
|
835
|
-
children:
|
|
846
|
+
children: e("healthybowl.crops.planningDetail.statusOptions.draft", "Draft")
|
|
836
847
|
}),
|
|
837
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ p(v, {
|
|
838
849
|
value: "approved",
|
|
839
|
-
children:
|
|
850
|
+
children: e("healthybowl.crops.planningDetail.statusOptions.approved", "Approved")
|
|
840
851
|
}),
|
|
841
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ p(v, {
|
|
842
853
|
value: "active",
|
|
843
|
-
children:
|
|
854
|
+
children: e("healthybowl.crops.planningDetail.statusOptions.active", "Active")
|
|
844
855
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ p(v, {
|
|
846
857
|
value: "completed",
|
|
847
|
-
children:
|
|
858
|
+
children: e("healthybowl.crops.planningDetail.statusOptions.completed", "Completed")
|
|
848
859
|
})
|
|
849
860
|
] })]
|
|
850
861
|
})] })
|
|
851
862
|
]
|
|
852
863
|
})
|
|
853
864
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
toasts:
|
|
856
|
-
onDismiss:
|
|
865
|
+
/* @__PURE__ */ p(ae, {
|
|
866
|
+
toasts: Ie,
|
|
867
|
+
onDismiss: Le
|
|
857
868
|
})
|
|
858
869
|
]
|
|
859
870
|
});
|
|
860
871
|
};
|
|
861
872
|
//#endregion
|
|
862
|
-
export {
|
|
873
|
+
export { T as PlanningDetailsPage };
|
|
863
874
|
|
|
864
875
|
//# sourceMappingURL=PlanningDetailsPage.js.map
|