@burdenoff/microfe-govcitizenhub 2026.720.6 → 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 +20 -0
- package/dist/govcitizenhub/hooks/useGovApi.d.ts.map +1 -1
- package/dist/govcitizenhub/hooks/useGovApi.js +18 -7
- 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/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
|
@@ -8,17 +8,18 @@ import { EmptyState as o } from "../../components/EmptyState.js";
|
|
|
8
8
|
import { useGovAgencies as s, useGovGrievances as c, useGovReportGrievance as l } from "../../hooks/useGovApi.js";
|
|
9
9
|
import { useCursorPager as u } from "../../hooks/useCursorPager.js";
|
|
10
10
|
import { FILE_FOLDERS as d, uploadFileToFiles as f } from "../../hooks/useFiles.js";
|
|
11
|
+
import { useGovCitizenHubAnalytics as p } from "../../hooks/useGovCitizenHubAnalytics.js";
|
|
11
12
|
import "../../hooks/index.js";
|
|
12
|
-
import { ErrorView as
|
|
13
|
-
import { FilterTabs as
|
|
14
|
-
import { describeError as
|
|
15
|
-
import { Pagination as
|
|
16
|
-
import { useEffect as
|
|
17
|
-
import { BadgeCheck as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { Button as
|
|
13
|
+
import { ErrorView as m } from "../../components/StateViews.js";
|
|
14
|
+
import { FilterTabs as h } from "../../components/FilterTabs.js";
|
|
15
|
+
import { describeError as g, notify as _ } from "../../lib/toast.js";
|
|
16
|
+
import { Pagination as v } from "../../components/Pagination.js";
|
|
17
|
+
import { useEffect as y, useState as b } from "react";
|
|
18
|
+
import { BadgeCheck as x, Camera as S, ChevronRight as C, CircleHelp as w, GraduationCap as T, HandHeart as E, HeartPulse as D, Loader2 as ee, MapPin as O, Megaphone as k, Plus as A, Receipt as j, ScrollText as M, Wrench as N, X as te } from "lucide-react";
|
|
19
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
20
|
+
import { Button as L, GlassCard as R, Input as z, Label as B, ResponsiveDialog as ne, ResponsiveDialogContent as re, ResponsiveDialogDescription as ie, ResponsiveDialogFooter as ae, ResponsiveDialogHeader as oe, ResponsiveDialogTitle as se, Select as V, SelectContent as H, SelectItem as U, SelectTrigger as W, SelectValue as G, Skeleton as K, Textarea as ce } from "@burdenoff/fe-libs/ui";
|
|
20
21
|
//#region src/govcitizenhub/pages/grievances/GrievancesPage.tsx
|
|
21
|
-
var
|
|
22
|
+
var q = 15, J = 5, Y = 1e3, X = [
|
|
22
23
|
{
|
|
23
24
|
value: "ALL",
|
|
24
25
|
label: "All"
|
|
@@ -43,7 +44,7 @@ var J = 15, Y = 5, X = 1e3, Z = [
|
|
|
43
44
|
value: "CLOSED",
|
|
44
45
|
label: "Closed"
|
|
45
46
|
}
|
|
46
|
-
],
|
|
47
|
+
], le = [
|
|
47
48
|
"GRIEVANCES",
|
|
48
49
|
"HEALTH",
|
|
49
50
|
"UTILITIES",
|
|
@@ -53,272 +54,275 @@ var J = 15, Y = 5, X = 1e3, Z = [
|
|
|
53
54
|
"LICENCES_AND_PERMITS",
|
|
54
55
|
"TAXES_AND_PAYMENTS",
|
|
55
56
|
"OTHER"
|
|
56
|
-
],
|
|
57
|
+
], ue = [
|
|
57
58
|
"LOW",
|
|
58
59
|
"NORMAL",
|
|
59
60
|
"HIGH",
|
|
60
61
|
"URGENT"
|
|
61
|
-
],
|
|
62
|
-
CERTIFICATES:
|
|
63
|
-
EDUCATION:
|
|
64
|
-
GRIEVANCES:
|
|
65
|
-
HEALTH:
|
|
66
|
-
LICENCES_AND_PERMITS:
|
|
67
|
-
OTHER:
|
|
68
|
-
SOCIAL_WELFARE:
|
|
69
|
-
TAXES_AND_PAYMENTS:
|
|
70
|
-
UTILITIES:
|
|
62
|
+
], Z = {
|
|
63
|
+
CERTIFICATES: M,
|
|
64
|
+
EDUCATION: T,
|
|
65
|
+
GRIEVANCES: k,
|
|
66
|
+
HEALTH: D,
|
|
67
|
+
LICENCES_AND_PERMITS: x,
|
|
68
|
+
OTHER: w,
|
|
69
|
+
SOCIAL_WELFARE: E,
|
|
70
|
+
TAXES_AND_PAYMENTS: j,
|
|
71
|
+
UTILITIES: N
|
|
71
72
|
};
|
|
72
|
-
function
|
|
73
|
-
let { navigateTo: t } = e(), s = u(), [l, d] =
|
|
73
|
+
function Q() {
|
|
74
|
+
let { navigateTo: t } = e(), s = u(), [l, d] = b("ALL"), [f, p] = b(!1), { data: g, isLoading: _, isError: y, refetch: x } = c({
|
|
74
75
|
status: l === "ALL" ? void 0 : l,
|
|
75
76
|
pagination: {
|
|
76
|
-
limit:
|
|
77
|
+
limit: q,
|
|
77
78
|
cursor: s.cursor
|
|
78
79
|
}
|
|
79
80
|
}), T = g?.items ?? [];
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ I(n, {
|
|
81
82
|
title: "Grievances",
|
|
82
83
|
titleGradient: !0,
|
|
83
84
|
description: "Civic complaints reported by citizens, triaged through to resolution.",
|
|
84
|
-
actions: /* @__PURE__ */
|
|
85
|
-
onClick: () =>
|
|
86
|
-
children: [/* @__PURE__ */
|
|
85
|
+
actions: /* @__PURE__ */ I(L, {
|
|
86
|
+
onClick: () => p(!0),
|
|
87
|
+
children: [/* @__PURE__ */ F(A, { className: "mr-1.5 h-4 w-4" }), " Report grievance"]
|
|
87
88
|
}),
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ F("div", {
|
|
90
91
|
className: "mb-5",
|
|
91
|
-
children: /* @__PURE__ */
|
|
92
|
-
options:
|
|
92
|
+
children: /* @__PURE__ */ F(h, {
|
|
93
|
+
options: X,
|
|
93
94
|
value: l,
|
|
94
95
|
onChange: (e) => {
|
|
95
96
|
d(e), s.reset();
|
|
96
97
|
}
|
|
97
98
|
})
|
|
98
99
|
}),
|
|
99
|
-
|
|
100
|
+
_ ? /* @__PURE__ */ F("div", {
|
|
100
101
|
className: "space-y-3",
|
|
101
|
-
children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */
|
|
102
|
-
}) :
|
|
102
|
+
children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ F(K, { className: "h-[72px] w-full rounded-card" }, t))
|
|
103
|
+
}) : y ? /* @__PURE__ */ F(m, {
|
|
103
104
|
message: "We couldn't load grievances.",
|
|
104
|
-
onRetry: () =>
|
|
105
|
-
}) : T.length === 0 && s.page === 0 ? /* @__PURE__ */
|
|
105
|
+
onRetry: () => x()
|
|
106
|
+
}) : T.length === 0 && s.page === 0 ? /* @__PURE__ */ F(o, {
|
|
106
107
|
illustration: "empty-data",
|
|
107
108
|
title: "No grievances found",
|
|
108
109
|
description: l === "ALL" ? "Report the first civic grievance." : "No grievances match this status.",
|
|
109
|
-
action: /* @__PURE__ */
|
|
110
|
-
onClick: () =>
|
|
111
|
-
children: [/* @__PURE__ */
|
|
110
|
+
action: /* @__PURE__ */ I(L, {
|
|
111
|
+
onClick: () => p(!0),
|
|
112
|
+
children: [/* @__PURE__ */ F(A, { className: "mr-1.5 h-4 w-4" }), " Report grievance"]
|
|
112
113
|
})
|
|
113
|
-
}) : /* @__PURE__ */
|
|
114
|
+
}) : /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(R, {
|
|
114
115
|
treatment: "plain",
|
|
115
116
|
className: "divide-y divide-border-subtle border-border-seam p-0",
|
|
116
|
-
children: T.map((e) => /* @__PURE__ */
|
|
117
|
+
children: T.map((e) => /* @__PURE__ */ I("button", {
|
|
117
118
|
type: "button",
|
|
118
119
|
onClick: () => t(`grievances/${e.id}`),
|
|
119
120
|
className: "group flex w-full items-center gap-3 px-4 py-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken sm:px-5",
|
|
120
121
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ F("span", {
|
|
122
123
|
className: "inline-flex size-10 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-text-secondary group-hover:bg-bg-surface",
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ F(Z[e.category] ?? w, { className: "size-5" })
|
|
124
125
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ I("div", {
|
|
126
127
|
className: "min-w-0 flex-1",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ I("div", {
|
|
128
129
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ F("span", {
|
|
130
131
|
className: "truncate font-medium text-text-primary",
|
|
131
132
|
children: e.title
|
|
132
|
-
}), /* @__PURE__ */
|
|
133
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ F(a, { status: e.priority })]
|
|
134
|
+
}), /* @__PURE__ */ I("p", {
|
|
134
135
|
className: "mt-0.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-muted",
|
|
135
136
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
e.location && /* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ F("span", { children: r(e.category) }),
|
|
138
|
+
e.location && /* @__PURE__ */ I("span", {
|
|
138
139
|
className: "flex items-center gap-1",
|
|
139
140
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ F(O, { className: "size-3" }),
|
|
141
142
|
" ",
|
|
142
143
|
e.location
|
|
143
144
|
]
|
|
144
145
|
}),
|
|
145
|
-
e.photoFileIds.length > 0 && /* @__PURE__ */
|
|
146
|
+
e.photoFileIds.length > 0 && /* @__PURE__ */ I("span", {
|
|
146
147
|
className: "flex items-center gap-1",
|
|
147
148
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ F(S, { className: "size-3" }),
|
|
149
150
|
" ",
|
|
150
151
|
e.photoFileIds.length
|
|
151
152
|
]
|
|
152
153
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ I("span", { children: ["Reported ", i(e.createdAt)] })
|
|
154
155
|
]
|
|
155
156
|
})]
|
|
156
157
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ F(a, {
|
|
158
159
|
status: e.status,
|
|
159
160
|
className: "hidden sm:inline-flex"
|
|
160
161
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ F(C, { className: "size-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
|
|
162
163
|
]
|
|
163
164
|
}, e.id))
|
|
164
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ F(v, {
|
|
165
166
|
page: s.page,
|
|
166
|
-
pageSize:
|
|
167
|
+
pageSize: q,
|
|
167
168
|
itemCount: T.length,
|
|
168
169
|
hasMore: g?.pageInfo.hasMore ?? !1,
|
|
169
170
|
onPageChange: (e) => s.onPageChange(e, g?.pageInfo.cursor)
|
|
170
171
|
})] }),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ F(de, {
|
|
172
173
|
open: f,
|
|
173
|
-
onOpenChange:
|
|
174
|
+
onOpenChange: p,
|
|
174
175
|
onReported: (e) => t(`grievances/${e}`)
|
|
175
176
|
})
|
|
176
177
|
]
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
-
let
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}, [
|
|
184
|
-
let
|
|
180
|
+
function de({ open: n, onOpenChange: i, onReported: a }) {
|
|
181
|
+
let { workspaceId: o } = e(), { emitGrievanceReported: c } = p(), u = l(), { data: m } = s({ isActive: !0 }), [h, v] = b(""), [x, C] = b(""), [w, T] = b("GRIEVANCES"), [E, D] = b("NORMAL"), [k, j] = b(""), [M, N] = b(""), [P, R] = b([]), [K, q] = b(!1), [X, Z] = b(null);
|
|
182
|
+
y(() => {
|
|
183
|
+
n && (v(""), C(""), T("GRIEVANCES"), D("NORMAL"), j(""), N(""), R([]), Z(null));
|
|
184
|
+
}, [n]);
|
|
185
|
+
let Q = async (e) => {
|
|
185
186
|
let t = e.target.files?.[0];
|
|
186
|
-
if (e.target.value = "", !(!t ||
|
|
187
|
-
|
|
187
|
+
if (e.target.value = "", !(!t || P.length >= J)) {
|
|
188
|
+
q(!0);
|
|
188
189
|
try {
|
|
189
190
|
let e = await f(t, d.grievances);
|
|
190
|
-
|
|
191
|
+
R((t) => [...t, e]), _.success("Photo attached", e.name);
|
|
191
192
|
} catch (e) {
|
|
192
|
-
|
|
193
|
+
_.error("Could not attach photo", g(e));
|
|
193
194
|
} finally {
|
|
194
|
-
|
|
195
|
+
q(!1);
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
|
-
},
|
|
198
|
-
if (!
|
|
199
|
-
|
|
198
|
+
}, de = (e) => R((t) => t.filter((t) => t.id !== e)), fe = async () => {
|
|
199
|
+
if (!h.trim()) {
|
|
200
|
+
Z("A title is required.");
|
|
200
201
|
return;
|
|
201
202
|
}
|
|
202
|
-
if (!
|
|
203
|
-
|
|
203
|
+
if (!x.trim()) {
|
|
204
|
+
Z("Please describe the grievance.");
|
|
204
205
|
return;
|
|
205
206
|
}
|
|
206
207
|
try {
|
|
207
|
-
let e = await
|
|
208
|
-
title:
|
|
209
|
-
description:
|
|
210
|
-
category:
|
|
211
|
-
priority:
|
|
212
|
-
location:
|
|
213
|
-
agencyId:
|
|
214
|
-
photoFileIds:
|
|
208
|
+
let e = await u.mutateAsync({
|
|
209
|
+
title: h.trim(),
|
|
210
|
+
description: x.trim(),
|
|
211
|
+
category: w,
|
|
212
|
+
priority: E,
|
|
213
|
+
location: k.trim() || null,
|
|
214
|
+
agencyId: M || null,
|
|
215
|
+
photoFileIds: P.length ? P.map((e) => e.id) : null
|
|
215
216
|
});
|
|
216
|
-
|
|
217
|
+
_.success("Grievance reported", e.title), c({
|
|
218
|
+
workspaceId: o,
|
|
219
|
+
id: e.id
|
|
220
|
+
}), a(e.id), i(!1);
|
|
217
221
|
} catch (e) {
|
|
218
|
-
|
|
222
|
+
Z(g(e));
|
|
219
223
|
}
|
|
220
|
-
}, $ =
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
open:
|
|
223
|
-
onOpenChange: (e) => $ ? void 0 :
|
|
224
|
-
children: /* @__PURE__ */
|
|
224
|
+
}, $ = u.isPending;
|
|
225
|
+
return /* @__PURE__ */ F(ne, {
|
|
226
|
+
open: n,
|
|
227
|
+
onOpenChange: (e) => $ ? void 0 : i(e),
|
|
228
|
+
children: /* @__PURE__ */ I(re, {
|
|
225
229
|
className: "max-h-[92vh] overflow-y-auto sm:max-w-2xl",
|
|
226
230
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ I(oe, { children: [/* @__PURE__ */ F(se, { children: "Report a grievance" }), /* @__PURE__ */ F(ie, { children: "Tell us what went wrong. We will route it to the right agency and track it to resolution." })] }),
|
|
232
|
+
/* @__PURE__ */ I("div", {
|
|
229
233
|
className: "flex flex-col gap-4 py-2",
|
|
230
234
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ I("div", {
|
|
232
236
|
className: "grid gap-4 sm:grid-cols-2",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ I("div", {
|
|
234
238
|
className: "grid gap-1.5",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ I(B, {
|
|
236
240
|
htmlFor: "g-title",
|
|
237
|
-
children: ["Title ", /* @__PURE__ */
|
|
241
|
+
children: ["Title ", /* @__PURE__ */ F("span", {
|
|
238
242
|
className: "text-status-error-text",
|
|
239
243
|
children: "*"
|
|
240
244
|
})]
|
|
241
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ F(z, {
|
|
242
246
|
id: "g-title",
|
|
243
|
-
value:
|
|
244
|
-
onChange: (e) =>
|
|
247
|
+
value: h,
|
|
248
|
+
onChange: (e) => v(e.target.value),
|
|
245
249
|
placeholder: "e.g. Broken street light on Main Road"
|
|
246
250
|
})]
|
|
247
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ I("div", {
|
|
248
252
|
className: "grid gap-1.5",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ I(B, { children: ["Category ", /* @__PURE__ */ F("span", {
|
|
250
254
|
className: "text-status-error-text",
|
|
251
255
|
children: "*"
|
|
252
|
-
})] }), /* @__PURE__ */
|
|
253
|
-
value:
|
|
254
|
-
onValueChange: (e) =>
|
|
255
|
-
children: [/* @__PURE__ */
|
|
256
|
+
})] }), /* @__PURE__ */ I(V, {
|
|
257
|
+
value: w,
|
|
258
|
+
onValueChange: (e) => T(e),
|
|
259
|
+
children: [/* @__PURE__ */ F(W, {
|
|
256
260
|
"aria-label": "Category",
|
|
257
|
-
children: /* @__PURE__ */
|
|
258
|
-
}), /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ F(G, {})
|
|
262
|
+
}), /* @__PURE__ */ F(H, { children: le.map((e) => /* @__PURE__ */ F(U, {
|
|
259
263
|
value: e,
|
|
260
264
|
children: r(e)
|
|
261
265
|
}, e)) })]
|
|
262
266
|
})]
|
|
263
267
|
})]
|
|
264
268
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ I("div", {
|
|
266
270
|
className: "grid gap-4 sm:grid-cols-2",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ I("div", {
|
|
268
272
|
className: "grid gap-1.5",
|
|
269
273
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ I(B, {
|
|
271
275
|
htmlFor: "g-desc",
|
|
272
|
-
children: ["Description ", /* @__PURE__ */
|
|
276
|
+
children: ["Description ", /* @__PURE__ */ F("span", {
|
|
273
277
|
className: "text-status-error-text",
|
|
274
278
|
children: "*"
|
|
275
279
|
})]
|
|
276
280
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ F(ce, {
|
|
278
282
|
id: "g-desc",
|
|
279
|
-
value:
|
|
280
|
-
onChange: (e) =>
|
|
283
|
+
value: x,
|
|
284
|
+
onChange: (e) => C(e.target.value.slice(0, Y)),
|
|
281
285
|
placeholder: "Provide details about the issue. Include when it happened, how often, and any other relevant information.",
|
|
282
286
|
rows: 5
|
|
283
287
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ I("p", {
|
|
285
289
|
className: "text-right text-xs text-text-muted tabular-nums",
|
|
286
290
|
children: [
|
|
287
|
-
|
|
291
|
+
x.length,
|
|
288
292
|
" / ",
|
|
289
|
-
|
|
293
|
+
Y
|
|
290
294
|
]
|
|
291
295
|
})
|
|
292
296
|
]
|
|
293
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ I("div", {
|
|
294
298
|
className: "flex flex-col gap-4",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ I("div", {
|
|
296
300
|
className: "grid gap-1.5",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ I(B, { children: ["Priority ", /* @__PURE__ */ F("span", {
|
|
298
302
|
className: "text-status-error-text",
|
|
299
303
|
children: "*"
|
|
300
|
-
})] }), /* @__PURE__ */
|
|
301
|
-
value:
|
|
302
|
-
onValueChange: (e) =>
|
|
303
|
-
children: [/* @__PURE__ */
|
|
304
|
+
})] }), /* @__PURE__ */ I(V, {
|
|
305
|
+
value: E,
|
|
306
|
+
onValueChange: (e) => D(e),
|
|
307
|
+
children: [/* @__PURE__ */ F(W, {
|
|
304
308
|
"aria-label": "Priority",
|
|
305
|
-
children: /* @__PURE__ */
|
|
306
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ F(G, {})
|
|
310
|
+
}), /* @__PURE__ */ F(H, { children: ue.map((e) => /* @__PURE__ */ F(U, {
|
|
307
311
|
value: e,
|
|
308
312
|
children: r(e)
|
|
309
313
|
}, e)) })]
|
|
310
314
|
})]
|
|
311
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ I("div", {
|
|
312
316
|
className: "grid gap-1.5",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ F(B, {
|
|
314
318
|
htmlFor: "g-loc",
|
|
315
319
|
children: "Location"
|
|
316
|
-
}), /* @__PURE__ */
|
|
320
|
+
}), /* @__PURE__ */ I("div", {
|
|
317
321
|
className: "relative",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ F(O, { className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ F(z, {
|
|
319
323
|
id: "g-loc",
|
|
320
|
-
value:
|
|
321
|
-
onChange: (e) =>
|
|
324
|
+
value: k,
|
|
325
|
+
onChange: (e) => j(e.target.value),
|
|
322
326
|
placeholder: "Street, area, landmark",
|
|
323
327
|
className: "pl-9"
|
|
324
328
|
})]
|
|
@@ -326,92 +330,92 @@ function le({ open: e, onOpenChange: n, onReported: i }) {
|
|
|
326
330
|
})]
|
|
327
331
|
})]
|
|
328
332
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ I("div", {
|
|
330
334
|
className: "grid gap-1.5",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
332
|
-
value:
|
|
333
|
-
onValueChange:
|
|
334
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ F(B, { children: "Route to agency" }), /* @__PURE__ */ I(V, {
|
|
336
|
+
value: M,
|
|
337
|
+
onValueChange: N,
|
|
338
|
+
children: [/* @__PURE__ */ F(W, {
|
|
335
339
|
"aria-label": "Agency",
|
|
336
|
-
children: /* @__PURE__ */
|
|
337
|
-
}), /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ F(G, { placeholder: "Auto-route to the right agency" })
|
|
341
|
+
}), /* @__PURE__ */ F(H, { children: (m ?? []).map((e) => /* @__PURE__ */ F(U, {
|
|
338
342
|
value: e.id,
|
|
339
343
|
children: e.name
|
|
340
344
|
}, e.id)) })]
|
|
341
345
|
})]
|
|
342
346
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ I("div", {
|
|
344
348
|
className: "grid gap-1.5",
|
|
345
349
|
children: [
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ F(B, { children: "Photos" }),
|
|
351
|
+
/* @__PURE__ */ I("div", {
|
|
348
352
|
className: "flex flex-wrap gap-3",
|
|
349
|
-
children: [
|
|
353
|
+
children: [P.map((e) => /* @__PURE__ */ I("div", {
|
|
350
354
|
className: "group relative size-24 overflow-hidden rounded-xl border border-border-seam bg-bg-sunken",
|
|
351
|
-
children: [e.url ? /* @__PURE__ */
|
|
355
|
+
children: [e.url ? /* @__PURE__ */ F("img", {
|
|
352
356
|
src: e.url,
|
|
353
357
|
alt: e.name,
|
|
354
358
|
className: "size-full object-cover",
|
|
355
359
|
loading: "lazy"
|
|
356
|
-
}) : /* @__PURE__ */
|
|
360
|
+
}) : /* @__PURE__ */ F("span", {
|
|
357
361
|
className: "flex size-full items-center justify-center",
|
|
358
|
-
children: /* @__PURE__ */
|
|
359
|
-
}), /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ F(S, { className: "size-6 text-text-muted" })
|
|
363
|
+
}), /* @__PURE__ */ F("button", {
|
|
360
364
|
type: "button",
|
|
361
|
-
onClick: () =>
|
|
365
|
+
onClick: () => de(e.id),
|
|
362
366
|
"aria-label": `Remove ${e.name}`,
|
|
363
367
|
className: "absolute right-1 top-1 inline-flex size-6 items-center justify-center rounded-full bg-bg-canvas/80 text-text-primary backdrop-blur transition-colors hover:bg-bg-canvas focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
364
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ F(te, { className: "size-3.5" })
|
|
365
369
|
})]
|
|
366
|
-
}, e.id)),
|
|
367
|
-
className: t("flex size-24 cursor-pointer flex-col items-center justify-center gap-1 rounded-xl border-2 border-dashed border-border-default text-text-secondary transition-colors hover:border-action-primary-bg hover:bg-[var(--color-accent-soft)]",
|
|
370
|
+
}, e.id)), P.length < J && /* @__PURE__ */ I("label", {
|
|
371
|
+
className: t("flex size-24 cursor-pointer flex-col items-center justify-center gap-1 rounded-xl border-2 border-dashed border-border-default text-text-secondary transition-colors hover:border-action-primary-bg hover:bg-[var(--color-accent-soft)]", K && "pointer-events-none opacity-60"),
|
|
368
372
|
children: [
|
|
369
|
-
|
|
370
|
-
/* @__PURE__ */
|
|
373
|
+
K ? /* @__PURE__ */ F(ee, { className: "size-5 animate-spin" }) : /* @__PURE__ */ F(S, { className: "size-5" }),
|
|
374
|
+
/* @__PURE__ */ F("span", {
|
|
371
375
|
className: "text-xs font-medium",
|
|
372
|
-
children:
|
|
376
|
+
children: K ? "Uploading…" : "Add photo"
|
|
373
377
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ F("input", {
|
|
375
379
|
type: "file",
|
|
376
380
|
accept: "image/*",
|
|
377
381
|
className: "sr-only",
|
|
378
|
-
onChange: (e) => void
|
|
379
|
-
disabled:
|
|
382
|
+
onChange: (e) => void Q(e),
|
|
383
|
+
disabled: K
|
|
380
384
|
})
|
|
381
385
|
]
|
|
382
386
|
})]
|
|
383
387
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ I("p", {
|
|
385
389
|
className: "text-xs text-text-muted",
|
|
386
390
|
children: [
|
|
387
391
|
"JPG or PNG. You can attach up to ",
|
|
388
|
-
|
|
392
|
+
J,
|
|
389
393
|
" photos."
|
|
390
394
|
]
|
|
391
395
|
})
|
|
392
396
|
]
|
|
393
397
|
}),
|
|
394
|
-
|
|
398
|
+
X && /* @__PURE__ */ F("p", {
|
|
395
399
|
className: "text-sm text-status-error-text",
|
|
396
|
-
children:
|
|
400
|
+
children: X
|
|
397
401
|
})
|
|
398
402
|
]
|
|
399
403
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ I(ae, { children: [/* @__PURE__ */ F(L, {
|
|
401
405
|
variant: "outline",
|
|
402
|
-
onClick: () =>
|
|
406
|
+
onClick: () => i(!1),
|
|
403
407
|
disabled: $,
|
|
404
408
|
children: "Cancel"
|
|
405
|
-
}), /* @__PURE__ */
|
|
406
|
-
onClick:
|
|
407
|
-
disabled: $ ||
|
|
408
|
-
children: [/* @__PURE__ */
|
|
409
|
+
}), /* @__PURE__ */ I(L, {
|
|
410
|
+
onClick: fe,
|
|
411
|
+
disabled: $ || K,
|
|
412
|
+
children: [/* @__PURE__ */ F(A, { className: "mr-1.5 h-4 w-4" }), " Submit grievance"]
|
|
409
413
|
})] })
|
|
410
414
|
]
|
|
411
415
|
})
|
|
412
416
|
});
|
|
413
417
|
}
|
|
414
418
|
//#endregion
|
|
415
|
-
export {
|
|
419
|
+
export { Z as CATEGORY_ICON, Q as GrievancesPage };
|
|
416
420
|
|
|
417
421
|
//# sourceMappingURL=GrievancesPage.js.map
|