@burdenoff/microfe-healthybowl 2026.1120.2 → 2026.1120.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/healthybowl/components/BedLayoutGrid.js +40 -35
- package/dist/healthybowl/components/EmptyState.d.ts +14 -0
- package/dist/healthybowl/components/EmptyState.js +9 -3
- package/dist/healthybowl/components/ErrorState.js +2 -1
- package/dist/healthybowl/emptyStateSubjects.d.ts +20 -0
- package/dist/healthybowl/emptyStateSubjects.js +8 -0
- package/dist/healthybowl/index.d.ts +2 -0
- package/dist/healthybowl/index.js +2 -1
- package/dist/healthybowl/pages/HomePage.js +10 -3
- package/dist/healthybowl/pages/agri-inputs/AgriInputsStorePage.js +2 -1
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js +2 -1
- package/dist/healthybowl/pages/ai/AiHubPage.js +2 -1
- package/dist/healthybowl/pages/ai/FarmAttentionPage.js +3 -1
- package/dist/healthybowl/pages/analytics/AnalyticsDashboardPage.js +2 -1
- package/dist/healthybowl/pages/analytics/AnalyticsOverviewPage.js +5 -2
- package/dist/healthybowl/pages/analytics/ExportPage.js +2 -1
- package/dist/healthybowl/pages/analytics/InsightsPage.js +2 -1
- package/dist/healthybowl/pages/analytics/ReportsPage.js +2 -1
- package/dist/healthybowl/pages/catalog/PlantCatalogPage.js +170 -156
- package/dist/healthybowl/pages/compliance/CertificatesOfOriginPage.js +2 -1
- package/dist/healthybowl/pages/compliance/CertificationStandardDetailPage.js +8 -3
- package/dist/healthybowl/pages/compliance/ComplianceAlertsPage.js +2 -1
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +6 -2
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +3 -1
- package/dist/healthybowl/pages/compliance/IcsGroupsPage.js +2 -1
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +7 -3
- package/dist/healthybowl/pages/compliance/IcsGrowerWizardPage.js +2 -1
- package/dist/healthybowl/pages/compliance/InspectionCalendarPage.js +3 -1
- package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js +2 -1
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +2 -1
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +2 -1
- package/dist/healthybowl/pages/consultant/ConsultantClientsPage.js +2 -1
- package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js +2 -1
- package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js +2 -1
- package/dist/healthybowl/pages/contacts/ContactsPage.js +2 -1
- package/dist/healthybowl/pages/contracts/ContractsPage.js +3 -1
- package/dist/healthybowl/pages/coop/AggregationLotBuilderPage.js +6 -2
- package/dist/healthybowl/pages/coop/CoopMemberDetailPage.js +3 -1
- package/dist/healthybowl/pages/coop/CoopOverviewPage.js +8 -3
- package/dist/healthybowl/pages/crops/CropDetailsPage.js +2 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +17 -15
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +252 -250
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +154 -152
- package/dist/healthybowl/pages/crops/CropsPage.js +403 -400
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +2 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +2 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +2 -1
- package/dist/healthybowl/pages/crops/PlantingCalendarPage.js +2 -1
- package/dist/healthybowl/pages/crops/PlantingPlanReportPage.js +2 -1
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +7 -3
- package/dist/healthybowl/pages/distribution/CsaPlansPage.js +2 -1
- package/dist/healthybowl/pages/distribution/DeliveryRouteDetailPage.js +4 -2
- package/dist/healthybowl/pages/distribution/DeliveryRoutesPage.js +2 -1
- package/dist/healthybowl/pages/distribution/DistributionOverviewPage.js +2 -1
- package/dist/healthybowl/pages/distribution/PickupLocationsPage.js +2 -1
- package/dist/healthybowl/pages/distribution/PickupManifestPage.js +4 -2
- package/dist/healthybowl/pages/distribution/WholesaleOrdersPage.js +2 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js +4 -2
- package/dist/healthybowl/pages/field-capture/ObservationLogPage.js +2 -1
- package/dist/healthybowl/pages/fields/FieldMapPage.js +1014 -996
- package/dist/healthybowl/pages/financial/AccountingIntegrationsPage.js +3 -1
- package/dist/healthybowl/pages/financial/BankReconciliationPage.js +4 -2
- package/dist/healthybowl/pages/financial/ChartOfAccountsPage.js +2 -1
- package/dist/healthybowl/pages/financial/CostByCropPage.js +5 -2
- package/dist/healthybowl/pages/financial/FarmAccountingPage.js +6 -2
- package/dist/healthybowl/pages/financial/FinancialDashboardPage.js +2 -1
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js +5 -2
- package/dist/healthybowl/pages/financial/FinancialStatementsPage.js +2 -1
- package/dist/healthybowl/pages/financial/FinancierAccessPage.js +2 -1
- package/dist/healthybowl/pages/financial/GeneralLedgerPage.js +3 -1
- package/dist/healthybowl/pages/financial/MachinerySpendPage.js +2 -1
- package/dist/healthybowl/pages/financial/ProfitLossPage.js +2 -1
- package/dist/healthybowl/pages/financial/TransactionsPage.js +2 -1
- package/dist/healthybowl/pages/financier/FinancierPage.js +2 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +120 -118
- package/dist/healthybowl/pages/government-schemes/GovernmentDashboardPage.js +74 -65
- package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +4 -2
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +2 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDiscoveryPage.js +3 -1
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +3 -1
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js +5 -2
- package/dist/healthybowl/pages/inputs-insurance/LoanAccountingDetailPage.js +4 -2
- package/dist/healthybowl/pages/inputs-insurance/LoanFacilitationPage.js +2 -1
- package/dist/healthybowl/pages/inputs-insurance/PolicyClaimsPage.js +3 -1
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js +455 -426
- package/dist/healthybowl/pages/labour/CrewTimesheetPage.js +2 -1
- package/dist/healthybowl/pages/labour/LabourRosterPage.js +4 -2
- package/dist/healthybowl/pages/learn/LearnCatalogPage.js +4 -2
- package/dist/healthybowl/pages/learn/LearnCourseDetailPage.js +5 -2
- package/dist/healthybowl/pages/learn/LearnHomePage.js +2 -1
- package/dist/healthybowl/pages/learn/LearnLessonPage.js +2 -1
- package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +2 -1
- package/dist/healthybowl/pages/livestock/FertilityCard.js +161 -155
- package/dist/healthybowl/pages/livestock/GrazingPage.js +2 -1
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js +2 -1
- package/dist/healthybowl/pages/livestock/HerdStatsCard.js +156 -150
- package/dist/healthybowl/pages/livestock/LivestockDashboardPage.js +3 -1
- package/dist/healthybowl/pages/livestock/LivestockFeedCard.js +56 -50
- package/dist/healthybowl/pages/livestock/LivestockGrowthCard.js +56 -50
- package/dist/healthybowl/pages/livestock/PedigreeTree.js +3 -1
- package/dist/healthybowl/pages/livestock/WithdrawalAlertsPage.js +2 -1
- package/dist/healthybowl/pages/market/MarketPricesPage.js +254 -238
- package/dist/healthybowl/pages/marketplace/AuctionsView.js +2 -1
- package/dist/healthybowl/pages/marketplace/CartPage.js +2 -1
- package/dist/healthybowl/pages/marketplace/MarketplacePage.js +3 -1
- package/dist/healthybowl/pages/marketplace/OrdersPage.js +3 -1
- package/dist/healthybowl/pages/marketplace/ProductDetailPage.js +2 -1
- package/dist/healthybowl/pages/marketplace/SharedMarketView.js +3 -1
- package/dist/healthybowl/pages/marketplace/ShipmentTrackingPanel.js +2 -1
- package/dist/healthybowl/pages/marketplace/WishlistPage.js +4 -2
- package/dist/healthybowl/pages/network/CohortsPage.js +4 -2
- package/dist/healthybowl/pages/network/CommunityPage.js +4 -2
- package/dist/healthybowl/pages/network/EventsPage.js +4 -2
- package/dist/healthybowl/pages/network/ExpertsPage.js +4 -2
- package/dist/healthybowl/pages/network/MentorsPage.js +4 -2
- package/dist/healthybowl/pages/nursery/NurseryProvenancePage.js +437 -409
- package/dist/healthybowl/pages/pest-management/AiPestDetectionPage.js +3 -1
- package/dist/healthybowl/pages/pest-management/PestOverviewPage.js +7 -2
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +3 -1
- package/dist/healthybowl/pages/production/ProductionPlanningPage.js +3 -1
- package/dist/healthybowl/pages/production/ProductionSchedulePage.js +2 -1
- package/dist/healthybowl/pages/production/ValueAddedProductsPage.js +2 -1
- package/dist/healthybowl/pages/products/BatchesPage.js +3 -1
- package/dist/healthybowl/pages/products/ProductsOverviewPage.js +3 -1
- package/dist/healthybowl/pages/products/QualityPage.js +2 -1
- package/dist/healthybowl/pages/reports-api/ReportsApiPage.js +4 -2
- package/dist/healthybowl/pages/satellite/CropHealthAlertsPage.js +3 -1
- package/dist/healthybowl/pages/satellite/SatelliteCropHealthPage.js +6 -3
- package/dist/healthybowl/pages/soil/FieldSensorsPage.js +197 -186
- package/dist/healthybowl/pages/soil/SoilDashboardPage.js +2 -1
- package/dist/healthybowl/pages/soil/SoilMonitoringPage.js +3 -1
- package/dist/healthybowl/pages/soil/SoilRecommendationsPage.js +4 -1
- package/dist/healthybowl/pages/storage/StoragePage.js +113 -108
- package/dist/healthybowl/pages/suppliers/SuppliersPage.js +534 -502
- package/dist/healthybowl/pages/sustainability/CarbonCreditLedgerPage.js +2 -1
- package/dist/healthybowl/pages/sustainability/CarbonGhgPage.js +5 -2
- package/dist/healthybowl/pages/sustainability/EudrDueDiligencePage.js +2 -1
- package/dist/healthybowl/pages/sustainability/SoilCarbonPage.js +9 -3
- package/dist/healthybowl/pages/sustainability/SustainabilityOverviewPage.js +12 -4
- package/dist/healthybowl/pages/tasks/JobCardPage.js +3 -1
- package/dist/healthybowl/pages/tasks/TasksPage.js +2 -1
- package/dist/healthybowl/pages/terrace/CareSchedulePage.js +4 -2
- package/dist/healthybowl/pages/terrace/CompostInputsPage.js +6 -3
- package/dist/healthybowl/pages/terrace/GardenJournalPage.js +4 -2
- package/dist/healthybowl/pages/terrace/GrowSpacesPage.js +4 -2
- package/dist/healthybowl/pages/terrace/HarvestsPage.js +4 -2
- package/dist/healthybowl/pages/terrace/MyGardensPage.js +2 -1
- package/dist/healthybowl/pages/terrace/PlantingsPage.js +5 -2
- package/dist/healthybowl/pages/terrace/WhatToGrowPage.js +4 -2
- package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +4 -2
- package/dist/healthybowl/pages/traceability/QRCodesPage.js +7 -3
- package/dist/healthybowl/pages/traceability/SupplyChainPage.js +4 -2
- package/dist/healthybowl/pages/traceability/TraceLedgerPage.js +2 -1
- package/dist/healthybowl/pages/traceability/TracePortalSettingsPage.js +2 -1
- package/dist/healthybowl/pages/traceability/TraceScanActivityPage.js +2 -1
- package/dist/healthybowl/pages/traceability/TraceTrackingPage.js +6 -3
- package/dist/healthybowl/pages/traceability/UnifiedTraceBatchPage.js +2 -1
- package/dist/healthybowl/pages/wallet/CreditsWalletPage.js +5 -2
- package/dist/healthybowl/pages/weather/FrostRiskCalendarPage.js +2 -1
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +2 -1
- package/dist/healthybowl/pages/weather/WeatherAlertRulesPage.js +200 -185
- package/dist/healthybowl/pages/weather/WeatherAlertsPage.js +3 -1
- package/dist/healthybowl/pages/weather/WeatherAnomalyReportPage.js +2 -1
- package/dist/healthybowl/pages/weather/WeatherForecastPage.js +2 -1
- package/dist/healthybowl/pages/weather/WeatherHistoryPage.js +3 -1
- package/dist/healthybowl/pages/weather/WeatherOverviewPage.js +11 -4
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +2 -1
- package/dist/index.js +3 -2
- package/package.json +2 -2
|
@@ -8,11 +8,11 @@ import { useId as o, useMemo as s, useState as c } from "react";
|
|
|
8
8
|
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
9
|
import { LayoutGrid as u, Loader2 as d } from "lucide-react";
|
|
10
10
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
-
import { Button as m } from "@burdenoff/fe-libs/ui";
|
|
12
|
-
import { gql as
|
|
13
|
-
import { useMutation as
|
|
11
|
+
import { Button as m, EmptyState as h, useGlassEmptyStates as g } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { gql as _ } from "@apollo/client";
|
|
13
|
+
import { useMutation as v } from "@apollo/client/react";
|
|
14
14
|
// src/healthybowl/components/BedLayoutGrid.tsx
|
|
15
|
-
var
|
|
15
|
+
var y = _`
|
|
16
16
|
query HealthyBowlFieldDetailBeds($context: ContextInput!, $fieldId: ID) {
|
|
17
17
|
healthyBowlBeds(context: $context, fieldId: $fieldId) {
|
|
18
18
|
id
|
|
@@ -25,7 +25,7 @@ var _ = h`
|
|
|
25
25
|
status
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`, b = _`
|
|
29
29
|
mutation UpdateHealthyBowlFieldDetailBed($input: UpdateHealthyBowlBedInput!) {
|
|
30
30
|
updateHealthyBowlBed(input: $input) {
|
|
31
31
|
id
|
|
@@ -35,15 +35,15 @@ var _ = h`
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
38
|
-
function
|
|
38
|
+
function x(e, t) {
|
|
39
39
|
return e === "planted" || t ? "border-success/50 bg-success/10" : e === "fallow" ? "border-muted/50 bg-muted/10" : "border-warning/50 bg-warning/10";
|
|
40
40
|
}
|
|
41
|
-
var
|
|
42
|
-
function
|
|
43
|
-
let { t: u } = l(), d = o(), { crop: m, loading: h, error: g } = r(e.cropId, { skip: !!n }), _ = n ?? m, v = u("healthybowl.crops.fieldDetail.beds.recordedCrop", "Recorded crop ({{id}})", { id: e.cropId ?? "" }),
|
|
41
|
+
var S = "__bed-unassigned__";
|
|
42
|
+
function C({ bed: e, crops: t, loadedCrop: n, saving: s, onAssign: c }) {
|
|
43
|
+
let { t: u } = l(), d = o(), { crop: m, loading: h, error: g } = r(e.cropId, { skip: !!n }), _ = n ?? m, v = u("healthybowl.crops.fieldDetail.beds.recordedCrop", "Recorded crop ({{id}})", { id: e.cropId ?? "" }), y = _ ? i(_) : e.cropId ? h ? u("healthybowl.crops.fieldDetail.beds.recordedLoading", "Recorded crop ({{id}}) — loading…", { id: e.cropId }) : g ? u("healthybowl.crops.fieldDetail.beds.recordedError", "Recorded crop ({{id}}) — details could not be loaded", { id: e.cropId }) : u("healthybowl.crops.fieldDetail.beds.recordedUnavailable", "Recorded crop ({{id}}) — unavailable", { id: e.cropId }) : u("healthybowl.crops.fieldDetail.beds.unassigned", "Unassigned");
|
|
44
44
|
return /* @__PURE__ */ p("article", {
|
|
45
45
|
role: "listitem",
|
|
46
|
-
className: `rounded-lg border p-4 ${
|
|
46
|
+
className: `rounded-lg border p-4 ${x(e.status, !!e.cropId)}`,
|
|
47
47
|
children: [
|
|
48
48
|
/* @__PURE__ */ p("div", {
|
|
49
49
|
className: "flex items-start justify-between gap-2",
|
|
@@ -63,7 +63,7 @@ function x({ bed: e, crops: t, loadedCrop: n, saving: s, onAssign: c }) {
|
|
|
63
63
|
children: u("healthybowl.crops.fieldDetail.beds.crop", "Crop")
|
|
64
64
|
}), /* @__PURE__ */ f("dd", {
|
|
65
65
|
className: "font-medium text-text-primary",
|
|
66
|
-
children:
|
|
66
|
+
children: y
|
|
67
67
|
})] }),
|
|
68
68
|
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
69
69
|
className: "text-text-secondary",
|
|
@@ -93,12 +93,12 @@ function x({ bed: e, crops: t, loadedCrop: n, saving: s, onAssign: c }) {
|
|
|
93
93
|
children: u("healthybowl.crops.fieldDetail.beds.assign", "Assign crop")
|
|
94
94
|
}), /* @__PURE__ */ f(a, {
|
|
95
95
|
id: d,
|
|
96
|
-
value: e.cropId ??
|
|
97
|
-
onValueChange: (t) => void c(e, t ===
|
|
96
|
+
value: e.cropId ?? S,
|
|
97
|
+
onValueChange: (t) => void c(e, t === S ? "" : t),
|
|
98
98
|
options: t,
|
|
99
99
|
recordedLabel: v,
|
|
100
100
|
emptyOption: {
|
|
101
|
-
value:
|
|
101
|
+
value: S,
|
|
102
102
|
label: u("healthybowl.crops.fieldDetail.beds.unassigned", "Unassigned")
|
|
103
103
|
},
|
|
104
104
|
disabled: s,
|
|
@@ -109,31 +109,31 @@ function x({ bed: e, crops: t, loadedCrop: n, saving: s, onAssign: c }) {
|
|
|
109
109
|
]
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
let { t: a } = l(), { workspaceId:
|
|
114
|
-
context: { workspaceId:
|
|
112
|
+
function w({ fieldId: r, crops: i }) {
|
|
113
|
+
let { t: a } = l(), o = g(), { workspaceId: _ } = e(), { toast: x } = t(), [S, w] = c(null), T = s(() => ({
|
|
114
|
+
context: { workspaceId: _ },
|
|
115
115
|
fieldId: r
|
|
116
|
-
}), [
|
|
117
|
-
|
|
116
|
+
}), [_, r]), { data: E, loading: D, error: O, refetch: k } = n(y, T, !r), [A] = v(b), j = E?.healthyBowlBeds ?? [], M = s(() => new Map(i.map((e) => [e.id, e])), [i]), N = async (e, t) => {
|
|
117
|
+
w(e.id);
|
|
118
118
|
try {
|
|
119
|
-
await
|
|
119
|
+
await A({ variables: { input: {
|
|
120
120
|
id: e.id,
|
|
121
121
|
cropId: t || null,
|
|
122
122
|
plantCount: e.plantCount,
|
|
123
|
-
context: { workspaceId:
|
|
124
|
-
} } }), await
|
|
123
|
+
context: { workspaceId: _ }
|
|
124
|
+
} } }), await k(), x({
|
|
125
125
|
title: a("healthybowl.crops.fieldDetail.beds.saved.title", "Bed updated"),
|
|
126
126
|
description: a("healthybowl.crops.fieldDetail.beds.saved.description", "{{name}} is up to date.", { name: e.name }),
|
|
127
127
|
variant: "success"
|
|
128
128
|
});
|
|
129
129
|
} catch (e) {
|
|
130
|
-
|
|
130
|
+
x({
|
|
131
131
|
title: a("healthybowl.crops.fieldDetail.beds.failed.title", "Could not update bed"),
|
|
132
132
|
description: String(e),
|
|
133
133
|
variant: "error"
|
|
134
134
|
});
|
|
135
135
|
} finally {
|
|
136
|
-
|
|
136
|
+
w(null);
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
return /* @__PURE__ */ p("section", {
|
|
@@ -157,17 +157,22 @@ function S({ fieldId: r, crops: i }) {
|
|
|
157
157
|
})] }), /* @__PURE__ */ f(m, {
|
|
158
158
|
variant: "outline",
|
|
159
159
|
size: "sm",
|
|
160
|
-
onClick: () => void
|
|
161
|
-
disabled:
|
|
162
|
-
children:
|
|
160
|
+
onClick: () => void k(),
|
|
161
|
+
disabled: D,
|
|
162
|
+
children: D ? /* @__PURE__ */ f(d, { className: "h-4 w-4 animate-spin" }) : a("healthybowl.common.refresh", "Refresh")
|
|
163
163
|
})]
|
|
164
|
-
}),
|
|
164
|
+
}), D && j.length === 0 ? /* @__PURE__ */ f("div", {
|
|
165
165
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
166
166
|
children: a("healthybowl.common.loading", "Loading…")
|
|
167
|
-
}) :
|
|
167
|
+
}) : O ? /* @__PURE__ */ f("div", {
|
|
168
168
|
className: "rounded-lg border border-error/40 bg-error/10 p-4 text-sm text-error",
|
|
169
169
|
children: a("healthybowl.crops.fieldDetail.beds.error", "Beds could not be loaded. Try again.")
|
|
170
|
-
}) :
|
|
170
|
+
}) : j.length === 0 ? o ? /* @__PURE__ */ f(h, {
|
|
171
|
+
illustration: "plants",
|
|
172
|
+
size: "panel",
|
|
173
|
+
title: a("healthybowl.crops.fieldDetail.beds.empty.title", "No beds saved yet"),
|
|
174
|
+
description: a("healthybowl.crops.fieldDetail.beds.empty.description", "Generate and save a bed layout from the Field Map page.")
|
|
175
|
+
}) : /* @__PURE__ */ p("div", {
|
|
171
176
|
className: "rounded-lg border border-dashed border-border-seam p-8 text-center",
|
|
172
177
|
children: [/* @__PURE__ */ f("p", {
|
|
173
178
|
className: "font-medium text-text-primary",
|
|
@@ -180,14 +185,14 @@ function S({ fieldId: r, crops: i }) {
|
|
|
180
185
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",
|
|
181
186
|
role: "list",
|
|
182
187
|
"aria-label": a("healthybowl.crops.fieldDetail.beds.listLabel", "Saved beds"),
|
|
183
|
-
children:
|
|
188
|
+
children: j.map((e) => /* @__PURE__ */ f(C, {
|
|
184
189
|
bed: e,
|
|
185
190
|
crops: i,
|
|
186
|
-
loadedCrop: e.cropId ?
|
|
187
|
-
saving:
|
|
188
|
-
onAssign:
|
|
191
|
+
loadedCrop: e.cropId ? M.get(e.cropId) : void 0,
|
|
192
|
+
saving: S === e.id,
|
|
193
|
+
onAssign: N
|
|
189
194
|
}, e.id))
|
|
190
195
|
})]
|
|
191
196
|
});
|
|
192
197
|
}
|
|
193
|
-
export {
|
|
198
|
+
export { w as BedLayoutGrid };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { EmptyStateKind, EmptyStateSize, EmptyStateSubject } from '@burdenoff/fe-libs/ui';
|
|
2
3
|
interface EmptyStateProps {
|
|
3
4
|
icon?: ReactNode;
|
|
4
5
|
title: string;
|
|
@@ -12,6 +13,19 @@ interface EmptyStateProps {
|
|
|
12
13
|
*/
|
|
13
14
|
illustration?: string;
|
|
14
15
|
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Glass opt-in only (the host's `glassEmptyStates`, BOFF-15608); ignored otherwise. What the
|
|
18
|
+
* state says: `first-use` (default), or a situation such as `no-results` or `filtered`.
|
|
19
|
+
*/
|
|
20
|
+
kind?: EmptyStateKind;
|
|
21
|
+
/**
|
|
22
|
+
* Glass opt-in only; ignored otherwise. The glass picture: a shared subject or one of
|
|
23
|
+
* HealthyBowl's own (livestock, pests, soil, harvest). Default: from the kind, the icon or
|
|
24
|
+
* the old picture name.
|
|
25
|
+
*/
|
|
26
|
+
glassIllustration?: EmptyStateSubject | 'auto' | 'none';
|
|
27
|
+
/** Glass opt-in only; ignored otherwise. Where it sits; default `page`. */
|
|
28
|
+
size?: EmptyStateSize;
|
|
15
29
|
}
|
|
16
30
|
/**
|
|
17
31
|
* Boff UI 2.0 zero state. With no custom `icon` it renders the calm,
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { EmptyState as t, IllustratedEmptyState as n } from "@burdenoff/fe-libs/ui";
|
|
3
3
|
// src/healthybowl/components/EmptyState.tsx
|
|
4
|
-
var r = ({ icon: r, title: i, description: a, action: o, illustration: s = "empty-data", className: c }) => r ? /* @__PURE__ */ e(t, {
|
|
4
|
+
var r = ({ icon: r, title: i, description: a, action: o, illustration: s = "empty-data", className: c, kind: l, glassIllustration: u, size: d }) => r ? /* @__PURE__ */ e(t, {
|
|
5
5
|
icon: r,
|
|
6
6
|
title: i,
|
|
7
7
|
description: a,
|
|
8
8
|
action: o,
|
|
9
|
-
className: c
|
|
9
|
+
className: c,
|
|
10
|
+
kind: l,
|
|
11
|
+
illustration: u,
|
|
12
|
+
size: d
|
|
10
13
|
}) : /* @__PURE__ */ e(n, {
|
|
11
14
|
illustration: s,
|
|
12
15
|
title: i,
|
|
13
16
|
description: a,
|
|
14
17
|
action: o,
|
|
15
18
|
alt: i,
|
|
16
|
-
className: c
|
|
19
|
+
className: c,
|
|
20
|
+
kind: l,
|
|
21
|
+
glassIllustration: u,
|
|
22
|
+
size: d
|
|
17
23
|
});
|
|
18
24
|
export { r as EmptyState };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HealthyBowl's own glass empty-state subjects (BOFF-15608, decision D2 option B).
|
|
3
|
+
*
|
|
4
|
+
* Livestock, pests, soil and harvest are farm-only pictures, so they are not in fe-libs' shared
|
|
5
|
+
* set: healthybowl-app registers their drawings, loaded from its own chunk, with
|
|
6
|
+
* `AppShellConfig.emptyStateSubjects`. Naming them here types `glassIllustration="livestock"`
|
|
7
|
+
* on this module's pages (fe-libs' `EmptyStateSubjectRegistry`), and the list lets the app
|
|
8
|
+
* prove it registered a drawing for every subject this module uses. Weather, water, machinery
|
|
9
|
+
* and plants are shared subjects and need nothing here.
|
|
10
|
+
*/
|
|
11
|
+
export declare const HB_EMPTY_STATE_SUBJECTS: readonly ["livestock", "pests", "soil", "harvest"];
|
|
12
|
+
export type HbEmptyStateSubject = (typeof HB_EMPTY_STATE_SUBJECTS)[number];
|
|
13
|
+
declare module '@burdenoff/fe-libs/ui' {
|
|
14
|
+
interface EmptyStateSubjectRegistry {
|
|
15
|
+
livestock: true;
|
|
16
|
+
pests: true;
|
|
17
|
+
soil: true;
|
|
18
|
+
harvest: true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -17,3 +17,5 @@ export { AIAssistantPanel } from '../components/assistant';
|
|
|
17
17
|
export type { AIAssistantPanelProps } from '../components/assistant';
|
|
18
18
|
export { HB_NEW_ACTION_PATHS } from './newActionPaths';
|
|
19
19
|
export type { HbNewActionPath } from './newActionPaths';
|
|
20
|
+
export { HB_EMPTY_STATE_SUBJECTS } from './emptyStateSubjects';
|
|
21
|
+
export type { HbEmptyStateSubject } from './emptyStateSubjects';
|
|
@@ -8,4 +8,5 @@ import { useHealthyBowl as s } from "./context/HealthyBowlContext.js";
|
|
|
8
8
|
import { useHealthyBowlStore as c } from "./store/healthybowlStore.js";
|
|
9
9
|
import "../components/assistant/index.js";
|
|
10
10
|
import { HB_NEW_ACTION_PATHS as l } from "./newActionPaths.js";
|
|
11
|
-
|
|
11
|
+
import { HB_EMPTY_STATE_SUBJECTS as u } from "./emptyStateSubjects.js";
|
|
12
|
+
export { u as HB_EMPTY_STATE_SUBJECTS, l as HB_NEW_ACTION_PATHS, n as HEALTHYBOWL_RYBBIT_EVENT_ALLOWLIST, e as HealthyBowlRoot, o as PublicSeedLotPage, t as PublicTracePage, r as lockHealthyBowlOfflineData, i as purgeHealthyBowlOfflineData, a as unlockHealthyBowlOfflineData, s as useHealthyBowl, c as useHealthyBowlStore };
|
|
@@ -383,7 +383,9 @@ var A = {
|
|
|
383
383
|
onClick: () => V(G("weather/alert-rules")),
|
|
384
384
|
className: "inline-flex min-h-[40px] items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
385
385
|
children: W("healthybowl.home.needsAttention.empty.action", "Manage alert rules")
|
|
386
|
-
})
|
|
386
|
+
}),
|
|
387
|
+
kind: "all-done",
|
|
388
|
+
size: "panel"
|
|
387
389
|
}) : /* @__PURE__ */ D("ul", {
|
|
388
390
|
className: "divide-y divide-border-subtle",
|
|
389
391
|
children: pe.map((e) => /* @__PURE__ */ D(R, {
|
|
@@ -432,7 +434,9 @@ var A = {
|
|
|
432
434
|
onClick: () => V(G("crops")),
|
|
433
435
|
className: "inline-flex min-h-[40px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
434
436
|
children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), W("healthybowl.home.quickActions.addCrop.label", "Add crop")]
|
|
435
|
-
})
|
|
437
|
+
}),
|
|
438
|
+
glassIllustration: "plants",
|
|
439
|
+
size: "panel"
|
|
436
440
|
}) : /* @__PURE__ */ D("ul", {
|
|
437
441
|
className: "divide-y divide-border-subtle",
|
|
438
442
|
children: me.map((e) => {
|
|
@@ -522,7 +526,10 @@ var A = {
|
|
|
522
526
|
onClick: () => F.weather ? B() : V(G("farm")),
|
|
523
527
|
className: "inline-flex min-h-[40px] items-center gap-2 rounded-md border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
524
528
|
children: F.weather ? W("healthybowl.home.weatherCard.error.retry", "Try again") : W("healthybowl.home.weatherCard.empty.action", "Set farm location")
|
|
525
|
-
})
|
|
529
|
+
}),
|
|
530
|
+
kind: F.weather ? "error" : "first-use",
|
|
531
|
+
glassIllustration: "weather",
|
|
532
|
+
size: "panel"
|
|
526
533
|
}),
|
|
527
534
|
J.forecast.length > 0 && /* @__PURE__ */ D("div", {
|
|
528
535
|
className: "grid grid-cols-4 gap-2 border-t border-border-subtle pt-3",
|
|
@@ -102,7 +102,8 @@ var j = "all", M = () => {
|
|
|
102
102
|
z && R.length === 0 ? /* @__PURE__ */ O(o, {}) : B && R.length === 0 ? /* @__PURE__ */ O(i, { onRetry: () => se() }) : Q.length === 0 ? /* @__PURE__ */ O(r, {
|
|
103
103
|
illustration: "empty-files",
|
|
104
104
|
title: M("healthybowl.agriInputs.empty.title", "No agri-inputs to show"),
|
|
105
|
-
description: M("healthybowl.agriInputs.empty.description", "No products in this category yet. Check back soon — suppliers list new inputs from the Seller Portal.")
|
|
105
|
+
description: M("healthybowl.agriInputs.empty.description", "No products in this category yet. Check back soon — suppliers list new inputs from the Seller Portal."),
|
|
106
|
+
glassIllustration: "box"
|
|
106
107
|
}) : /* @__PURE__ */ O("div", {
|
|
107
108
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
108
109
|
children: Q.map((e) => /* @__PURE__ */ k("div", {
|
|
@@ -148,7 +148,8 @@ var x = () => {
|
|
|
148
148
|
}) : P.length === 0 ? /* @__PURE__ */ h(n, {
|
|
149
149
|
icon: /* @__PURE__ */ h(u, { className: "h-6 w-6" }),
|
|
150
150
|
title: t("healthybowl.ai.decisions.empty.title", "Nothing here yet"),
|
|
151
|
-
description: O === "PROPOSED" ? t("healthybowl.ai.decisions.empty.proposals", "Run a check above. If a field has no recent probe reading, or the farm has no location set, the engine will say so rather than guess.") : t("healthybowl.ai.decisions.empty.other", "No decisions in this state.")
|
|
151
|
+
description: O === "PROPOSED" ? t("healthybowl.ai.decisions.empty.proposals", "Run a check above. If a field has no recent probe reading, or the farm has no location set, the engine will say so rather than guess.") : t("healthybowl.ai.decisions.empty.other", "No decisions in this state."),
|
|
152
|
+
glassIllustration: "assistant"
|
|
152
153
|
}) : /* @__PURE__ */ h("div", {
|
|
153
154
|
className: "space-y-4",
|
|
154
155
|
children: P.map((e) => /* @__PURE__ */ h(S, {
|
|
@@ -125,7 +125,9 @@ var M = (e) => new Date(e).toLocaleTimeString(f(), {
|
|
|
125
125
|
variant: "outline",
|
|
126
126
|
onClick: t,
|
|
127
127
|
children: [/* @__PURE__ */ k(w, { className: "me-1.5 h-4 w-4" }), n("healthybowl.attention.clear.refresh", "Check again")]
|
|
128
|
-
})
|
|
128
|
+
}),
|
|
129
|
+
kind: "all-done",
|
|
130
|
+
size: "panel"
|
|
129
131
|
}), /* @__PURE__ */ A("div", {
|
|
130
132
|
className: "mt-6 border-t border-border-subtle pt-5",
|
|
131
133
|
children: [/* @__PURE__ */ k("p", {
|
|
@@ -71,7 +71,8 @@ function j() {
|
|
|
71
71
|
M.length === 0 ? I.analytics ? /* @__PURE__ */ k(i, {}) : /* @__PURE__ */ k(r, {
|
|
72
72
|
illustration: "empty-data",
|
|
73
73
|
title: j("healthybowl.analytics.dashboard.emptyState.title", "No analytics yet"),
|
|
74
|
-
description: j("healthybowl.analytics.dashboard.emptyState.description", "Key performance indicators will appear here once farm data has been recorded.")
|
|
74
|
+
description: j("healthybowl.analytics.dashboard.emptyState.description", "Key performance indicators will appear here once farm data has been recorded."),
|
|
75
|
+
glassIllustration: "charts"
|
|
75
76
|
}) : /* @__PURE__ */ k("div", {
|
|
76
77
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
77
78
|
children: M.slice(0, 3).map((e) => /* @__PURE__ */ k(n, {
|
|
@@ -93,7 +93,8 @@ function D() {
|
|
|
93
93
|
v.length === 0 ? S.analytics ? /* @__PURE__ */ w(i, {}) : /* @__PURE__ */ w(r, {
|
|
94
94
|
illustration: "empty-data",
|
|
95
95
|
title: h("healthybowl.analytics.overview.kpis.empty.title", "No metrics yet"),
|
|
96
|
-
description: h("healthybowl.analytics.overview.kpis.empty.description", "Key performance metrics will appear here once your farm has activity to report.")
|
|
96
|
+
description: h("healthybowl.analytics.overview.kpis.empty.description", "Key performance metrics will appear here once your farm has activity to report."),
|
|
97
|
+
glassIllustration: "charts"
|
|
97
98
|
}) : /* @__PURE__ */ w("div", {
|
|
98
99
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
99
100
|
children: v.map((e, t) => /* @__PURE__ */ w(n, {
|
|
@@ -170,7 +171,9 @@ function D() {
|
|
|
170
171
|
children: b.length === 0 ? /* @__PURE__ */ w(r, {
|
|
171
172
|
illustration: "empty-data",
|
|
172
173
|
title: h("healthybowl.analytics.overview.cropChart.empty.title", "No crop data yet"),
|
|
173
|
-
description: h("healthybowl.analytics.overview.cropChart.empty.description", "Crop distribution will appear here once crops are added.")
|
|
174
|
+
description: h("healthybowl.analytics.overview.cropChart.empty.description", "Crop distribution will appear here once crops are added."),
|
|
175
|
+
glassIllustration: "charts",
|
|
176
|
+
size: "panel"
|
|
174
177
|
}) : /* @__PURE__ */ w("div", {
|
|
175
178
|
className: "space-y-3 py-2",
|
|
176
179
|
children: b.map((e) => /* @__PURE__ */ T("div", {
|
|
@@ -252,7 +252,8 @@ function L() {
|
|
|
252
252
|
children: k("healthybowl.common.loading", "Loading…")
|
|
253
253
|
}) : $.length === 0 ? /* @__PURE__ */ h(a, {
|
|
254
254
|
title: k("healthybowl.analytics.export.emptyState.title", "No exports yet"),
|
|
255
|
-
description: k("healthybowl.analytics.export.emptyState.description", "Create an export above — it will appear here once it's ready.")
|
|
255
|
+
description: k("healthybowl.analytics.export.emptyState.description", "Create an export above — it will appear here once it's ready."),
|
|
256
|
+
glassIllustration: "files"
|
|
256
257
|
}) : /* @__PURE__ */ h(r, {
|
|
257
258
|
columns: ce,
|
|
258
259
|
data: $,
|
|
@@ -39,7 +39,8 @@ function _() {
|
|
|
39
39
|
}) : l.length === 0 ? f.analytics ? /* @__PURE__ */ p(r, {}) : /* @__PURE__ */ p(n, {
|
|
40
40
|
illustration: "empty-notifications",
|
|
41
41
|
title: c("healthybowl.analytics.insights.emptyState.title", "Nothing notable yet"),
|
|
42
|
-
description: c("healthybowl.analytics.insights.emptyState.description", "Insights compare this month against last, so they appear once you have two months of transactions or harvests recorded. Nothing stands out right now.")
|
|
42
|
+
description: c("healthybowl.analytics.insights.emptyState.description", "Insights compare this month against last, so they appear once you have two months of transactions or harvests recorded. Nothing stands out right now."),
|
|
43
|
+
glassIllustration: "charts"
|
|
43
44
|
}) : /* @__PURE__ */ p("div", {
|
|
44
45
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
45
46
|
children: l.map((e) => /* @__PURE__ */ p("div", {
|
|
@@ -150,7 +150,8 @@ function M() {
|
|
|
150
150
|
}) : N.length === 0 ? F.analytics ? /* @__PURE__ */ S(a, {}) : /* @__PURE__ */ S(i, {
|
|
151
151
|
illustration: "empty-files",
|
|
152
152
|
title: M("healthybowl.analytics.reports.emptyState.title", "No reports yet"),
|
|
153
|
-
description: M("healthybowl.analytics.reports.emptyState.description", "Generated farm reports will appear here once they're available.")
|
|
153
|
+
description: M("healthybowl.analytics.reports.emptyState.description", "Generated farm reports will appear here once they're available."),
|
|
154
|
+
glassIllustration: "documents"
|
|
154
155
|
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(n, {
|
|
155
156
|
searchValue: V,
|
|
156
157
|
onSearchChange: H,
|