@burdenoff/microfe-govcitizenhub 2026.720.5 → 2026.720.7
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/govcitizenhub/hooks/index.d.ts +1 -0
- package/dist/govcitizenhub/hooks/index.d.ts.map +1 -1
- package/dist/govcitizenhub/hooks/index.js +1 -0
- package/dist/govcitizenhub/hooks/useGovApi.d.ts +23 -4
- package/dist/govcitizenhub/hooks/useGovApi.d.ts.map +1 -1
- package/dist/govcitizenhub/hooks/useGovApi.js +28 -11
- package/dist/govcitizenhub/hooks/useGovApi.js.map +1 -1
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.d.ts +24 -0
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.d.ts.map +1 -0
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.js +40 -0
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.js.map +1 -0
- package/dist/govcitizenhub/pages/agencies/AgenciesPage.d.ts +3 -2
- package/dist/govcitizenhub/pages/agencies/AgenciesPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/agencies/AgenciesPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js +169 -163
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +151 -147
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.js +173 -169
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.js.map +1 -1
- package/dist/govcitizenhub/pages/payments/PaymentsPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/payments/PaymentsPage.js +53 -49
- package/dist/govcitizenhub/pages/payments/PaymentsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js +82 -76
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/PermitsPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/permits/PermitsPage.js +174 -120
- package/dist/govcitizenhub/pages/permits/PermitsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,72 +2,73 @@ import { useGovCitizenHub as e } from "../../context/GovCitizenHubContext.js";
|
|
|
2
2
|
import "../../context/index.js";
|
|
3
3
|
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
4
4
|
import { formatCurrency as n } from "../../utils/formatters.js";
|
|
5
|
-
import { StatusBadge as
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { useGovCreateApplication as
|
|
8
|
-
import { FILE_FOLDERS as
|
|
5
|
+
import { StatusBadge as ee } from "../../components/StatusBadge.js";
|
|
6
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
7
|
+
import { useGovCreateApplication as ne, useGovService as re, useGovServices as ie, useGovSubmitApplication as r } from "../../hooks/useGovApi.js";
|
|
8
|
+
import { FILE_FOLDERS as i, uploadFileToFiles as a } from "../../hooks/useFiles.js";
|
|
9
|
+
import { useGovCitizenHubAnalytics as ae } from "../../hooks/useGovCitizenHubAnalytics.js";
|
|
9
10
|
import "../../hooks/index.js";
|
|
10
|
-
import { ErrorView as
|
|
11
|
-
import { describeError as
|
|
12
|
-
import { StatusStepper as
|
|
13
|
-
import { KeyValueList as
|
|
14
|
-
import { isFieldVisible as
|
|
15
|
-
import { DynamicFormFields as
|
|
16
|
-
import { useMemo as
|
|
17
|
-
import { ChevronLeft as
|
|
18
|
-
import { useSearchParams as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { Button as
|
|
11
|
+
import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
|
|
12
|
+
import { describeError as c, notify as l } from "../../lib/toast.js";
|
|
13
|
+
import { StatusStepper as oe } from "../../components/StatusStepper.js";
|
|
14
|
+
import { KeyValueList as u } from "../../components/KeyValueList.js";
|
|
15
|
+
import { isFieldVisible as se, parseFormFields as d } from "../../utils/dynamicForm.js";
|
|
16
|
+
import { DynamicFormFields as f } from "../../components/DynamicFormFields.js";
|
|
17
|
+
import { useMemo as p, useState as m } from "react";
|
|
18
|
+
import { ChevronLeft as h, ChevronRight as g, Clock as _, FileText as v, Loader2 as ce, Save as y, Send as le } from "lucide-react";
|
|
19
|
+
import { useSearchParams as ue } from "react-router-dom";
|
|
20
|
+
import { Fragment as de, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
21
|
+
import { Button as S, GlassCard as C, Input as fe, Label as w, Select as pe, SelectContent as me, SelectItem as he, SelectTrigger as ge, SelectValue as _e, Textarea as ve } from "@burdenoff/fe-libs/ui";
|
|
21
22
|
//#region src/govcitizenhub/pages/applications/NewApplicationPage.tsx
|
|
22
|
-
var
|
|
23
|
+
var T = [
|
|
23
24
|
"LOW",
|
|
24
25
|
"NORMAL",
|
|
25
26
|
"HIGH",
|
|
26
27
|
"URGENT"
|
|
27
|
-
],
|
|
28
|
+
], E = [
|
|
28
29
|
"choose",
|
|
29
30
|
"fill",
|
|
30
31
|
"review"
|
|
31
32
|
];
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
function D({ service: e }) {
|
|
34
|
+
return /* @__PURE__ */ x("div", {
|
|
34
35
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-xl border border-border-seam bg-[var(--color-accent-soft)]/50 px-4 py-3",
|
|
35
36
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ b("span", {
|
|
37
38
|
className: "inline-flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-surface text-action-primary-text",
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ b(v, { className: "size-5" })
|
|
39
40
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ b("span", {
|
|
41
42
|
className: "text-base font-semibold text-text-primary",
|
|
42
43
|
children: e.name
|
|
43
44
|
}),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ b("span", {
|
|
45
46
|
"aria-hidden": !0,
|
|
46
47
|
className: "text-text-muted",
|
|
47
48
|
children: "·"
|
|
48
49
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ b("span", {
|
|
50
51
|
className: "text-sm text-text-secondary",
|
|
51
52
|
children: e.agency?.name ?? "Agency"
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ b("span", {
|
|
54
55
|
"aria-hidden": !0,
|
|
55
56
|
className: "text-text-muted",
|
|
56
57
|
children: "·"
|
|
57
58
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ b("span", {
|
|
59
60
|
className: "text-sm text-text-secondary",
|
|
60
61
|
children: e.feeType === "FREE" ? "Free" : n(e.feeAmount, e.currency)
|
|
61
62
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ b("span", {
|
|
63
64
|
"aria-hidden": !0,
|
|
64
65
|
className: "text-text-muted",
|
|
65
66
|
children: "·"
|
|
66
67
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ x("span", {
|
|
68
69
|
className: "inline-flex items-center gap-1 text-sm text-text-secondary",
|
|
69
70
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ b(_, { className: "size-3.5" }),
|
|
71
72
|
" ",
|
|
72
73
|
e.slaDays,
|
|
73
74
|
"-day SLA"
|
|
@@ -76,317 +77,320 @@ function O({ service: e }) {
|
|
|
76
77
|
]
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
let { navigateTo:
|
|
80
|
+
function O() {
|
|
81
|
+
let { navigateTo: _, workspaceId: O } = e(), { emitApplicationCreated: k } = ae(), [A] = ue(), j = A.get("serviceId") ?? void 0, [M, N] = m(j), [P, F] = m(!1), I = M ?? j, L = ie({
|
|
81
82
|
status: "PUBLISHED",
|
|
82
83
|
pagination: { limit: 50 }
|
|
83
|
-
}), { data:
|
|
84
|
+
}), { data: R, isLoading: ye, isError: be, refetch: xe } = re(I), z = ne(), B = r(), V = p(() => d(R?.formSchema ?? null), [R?.formSchema]), [H, Se] = m({}), [U, Ce] = m({}), [we, W] = m(null), [G, Te] = m(""), [K, Ee] = m(""), [q, De] = m("NORMAL"), J = (e, t) => Se((n) => ({
|
|
84
85
|
...n,
|
|
85
86
|
[e]: t
|
|
86
|
-
})),
|
|
87
|
+
})), Oe = async (e, t) => {
|
|
87
88
|
let n = t?.[0];
|
|
88
89
|
if (n) {
|
|
89
|
-
|
|
90
|
+
W(e);
|
|
90
91
|
try {
|
|
91
|
-
let t = await
|
|
92
|
-
|
|
92
|
+
let t = await a(n, i.documents);
|
|
93
|
+
J(e, t.id), Ce((n) => ({
|
|
93
94
|
...n,
|
|
94
95
|
[e]: t.name
|
|
95
96
|
}));
|
|
96
97
|
} catch (e) {
|
|
97
|
-
|
|
98
|
+
l.error("Upload failed", c(e));
|
|
98
99
|
} finally {
|
|
99
|
-
|
|
100
|
+
W(null);
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
}, Y =
|
|
103
|
+
}, Y = p(() => V.filter((e) => se(e, H, V)), [V, H]), ke = () => {
|
|
103
104
|
if (Y.length > 0) {
|
|
104
105
|
let e = {};
|
|
105
|
-
for (let t of Y) e[t.key] =
|
|
106
|
+
for (let t of Y) e[t.key] = H[t.key] ?? "";
|
|
106
107
|
return e;
|
|
107
108
|
}
|
|
108
|
-
return
|
|
109
|
-
}, X = Y.some((e) => e.required && !(
|
|
110
|
-
if (
|
|
111
|
-
let t = await
|
|
112
|
-
serviceId:
|
|
113
|
-
formData:
|
|
114
|
-
priority:
|
|
115
|
-
reference:
|
|
109
|
+
return G.trim() ? { details: G.trim() } : {};
|
|
110
|
+
}, X = Y.some((e) => e.required && !(H[e.key] ?? "").trim()), Z = async (e) => {
|
|
111
|
+
if (I) try {
|
|
112
|
+
let t = await z.mutateAsync({
|
|
113
|
+
serviceId: I,
|
|
114
|
+
formData: ke(),
|
|
115
|
+
priority: q,
|
|
116
|
+
reference: K.trim() || null
|
|
116
117
|
});
|
|
117
|
-
|
|
118
|
+
k({
|
|
119
|
+
workspaceId: O,
|
|
120
|
+
id: t.id
|
|
121
|
+
}), e ? (await B.mutateAsync(t.id), l.success("Application submitted", t.reference)) : l.success("Draft saved", t.reference), _(`applications/${t.id}`);
|
|
118
122
|
} catch (e) {
|
|
119
|
-
|
|
123
|
+
l.error("Could not file the application", c(e));
|
|
120
124
|
}
|
|
121
|
-
}, Q =
|
|
125
|
+
}, Q = z.isPending || B.isPending, Ae = I ? P ? 2 : 1 : 0, je = [
|
|
122
126
|
{
|
|
123
|
-
key:
|
|
127
|
+
key: E[0],
|
|
124
128
|
label: "Choose service"
|
|
125
129
|
},
|
|
126
130
|
{
|
|
127
|
-
key:
|
|
131
|
+
key: E[1],
|
|
128
132
|
label: "Fill form"
|
|
129
133
|
},
|
|
130
134
|
{
|
|
131
|
-
key:
|
|
135
|
+
key: E[2],
|
|
132
136
|
label: "Review & submit"
|
|
133
137
|
}
|
|
134
|
-
],
|
|
135
|
-
steps:
|
|
136
|
-
current:
|
|
138
|
+
], Me = (e) => e.type === "file" ? U[e.key] ?? "" : H[e.key] ?? "", $ = /* @__PURE__ */ b(oe, {
|
|
139
|
+
steps: je,
|
|
140
|
+
current: Ae,
|
|
137
141
|
className: "mb-6"
|
|
138
142
|
});
|
|
139
|
-
return
|
|
143
|
+
return I ? /* @__PURE__ */ x(t, {
|
|
140
144
|
title: "New application",
|
|
141
145
|
back: {
|
|
142
146
|
label: "Applications",
|
|
143
|
-
onClick: () =>
|
|
147
|
+
onClick: () => _("applications")
|
|
144
148
|
},
|
|
145
|
-
description:
|
|
146
|
-
children: [$,
|
|
149
|
+
description: R ? `Applying for ${R.name}` : "Loading service…",
|
|
150
|
+
children: [$, ye ? /* @__PURE__ */ b(s, { label: "Loading service…" }) : be || !R ? /* @__PURE__ */ b(o, {
|
|
147
151
|
message: "We couldn't load this service.",
|
|
148
|
-
onRetry: () =>
|
|
149
|
-
}) : /* @__PURE__ */
|
|
152
|
+
onRetry: () => xe()
|
|
153
|
+
}) : /* @__PURE__ */ x("div", {
|
|
150
154
|
className: "max-w-3xl space-y-4",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ b(D, { service: R }), P ? /* @__PURE__ */ x(C, {
|
|
152
156
|
treatment: "plain",
|
|
153
157
|
className: "border-border-seam p-6",
|
|
154
158
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ b("h2", {
|
|
156
160
|
className: "text-lg font-semibold text-text-primary",
|
|
157
161
|
children: "Review your application"
|
|
158
162
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ b("p", {
|
|
160
164
|
className: "mt-0.5 text-sm text-text-muted",
|
|
161
165
|
children: "Check the details below, then submit or save as a draft."
|
|
162
166
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ x("div", {
|
|
164
168
|
className: "mt-5 space-y-5",
|
|
165
169
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h3", {
|
|
167
171
|
className: "mb-2 text-sm font-semibold text-text-secondary",
|
|
168
172
|
children: "Application"
|
|
169
|
-
}), /* @__PURE__ */
|
|
173
|
+
}), /* @__PURE__ */ b(u, {
|
|
170
174
|
items: [
|
|
171
175
|
{
|
|
172
176
|
label: "Service",
|
|
173
|
-
value:
|
|
177
|
+
value: R.name
|
|
174
178
|
},
|
|
175
179
|
{
|
|
176
180
|
label: "Agency",
|
|
177
|
-
value:
|
|
181
|
+
value: R.agency?.name ?? "—"
|
|
178
182
|
},
|
|
179
183
|
{
|
|
180
184
|
label: "Priority",
|
|
181
|
-
value:
|
|
185
|
+
value: q.charAt(0) + q.slice(1).toLowerCase()
|
|
182
186
|
},
|
|
183
187
|
{
|
|
184
188
|
label: "Reference",
|
|
185
|
-
value:
|
|
189
|
+
value: K.trim() || "Auto-generated"
|
|
186
190
|
}
|
|
187
191
|
],
|
|
188
192
|
columns: 2
|
|
189
193
|
})] }),
|
|
190
|
-
Y.length > 0 && /* @__PURE__ */
|
|
194
|
+
Y.length > 0 && /* @__PURE__ */ x("div", {
|
|
191
195
|
className: "border-t border-border-seam pt-4",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
193
197
|
className: "mb-2 text-sm font-semibold text-text-secondary",
|
|
194
198
|
children: "Your answers"
|
|
195
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ b(u, {
|
|
196
200
|
variant: "stacked",
|
|
197
201
|
columns: 2,
|
|
198
202
|
items: Y.map((e) => ({
|
|
199
|
-
label: /* @__PURE__ */
|
|
203
|
+
label: /* @__PURE__ */ x(de, { children: [e.label, e.required && /* @__PURE__ */ b("span", {
|
|
200
204
|
className: "text-status-error-text",
|
|
201
205
|
children: " *"
|
|
202
206
|
})] }),
|
|
203
|
-
value:
|
|
207
|
+
value: Me(e) || /* @__PURE__ */ b("span", {
|
|
204
208
|
className: "text-text-muted",
|
|
205
209
|
children: "Not provided"
|
|
206
210
|
})
|
|
207
211
|
}))
|
|
208
212
|
})]
|
|
209
213
|
}),
|
|
210
|
-
|
|
214
|
+
V.length === 0 && G.trim() && /* @__PURE__ */ x("div", {
|
|
211
215
|
className: "border-t border-border-seam pt-4",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
213
217
|
className: "mb-1.5 text-sm font-semibold text-text-secondary",
|
|
214
218
|
children: "Details"
|
|
215
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ b("p", {
|
|
216
220
|
className: "whitespace-pre-wrap text-sm text-text-primary",
|
|
217
|
-
children:
|
|
221
|
+
children: G.trim()
|
|
218
222
|
})]
|
|
219
223
|
})
|
|
220
224
|
]
|
|
221
225
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ x("div", {
|
|
223
227
|
className: "mt-6 flex flex-col gap-2 sm:flex-row sm:justify-between",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ x(S, {
|
|
225
229
|
variant: "ghost",
|
|
226
|
-
onClick: () =>
|
|
230
|
+
onClick: () => F(!1),
|
|
227
231
|
disabled: Q,
|
|
228
|
-
children: [/* @__PURE__ */
|
|
229
|
-
}), /* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ b(h, { className: "mr-1.5 h-4 w-4" }), " Back to edit"]
|
|
233
|
+
}), /* @__PURE__ */ x("div", {
|
|
230
234
|
className: "flex flex-col gap-2 sm:flex-row",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ x(S, {
|
|
232
236
|
variant: "outline",
|
|
233
237
|
onClick: () => Z(!1),
|
|
234
238
|
disabled: Q,
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
-
}), /* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ b(y, { className: "mr-1.5 h-4 w-4" }), " Save draft"]
|
|
240
|
+
}), /* @__PURE__ */ x(S, {
|
|
237
241
|
onClick: () => Z(!0),
|
|
238
242
|
disabled: Q || X,
|
|
239
|
-
children: [Q ? /* @__PURE__ */
|
|
243
|
+
children: [Q ? /* @__PURE__ */ b(ce, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ b(le, { className: "mr-1.5 h-4 w-4" }), "Submit application"]
|
|
240
244
|
})]
|
|
241
245
|
})]
|
|
242
246
|
})
|
|
243
247
|
]
|
|
244
|
-
}) : /* @__PURE__ */
|
|
248
|
+
}) : /* @__PURE__ */ b(C, {
|
|
245
249
|
treatment: "plain",
|
|
246
250
|
className: "border-border-seam p-6",
|
|
247
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ x("div", {
|
|
248
252
|
className: "flex flex-col gap-4",
|
|
249
253
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ x("div", {
|
|
251
255
|
className: "grid gap-4 sm:grid-cols-2",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ x("div", {
|
|
253
257
|
className: "grid gap-1.5",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ b(w, {
|
|
255
259
|
htmlFor: "app-ref",
|
|
256
260
|
children: "Reference (optional)"
|
|
257
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ b(fe, {
|
|
258
262
|
id: "app-ref",
|
|
259
|
-
value:
|
|
260
|
-
onChange: (e) =>
|
|
263
|
+
value: K,
|
|
264
|
+
onChange: (e) => Ee(e.target.value),
|
|
261
265
|
placeholder: "Auto-generated if left blank"
|
|
262
266
|
})]
|
|
263
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ x("div", {
|
|
264
268
|
className: "grid gap-1.5",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
266
|
-
value:
|
|
267
|
-
onValueChange: (e) =>
|
|
268
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ b(w, { children: "Priority" }), /* @__PURE__ */ x(pe, {
|
|
270
|
+
value: q,
|
|
271
|
+
onValueChange: (e) => De(e),
|
|
272
|
+
children: [/* @__PURE__ */ b(ge, {
|
|
269
273
|
"aria-label": "Priority",
|
|
270
|
-
children: /* @__PURE__ */
|
|
271
|
-
}), /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ b(_e, {})
|
|
275
|
+
}), /* @__PURE__ */ b(me, { children: T.map((e) => /* @__PURE__ */ b(he, {
|
|
272
276
|
value: e,
|
|
273
277
|
children: e.charAt(0) + e.slice(1).toLowerCase()
|
|
274
278
|
}, e)) })]
|
|
275
279
|
})]
|
|
276
280
|
})]
|
|
277
281
|
}),
|
|
278
|
-
|
|
279
|
-
fields:
|
|
280
|
-
values:
|
|
281
|
-
onChange:
|
|
282
|
-
fileNames:
|
|
283
|
-
uploadingKey:
|
|
284
|
-
onFileSelect:
|
|
285
|
-
}) : /* @__PURE__ */
|
|
282
|
+
V.length > 0 ? /* @__PURE__ */ b(f, {
|
|
283
|
+
fields: V,
|
|
284
|
+
values: H,
|
|
285
|
+
onChange: J,
|
|
286
|
+
fileNames: U,
|
|
287
|
+
uploadingKey: we,
|
|
288
|
+
onFileSelect: Oe
|
|
289
|
+
}) : /* @__PURE__ */ x("div", {
|
|
286
290
|
className: "grid gap-1.5",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ b(w, {
|
|
288
292
|
htmlFor: "app-details",
|
|
289
293
|
children: "Application details"
|
|
290
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ b(ve, {
|
|
291
295
|
id: "app-details",
|
|
292
|
-
value:
|
|
293
|
-
onChange: (e) =>
|
|
296
|
+
value: G,
|
|
297
|
+
onChange: (e) => Te(e.target.value),
|
|
294
298
|
placeholder: "Describe your request and include any relevant information.",
|
|
295
299
|
rows: 5
|
|
296
300
|
})]
|
|
297
301
|
}),
|
|
298
|
-
|
|
302
|
+
R.requiredDocuments.length > 0 && /* @__PURE__ */ x("p", {
|
|
299
303
|
className: "rounded-lg bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
|
|
300
304
|
children: [
|
|
301
305
|
"You will be able to upload the required documents (",
|
|
302
|
-
|
|
306
|
+
R.requiredDocuments.join(", "),
|
|
303
307
|
") from the application page after filing."
|
|
304
308
|
]
|
|
305
309
|
}),
|
|
306
|
-
X && /* @__PURE__ */
|
|
310
|
+
X && /* @__PURE__ */ x("p", {
|
|
307
311
|
className: "text-xs text-text-muted",
|
|
308
312
|
children: [
|
|
309
313
|
"Fields marked ",
|
|
310
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ b("span", {
|
|
311
315
|
className: "text-status-error-text",
|
|
312
316
|
children: "*"
|
|
313
317
|
}),
|
|
314
318
|
" are required to submit — you can still save a draft."
|
|
315
319
|
]
|
|
316
320
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ x("div", {
|
|
318
322
|
className: "mt-2 flex flex-col gap-2 sm:flex-row sm:justify-end",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ x(S, {
|
|
320
324
|
variant: "outline",
|
|
321
325
|
onClick: () => Z(!1),
|
|
322
326
|
disabled: Q,
|
|
323
|
-
children: [/* @__PURE__ */
|
|
324
|
-
}), /* @__PURE__ */
|
|
325
|
-
onClick: () =>
|
|
327
|
+
children: [/* @__PURE__ */ b(y, { className: "mr-1.5 h-4 w-4" }), " Save draft"]
|
|
328
|
+
}), /* @__PURE__ */ x(S, {
|
|
329
|
+
onClick: () => F(!0),
|
|
326
330
|
disabled: Q,
|
|
327
|
-
children: ["Review & submit ", /* @__PURE__ */
|
|
331
|
+
children: ["Review & submit ", /* @__PURE__ */ b(g, { className: "ml-1.5 h-4 w-4" })]
|
|
328
332
|
})]
|
|
329
333
|
})
|
|
330
334
|
]
|
|
331
335
|
})
|
|
332
336
|
})]
|
|
333
337
|
})]
|
|
334
|
-
}) : /* @__PURE__ */
|
|
338
|
+
}) : /* @__PURE__ */ x(t, {
|
|
335
339
|
title: "New application",
|
|
336
340
|
back: {
|
|
337
341
|
label: "Applications",
|
|
338
|
-
onClick: () =>
|
|
342
|
+
onClick: () => _("applications")
|
|
339
343
|
},
|
|
340
344
|
description: "Choose the service you want to apply for.",
|
|
341
|
-
children: [$,
|
|
345
|
+
children: [$, L.isLoading ? /* @__PURE__ */ b(s, { label: "Loading services…" }) : L.isError ? /* @__PURE__ */ b(o, {
|
|
342
346
|
message: "We couldn't load services.",
|
|
343
|
-
onRetry: () =>
|
|
344
|
-
}) : (
|
|
347
|
+
onRetry: () => L.refetch()
|
|
348
|
+
}) : (L.data?.items.length ?? 0) === 0 ? /* @__PURE__ */ b(te, {
|
|
345
349
|
illustration: "empty-data",
|
|
346
350
|
title: "No published services",
|
|
347
351
|
description: "There are no services available to apply for yet. Publish a service first.",
|
|
348
|
-
action: /* @__PURE__ */ S
|
|
349
|
-
onClick: () =>
|
|
352
|
+
action: /* @__PURE__ */ b(S, {
|
|
353
|
+
onClick: () => _("services"),
|
|
350
354
|
children: "Go to services"
|
|
351
355
|
})
|
|
352
|
-
}) : /* @__PURE__ */
|
|
356
|
+
}) : /* @__PURE__ */ b("div", {
|
|
353
357
|
className: "grid gap-3 sm:grid-cols-2",
|
|
354
|
-
children:
|
|
358
|
+
children: L.data?.items.map((e) => /* @__PURE__ */ x("button", {
|
|
355
359
|
type: "button",
|
|
356
|
-
onClick: () =>
|
|
360
|
+
onClick: () => N(e.id),
|
|
357
361
|
className: "group flex items-center gap-3 rounded-xl border border-border-seam bg-bg-surface p-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
358
362
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ b("span", {
|
|
360
364
|
className: "inline-flex size-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-action-primary-text",
|
|
361
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ b(v, { className: "size-5" })
|
|
362
366
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ x("div", {
|
|
364
368
|
className: "min-w-0 flex-1",
|
|
365
369
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ b("p", {
|
|
367
371
|
className: "truncate font-medium text-text-primary",
|
|
368
372
|
children: e.name
|
|
369
373
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ b("p", {
|
|
371
375
|
className: "truncate text-xs text-text-muted",
|
|
372
376
|
children: e.agency?.name ?? "Agency"
|
|
373
377
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ x("div", {
|
|
375
379
|
className: "mt-2 flex items-center gap-2",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ b(ee, { status: e.category }), /* @__PURE__ */ b("span", {
|
|
377
381
|
className: "text-xs text-text-secondary",
|
|
378
382
|
children: e.feeType === "FREE" ? "Free" : n(e.feeAmount, e.currency)
|
|
379
383
|
})]
|
|
380
384
|
})
|
|
381
385
|
]
|
|
382
386
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ b(g, { className: "h-4 w-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
|
|
384
388
|
]
|
|
385
389
|
}, e.id))
|
|
386
390
|
})]
|
|
387
391
|
});
|
|
388
392
|
}
|
|
389
393
|
//#endregion
|
|
390
|
-
export {
|
|
394
|
+
export { O as NewApplicationPage };
|
|
391
395
|
|
|
392
396
|
//# sourceMappingURL=NewApplicationPage.js.map
|