@burdenoff/microfe-govcitizenhub 2026.705.1 → 2026.705.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/govcitizenhub/components/Avatar.js +55 -0
- package/dist/govcitizenhub/components/Avatar.js.map +1 -0
- package/dist/govcitizenhub/components/DocumentUploadField.js +95 -45
- package/dist/govcitizenhub/components/DocumentUploadField.js.map +1 -1
- package/dist/govcitizenhub/components/FilterTabs.js +5 -4
- package/dist/govcitizenhub/components/FilterTabs.js.map +1 -1
- package/dist/govcitizenhub/components/KeyValueList.js +23 -0
- package/dist/govcitizenhub/components/KeyValueList.js.map +1 -0
- package/dist/govcitizenhub/components/MetricsCard.js +51 -26
- package/dist/govcitizenhub/components/MetricsCard.js.map +1 -1
- package/dist/govcitizenhub/components/PageLayout.js +81 -51
- package/dist/govcitizenhub/components/PageLayout.js.map +1 -1
- package/dist/govcitizenhub/components/Pagination.js +41 -19
- package/dist/govcitizenhub/components/Pagination.js.map +1 -1
- package/dist/govcitizenhub/components/SectionCard.js +31 -0
- package/dist/govcitizenhub/components/SectionCard.js.map +1 -0
- package/dist/govcitizenhub/components/SlaBadge.js +71 -0
- package/dist/govcitizenhub/components/SlaBadge.js.map +1 -0
- package/dist/govcitizenhub/components/StateViews.js +1 -16
- package/dist/govcitizenhub/components/StateViews.js.map +1 -1
- package/dist/govcitizenhub/components/StatusBadge.js +23 -10
- package/dist/govcitizenhub/components/StatusBadge.js.map +1 -1
- package/dist/govcitizenhub/components/StatusStepper.js +55 -0
- package/dist/govcitizenhub/components/StatusStepper.js.map +1 -0
- package/dist/govcitizenhub/components/SummaryStrip.js +54 -0
- package/dist/govcitizenhub/components/SummaryStrip.js.map +1 -0
- package/dist/govcitizenhub/components/TagInput.js +2 -2
- package/dist/govcitizenhub/components/TagInput.js.map +1 -1
- package/dist/govcitizenhub/components/Timeline.js +61 -0
- package/dist/govcitizenhub/components/Timeline.js.map +1 -0
- package/dist/govcitizenhub/hooks/useFiles.js +50 -22
- package/dist/govcitizenhub/hooks/useFiles.js.map +1 -1
- package/dist/govcitizenhub/hooks/useGovApi.js +40 -31
- package/dist/govcitizenhub/hooks/useGovApi.js.map +1 -1
- package/dist/govcitizenhub/pages/DashboardPage.js +118 -50
- package/dist/govcitizenhub/pages/DashboardPage.js.map +1 -1
- package/dist/govcitizenhub/pages/agencies/AgenciesPage.js +258 -137
- package/dist/govcitizenhub/pages/agencies/AgenciesPage.js.map +1 -1
- package/dist/govcitizenhub/pages/agencies/AgencyFormDialog.js +103 -90
- package/dist/govcitizenhub/pages/agencies/AgencyFormDialog.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js +493 -397
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.js +266 -80
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +412 -174
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
- package/dist/govcitizenhub/pages/documents/DocumentsPage.js +313 -115
- package/dist/govcitizenhub/pages/documents/DocumentsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/grievances/GrievanceDetailPage.js +379 -176
- package/dist/govcitizenhub/pages/grievances/GrievanceDetailPage.js.map +1 -1
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.js +275 -184
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.js.map +1 -1
- package/dist/govcitizenhub/pages/payments/PaymentsPage.js +251 -133
- package/dist/govcitizenhub/pages/payments/PaymentsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js +175 -105
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/PermitsPage.js +204 -110
- package/dist/govcitizenhub/pages/permits/PermitsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/VerifyPermitPage.js +290 -113
- package/dist/govcitizenhub/pages/permits/VerifyPermitPage.js.map +1 -1
- package/dist/govcitizenhub/pages/services/FormFieldBuilder.js +301 -0
- package/dist/govcitizenhub/pages/services/FormFieldBuilder.js.map +1 -0
- package/dist/govcitizenhub/pages/services/ServiceDetailPage.js +248 -163
- package/dist/govcitizenhub/pages/services/ServiceDetailPage.js.map +1 -1
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.js +183 -149
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.js.map +1 -1
- package/dist/govcitizenhub/pages/services/ServicesPage.js +228 -137
- package/dist/govcitizenhub/pages/services/ServicesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,542 +5,638 @@ import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
|
5
5
|
import "../../context/index.js";
|
|
6
6
|
import { useGovAddCaseNote as c, useGovApplication as l, useGovCreatePayment as u, useGovMarkPaymentPaid as d, useGovPayments as f, useGovRefundPayment as ee, useGovReviewDocument as te, useGovService as ne, useGovSubmitApplication as re, useGovTransitionApplication as ie, useGovUpdateApplication as ae } from "../../hooks/useGovApi.js";
|
|
7
7
|
import "../../hooks/index.js";
|
|
8
|
-
import { ErrorView as oe, LoadingView as se
|
|
9
|
-
import { ConfirmDialog as
|
|
10
|
-
import { describeError as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
8
|
+
import { ErrorView as oe, LoadingView as se } from "../../components/StateViews.js";
|
|
9
|
+
import { ConfirmDialog as ce } from "../../components/ConfirmDialog.js";
|
|
10
|
+
import { describeError as p, notify as m } from "../../lib/toast.js";
|
|
11
|
+
import { SlaBadge as le } from "../../components/SlaBadge.js";
|
|
12
|
+
import { StatusStepper as ue } from "../../components/StatusStepper.js";
|
|
13
|
+
import { Timeline as de, TimelineItem as fe } from "../../components/Timeline.js";
|
|
14
|
+
import { SectionCard as h } from "../../components/SectionCard.js";
|
|
15
|
+
import { KeyValueList as g } from "../../components/KeyValueList.js";
|
|
16
|
+
import { AssigneeChip as _ } from "../../components/Avatar.js";
|
|
17
|
+
import { DocumentUploadField as pe } from "../../components/DocumentUploadField.js";
|
|
18
|
+
import { IssuePermitDialog as me } from "../permits/IssuePermitDialog.js";
|
|
19
|
+
import { useEffect as v, useMemo as y, useState as b } from "react";
|
|
20
|
+
import { BadgeCheck as he, Check as ge, CheckCircle2 as x, ChevronDown as _e, ClipboardList as ve, CreditCard as ye, Eye as be, FileText as xe, Gavel as S, HelpCircle as C, Lock as w, MessageSquare as T, PlayCircle as E, Plus as D, Route as Se, Send as Ce, UserPlus as we, X as Te, XCircle as O } from "lucide-react";
|
|
21
|
+
import { useParams as Ee } from "react-router-dom";
|
|
22
|
+
import { Fragment as De, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
23
|
+
import { Button as j, DropdownMenu as Oe, DropdownMenuContent as ke, DropdownMenuItem as Ae, DropdownMenuTrigger as je, Input as M, Label as N, ResponsiveDialog as P, ResponsiveDialogContent as F, ResponsiveDialogDescription as I, ResponsiveDialogFooter as L, ResponsiveDialogHeader as R, ResponsiveDialogTitle as z, Select as Me, SelectContent as Ne, SelectItem as Pe, SelectTrigger as Fe, SelectValue as Ie, Textarea as Le } from "@burdenoff/fe-libs/ui";
|
|
18
24
|
//#region src/govcitizenhub/pages/applications/ApplicationDetailPage.tsx
|
|
19
|
-
var
|
|
25
|
+
var Re = [
|
|
20
26
|
"INTERNAL",
|
|
21
27
|
"CITIZEN_MESSAGE",
|
|
22
28
|
"INFO_REQUEST",
|
|
23
29
|
"DECISION"
|
|
24
|
-
]
|
|
25
|
-
|
|
30
|
+
], B = {
|
|
31
|
+
INTERNAL: {
|
|
32
|
+
tone: "default",
|
|
33
|
+
icon: w,
|
|
34
|
+
label: "Internal"
|
|
35
|
+
},
|
|
36
|
+
CITIZEN_MESSAGE: {
|
|
37
|
+
tone: "success",
|
|
38
|
+
icon: T,
|
|
39
|
+
label: "Citizen message"
|
|
40
|
+
},
|
|
41
|
+
INFO_REQUEST: {
|
|
42
|
+
tone: "warning",
|
|
43
|
+
icon: C,
|
|
44
|
+
label: "Info request"
|
|
45
|
+
},
|
|
46
|
+
DECISION: {
|
|
47
|
+
tone: "info",
|
|
48
|
+
icon: S,
|
|
49
|
+
label: "Decision"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
function V(e) {
|
|
53
|
+
if (!e) return;
|
|
54
|
+
let t = [e.firstName, e.lastName].filter(Boolean).join(" ").trim();
|
|
55
|
+
return e.name?.trim() || t || e.username?.trim() || e.email;
|
|
56
|
+
}
|
|
57
|
+
var H = (e) => e.slice(0, 8);
|
|
58
|
+
function ze(e) {
|
|
26
59
|
switch (e) {
|
|
27
60
|
case "SUBMITTED": return [
|
|
28
61
|
{
|
|
29
62
|
status: "IN_REVIEW",
|
|
30
63
|
label: "Start review",
|
|
31
|
-
icon:
|
|
64
|
+
icon: E,
|
|
32
65
|
reason: "none"
|
|
33
66
|
},
|
|
34
67
|
{
|
|
35
68
|
status: "INFO_REQUESTED",
|
|
36
69
|
label: "Request info",
|
|
37
|
-
icon:
|
|
38
|
-
reason: "required"
|
|
39
|
-
variant: "outline"
|
|
70
|
+
icon: C,
|
|
71
|
+
reason: "required"
|
|
40
72
|
},
|
|
41
73
|
{
|
|
42
74
|
status: "APPROVED",
|
|
43
75
|
label: "Approve",
|
|
44
|
-
icon:
|
|
76
|
+
icon: x,
|
|
45
77
|
reason: "optional"
|
|
46
78
|
},
|
|
47
79
|
{
|
|
48
80
|
status: "REJECTED",
|
|
49
81
|
label: "Reject",
|
|
50
|
-
icon:
|
|
82
|
+
icon: O,
|
|
51
83
|
reason: "required",
|
|
52
|
-
|
|
84
|
+
destructive: !0
|
|
53
85
|
}
|
|
54
86
|
];
|
|
55
87
|
case "IN_REVIEW": return [
|
|
56
88
|
{
|
|
57
89
|
status: "INFO_REQUESTED",
|
|
58
90
|
label: "Request info",
|
|
59
|
-
icon:
|
|
60
|
-
reason: "required"
|
|
61
|
-
variant: "outline"
|
|
91
|
+
icon: C,
|
|
92
|
+
reason: "required"
|
|
62
93
|
},
|
|
63
94
|
{
|
|
64
95
|
status: "APPROVED",
|
|
65
96
|
label: "Approve",
|
|
66
|
-
icon:
|
|
97
|
+
icon: x,
|
|
67
98
|
reason: "optional"
|
|
68
99
|
},
|
|
69
100
|
{
|
|
70
101
|
status: "REJECTED",
|
|
71
102
|
label: "Reject",
|
|
72
|
-
icon:
|
|
103
|
+
icon: O,
|
|
73
104
|
reason: "required",
|
|
74
|
-
|
|
105
|
+
destructive: !0
|
|
75
106
|
}
|
|
76
107
|
];
|
|
77
108
|
case "INFO_REQUESTED": return [
|
|
78
109
|
{
|
|
79
110
|
status: "IN_REVIEW",
|
|
80
111
|
label: "Resume review",
|
|
81
|
-
icon:
|
|
112
|
+
icon: E,
|
|
82
113
|
reason: "none"
|
|
83
114
|
},
|
|
84
115
|
{
|
|
85
116
|
status: "APPROVED",
|
|
86
117
|
label: "Approve",
|
|
87
|
-
icon:
|
|
118
|
+
icon: x,
|
|
88
119
|
reason: "optional"
|
|
89
120
|
},
|
|
90
121
|
{
|
|
91
122
|
status: "REJECTED",
|
|
92
123
|
label: "Reject",
|
|
93
|
-
icon:
|
|
124
|
+
icon: O,
|
|
94
125
|
reason: "required",
|
|
95
|
-
|
|
126
|
+
destructive: !0
|
|
96
127
|
}
|
|
97
128
|
];
|
|
98
129
|
default: return [];
|
|
99
130
|
}
|
|
100
131
|
}
|
|
101
|
-
function
|
|
102
|
-
let
|
|
103
|
-
|
|
132
|
+
function Be(e) {
|
|
133
|
+
let t = e.status === "APPROVED" ? "Approved" : e.status === "REJECTED" ? "Rejected" : e.status === "WITHDRAWN" ? "Withdrawn" : "Decision";
|
|
134
|
+
return {
|
|
135
|
+
steps: [
|
|
136
|
+
{
|
|
137
|
+
key: "submitted",
|
|
138
|
+
label: "Submitted",
|
|
139
|
+
caption: e.submittedAt ? r(e.submittedAt) : e.status === "DRAFT" ? "Not submitted" : void 0
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
key: "review",
|
|
143
|
+
label: "In review"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
key: "info",
|
|
147
|
+
label: "Info requested",
|
|
148
|
+
state: e.status === "INFO_REQUESTED" ? "alert" : void 0
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: "decision",
|
|
152
|
+
label: t,
|
|
153
|
+
caption: e.decidedAt ? r(e.decidedAt) : void 0
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
current: {
|
|
157
|
+
DRAFT: 0,
|
|
158
|
+
SUBMITTED: 1,
|
|
159
|
+
IN_REVIEW: 1,
|
|
160
|
+
INFO_REQUESTED: 2,
|
|
161
|
+
APPROVED: 4,
|
|
162
|
+
REJECTED: 4,
|
|
163
|
+
WITHDRAWN: 4
|
|
164
|
+
}[e.status]
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function Ve({ assignedToId: e, currentUser: t }) {
|
|
168
|
+
return e ? t?.id && e === t.id ? /* @__PURE__ */ k(_, {
|
|
169
|
+
name: V(t) ?? "You",
|
|
170
|
+
src: t.avatar,
|
|
171
|
+
subtitle: "You"
|
|
172
|
+
}) : /* @__PURE__ */ k(_, {
|
|
173
|
+
name: "Assigned officer",
|
|
174
|
+
subtitle: `#${H(e)}`
|
|
175
|
+
}) : /* @__PURE__ */ k("span", {
|
|
176
|
+
className: "text-sm text-text-muted",
|
|
177
|
+
children: "Unassigned"
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function U() {
|
|
181
|
+
let { id: _ } = Ee(), { navigateTo: v, currentUser: x } = e(), { data: S, isLoading: C, isError: w, refetch: E } = l(_), { data: O } = ne(S?.serviceId), M = f({
|
|
182
|
+
applicationId: _,
|
|
104
183
|
pagination: { limit: 50 }
|
|
105
|
-
}), P = re(), F = ie(), I = ae(), L = te(), R = c(),
|
|
106
|
-
|
|
184
|
+
}), P = re(), F = ie(), I = ae(), L = te(), R = c(), z = u(), V = d(), U = ee(), [W, G] = b(null), [K, q] = b(null), [J, Y] = b(""), [X, Ue] = b("INTERNAL"), [We, Z] = b(!1), [Ge, Q] = b(!1), Ke = y(() => S ? ze(S.status) : [], [S]), qe = y(() => S ? Be(S) : {
|
|
185
|
+
steps: [],
|
|
186
|
+
current: 0
|
|
187
|
+
}, [S]), Je = y(() => {
|
|
188
|
+
let e = S?.formData;
|
|
107
189
|
return !e || typeof e != "object" || Array.isArray(e) ? [] : Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "");
|
|
108
|
-
}, [
|
|
109
|
-
if (
|
|
190
|
+
}, [S?.formData]), $ = y(() => S ? [...S.notes].sort((e, t) => new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime()) : [], [S]);
|
|
191
|
+
if (C) return /* @__PURE__ */ k(t, {
|
|
110
192
|
title: "Application",
|
|
111
193
|
back: {
|
|
112
194
|
label: "Applications",
|
|
113
|
-
onClick: () =>
|
|
195
|
+
onClick: () => v("applications")
|
|
114
196
|
},
|
|
115
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ k(se, { label: "Loading application…" })
|
|
116
198
|
});
|
|
117
|
-
if (
|
|
199
|
+
if (w || !S) return /* @__PURE__ */ k(t, {
|
|
118
200
|
title: "Application",
|
|
119
201
|
back: {
|
|
120
202
|
label: "Applications",
|
|
121
|
-
onClick: () =>
|
|
203
|
+
onClick: () => v("applications")
|
|
122
204
|
},
|
|
123
|
-
children: /* @__PURE__ */
|
|
205
|
+
children: /* @__PURE__ */ k(oe, {
|
|
124
206
|
message: "We couldn't load this application.",
|
|
125
|
-
onRetry: () =>
|
|
207
|
+
onRetry: () => E()
|
|
126
208
|
})
|
|
127
209
|
});
|
|
128
|
-
let
|
|
210
|
+
let Ye = async () => {
|
|
129
211
|
try {
|
|
130
|
-
await P.mutateAsync(
|
|
212
|
+
await P.mutateAsync(S.id), m.success("Application submitted", S.reference);
|
|
131
213
|
} catch (e) {
|
|
132
|
-
|
|
214
|
+
m.error("Could not submit", p(e));
|
|
133
215
|
}
|
|
134
|
-
},
|
|
216
|
+
}, Xe = async (e, t) => {
|
|
135
217
|
try {
|
|
136
218
|
await F.mutateAsync({
|
|
137
|
-
id:
|
|
219
|
+
id: S.id,
|
|
138
220
|
status: e.status,
|
|
139
221
|
reason: t.trim() || null
|
|
140
|
-
}),
|
|
222
|
+
}), m.success("Application updated", `Status is now ${a(e.status)}.`);
|
|
141
223
|
} catch (e) {
|
|
142
|
-
|
|
224
|
+
m.error("Could not update the application", p(e));
|
|
143
225
|
}
|
|
144
|
-
},
|
|
226
|
+
}, Ze = async () => {
|
|
145
227
|
if (x?.id) try {
|
|
146
228
|
await I.mutateAsync({
|
|
147
|
-
id:
|
|
229
|
+
id: S.id,
|
|
148
230
|
input: { assignedToId: x.id }
|
|
149
|
-
}),
|
|
231
|
+
}), m.success("Assigned to you");
|
|
150
232
|
} catch (e) {
|
|
151
|
-
|
|
233
|
+
m.error("Could not assign", p(e));
|
|
152
234
|
}
|
|
153
|
-
},
|
|
235
|
+
}, Qe = async (e) => {
|
|
154
236
|
try {
|
|
155
237
|
await L.mutateAsync({
|
|
156
238
|
id: e.id,
|
|
157
239
|
status: "ACCEPTED",
|
|
158
|
-
applicationId:
|
|
159
|
-
}),
|
|
240
|
+
applicationId: S.id
|
|
241
|
+
}), m.success("Document accepted", e.name);
|
|
160
242
|
} catch (e) {
|
|
161
|
-
|
|
243
|
+
m.error("Could not accept document", p(e));
|
|
162
244
|
}
|
|
163
|
-
},
|
|
164
|
-
if (
|
|
245
|
+
}, $e = async () => {
|
|
246
|
+
if (J.trim()) try {
|
|
165
247
|
await R.mutateAsync({
|
|
166
|
-
applicationId:
|
|
167
|
-
body:
|
|
168
|
-
type:
|
|
169
|
-
}),
|
|
248
|
+
applicationId: S.id,
|
|
249
|
+
body: J.trim(),
|
|
250
|
+
type: X
|
|
251
|
+
}), Y(""), m.success("Note added");
|
|
170
252
|
} catch (e) {
|
|
171
|
-
|
|
253
|
+
m.error("Could not add note", p(e));
|
|
172
254
|
}
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
|
|
255
|
+
}, et = P.isPending || F.isPending || I.isPending, tt = !!(S.assignedToId && S.assignedToId === x?.id), nt = (e) => {
|
|
256
|
+
e.reason === "none" ? Xe(e, "") : G(e);
|
|
257
|
+
}, rt = [
|
|
258
|
+
{
|
|
259
|
+
label: "Filed",
|
|
260
|
+
value: i(S.createdAt)
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: "Submitted",
|
|
264
|
+
value: S.submittedAt ? i(S.submittedAt) : "Not submitted"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
label: "Due date",
|
|
268
|
+
value: S.dueDate ? /* @__PURE__ */ A("span", {
|
|
269
|
+
className: "flex flex-col items-end gap-1",
|
|
270
|
+
children: [/* @__PURE__ */ k("span", { children: r(S.dueDate) }), /* @__PURE__ */ k(le, {
|
|
271
|
+
dueDate: S.dueDate,
|
|
272
|
+
status: S.status
|
|
273
|
+
})]
|
|
274
|
+
}) : "—"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
label: "Decided",
|
|
278
|
+
value: S.decidedAt ? i(S.decidedAt) : "—"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
label: "Assigned to",
|
|
282
|
+
value: /* @__PURE__ */ k(Ve, {
|
|
283
|
+
assignedToId: S.assignedToId,
|
|
284
|
+
currentUser: x
|
|
285
|
+
})
|
|
286
|
+
}
|
|
287
|
+
];
|
|
288
|
+
return /* @__PURE__ */ A(t, {
|
|
289
|
+
title: /* @__PURE__ */ A("span", {
|
|
290
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-2",
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ k("span", {
|
|
293
|
+
className: "text-text-primary",
|
|
294
|
+
children: S.reference
|
|
295
|
+
}),
|
|
296
|
+
O && /* @__PURE__ */ A("span", {
|
|
297
|
+
className: "text-lg font-normal text-text-secondary",
|
|
298
|
+
children: ["· ", O.name]
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ k(s, {
|
|
301
|
+
status: S.status,
|
|
302
|
+
size: "md"
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ k(s, {
|
|
305
|
+
status: S.priority,
|
|
306
|
+
size: "md"
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}),
|
|
176
310
|
back: {
|
|
177
311
|
label: "Applications",
|
|
178
|
-
onClick: () =>
|
|
312
|
+
onClick: () => v("applications")
|
|
179
313
|
},
|
|
180
|
-
actions: /* @__PURE__ */
|
|
314
|
+
actions: /* @__PURE__ */ A("div", {
|
|
181
315
|
className: "flex flex-wrap items-center gap-2",
|
|
182
316
|
children: [
|
|
183
|
-
|
|
317
|
+
!tt && x?.id && /* @__PURE__ */ A(j, {
|
|
184
318
|
variant: "outline",
|
|
185
|
-
onClick:
|
|
319
|
+
onClick: Ze,
|
|
186
320
|
disabled: I.isPending,
|
|
187
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ k(we, { className: "mr-1.5 h-4 w-4" }), " Assign to me"]
|
|
188
322
|
}),
|
|
189
|
-
|
|
190
|
-
onClick:
|
|
191
|
-
disabled:
|
|
192
|
-
children: [/* @__PURE__ */
|
|
323
|
+
S.status === "DRAFT" && /* @__PURE__ */ A(j, {
|
|
324
|
+
onClick: Ye,
|
|
325
|
+
disabled: et,
|
|
326
|
+
children: [/* @__PURE__ */ k(Ce, { className: "mr-1.5 h-4 w-4" }), " Submit"]
|
|
193
327
|
}),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
328
|
+
Ke.length > 0 && /* @__PURE__ */ A(Oe, { children: [/* @__PURE__ */ A(je, {
|
|
329
|
+
disabled: et,
|
|
330
|
+
className: "inline-flex items-center gap-1.5 rounded-button bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:opacity-50",
|
|
331
|
+
"aria-label": "Advance status",
|
|
332
|
+
children: ["Advance status ", /* @__PURE__ */ k(_e, { className: "size-4" })]
|
|
333
|
+
}), /* @__PURE__ */ k(ke, {
|
|
334
|
+
align: "end",
|
|
335
|
+
className: "min-w-48",
|
|
336
|
+
children: Ke.map((e) => {
|
|
337
|
+
let t = e.icon;
|
|
338
|
+
return /* @__PURE__ */ A(Ae, {
|
|
339
|
+
className: `gap-2 ${e.destructive ? "text-status-error-text focus:text-status-error-text" : ""}`,
|
|
340
|
+
onSelect: () => nt(e),
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ k(t, { className: "size-4" }),
|
|
343
|
+
" ",
|
|
344
|
+
e.label
|
|
345
|
+
]
|
|
346
|
+
}, e.status);
|
|
347
|
+
})
|
|
348
|
+
})] })
|
|
207
349
|
]
|
|
208
350
|
}),
|
|
209
351
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ k(h, {
|
|
353
|
+
title: "Progress",
|
|
354
|
+
icon: /* @__PURE__ */ k(Se, {}),
|
|
355
|
+
className: "mb-4 border-border-seam",
|
|
356
|
+
children: /* @__PURE__ */ k(ue, {
|
|
357
|
+
steps: qe.steps,
|
|
358
|
+
current: qe.current
|
|
359
|
+
})
|
|
360
|
+
}),
|
|
361
|
+
/* @__PURE__ */ A("div", {
|
|
211
362
|
className: "grid gap-4 lg:grid-cols-3",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ A("div", {
|
|
213
364
|
className: "space-y-4 lg:col-span-2",
|
|
214
365
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
children: [
|
|
222
|
-
/* @__PURE__ */ E(s, { status: C.status }),
|
|
223
|
-
/* @__PURE__ */ E(s, { status: C.priority }),
|
|
224
|
-
M && /* @__PURE__ */ E("span", {
|
|
225
|
-
className: "text-sm text-text-secondary",
|
|
226
|
-
children: M.name
|
|
227
|
-
})
|
|
228
|
-
]
|
|
229
|
-
}),
|
|
230
|
-
C.decisionReason && /* @__PURE__ */ D("p", {
|
|
231
|
-
className: "mt-3 rounded-lg bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
|
|
232
|
-
children: [/* @__PURE__ */ E("span", {
|
|
233
|
-
className: "font-medium text-text-primary",
|
|
234
|
-
children: "Decision note: "
|
|
235
|
-
}), C.decisionReason]
|
|
236
|
-
}),
|
|
237
|
-
X.length > 0 && /* @__PURE__ */ E(ce, {
|
|
238
|
-
title: "Submitted information",
|
|
239
|
-
className: "mt-5",
|
|
240
|
-
children: /* @__PURE__ */ E("dl", {
|
|
241
|
-
className: "grid gap-x-6 gap-y-2 sm:grid-cols-2",
|
|
242
|
-
children: X.map(([e, t]) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
243
|
-
className: "text-xs text-text-muted",
|
|
244
|
-
children: a(e)
|
|
245
|
-
}), /* @__PURE__ */ E("dd", {
|
|
246
|
-
className: "text-sm text-text-primary",
|
|
247
|
-
children: String(t)
|
|
248
|
-
})] }, e))
|
|
249
|
-
})
|
|
250
|
-
})
|
|
251
|
-
]
|
|
366
|
+
S.decisionReason && /* @__PURE__ */ A("div", {
|
|
367
|
+
className: "rounded-card border border-border-seam bg-bg-sunken px-4 py-3 text-sm text-text-secondary",
|
|
368
|
+
children: [/* @__PURE__ */ k("span", {
|
|
369
|
+
className: "font-medium text-text-primary",
|
|
370
|
+
children: "Decision note: "
|
|
371
|
+
}), S.decisionReason]
|
|
252
372
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
373
|
+
/* @__PURE__ */ k(h, {
|
|
374
|
+
title: "Submitted information",
|
|
375
|
+
icon: /* @__PURE__ */ k(ve, {}),
|
|
376
|
+
className: "border-border-seam",
|
|
377
|
+
children: Je.length === 0 ? /* @__PURE__ */ k("p", {
|
|
378
|
+
className: "text-sm text-text-secondary",
|
|
379
|
+
children: "No form data was captured with this application."
|
|
380
|
+
}) : /* @__PURE__ */ k(g, {
|
|
381
|
+
columns: 2,
|
|
382
|
+
variant: "stacked",
|
|
383
|
+
items: Je.map(([e, t]) => ({
|
|
384
|
+
label: a(e),
|
|
385
|
+
value: String(t)
|
|
386
|
+
}))
|
|
387
|
+
})
|
|
388
|
+
}),
|
|
389
|
+
/* @__PURE__ */ A(h, {
|
|
390
|
+
title: "Documents",
|
|
391
|
+
icon: /* @__PURE__ */ k(xe, {}),
|
|
392
|
+
className: "border-border-seam",
|
|
393
|
+
actions: /* @__PURE__ */ A("span", {
|
|
394
|
+
className: "text-xs text-text-muted tabular-nums",
|
|
395
|
+
children: [S.documents.length, " attached"]
|
|
396
|
+
}),
|
|
397
|
+
children: [/* @__PURE__ */ k("div", {
|
|
398
|
+
className: "space-y-2.5",
|
|
399
|
+
children: S.documents.length === 0 ? /* @__PURE__ */ k("p", {
|
|
400
|
+
className: "text-sm text-text-secondary",
|
|
401
|
+
children: "No documents attached yet."
|
|
402
|
+
}) : S.documents.map((e) => /* @__PURE__ */ A("div", {
|
|
403
|
+
className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
404
|
+
children: [/* @__PURE__ */ A("div", {
|
|
405
|
+
className: "flex min-w-0 items-center gap-3",
|
|
406
|
+
children: [/* @__PURE__ */ k("span", {
|
|
407
|
+
className: "inline-flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
408
|
+
children: /* @__PURE__ */ k(xe, { className: "size-4" })
|
|
409
|
+
}), /* @__PURE__ */ A("div", {
|
|
272
410
|
className: "min-w-0",
|
|
273
411
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ k("p", {
|
|
275
413
|
className: "truncate text-sm font-medium text-text-primary",
|
|
276
414
|
children: e.name
|
|
277
415
|
}),
|
|
278
|
-
|
|
416
|
+
/* @__PURE__ */ A("p", {
|
|
279
417
|
className: "text-xs text-text-muted",
|
|
280
|
-
children: [
|
|
418
|
+
children: [
|
|
419
|
+
e.requirement ? `${e.requirement} · ` : "",
|
|
420
|
+
"Added ",
|
|
421
|
+
o(e.createdAt)
|
|
422
|
+
]
|
|
281
423
|
}),
|
|
282
|
-
e.status === "REJECTED" && e.rejectionReason && /* @__PURE__ */
|
|
283
|
-
className: "text-xs text-status-error-text",
|
|
424
|
+
e.status === "REJECTED" && e.rejectionReason && /* @__PURE__ */ A("p", {
|
|
425
|
+
className: "mt-0.5 text-xs text-status-error-text",
|
|
284
426
|
children: ["Rejected: ", e.rejectionReason]
|
|
285
427
|
})
|
|
286
428
|
]
|
|
287
|
-
}), /* @__PURE__ */ D("div", {
|
|
288
|
-
className: "flex items-center gap-2",
|
|
289
|
-
children: [/* @__PURE__ */ E(s, { status: e.status }), e.status === "PENDING" && /* @__PURE__ */ D(ve, { children: [/* @__PURE__ */ E(O, {
|
|
290
|
-
size: "sm",
|
|
291
|
-
variant: "outline",
|
|
292
|
-
onClick: () => Fe(e),
|
|
293
|
-
disabled: L.isPending,
|
|
294
|
-
"aria-label": `Accept ${e.name}`,
|
|
295
|
-
children: /* @__PURE__ */ E(fe, { className: "h-4 w-4" })
|
|
296
|
-
}), /* @__PURE__ */ E(O, {
|
|
297
|
-
size: "sm",
|
|
298
|
-
variant: "outline",
|
|
299
|
-
onClick: () => W(e),
|
|
300
|
-
"aria-label": `Reject ${e.name}`,
|
|
301
|
-
children: /* @__PURE__ */ E(ge, { className: "h-4 w-4" })
|
|
302
|
-
})] })]
|
|
303
429
|
})]
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
430
|
+
}), /* @__PURE__ */ A("div", {
|
|
431
|
+
className: "flex items-center gap-2",
|
|
432
|
+
children: [/* @__PURE__ */ k(s, { status: e.status }), e.status === "PENDING" && /* @__PURE__ */ A(De, { children: [/* @__PURE__ */ k(j, {
|
|
433
|
+
size: "sm",
|
|
434
|
+
variant: "outline",
|
|
435
|
+
onClick: () => Qe(e),
|
|
436
|
+
disabled: L.isPending,
|
|
437
|
+
"aria-label": `Accept ${e.name}`,
|
|
438
|
+
children: /* @__PURE__ */ k(ge, { className: "h-4 w-4" })
|
|
439
|
+
}), /* @__PURE__ */ k(j, {
|
|
440
|
+
size: "sm",
|
|
441
|
+
variant: "outline",
|
|
442
|
+
onClick: () => q(e),
|
|
443
|
+
disabled: L.isPending,
|
|
444
|
+
"aria-label": `Reject ${e.name}`,
|
|
445
|
+
children: /* @__PURE__ */ k(Te, { className: "h-4 w-4" })
|
|
446
|
+
})] })]
|
|
314
447
|
})]
|
|
315
|
-
})
|
|
316
|
-
|
|
448
|
+
}, e.id))
|
|
449
|
+
}), /* @__PURE__ */ A("div", {
|
|
450
|
+
className: "mt-4 border-t border-border-seam pt-4",
|
|
451
|
+
children: [/* @__PURE__ */ k(pe, {
|
|
452
|
+
applicationId: S.id,
|
|
453
|
+
onAdded: () => E()
|
|
454
|
+
}), O && O.requiredDocuments.length > 0 && /* @__PURE__ */ A("p", {
|
|
455
|
+
className: "mt-2 text-xs text-text-muted",
|
|
456
|
+
children: ["Required: ", O.requiredDocuments.join(", ")]
|
|
457
|
+
})]
|
|
458
|
+
})]
|
|
317
459
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
460
|
+
/* @__PURE__ */ A(h, {
|
|
461
|
+
title: "Case notes",
|
|
462
|
+
icon: /* @__PURE__ */ k(T, {}),
|
|
463
|
+
className: "border-border-seam",
|
|
464
|
+
actions: /* @__PURE__ */ A("span", {
|
|
465
|
+
className: "text-xs text-text-muted tabular-nums",
|
|
466
|
+
children: [
|
|
467
|
+
S.notes.length,
|
|
468
|
+
" ",
|
|
469
|
+
S.notes.length === 1 ? "note" : "notes"
|
|
470
|
+
]
|
|
471
|
+
}),
|
|
472
|
+
children: [$.length === 0 ? /* @__PURE__ */ k("p", {
|
|
473
|
+
className: "text-sm text-text-secondary",
|
|
474
|
+
children: "No case notes yet."
|
|
475
|
+
}) : /* @__PURE__ */ k(de, { children: $.map((e, t) => {
|
|
476
|
+
let n = B[e.type], r = n.icon, a = x?.id && e.authorId === x.id ? "You" : `#${H(e.authorId)}`;
|
|
477
|
+
return /* @__PURE__ */ k(fe, {
|
|
478
|
+
tone: n.tone,
|
|
479
|
+
icon: /* @__PURE__ */ k(r, {}),
|
|
480
|
+
title: n.label,
|
|
481
|
+
author: a,
|
|
482
|
+
timestamp: i(e.createdAt),
|
|
483
|
+
last: t === $.length - 1,
|
|
484
|
+
children: /* @__PURE__ */ k("p", {
|
|
485
|
+
className: "whitespace-pre-wrap text-text-primary",
|
|
486
|
+
children: e.body
|
|
487
|
+
})
|
|
488
|
+
}, e.id);
|
|
489
|
+
}) }), /* @__PURE__ */ A("div", {
|
|
490
|
+
className: "mt-4 space-y-2 border-t border-border-seam pt-4",
|
|
491
|
+
children: [/* @__PURE__ */ k(Le, {
|
|
492
|
+
value: J,
|
|
493
|
+
onChange: (e) => Y(e.target.value),
|
|
494
|
+
placeholder: "Add a case note…",
|
|
495
|
+
rows: 2,
|
|
496
|
+
"aria-label": "New case note"
|
|
497
|
+
}), /* @__PURE__ */ A("div", {
|
|
498
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
499
|
+
children: [/* @__PURE__ */ A("div", {
|
|
500
|
+
className: "flex items-center gap-2",
|
|
501
|
+
children: [/* @__PURE__ */ k(N, {
|
|
502
|
+
htmlFor: "note-type",
|
|
503
|
+
className: "text-xs text-text-muted",
|
|
504
|
+
children: "Note type"
|
|
505
|
+
}), /* @__PURE__ */ A(Me, {
|
|
506
|
+
value: X,
|
|
507
|
+
onValueChange: (e) => Ue(e),
|
|
508
|
+
children: [/* @__PURE__ */ k(Fe, {
|
|
509
|
+
id: "note-type",
|
|
510
|
+
className: "w-44",
|
|
363
511
|
"aria-label": "Note type",
|
|
364
|
-
children: /* @__PURE__ */
|
|
365
|
-
}), /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ k(Ie, {})
|
|
513
|
+
}), /* @__PURE__ */ k(Ne, { children: Re.map((e) => /* @__PURE__ */ k(Pe, {
|
|
366
514
|
value: e,
|
|
367
|
-
children:
|
|
515
|
+
children: B[e].label
|
|
368
516
|
}, e)) })]
|
|
369
|
-
}), /* @__PURE__ */ D(O, {
|
|
370
|
-
onClick: Ie,
|
|
371
|
-
disabled: !G.trim() || R.isPending,
|
|
372
|
-
children: [/* @__PURE__ */ E(w, { className: "mr-1.5 h-4 w-4" }), " Add note"]
|
|
373
517
|
})]
|
|
518
|
+
}), /* @__PURE__ */ A(j, {
|
|
519
|
+
onClick: $e,
|
|
520
|
+
disabled: !J.trim() || R.isPending,
|
|
521
|
+
children: [/* @__PURE__ */ k(D, { className: "mr-1.5 h-4 w-4" }), " Add note"]
|
|
374
522
|
})]
|
|
375
|
-
})
|
|
376
|
-
]
|
|
523
|
+
})]
|
|
524
|
+
})]
|
|
377
525
|
})
|
|
378
526
|
]
|
|
379
|
-
}), /* @__PURE__ */
|
|
527
|
+
}), /* @__PURE__ */ A("div", {
|
|
380
528
|
className: "space-y-4",
|
|
381
529
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
children: [
|
|
388
|
-
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
389
|
-
className: "text-text-muted",
|
|
390
|
-
children: "Filed"
|
|
391
|
-
}), /* @__PURE__ */ E("dd", {
|
|
392
|
-
className: "font-medium text-text-primary",
|
|
393
|
-
children: i(C.createdAt)
|
|
394
|
-
})] }),
|
|
395
|
-
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
396
|
-
className: "text-text-muted",
|
|
397
|
-
children: "Submitted"
|
|
398
|
-
}), /* @__PURE__ */ E("dd", {
|
|
399
|
-
className: "font-medium text-text-primary",
|
|
400
|
-
children: C.submittedAt ? i(C.submittedAt) : "Not submitted"
|
|
401
|
-
})] }),
|
|
402
|
-
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
403
|
-
className: "text-text-muted",
|
|
404
|
-
children: "Due"
|
|
405
|
-
}), /* @__PURE__ */ E("dd", {
|
|
406
|
-
className: "font-medium text-text-primary",
|
|
407
|
-
children: C.dueDate ? r(C.dueDate) : "—"
|
|
408
|
-
})] }),
|
|
409
|
-
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
410
|
-
className: "text-text-muted",
|
|
411
|
-
children: "Decided"
|
|
412
|
-
}), /* @__PURE__ */ E("dd", {
|
|
413
|
-
className: "font-medium text-text-primary",
|
|
414
|
-
children: C.decidedAt ? i(C.decidedAt) : "—"
|
|
415
|
-
})] }),
|
|
416
|
-
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
417
|
-
className: "text-text-muted",
|
|
418
|
-
children: "Assigned"
|
|
419
|
-
}), /* @__PURE__ */ E("dd", {
|
|
420
|
-
className: "font-medium text-text-primary",
|
|
421
|
-
children: C.assignedToId ? $ ? "You" : "An officer" : "Unassigned"
|
|
422
|
-
})] })
|
|
423
|
-
]
|
|
424
|
-
})
|
|
530
|
+
/* @__PURE__ */ k(h, {
|
|
531
|
+
title: "Case details",
|
|
532
|
+
icon: /* @__PURE__ */ k(be, {}),
|
|
533
|
+
className: "border-border-seam",
|
|
534
|
+
children: /* @__PURE__ */ k(g, { items: rt })
|
|
425
535
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
"aria-label": "Record payment",
|
|
442
|
-
children: /* @__PURE__ */ E(w, { className: "h-4 w-4" })
|
|
443
|
-
})]
|
|
444
|
-
}), /* @__PURE__ */ E("div", {
|
|
445
|
-
className: "mt-3 space-y-2",
|
|
446
|
-
children: N.data?.items.length ? N.data.items.map((e) => /* @__PURE__ */ D("div", {
|
|
447
|
-
className: "rounded-lg border border-border-seam px-3 py-2",
|
|
536
|
+
/* @__PURE__ */ k(h, {
|
|
537
|
+
title: "Payments",
|
|
538
|
+
icon: /* @__PURE__ */ k(ye, {}),
|
|
539
|
+
className: "border-border-seam",
|
|
540
|
+
actions: /* @__PURE__ */ k(j, {
|
|
541
|
+
size: "sm",
|
|
542
|
+
variant: "outline",
|
|
543
|
+
onClick: () => Z(!0),
|
|
544
|
+
"aria-label": "Record payment",
|
|
545
|
+
children: /* @__PURE__ */ k(D, { className: "h-4 w-4" })
|
|
546
|
+
}),
|
|
547
|
+
children: /* @__PURE__ */ k("div", {
|
|
548
|
+
className: "space-y-2",
|
|
549
|
+
children: M.data?.items.length ? M.data.items.map((e) => /* @__PURE__ */ A("div", {
|
|
550
|
+
className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
448
551
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ A("div", {
|
|
450
553
|
className: "flex items-center justify-between gap-2",
|
|
451
|
-
children: [/* @__PURE__ */
|
|
452
|
-
className: "font-medium text-text-primary",
|
|
554
|
+
children: [/* @__PURE__ */ k("span", {
|
|
555
|
+
className: "font-medium text-text-primary tabular-nums",
|
|
453
556
|
children: n(e.amount, e.currency)
|
|
454
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ k(s, { status: e.status })]
|
|
455
558
|
}),
|
|
456
|
-
e.receiptNumber && /* @__PURE__ */
|
|
457
|
-
className: "text-xs text-text-muted",
|
|
559
|
+
e.receiptNumber && /* @__PURE__ */ A("p", {
|
|
560
|
+
className: "mt-0.5 text-xs text-text-muted",
|
|
458
561
|
children: ["Receipt ", e.receiptNumber]
|
|
459
562
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
563
|
+
(e.status === "PENDING" || e.status === "PAID") && /* @__PURE__ */ A("div", {
|
|
461
564
|
className: "mt-2 flex gap-2",
|
|
462
|
-
children: [e.status === "PENDING" && /* @__PURE__ */
|
|
565
|
+
children: [e.status === "PENDING" && /* @__PURE__ */ k(j, {
|
|
463
566
|
size: "sm",
|
|
464
567
|
variant: "outline",
|
|
465
|
-
onClick: () =>
|
|
466
|
-
disabled:
|
|
568
|
+
onClick: () => V.mutateAsync({ id: e.id }).then(() => m.success("Marked as paid")).catch((e) => m.error("Could not update", p(e))),
|
|
569
|
+
disabled: V.isPending,
|
|
467
570
|
children: "Mark paid"
|
|
468
|
-
}), e.status === "PAID" && /* @__PURE__ */
|
|
571
|
+
}), e.status === "PAID" && /* @__PURE__ */ k(j, {
|
|
469
572
|
size: "sm",
|
|
470
573
|
variant: "outline",
|
|
471
|
-
onClick: () =>
|
|
472
|
-
disabled:
|
|
574
|
+
onClick: () => U.mutateAsync(e.id).then(() => m.success("Refunded")).catch((e) => m.error("Could not refund", p(e))),
|
|
575
|
+
disabled: U.isPending,
|
|
473
576
|
children: "Refund"
|
|
474
577
|
})]
|
|
475
578
|
})
|
|
476
579
|
]
|
|
477
|
-
}, e.id)) : /* @__PURE__ */
|
|
580
|
+
}, e.id)) : /* @__PURE__ */ k("p", {
|
|
478
581
|
className: "text-sm text-text-secondary",
|
|
479
582
|
children: "No payments recorded."
|
|
480
583
|
})
|
|
481
|
-
})
|
|
584
|
+
})
|
|
482
585
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
children: /* @__PURE__ */ E(w, { className: "h-4 w-4" })
|
|
500
|
-
})]
|
|
501
|
-
}), /* @__PURE__ */ E("div", {
|
|
502
|
-
className: "mt-3 space-y-2",
|
|
503
|
-
children: C.permits.length ? C.permits.map((e) => /* @__PURE__ */ D("div", {
|
|
504
|
-
className: "rounded-lg border border-border-seam px-3 py-2",
|
|
505
|
-
children: [/* @__PURE__ */ D("div", {
|
|
586
|
+
/* @__PURE__ */ k(h, {
|
|
587
|
+
title: "Permits",
|
|
588
|
+
icon: /* @__PURE__ */ k(he, {}),
|
|
589
|
+
className: "border-border-seam",
|
|
590
|
+
actions: /* @__PURE__ */ k(j, {
|
|
591
|
+
size: "sm",
|
|
592
|
+
variant: "outline",
|
|
593
|
+
onClick: () => Q(!0),
|
|
594
|
+
"aria-label": "Issue permit",
|
|
595
|
+
children: /* @__PURE__ */ k(D, { className: "h-4 w-4" })
|
|
596
|
+
}),
|
|
597
|
+
children: /* @__PURE__ */ k("div", {
|
|
598
|
+
className: "space-y-2",
|
|
599
|
+
children: S.permits.length ? S.permits.map((e) => /* @__PURE__ */ A("div", {
|
|
600
|
+
className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
601
|
+
children: [/* @__PURE__ */ A("div", {
|
|
506
602
|
className: "flex items-center justify-between gap-2",
|
|
507
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ k("span", {
|
|
508
604
|
className: "truncate font-medium text-text-primary",
|
|
509
605
|
children: e.title
|
|
510
|
-
}), /* @__PURE__ */
|
|
511
|
-
}), /* @__PURE__ */
|
|
512
|
-
className: "font-mono text-xs text-text-muted",
|
|
606
|
+
}), /* @__PURE__ */ k(s, { status: e.status })]
|
|
607
|
+
}), /* @__PURE__ */ k("p", {
|
|
608
|
+
className: "mt-0.5 font-mono text-xs text-text-muted",
|
|
513
609
|
children: e.verificationCode
|
|
514
610
|
})]
|
|
515
|
-
}, e.id)) : /* @__PURE__ */
|
|
611
|
+
}, e.id)) : /* @__PURE__ */ k("p", {
|
|
516
612
|
className: "text-sm text-text-secondary",
|
|
517
|
-
children: "No
|
|
613
|
+
children: "No permit issued yet. Approve the application, then issue the permit here."
|
|
518
614
|
})
|
|
519
|
-
})
|
|
615
|
+
})
|
|
520
616
|
})
|
|
521
617
|
]
|
|
522
618
|
})]
|
|
523
619
|
}),
|
|
524
|
-
|
|
525
|
-
open: !!
|
|
526
|
-
onOpenChange: (e) => e ? void 0 :
|
|
527
|
-
title: `${
|
|
528
|
-
description: `This will move the application to ${a(
|
|
529
|
-
confirmLabel:
|
|
530
|
-
destructive:
|
|
620
|
+
W && /* @__PURE__ */ k(ce, {
|
|
621
|
+
open: !!W,
|
|
622
|
+
onOpenChange: (e) => e ? void 0 : G(null),
|
|
623
|
+
title: `${W.label}?`,
|
|
624
|
+
description: `This will move the application to ${a(W.status)}.`,
|
|
625
|
+
confirmLabel: W.label,
|
|
626
|
+
destructive: W.destructive,
|
|
531
627
|
reason: {
|
|
532
|
-
label:
|
|
628
|
+
label: W.status === "REJECTED" ? "Reason for rejection" : "Reason / note",
|
|
533
629
|
placeholder: "Explain the decision…",
|
|
534
|
-
required:
|
|
630
|
+
required: W.reason === "required"
|
|
535
631
|
},
|
|
536
632
|
onConfirm: async (e) => {
|
|
537
|
-
await
|
|
633
|
+
await Xe(W, e), G(null);
|
|
538
634
|
}
|
|
539
635
|
}),
|
|
540
|
-
|
|
541
|
-
open: !!
|
|
542
|
-
onOpenChange: (e) => e ? void 0 :
|
|
543
|
-
title: `Reject ${
|
|
636
|
+
K && /* @__PURE__ */ k(ce, {
|
|
637
|
+
open: !!K,
|
|
638
|
+
onOpenChange: (e) => e ? void 0 : q(null),
|
|
639
|
+
title: `Reject ${K.name}?`,
|
|
544
640
|
confirmLabel: "Reject document",
|
|
545
641
|
destructive: !0,
|
|
546
642
|
reason: {
|
|
@@ -550,62 +646,62 @@ function R() {
|
|
|
550
646
|
},
|
|
551
647
|
onConfirm: async (e) => {
|
|
552
648
|
await L.mutateAsync({
|
|
553
|
-
id:
|
|
649
|
+
id: K.id,
|
|
554
650
|
status: "REJECTED",
|
|
555
651
|
rejectionReason: e,
|
|
556
|
-
applicationId:
|
|
557
|
-
}),
|
|
652
|
+
applicationId: S.id
|
|
653
|
+
}), m.success("Document rejected"), q(null);
|
|
558
654
|
}
|
|
559
655
|
}),
|
|
560
|
-
/* @__PURE__ */
|
|
561
|
-
open:
|
|
562
|
-
onOpenChange:
|
|
563
|
-
defaultAmount:
|
|
564
|
-
defaultCurrency:
|
|
656
|
+
/* @__PURE__ */ k(He, {
|
|
657
|
+
open: We,
|
|
658
|
+
onOpenChange: Z,
|
|
659
|
+
defaultAmount: O?.feeAmount ?? 0,
|
|
660
|
+
defaultCurrency: O?.currency ?? "INR",
|
|
565
661
|
onSubmit: async ({ amount: e, currency: t, providerRef: n }) => {
|
|
566
|
-
await
|
|
567
|
-
applicationId:
|
|
662
|
+
await z.mutateAsync({
|
|
663
|
+
applicationId: S.id,
|
|
568
664
|
amount: e,
|
|
569
665
|
currency: t,
|
|
570
666
|
providerRef: n || null
|
|
571
|
-
}),
|
|
667
|
+
}), m.success("Payment recorded"), M.refetch();
|
|
572
668
|
}
|
|
573
669
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
open:
|
|
576
|
-
onOpenChange:
|
|
577
|
-
defaultServiceId:
|
|
578
|
-
defaultHolderId:
|
|
579
|
-
applicationId:
|
|
580
|
-
onIssued: () =>
|
|
670
|
+
/* @__PURE__ */ k(me, {
|
|
671
|
+
open: Ge,
|
|
672
|
+
onOpenChange: Q,
|
|
673
|
+
defaultServiceId: S.serviceId,
|
|
674
|
+
defaultHolderId: S.citizenId,
|
|
675
|
+
applicationId: S.id,
|
|
676
|
+
onIssued: () => E()
|
|
581
677
|
})
|
|
582
678
|
]
|
|
583
679
|
});
|
|
584
680
|
}
|
|
585
|
-
function
|
|
586
|
-
let [a, o] =
|
|
587
|
-
return
|
|
681
|
+
function He({ open: e, onOpenChange: t, defaultAmount: n, defaultCurrency: r, onSubmit: i }) {
|
|
682
|
+
let [a, o] = b(""), [s, c] = b(r), [l, u] = b(""), [d, f] = b(!1);
|
|
683
|
+
return v(() => {
|
|
588
684
|
e && (o(n ? String(n) : ""), c(r || "INR"), u(""));
|
|
589
685
|
}, [
|
|
590
686
|
e,
|
|
591
687
|
n,
|
|
592
688
|
r
|
|
593
|
-
]), /* @__PURE__ */
|
|
689
|
+
]), /* @__PURE__ */ k(P, {
|
|
594
690
|
open: e,
|
|
595
691
|
onOpenChange: (e) => d ? void 0 : t(e),
|
|
596
|
-
children: /* @__PURE__ */
|
|
692
|
+
children: /* @__PURE__ */ A(F, {
|
|
597
693
|
className: "sm:max-w-md",
|
|
598
694
|
children: [
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ A(R, { children: [/* @__PURE__ */ k(z, { children: "Record a payment" }), /* @__PURE__ */ k(I, { children: "Log a fee payment against this application." })] }),
|
|
696
|
+
/* @__PURE__ */ A("div", {
|
|
601
697
|
className: "grid gap-4 py-2 sm:grid-cols-2",
|
|
602
698
|
children: [
|
|
603
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ A("div", {
|
|
604
700
|
className: "grid gap-1.5",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ k(N, {
|
|
606
702
|
htmlFor: "pay-amount",
|
|
607
703
|
children: "Amount"
|
|
608
|
-
}), /* @__PURE__ */
|
|
704
|
+
}), /* @__PURE__ */ k(M, {
|
|
609
705
|
id: "pay-amount",
|
|
610
706
|
type: "number",
|
|
611
707
|
min: "0",
|
|
@@ -614,24 +710,24 @@ function De({ open: e, onOpenChange: t, defaultAmount: n, defaultCurrency: r, on
|
|
|
614
710
|
onChange: (e) => o(e.target.value)
|
|
615
711
|
})]
|
|
616
712
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ A("div", {
|
|
618
714
|
className: "grid gap-1.5",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
715
|
+
children: [/* @__PURE__ */ k(N, {
|
|
620
716
|
htmlFor: "pay-currency",
|
|
621
717
|
children: "Currency"
|
|
622
|
-
}), /* @__PURE__ */
|
|
718
|
+
}), /* @__PURE__ */ k(M, {
|
|
623
719
|
id: "pay-currency",
|
|
624
720
|
value: s,
|
|
625
721
|
maxLength: 3,
|
|
626
722
|
onChange: (e) => c(e.target.value.toUpperCase())
|
|
627
723
|
})]
|
|
628
724
|
}),
|
|
629
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ A("div", {
|
|
630
726
|
className: "grid gap-1.5 sm:col-span-2",
|
|
631
|
-
children: [/* @__PURE__ */
|
|
727
|
+
children: [/* @__PURE__ */ k(N, {
|
|
632
728
|
htmlFor: "pay-ref",
|
|
633
729
|
children: "Provider reference (optional)"
|
|
634
|
-
}), /* @__PURE__ */
|
|
730
|
+
}), /* @__PURE__ */ k(M, {
|
|
635
731
|
id: "pay-ref",
|
|
636
732
|
value: l,
|
|
637
733
|
onChange: (e) => u(e.target.value),
|
|
@@ -640,12 +736,12 @@ function De({ open: e, onOpenChange: t, defaultAmount: n, defaultCurrency: r, on
|
|
|
640
736
|
})
|
|
641
737
|
]
|
|
642
738
|
}),
|
|
643
|
-
/* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ A(L, { children: [/* @__PURE__ */ k(j, {
|
|
644
740
|
variant: "outline",
|
|
645
741
|
onClick: () => t(!1),
|
|
646
742
|
disabled: d,
|
|
647
743
|
children: "Cancel"
|
|
648
|
-
}), /* @__PURE__ */
|
|
744
|
+
}), /* @__PURE__ */ k(j, {
|
|
649
745
|
onClick: async () => {
|
|
650
746
|
let e = Number(a || 0);
|
|
651
747
|
if (!(e <= 0)) {
|
|
@@ -669,6 +765,6 @@ function De({ open: e, onOpenChange: t, defaultAmount: n, defaultCurrency: r, on
|
|
|
669
765
|
});
|
|
670
766
|
}
|
|
671
767
|
//#endregion
|
|
672
|
-
export {
|
|
768
|
+
export { U as ApplicationDetailPage };
|
|
673
769
|
|
|
674
770
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|