@burdenoff/microfe-healthybowl 2026.903.21 → 2026.903.22
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/components/assistant/AssistantChatArea.js +7 -9
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoot.js +56 -57
- package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoutes.js +36 -48
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -1
- package/dist/healthybowl/components/PageLayout.js +10 -11
- package/dist/healthybowl/components/PageLayout.js.map +1 -1
- package/dist/healthybowl/context/HealthyBowlContext.js +7 -7
- package/dist/healthybowl/context/HealthyBowlContext.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js +141 -157
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlData.js +0 -18
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js +37 -52
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js +78 -135
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js.map +1 -1
- package/dist/healthybowl/hooks/useIrrigationAutomation.js +1 -1
- package/dist/healthybowl/hooks/useIrrigationAutomation.js.map +1 -1
- package/dist/healthybowl/hooks/useSuccessionPlanning.js +1 -1
- package/dist/healthybowl/hooks/useSuccessionPlanning.js.map +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js.map +1 -1
- package/dist/healthybowl/offline/OfflineStatusPill.js +21 -40
- package/dist/healthybowl/offline/OfflineStatusPill.js.map +1 -1
- package/dist/healthybowl/offline/OfflineSyncProvider.js +130 -153
- package/dist/healthybowl/offline/OfflineSyncProvider.js.map +1 -1
- package/dist/healthybowl/offline/graphql.js.map +1 -1
- package/dist/healthybowl/offline/store.js +1 -1
- package/dist/healthybowl/offline/syncEngine.js +1 -2
- package/dist/healthybowl/offline/syncEngine.js.map +1 -1
- package/dist/healthybowl/offline/types.js.map +1 -1
- package/dist/healthybowl/pages/GettingStartedPage.js +0 -1
- package/dist/healthybowl/pages/GettingStartedPage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/InsightsPage.js +2 -2
- package/dist/healthybowl/pages/analytics/InsightsPage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/ReportsPage.js +99 -136
- package/dist/healthybowl/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +162 -204
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +178 -196
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +141 -142
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +0 -2
- package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +272 -316
- package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +0 -6
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +846 -871
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +334 -376
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +188 -415
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/labels.js +2 -10
- package/dist/healthybowl/pages/distribution/labels.js.map +1 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js +0 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
- package/dist/healthybowl/pages/field-capture/CaptureObservationForm.js +8 -8
- package/dist/healthybowl/pages/fields/FieldMapPage.js +0 -2
- package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js +107 -92
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +188 -228
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +191 -261
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js +14 -14
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js +307 -338
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +102 -126
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js +215 -257
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js +0 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js +0 -4
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +9 -8
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +419 -520
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +130 -129
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +237 -285
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -1
- package/dist/healthybowl/utils/plantingCapacity.js +10 -10
- package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +42 -33
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +47 -44
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +86 -74
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/services/assistantApi.js +31 -60
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/utils/pageContext.js +1 -15
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
- package/dist/healthybowl/hooks/useAgronomyDecisions.js +0 -79
- package/dist/healthybowl/hooks/useAgronomyDecisions.js.map +0 -1
- package/dist/healthybowl/hooks/useAnalyticsReports.js +0 -173
- package/dist/healthybowl/hooks/useAnalyticsReports.js.map +0 -1
- package/dist/healthybowl/hooks/useComplianceExports.js +0 -74
- package/dist/healthybowl/hooks/useComplianceExports.js.map +0 -1
- package/dist/healthybowl/hooks/useConsultationPayments.js +0 -59
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +0 -1
- package/dist/healthybowl/hooks/usePlantingEstimate.js +0 -88
- package/dist/healthybowl/hooks/usePlantingEstimate.js.map +0 -1
- package/dist/healthybowl/offline/HeaderOfflinePill.js +0 -28
- package/dist/healthybowl/offline/HeaderOfflinePill.js.map +0 -1
- package/dist/healthybowl/offline/captureCache.js +0 -30
- package/dist/healthybowl/offline/captureCache.js.map +0 -1
- package/dist/healthybowl/offline/headerSlot.js +0 -24
- package/dist/healthybowl/offline/headerSlot.js.map +0 -1
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js +0 -287
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +0 -291
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +0 -300
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js +0 -135
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +0 -49
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +0 -48
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +0 -54
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +0 -1
- package/dist/healthybowl/pages/livestock/PedigreeTree.js +0 -154
- package/dist/healthybowl/pages/livestock/PedigreeTree.js.map +0 -1
- package/dist/healthybowl/pages/livestock/eidTagInput.js +0 -39
- package/dist/healthybowl/pages/livestock/eidTagInput.js.map +0 -1
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js +0 -68
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js.map +0 -1
- package/dist/healthybowl/pages/weather/alertDelivery.js +0 -105
- package/dist/healthybowl/pages/weather/alertDelivery.js.map +0 -1
- package/dist/healthybowl/utils/icsInspection.js +0 -18
- package/dist/healthybowl/utils/icsInspection.js.map +0 -1
|
@@ -8,22 +8,20 @@ import { ToastContainer as o } from "../../components/Toast.js";
|
|
|
8
8
|
import { Breadcrumbs as s } from "../../components/Breadcrumbs.js";
|
|
9
9
|
import { PageLoader as c } from "../../components/PageLoader.js";
|
|
10
10
|
import { Modal as l } from "../../components/Modal.js";
|
|
11
|
-
import { useToast as
|
|
11
|
+
import { useToast as u } from "../../hooks/useToast.js";
|
|
12
12
|
import "../../components/index.js";
|
|
13
|
-
import { useHealthyBowlData as
|
|
14
|
-
import { useOfflineSync as
|
|
15
|
-
import { useSchemeEligibility as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
13
|
+
import { useHealthyBowlData as d } from "../../hooks/useHealthyBowlData.js";
|
|
14
|
+
import { useOfflineSync as re } from "../../offline/OfflineSyncProvider.js";
|
|
15
|
+
import { useSchemeEligibility as ie } from "../../hooks/useSchemeEligibility.js";
|
|
16
|
+
import { getEffectiveSchemeStatus as f, isAcceptingSchemeApplications as ae } from "./schemeDiscoveryFilters.js";
|
|
17
|
+
import { useMemo as p, useState as m } from "react";
|
|
18
|
+
import { useI18n as oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
+
import { AlertCircle as se, ArrowLeft as ce, CalendarDays as le, CheckCircle2 as h, ChevronDown as ue, ChevronUp as g, Circle as _, Clock as v, DollarSign as y, HelpCircle as b, Landmark as x, Upload as de, XCircle as fe } from "lucide-react";
|
|
20
|
+
import { useNavigate as pe, useParams as me } from "react-router";
|
|
21
|
+
import { Fragment as he, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
23
22
|
import { Button as w, GlassCard as T } from "@burdenoff/fe-libs/ui";
|
|
24
|
-
import { useSaveToFiles as E } from "@burdenoff/fe-libs/storage";
|
|
25
23
|
//#region src/healthybowl/pages/government-schemes/SchemeDetailsPage.tsx
|
|
26
|
-
var
|
|
24
|
+
var E = (e) => {
|
|
27
25
|
switch (e) {
|
|
28
26
|
case "open": return "success";
|
|
29
27
|
case "closing_soon": return "warning";
|
|
@@ -31,7 +29,7 @@ var D = (e) => {
|
|
|
31
29
|
case "expired": return "error";
|
|
32
30
|
default: return "default";
|
|
33
31
|
}
|
|
34
|
-
},
|
|
32
|
+
}, D = (e) => {
|
|
35
33
|
switch (e) {
|
|
36
34
|
case "subsidy": return "success";
|
|
37
35
|
case "credit": return "info";
|
|
@@ -41,90 +39,59 @@ var D = (e) => {
|
|
|
41
39
|
case "equipment": return "muted";
|
|
42
40
|
default: return "muted";
|
|
43
41
|
}
|
|
44
|
-
},
|
|
45
|
-
let { governmentSchemes:
|
|
42
|
+
}, O = () => {
|
|
43
|
+
let { governmentSchemes: O, errors: k, loadings: A, refetch: j } = d(), { queueSchemeApplication: M } = re(), { schemeId: N } = me(), { eligibility: P } = ie(N), F = pe(), { buildPath: I } = ee(), { toasts: L, toast: R, dismiss: ge } = u(), { t: z } = oe(), _e = p(() => [
|
|
46
44
|
{
|
|
47
|
-
question:
|
|
48
|
-
answer:
|
|
45
|
+
question: z("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.question", "How long does the application review process take?"),
|
|
46
|
+
answer: z("healthybowl.governmentSchemes.schemeDetails.faq.reviewTime.answer", "Typically, applications are reviewed within 2-4 weeks of submission. You will receive status updates via email and on the Application Tracking page.")
|
|
49
47
|
},
|
|
50
48
|
{
|
|
51
|
-
question:
|
|
52
|
-
answer:
|
|
49
|
+
question: z("healthybowl.governmentSchemes.schemeDetails.faq.documents.question", "What documents do I need to submit?"),
|
|
50
|
+
answer: z("healthybowl.governmentSchemes.schemeDetails.faq.documents.answer", "Required documents include farm ownership or lease proof, valid ID, bank account details, organic certification (if applicable), and any scheme-specific documents mentioned in the eligibility criteria.")
|
|
53
51
|
},
|
|
54
52
|
{
|
|
55
|
-
question:
|
|
56
|
-
answer:
|
|
53
|
+
question: z("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.question", "Can I apply if my organic certification is pending?"),
|
|
54
|
+
answer: z("healthybowl.governmentSchemes.schemeDetails.faq.pendingCertification.answer", "For schemes requiring organic certification, you may apply during the transition period. Provide your transition plan and any in-process certification documentation.")
|
|
57
55
|
},
|
|
58
56
|
{
|
|
59
|
-
question:
|
|
60
|
-
answer:
|
|
57
|
+
question: z("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.question", "How will the benefits be disbursed?"),
|
|
58
|
+
answer: z("healthybowl.governmentSchemes.schemeDetails.faq.disbursement.answer", "Approved benefits are transferred directly to your registered bank account. The disbursement typically occurs within 30 days of approval. You will receive a notification when the transfer is initiated.")
|
|
61
59
|
}
|
|
62
|
-
], [
|
|
60
|
+
], [z]), [B, ve] = m(null), [ye, V] = m(!1), [H, U] = m(!1), [W, G] = m({
|
|
63
61
|
applicantName: "",
|
|
64
62
|
farmName: "",
|
|
65
63
|
farmSize: "",
|
|
66
64
|
farmLocation: "",
|
|
67
65
|
declaration: !1
|
|
68
|
-
}), J =
|
|
66
|
+
}), [K, q] = m(() => /* @__PURE__ */ new Set()), J = O.find((e) => e.id === N), Y = p(() => J ? O.filter((e) => e.id !== J.id && e.category === J.category) : [], [O, J]);
|
|
69
67
|
if (!J) return /* @__PURE__ */ S(i, {
|
|
70
|
-
title:
|
|
71
|
-
description:
|
|
72
|
-
children:
|
|
73
|
-
icon: /* @__PURE__ */ S(
|
|
74
|
-
title:
|
|
75
|
-
description:
|
|
68
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.notFound.title", "Scheme Not Found"),
|
|
69
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.notFound.description", "The requested scheme could not be found"),
|
|
70
|
+
children: A.government ? /* @__PURE__ */ S(c, {}) : k.government ? /* @__PURE__ */ S(ne, { onRetry: j }) : /* @__PURE__ */ S(te, {
|
|
71
|
+
icon: /* @__PURE__ */ S(se, { className: "h-12 w-12" }),
|
|
72
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.title", "Scheme Not Found"),
|
|
73
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.notFound.emptyState.description", "The government scheme you are looking for does not exist or may have been removed."),
|
|
76
74
|
action: /* @__PURE__ */ S(w, {
|
|
77
|
-
onClick: () =>
|
|
78
|
-
children:
|
|
75
|
+
onClick: () => F(I("government-schemes/discover")),
|
|
76
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.notFound.browseSchemes", "Browse Schemes")
|
|
79
77
|
})
|
|
80
78
|
})
|
|
81
79
|
});
|
|
82
|
-
let
|
|
80
|
+
let be = J.eligibility ?? [], X = (() => {
|
|
83
81
|
if (!J.applicationDeadline) return null;
|
|
84
82
|
let e = (/* @__PURE__ */ new Date(`${J.applicationDeadline.slice(0, 10)}T12:00:00`)).getTime(), t = (/* @__PURE__ */ new Date(`${r()}T12:00:00`)).getTime();
|
|
85
83
|
return Math.max(0, Math.round((e - t) / (1e3 * 60 * 60 * 24)));
|
|
86
|
-
})(), Z =
|
|
84
|
+
})(), Z = f(J, r()), Q = ae(J, r()), $ = () => {
|
|
87
85
|
if (!Q) {
|
|
88
86
|
let e = Z === "expired";
|
|
89
|
-
|
|
90
|
-
title: e ?
|
|
91
|
-
description: e ?
|
|
87
|
+
R({
|
|
88
|
+
title: e ? z("healthybowl.governmentSchemes.schemeDetails.toast.schemeExpired.title", "Scheme Expired") : z("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.title", "Scheme Closed"),
|
|
89
|
+
description: e ? z("healthybowl.governmentSchemes.schemeDetails.toast.schemeExpired.message", "The application deadline for this scheme has passed.") : z("healthybowl.governmentSchemes.schemeDetails.toast.schemeClosed.message", "This scheme is no longer accepting applications."),
|
|
92
90
|
variant: "error"
|
|
93
91
|
});
|
|
94
92
|
return;
|
|
95
93
|
}
|
|
96
|
-
|
|
97
|
-
}, je = async (e, t) => {
|
|
98
|
-
F(e);
|
|
99
|
-
try {
|
|
100
|
-
let n = await Ce({
|
|
101
|
-
source: {
|
|
102
|
-
kind: "blob",
|
|
103
|
-
filename: t.name,
|
|
104
|
-
mimeType: t.type || "application/octet-stream",
|
|
105
|
-
getBlob: async () => ({
|
|
106
|
-
blob: t,
|
|
107
|
-
filename: t.name,
|
|
108
|
-
mimeType: t.type || void 0
|
|
109
|
-
})
|
|
110
|
-
},
|
|
111
|
-
folderPath: "/HealthyBowl/SchemeApplication"
|
|
112
|
-
});
|
|
113
|
-
P((r) => de(r, {
|
|
114
|
-
slot: e,
|
|
115
|
-
fileId: n.id,
|
|
116
|
-
fileName: t.name,
|
|
117
|
-
uploadedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
118
|
-
}));
|
|
119
|
-
} catch (e) {
|
|
120
|
-
B({
|
|
121
|
-
title: V("healthybowl.governmentSchemes.schemeDetails.toast.uploadFailed.title", "Upload failed"),
|
|
122
|
-
description: e instanceof Error ? e.message : String(e),
|
|
123
|
-
variant: "error"
|
|
124
|
-
});
|
|
125
|
-
} finally {
|
|
126
|
-
F(null);
|
|
127
|
-
}
|
|
94
|
+
V(!0);
|
|
128
95
|
};
|
|
129
96
|
return /* @__PURE__ */ C(i, {
|
|
130
97
|
title: J.title,
|
|
@@ -132,45 +99,45 @@ var D = (e) => {
|
|
|
132
99
|
actions: /* @__PURE__ */ C(w, {
|
|
133
100
|
variant: "ghost",
|
|
134
101
|
size: "sm",
|
|
135
|
-
onClick: () =>
|
|
102
|
+
onClick: () => F(-1),
|
|
136
103
|
className: "gap-1 text-text-secondary hover:text-text-primary",
|
|
137
104
|
children: [
|
|
138
|
-
/* @__PURE__ */ S(
|
|
105
|
+
/* @__PURE__ */ S(ce, { className: "h-4 w-4" }),
|
|
139
106
|
" ",
|
|
140
|
-
|
|
107
|
+
z("healthybowl.common.back", "Back")
|
|
141
108
|
]
|
|
142
109
|
}),
|
|
143
110
|
purpose: "Everything you need to decide on one government scheme — what it offers, who qualifies, what documents you'll need, and how to apply. Read it through, then apply right here if it fits your farm.",
|
|
144
111
|
nextSteps: [
|
|
145
112
|
{
|
|
146
113
|
id: "apply",
|
|
147
|
-
label:
|
|
148
|
-
description:
|
|
114
|
+
label: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.label", "Apply for this scheme"),
|
|
115
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.apply.desc", "Start your application once you’ve checked the eligibility."),
|
|
149
116
|
onClick: $
|
|
150
117
|
},
|
|
151
118
|
{
|
|
152
119
|
id: "track",
|
|
153
|
-
label:
|
|
154
|
-
description:
|
|
155
|
-
href:
|
|
120
|
+
label: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.label", "Track your applications"),
|
|
121
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.track.desc", "Follow the status of schemes you’ve already applied to."),
|
|
122
|
+
href: I("government-schemes/applications")
|
|
156
123
|
},
|
|
157
124
|
{
|
|
158
125
|
id: "discover",
|
|
159
|
-
label:
|
|
160
|
-
description:
|
|
161
|
-
href:
|
|
126
|
+
label: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.label", "Find more schemes"),
|
|
127
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.nextSteps.discover.desc", "Browse other programs your farm may qualify for."),
|
|
128
|
+
href: I("government-schemes/discover")
|
|
162
129
|
}
|
|
163
130
|
],
|
|
164
131
|
nextStepsKey: "healthybowl-scheme-detail",
|
|
165
132
|
children: [
|
|
166
133
|
/* @__PURE__ */ S(s, { items: [
|
|
167
134
|
{
|
|
168
|
-
label:
|
|
169
|
-
href:
|
|
135
|
+
label: z("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.governmentSchemes", "Government Schemes"),
|
|
136
|
+
href: I("government-schemes")
|
|
170
137
|
},
|
|
171
138
|
{
|
|
172
|
-
label:
|
|
173
|
-
href:
|
|
139
|
+
label: z("healthybowl.governmentSchemes.schemeDetails.breadcrumbs.schemeDiscovery", "Scheme Discovery"),
|
|
140
|
+
href: I("government-schemes/discover")
|
|
174
141
|
},
|
|
175
142
|
{ label: J.title }
|
|
176
143
|
] }),
|
|
@@ -184,7 +151,7 @@ var D = (e) => {
|
|
|
184
151
|
className: "flex items-center gap-3",
|
|
185
152
|
children: [/* @__PURE__ */ S("div", {
|
|
186
153
|
className: "rounded-md bg-bg-sunken p-2",
|
|
187
|
-
children: /* @__PURE__ */ S(
|
|
154
|
+
children: /* @__PURE__ */ S(x, { className: "h-6 w-6 text-text-secondary" })
|
|
188
155
|
}), /* @__PURE__ */ C("div", { children: [
|
|
189
156
|
/* @__PURE__ */ S("h2", {
|
|
190
157
|
className: "text-lg font-semibold text-text-primary",
|
|
@@ -198,10 +165,10 @@ var D = (e) => {
|
|
|
198
165
|
className: "mt-2 flex items-center gap-2",
|
|
199
166
|
children: [/* @__PURE__ */ S(a, {
|
|
200
167
|
label: Z.replace(/_/g, " "),
|
|
201
|
-
variant:
|
|
168
|
+
variant: E(Z)
|
|
202
169
|
}), /* @__PURE__ */ S(a, {
|
|
203
170
|
label: J.category,
|
|
204
|
-
variant:
|
|
171
|
+
variant: D(J.category)
|
|
205
172
|
})]
|
|
206
173
|
})
|
|
207
174
|
] })]
|
|
@@ -213,9 +180,9 @@ var D = (e) => {
|
|
|
213
180
|
className: "rounded-md bg-bg-sunken p-4",
|
|
214
181
|
children: [/* @__PURE__ */ C("div", {
|
|
215
182
|
className: "flex items-center gap-2",
|
|
216
|
-
children: [/* @__PURE__ */ S(
|
|
183
|
+
children: [/* @__PURE__ */ S(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
|
|
217
184
|
className: "text-xs text-text-secondary",
|
|
218
|
-
children:
|
|
185
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.metrics.maxAmount.label", "Maximum Amount")
|
|
219
186
|
})]
|
|
220
187
|
}), /* @__PURE__ */ S("p", {
|
|
221
188
|
className: "mt-1 text-xl font-bold text-text-primary",
|
|
@@ -226,9 +193,9 @@ var D = (e) => {
|
|
|
226
193
|
className: "rounded-md bg-bg-sunken p-4",
|
|
227
194
|
children: [/* @__PURE__ */ C("div", {
|
|
228
195
|
className: "flex items-center gap-2",
|
|
229
|
-
children: [/* @__PURE__ */ S(
|
|
196
|
+
children: [/* @__PURE__ */ S(le, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
|
|
230
197
|
className: "text-xs text-text-secondary",
|
|
231
|
-
children:
|
|
198
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.metrics.deadline.label", "Application Deadline")
|
|
232
199
|
})]
|
|
233
200
|
}), /* @__PURE__ */ S("p", {
|
|
234
201
|
className: "mt-1 text-xl font-bold text-text-primary",
|
|
@@ -239,13 +206,13 @@ var D = (e) => {
|
|
|
239
206
|
className: e("rounded-md p-4", X <= 30 ? "bg-bg-sunken" : "bg-bg-surface"),
|
|
240
207
|
children: [/* @__PURE__ */ C("div", {
|
|
241
208
|
className: "flex items-center gap-2",
|
|
242
|
-
children: [/* @__PURE__ */ S(
|
|
209
|
+
children: [/* @__PURE__ */ S(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("p", {
|
|
243
210
|
className: "text-xs text-text-secondary",
|
|
244
|
-
children:
|
|
211
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.label", "Days Remaining")
|
|
245
212
|
})]
|
|
246
213
|
}), /* @__PURE__ */ S("p", {
|
|
247
214
|
className: "mt-1 text-xl font-bold text-text-primary",
|
|
248
|
-
children: X === 1 ?
|
|
215
|
+
children: X === 1 ? z("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOne", "{{count}} day", { count: X }) : z("healthybowl.governmentSchemes.schemeDetails.metrics.daysRemaining.valueOther", "{{count}} days", { count: X })
|
|
249
216
|
})]
|
|
250
217
|
})
|
|
251
218
|
]
|
|
@@ -255,7 +222,7 @@ var D = (e) => {
|
|
|
255
222
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
256
223
|
children: [/* @__PURE__ */ S("h3", {
|
|
257
224
|
className: "text-sm font-semibold text-text-primary",
|
|
258
|
-
children:
|
|
225
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.description.title", "Description")
|
|
259
226
|
}), /* @__PURE__ */ S("p", {
|
|
260
227
|
className: "mt-2 text-sm leading-relaxed text-text-secondary",
|
|
261
228
|
children: J.description
|
|
@@ -265,7 +232,7 @@ var D = (e) => {
|
|
|
265
232
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
266
233
|
children: [/* @__PURE__ */ S("h3", {
|
|
267
234
|
className: "text-sm font-semibold text-text-primary",
|
|
268
|
-
children:
|
|
235
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.benefits.title", "Benefits")
|
|
269
236
|
}), /* @__PURE__ */ S("p", {
|
|
270
237
|
className: "mt-2 text-sm leading-relaxed text-text-secondary",
|
|
271
238
|
children: J.benefits
|
|
@@ -276,37 +243,37 @@ var D = (e) => {
|
|
|
276
243
|
children: [
|
|
277
244
|
/* @__PURE__ */ S("h3", {
|
|
278
245
|
className: "text-sm font-semibold text-text-primary",
|
|
279
|
-
children:
|
|
246
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsTitle", "Eligibility Requirements")
|
|
280
247
|
}),
|
|
281
248
|
/* @__PURE__ */ S("p", {
|
|
282
249
|
className: "mt-1 text-xs text-text-secondary",
|
|
283
|
-
children:
|
|
250
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.requirementsHelper", "Review each requirement and confirm you qualify before applying.")
|
|
284
251
|
}),
|
|
285
|
-
|
|
286
|
-
className: `mt-4 rounded-md border p-3 ${
|
|
252
|
+
P && P.criteria.length > 0 && /* @__PURE__ */ C("div", {
|
|
253
|
+
className: `mt-4 rounded-md border p-3 ${P.outcome === "ELIGIBLE" ? "border-success/40 bg-success/10" : P.outcome === "NOT_ELIGIBLE" ? "border-status-error-bg/40 bg-status-error-bg/10" : "border-border-subtle bg-bg-sunken/50"}`,
|
|
287
254
|
children: [/* @__PURE__ */ S("p", {
|
|
288
255
|
className: "text-sm font-medium text-text-primary",
|
|
289
|
-
children:
|
|
256
|
+
children: P.summary
|
|
290
257
|
}), /* @__PURE__ */ S("p", {
|
|
291
258
|
className: "mt-1 text-xs text-text-secondary",
|
|
292
|
-
children:
|
|
259
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.eligibility.checkedAgainstFarm", "Checked against your farm records. Always confirm against the scheme’s own wording before applying.")
|
|
293
260
|
})]
|
|
294
261
|
}),
|
|
295
262
|
/* @__PURE__ */ S("div", {
|
|
296
263
|
className: "mt-4 space-y-3",
|
|
297
|
-
children:
|
|
264
|
+
children: P && P.criteria.length > 0 ? P.criteria.map((e) => /* @__PURE__ */ C("div", {
|
|
298
265
|
className: "flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
|
|
299
|
-
children: [e.verdict === "MET" ? /* @__PURE__ */ S(
|
|
266
|
+
children: [e.verdict === "MET" ? /* @__PURE__ */ S(h, {
|
|
300
267
|
role: "img",
|
|
301
|
-
"aria-label":
|
|
268
|
+
"aria-label": z("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.met", "Met"),
|
|
302
269
|
className: "mt-0.5 h-4 w-4 shrink-0 text-success"
|
|
303
|
-
}) : e.verdict === "UNMET" ? /* @__PURE__ */ S(
|
|
270
|
+
}) : e.verdict === "UNMET" ? /* @__PURE__ */ S(fe, {
|
|
304
271
|
role: "img",
|
|
305
|
-
"aria-label":
|
|
272
|
+
"aria-label": z("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unmet", "Not met"),
|
|
306
273
|
className: "mt-0.5 h-4 w-4 shrink-0 text-status-error-bg"
|
|
307
|
-
}) : /* @__PURE__ */ S(
|
|
274
|
+
}) : /* @__PURE__ */ S(b, {
|
|
308
275
|
role: "img",
|
|
309
|
-
"aria-label":
|
|
276
|
+
"aria-label": z("healthybowl.governmentSchemes.schemeDetails.eligibility.verdict.unknown", "Needs checking"),
|
|
310
277
|
className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary"
|
|
311
278
|
}), /* @__PURE__ */ C("div", {
|
|
312
279
|
className: "min-w-0",
|
|
@@ -318,9 +285,9 @@ var D = (e) => {
|
|
|
318
285
|
children: e.reason
|
|
319
286
|
}) : null]
|
|
320
287
|
})]
|
|
321
|
-
}, e.id)) :
|
|
288
|
+
}, e.id)) : be.map((e) => /* @__PURE__ */ C("div", {
|
|
322
289
|
className: "flex items-center gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
|
|
323
|
-
children: [/* @__PURE__ */ S(
|
|
290
|
+
children: [/* @__PURE__ */ S(_, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("span", {
|
|
324
291
|
className: "text-sm text-text-primary",
|
|
325
292
|
children: e
|
|
326
293
|
})]
|
|
@@ -335,15 +302,15 @@ var D = (e) => {
|
|
|
335
302
|
children: [/* @__PURE__ */ S("h3", {
|
|
336
303
|
id: "scheme-required-documents",
|
|
337
304
|
className: "text-sm font-semibold text-text-primary",
|
|
338
|
-
children:
|
|
305
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.documents.title", "Required Documents")
|
|
339
306
|
}), J.requiredDocuments.length === 0 ? /* @__PURE__ */ S("p", {
|
|
340
307
|
className: "mt-2 text-sm text-text-secondary",
|
|
341
|
-
children:
|
|
308
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.sections.documents.none", "The scheme provider has not listed any required documents.")
|
|
342
309
|
}) : /* @__PURE__ */ S("ul", {
|
|
343
310
|
className: "mt-3 space-y-2",
|
|
344
311
|
children: J.requiredDocuments.map((e) => /* @__PURE__ */ C("li", {
|
|
345
312
|
className: "flex items-start gap-2 text-sm text-text-secondary",
|
|
346
|
-
children: [/* @__PURE__ */ S(
|
|
313
|
+
children: [/* @__PURE__ */ S(h, { className: "mt-0.5 h-4 w-4 shrink-0 text-success" }), /* @__PURE__ */ S("span", { children: e })]
|
|
347
314
|
}, e))
|
|
348
315
|
})]
|
|
349
316
|
}),
|
|
@@ -353,10 +320,10 @@ var D = (e) => {
|
|
|
353
320
|
className: "rounded-md border border-border-subtle bg-bg-sunken p-4",
|
|
354
321
|
children: [/* @__PURE__ */ S("p", {
|
|
355
322
|
className: "text-sm font-medium text-text-primary",
|
|
356
|
-
children: Z === "expired" ?
|
|
323
|
+
children: Z === "expired" ? z("healthybowl.governmentSchemes.schemeDetails.expired.title", "Application deadline has passed") : z("healthybowl.governmentSchemes.schemeDetails.closed.title", "Applications are closed")
|
|
357
324
|
}), /* @__PURE__ */ S("p", {
|
|
358
325
|
className: "mt-1 text-xs text-text-secondary",
|
|
359
|
-
children: Z === "expired" ?
|
|
326
|
+
children: Z === "expired" ? z("healthybowl.governmentSchemes.schemeDetails.expired.description", "This scheme has expired. You can still review its requirements and benefits.") : z("healthybowl.governmentSchemes.schemeDetails.closed.description", "This scheme is no longer accepting applications. You can still review its requirements and benefits.")
|
|
360
327
|
})]
|
|
361
328
|
}),
|
|
362
329
|
/* @__PURE__ */ C("div", {
|
|
@@ -364,28 +331,28 @@ var D = (e) => {
|
|
|
364
331
|
children: [/* @__PURE__ */ S(w, {
|
|
365
332
|
"data-testid": "scheme-apply-button",
|
|
366
333
|
onClick: $,
|
|
367
|
-
children:
|
|
334
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.actions.apply", "Apply for This Scheme")
|
|
368
335
|
}), /* @__PURE__ */ S(w, {
|
|
369
336
|
variant: "outline",
|
|
370
|
-
onClick: () =>
|
|
371
|
-
children:
|
|
337
|
+
onClick: () => F(I("government-schemes/discover")),
|
|
338
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.actions.backToSchemes", "Back to Schemes")
|
|
372
339
|
})]
|
|
373
340
|
}),
|
|
374
341
|
/* @__PURE__ */ C("div", {
|
|
375
342
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
376
343
|
children: [/* @__PURE__ */ S("h3", {
|
|
377
344
|
className: "text-sm font-semibold text-text-primary",
|
|
378
|
-
children:
|
|
345
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.faq.title", "Frequently Asked Questions")
|
|
379
346
|
}), /* @__PURE__ */ S("div", {
|
|
380
347
|
className: "mt-4 space-y-2",
|
|
381
|
-
children:
|
|
348
|
+
children: _e.map((e, t) => /* @__PURE__ */ C("div", {
|
|
382
349
|
className: "rounded-md border border-border-subtle",
|
|
383
350
|
children: [/* @__PURE__ */ C(w, {
|
|
384
351
|
variant: "ghost",
|
|
385
|
-
onClick: () =>
|
|
352
|
+
onClick: () => ve(B === t ? null : t),
|
|
386
353
|
className: "h-auto w-full justify-between whitespace-normal px-4 py-3 text-start font-medium text-text-primary",
|
|
387
|
-
children: [e.question, S(
|
|
388
|
-
}),
|
|
354
|
+
children: [e.question, S(B === t ? g : ue, { className: "h-4 w-4 shrink-0 text-text-secondary" })]
|
|
355
|
+
}), B === t && /* @__PURE__ */ S("div", {
|
|
389
356
|
className: "border-t border-border-subtle px-4 py-3 text-sm leading-relaxed text-text-secondary",
|
|
390
357
|
children: e.answer
|
|
391
358
|
})]
|
|
@@ -394,14 +361,14 @@ var D = (e) => {
|
|
|
394
361
|
}),
|
|
395
362
|
Y.length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
|
|
396
363
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
397
|
-
children:
|
|
364
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.related.title", "Related Schemes ({{category}})", { category: J.category })
|
|
398
365
|
}), /* @__PURE__ */ S("div", {
|
|
399
366
|
className: "grid gap-4 sm:grid-cols-2",
|
|
400
367
|
children: Y.map((e) => /* @__PURE__ */ C("button", {
|
|
401
368
|
type: "button",
|
|
402
|
-
onClick: () =>
|
|
369
|
+
onClick: () => F(I(`government-schemes/schemes/${e.id}`)),
|
|
403
370
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-start transition-colors hover:bg-bg-sunken/50",
|
|
404
|
-
children: [/* @__PURE__ */ S(
|
|
371
|
+
children: [/* @__PURE__ */ S(x, { className: "mt-0.5 h-5 w-5 shrink-0 text-text-secondary" }), /* @__PURE__ */ C("div", {
|
|
405
372
|
className: "flex-1",
|
|
406
373
|
children: [
|
|
407
374
|
/* @__PURE__ */ S("p", {
|
|
@@ -415,11 +382,11 @@ var D = (e) => {
|
|
|
415
382
|
/* @__PURE__ */ C("div", {
|
|
416
383
|
className: "mt-2 flex items-center gap-2",
|
|
417
384
|
children: [/* @__PURE__ */ S(a, {
|
|
418
|
-
label:
|
|
419
|
-
variant:
|
|
385
|
+
label: f(e, r()).replace(/_/g, " "),
|
|
386
|
+
variant: E(f(e, r()))
|
|
420
387
|
}), e.maxAmount && /* @__PURE__ */ S("span", {
|
|
421
388
|
className: "text-xs text-text-secondary",
|
|
422
|
-
children:
|
|
389
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.related.upTo", "Up to {{amount}}", { amount: t(e.maxAmount, e.currency) })
|
|
423
390
|
})]
|
|
424
391
|
})
|
|
425
392
|
]
|
|
@@ -427,173 +394,158 @@ var D = (e) => {
|
|
|
427
394
|
}, e.id))
|
|
428
395
|
})] }),
|
|
429
396
|
/* @__PURE__ */ S(l, {
|
|
430
|
-
open:
|
|
397
|
+
open: ye && Q,
|
|
431
398
|
onClose: () => {
|
|
432
|
-
|
|
399
|
+
H || V(!1);
|
|
433
400
|
},
|
|
434
|
-
title:
|
|
401
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.modal.title", "Apply for Scheme"),
|
|
435
402
|
description: J.title,
|
|
436
403
|
size: "lg",
|
|
437
|
-
footer: /* @__PURE__ */ C(
|
|
404
|
+
footer: /* @__PURE__ */ C(he, { children: [/* @__PURE__ */ S(w, {
|
|
438
405
|
variant: "outline",
|
|
439
|
-
onClick: () =>
|
|
440
|
-
disabled:
|
|
441
|
-
children:
|
|
406
|
+
onClick: () => V(!1),
|
|
407
|
+
disabled: H,
|
|
408
|
+
children: z("healthybowl.common.cancel", "Cancel")
|
|
442
409
|
}), /* @__PURE__ */ S(w, {
|
|
443
410
|
onClick: async () => {
|
|
444
411
|
if (!Q) {
|
|
445
|
-
|
|
412
|
+
V(!1), $();
|
|
446
413
|
return;
|
|
447
414
|
}
|
|
448
|
-
if (!
|
|
449
|
-
if (!
|
|
450
|
-
|
|
451
|
-
title:
|
|
452
|
-
description:
|
|
415
|
+
if (!H) {
|
|
416
|
+
if (!W.applicantName.trim() || !W.farmName.trim()) {
|
|
417
|
+
R({
|
|
418
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.title", "Required Fields Missing"),
|
|
419
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.toast.requiredFields.message", "Please fill in all required fields."),
|
|
453
420
|
variant: "error"
|
|
454
421
|
});
|
|
455
422
|
return;
|
|
456
423
|
}
|
|
457
|
-
if (!
|
|
458
|
-
|
|
459
|
-
title:
|
|
460
|
-
description:
|
|
424
|
+
if (!W.declaration) {
|
|
425
|
+
R({
|
|
426
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.title", "Declaration Required"),
|
|
427
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.toast.declarationRequired.message", "Please accept the declaration to proceed."),
|
|
461
428
|
variant: "error"
|
|
462
429
|
});
|
|
463
430
|
return;
|
|
464
431
|
}
|
|
465
|
-
|
|
466
|
-
let e = le(N).map((e) => V(e.labelKey, e.labelFallback)).join(", ");
|
|
467
|
-
B({
|
|
468
|
-
title: V("healthybowl.governmentSchemes.schemeDetails.toast.documentsRequired.title", "Documents required"),
|
|
469
|
-
description: V("healthybowl.governmentSchemes.schemeDetails.toast.documentsRequired.message", "Upload these before submitting: {{missing}}.", { missing: e }),
|
|
470
|
-
variant: "error"
|
|
471
|
-
});
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
G(!0);
|
|
432
|
+
U(!0);
|
|
475
433
|
try {
|
|
476
|
-
let e =
|
|
434
|
+
let e = J.requiredDocuments.filter((e) => K.has(e)).join(", ") || "none", t = [W.farmSize.trim(), W.farmLocation.trim()].filter(Boolean).join(", "), n = await M({
|
|
477
435
|
schemeId: J.id,
|
|
478
|
-
applicantName:
|
|
479
|
-
farmName:
|
|
436
|
+
applicantName: W.applicantName.trim(),
|
|
437
|
+
farmName: W.farmName.trim(),
|
|
480
438
|
declarationAccepted: !0,
|
|
481
|
-
notes: `Applicant: ${
|
|
482
|
-
documents: N.map((e) => ({
|
|
483
|
-
slot: e.slot,
|
|
484
|
-
fileId: e.fileId,
|
|
485
|
-
fileName: e.fileName,
|
|
486
|
-
uploadedAt: e.uploadedAt
|
|
487
|
-
}))
|
|
439
|
+
notes: `Applicant: ${W.applicantName.trim()}; Farm: ${W.farmName.trim()}${t ? ` (${t})` : ""}; Documents ready: ${e}`
|
|
488
440
|
}, J.title);
|
|
489
|
-
if (
|
|
490
|
-
|
|
491
|
-
title:
|
|
492
|
-
description:
|
|
441
|
+
if (n.status === "FAILED") {
|
|
442
|
+
R({
|
|
443
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
|
|
444
|
+
description: n.message,
|
|
493
445
|
variant: "error"
|
|
494
446
|
});
|
|
495
447
|
return;
|
|
496
448
|
}
|
|
497
|
-
|
|
498
|
-
title:
|
|
499
|
-
description:
|
|
449
|
+
n.status === "SYNCED" ? (R({
|
|
450
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.toast.submitted.title", "Application Submitted"),
|
|
451
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.toast.submitted.message", "Your application for {{schemeTitle}} has been submitted successfully.", { schemeTitle: J.title }),
|
|
500
452
|
variant: "success"
|
|
501
|
-
}),
|
|
502
|
-
title:
|
|
503
|
-
description:
|
|
453
|
+
}), j()) : R({
|
|
454
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.toast.queued.title", "Saved — will submit when online"),
|
|
455
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.toast.queued.message", "Your application for {{schemeTitle}} is saved on this device and will be submitted automatically when you have a connection. You can see it under Pending Sync.", { schemeTitle: J.title }),
|
|
504
456
|
variant: "info"
|
|
505
|
-
}),
|
|
457
|
+
}), V(!1), G({
|
|
506
458
|
applicantName: "",
|
|
507
459
|
farmName: "",
|
|
508
460
|
farmSize: "",
|
|
509
461
|
farmLocation: "",
|
|
510
462
|
declaration: !1
|
|
511
|
-
}),
|
|
463
|
+
}), q(/* @__PURE__ */ new Set());
|
|
512
464
|
} catch (e) {
|
|
513
|
-
console.error("Scheme application submission failed", e),
|
|
514
|
-
title:
|
|
515
|
-
description:
|
|
465
|
+
console.error("Scheme application submission failed", e), R({
|
|
466
|
+
title: z("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.title", "Submission failed"),
|
|
467
|
+
description: z("healthybowl.governmentSchemes.schemeDetails.toast.submitFailed.message", "Something went wrong while submitting your application. Please try again or contact support."),
|
|
516
468
|
variant: "error"
|
|
517
469
|
});
|
|
518
470
|
} finally {
|
|
519
|
-
|
|
471
|
+
U(!1);
|
|
520
472
|
}
|
|
521
473
|
}
|
|
522
474
|
},
|
|
523
|
-
disabled:
|
|
524
|
-
children:
|
|
475
|
+
disabled: H,
|
|
476
|
+
children: H ? z("healthybowl.governmentSchemes.schemeDetails.modal.submitting", "Submitting...") : z("healthybowl.governmentSchemes.schemeDetails.modal.submit", "Submit Application")
|
|
525
477
|
})] }),
|
|
526
478
|
children: /* @__PURE__ */ C("div", {
|
|
527
479
|
className: "space-y-4",
|
|
528
480
|
children: [
|
|
529
481
|
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h4", {
|
|
530
482
|
className: "text-sm font-medium text-text-primary",
|
|
531
|
-
children:
|
|
483
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.applicant.title", "Applicant Details")
|
|
532
484
|
}), /* @__PURE__ */ S("div", {
|
|
533
485
|
className: "mt-2 space-y-3",
|
|
534
486
|
children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
535
487
|
htmlFor: "scheme-applicant-name",
|
|
536
488
|
className: "block text-xs font-medium text-text-secondary",
|
|
537
|
-
children:
|
|
489
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.label", "Full Name *")
|
|
538
490
|
}), /* @__PURE__ */ S("input", {
|
|
539
491
|
id: "scheme-applicant-name",
|
|
540
492
|
type: "text",
|
|
541
|
-
value:
|
|
542
|
-
onChange: (e) =>
|
|
543
|
-
...
|
|
493
|
+
value: W.applicantName,
|
|
494
|
+
onChange: (e) => G({
|
|
495
|
+
...W,
|
|
544
496
|
applicantName: e.target.value
|
|
545
497
|
}),
|
|
546
|
-
placeholder:
|
|
498
|
+
placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.fullName.placeholder", "Enter your full name"),
|
|
547
499
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
548
500
|
})] })
|
|
549
501
|
})] }),
|
|
550
502
|
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h4", {
|
|
551
503
|
className: "text-sm font-medium text-text-primary",
|
|
552
|
-
children:
|
|
504
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.farm.title", "Farm Details")
|
|
553
505
|
}), /* @__PURE__ */ C("div", {
|
|
554
506
|
className: "mt-2 grid gap-3 sm:grid-cols-2",
|
|
555
507
|
children: [
|
|
556
508
|
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
557
509
|
htmlFor: "scheme-farm-name",
|
|
558
510
|
className: "block text-xs font-medium text-text-secondary",
|
|
559
|
-
children:
|
|
511
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.label", "Farm Name *")
|
|
560
512
|
}), /* @__PURE__ */ S("input", {
|
|
561
513
|
id: "scheme-farm-name",
|
|
562
514
|
type: "text",
|
|
563
|
-
value:
|
|
564
|
-
onChange: (e) =>
|
|
565
|
-
...
|
|
515
|
+
value: W.farmName,
|
|
516
|
+
onChange: (e) => G({
|
|
517
|
+
...W,
|
|
566
518
|
farmName: e.target.value
|
|
567
519
|
}),
|
|
568
|
-
placeholder:
|
|
520
|
+
placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmName.placeholder", "Your farm name"),
|
|
569
521
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
570
522
|
})] }),
|
|
571
523
|
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
572
524
|
className: "block text-xs font-medium text-text-secondary",
|
|
573
|
-
children:
|
|
525
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.label", "Farm Size (acres)")
|
|
574
526
|
}), /* @__PURE__ */ S("input", {
|
|
575
527
|
type: "text",
|
|
576
|
-
value:
|
|
577
|
-
onChange: (e) =>
|
|
578
|
-
...
|
|
528
|
+
value: W.farmSize,
|
|
529
|
+
onChange: (e) => G({
|
|
530
|
+
...W,
|
|
579
531
|
farmSize: e.target.value
|
|
580
532
|
}),
|
|
581
|
-
placeholder:
|
|
533
|
+
placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmSize.placeholder", "e.g., 50"),
|
|
582
534
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
583
535
|
})] }),
|
|
584
536
|
/* @__PURE__ */ C("div", {
|
|
585
537
|
className: "sm:col-span-2",
|
|
586
538
|
children: [/* @__PURE__ */ S("label", {
|
|
587
539
|
className: "block text-xs font-medium text-text-secondary",
|
|
588
|
-
children:
|
|
540
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.label", "Farm Location")
|
|
589
541
|
}), /* @__PURE__ */ S("input", {
|
|
590
542
|
type: "text",
|
|
591
|
-
value:
|
|
592
|
-
onChange: (e) =>
|
|
593
|
-
...
|
|
543
|
+
value: W.farmLocation,
|
|
544
|
+
onChange: (e) => G({
|
|
545
|
+
...W,
|
|
594
546
|
farmLocation: e.target.value
|
|
595
547
|
}),
|
|
596
|
-
placeholder:
|
|
548
|
+
placeholder: z("healthybowl.governmentSchemes.schemeDetails.form.fields.farmLocation.placeholder", "County, State"),
|
|
597
549
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
|
|
598
550
|
})]
|
|
599
551
|
})
|
|
@@ -602,60 +554,38 @@ var D = (e) => {
|
|
|
602
554
|
/* @__PURE__ */ C("div", { children: [
|
|
603
555
|
/* @__PURE__ */ S("h4", {
|
|
604
556
|
className: "text-sm font-medium text-text-primary",
|
|
605
|
-
children:
|
|
557
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.documents.title", "Documents Checklist")
|
|
606
558
|
}),
|
|
607
559
|
/* @__PURE__ */ S("p", {
|
|
608
560
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
609
|
-
children:
|
|
561
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.documents.helper", "Confirm you have the following documents ready for upload")
|
|
610
562
|
}),
|
|
611
563
|
/* @__PURE__ */ S("div", {
|
|
612
564
|
className: "mt-2 space-y-2",
|
|
613
|
-
children:
|
|
614
|
-
let
|
|
615
|
-
return /* @__PURE__ */ C("
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
className: "ms-2 text-xs text-text-secondary",
|
|
630
|
-
children: V("healthybowl.governmentSchemes.schemeDetails.form.documents.optional", "optional")
|
|
631
|
-
}),
|
|
632
|
-
t ? /* @__PURE__ */ S("div", {
|
|
633
|
-
className: "text-xs text-text-secondary",
|
|
634
|
-
children: t.fileName ?? V("healthybowl.governmentSchemes.schemeDetails.form.documents.uploaded", "Uploaded")
|
|
635
|
-
}) : null
|
|
636
|
-
] })]
|
|
565
|
+
children: J.requiredDocuments.map((e, t) => {
|
|
566
|
+
let n = `scheme-document-${t}`;
|
|
567
|
+
return /* @__PURE__ */ C("label", {
|
|
568
|
+
htmlFor: n,
|
|
569
|
+
className: "flex items-center gap-3 rounded-md border border-border-subtle p-3 transition-colors hover:bg-bg-sunken/50",
|
|
570
|
+
children: [/* @__PURE__ */ S("input", {
|
|
571
|
+
id: n,
|
|
572
|
+
type: "checkbox",
|
|
573
|
+
checked: K.has(e),
|
|
574
|
+
onChange: (t) => {
|
|
575
|
+
q((n) => {
|
|
576
|
+
let r = new Set(n);
|
|
577
|
+
return t.target.checked ? r.add(e) : r.delete(e), r;
|
|
578
|
+
});
|
|
579
|
+
},
|
|
580
|
+
className: "h-4 w-4 rounded border-border-subtle"
|
|
637
581
|
}), /* @__PURE__ */ C("div", {
|
|
638
582
|
className: "flex items-center gap-2",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
640
|
-
className: "
|
|
641
|
-
children:
|
|
642
|
-
|
|
643
|
-
className: "sr-only",
|
|
644
|
-
disabled: n,
|
|
645
|
-
"aria-label": V(e.labelKey, e.labelFallback),
|
|
646
|
-
onChange: (t) => {
|
|
647
|
-
let n = t.target.files?.[0];
|
|
648
|
-
t.target.value = "", n && je(e.slot, n);
|
|
649
|
-
}
|
|
650
|
-
})]
|
|
651
|
-
}), t ? /* @__PURE__ */ S("button", {
|
|
652
|
-
type: "button",
|
|
653
|
-
onClick: () => P((t) => ue(t, e.slot)),
|
|
654
|
-
className: "text-xs text-text-secondary hover:text-status-error-text",
|
|
655
|
-
children: V("common.remove", "Remove")
|
|
656
|
-
}) : null]
|
|
583
|
+
children: [/* @__PURE__ */ S(de, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ S("span", {
|
|
584
|
+
className: "text-sm text-text-primary",
|
|
585
|
+
children: e
|
|
586
|
+
})]
|
|
657
587
|
})]
|
|
658
|
-
}, e
|
|
588
|
+
}, e);
|
|
659
589
|
})
|
|
660
590
|
})
|
|
661
591
|
] }),
|
|
@@ -667,15 +597,15 @@ var D = (e) => {
|
|
|
667
597
|
children: [/* @__PURE__ */ S("input", {
|
|
668
598
|
id: "scheme-declaration",
|
|
669
599
|
type: "checkbox",
|
|
670
|
-
checked:
|
|
671
|
-
onChange: (e) =>
|
|
672
|
-
...
|
|
600
|
+
checked: W.declaration,
|
|
601
|
+
onChange: (e) => G({
|
|
602
|
+
...W,
|
|
673
603
|
declaration: e.target.checked
|
|
674
604
|
}),
|
|
675
605
|
className: "mt-0.5 h-4 w-4 rounded border-border-subtle"
|
|
676
606
|
}), /* @__PURE__ */ S("span", {
|
|
677
607
|
className: "text-xs text-text-secondary",
|
|
678
|
-
children:
|
|
608
|
+
children: z("healthybowl.governmentSchemes.schemeDetails.form.declaration.text", "I declare that the information provided is true and accurate. I understand that providing false information may result in disqualification and legal action.")
|
|
679
609
|
})]
|
|
680
610
|
})
|
|
681
611
|
})
|
|
@@ -683,13 +613,13 @@ var D = (e) => {
|
|
|
683
613
|
})
|
|
684
614
|
}),
|
|
685
615
|
/* @__PURE__ */ S(o, {
|
|
686
|
-
toasts:
|
|
687
|
-
onDismiss:
|
|
616
|
+
toasts: L,
|
|
617
|
+
onDismiss: ge
|
|
688
618
|
})
|
|
689
619
|
]
|
|
690
620
|
});
|
|
691
621
|
};
|
|
692
622
|
//#endregion
|
|
693
|
-
export {
|
|
623
|
+
export { O as SchemeDetailsPage };
|
|
694
624
|
|
|
695
625
|
//# sourceMappingURL=SchemeDetailsPage.js.map
|