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