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