@burdenoff/microfe-govcitizenhub 2026.720.3 → 2026.720.5
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/DynamicFormFields.d.ts +17 -0
- package/dist/govcitizenhub/components/DynamicFormFields.d.ts.map +1 -0
- package/dist/govcitizenhub/components/DynamicFormFields.js +101 -0
- package/dist/govcitizenhub/components/DynamicFormFields.js.map +1 -0
- package/dist/govcitizenhub/components/mobile/BottomTabNav.d.ts.map +1 -1
- package/dist/govcitizenhub/components/mobile/BottomTabNav.js +11 -8
- package/dist/govcitizenhub/components/mobile/BottomTabNav.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.js +170 -150
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts +9 -5
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +148 -244
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
- package/dist/govcitizenhub/pages/services/FormFieldBuilder.d.ts +7 -28
- package/dist/govcitizenhub/pages/services/FormFieldBuilder.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/services/FormFieldBuilder.js +203 -136
- package/dist/govcitizenhub/pages/services/FormFieldBuilder.js.map +1 -1
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.js +156 -114
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.js.map +1 -1
- package/dist/govcitizenhub/utils/dynamicForm.d.ts +46 -0
- package/dist/govcitizenhub/utils/dynamicForm.d.ts.map +1 -0
- package/dist/govcitizenhub/utils/dynamicForm.js +59 -0
- package/dist/govcitizenhub/utils/dynamicForm.js.map +1 -0
- package/package.json +1 -1
|
@@ -5,27 +5,28 @@ import { PageLayout as n } from "../../components/PageLayout.js";
|
|
|
5
5
|
import { formatDate as r } from "../../utils/formatters.js";
|
|
6
6
|
import { StatusBadge as i } from "../../components/StatusBadge.js";
|
|
7
7
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
8
|
-
import { useGovApplicationSlaSummary as o, useGovApplications as
|
|
9
|
-
import { useCursorPager as
|
|
8
|
+
import { useGovApplicationSlaSummary as o, useGovApplications as ee, useGovDashboardSummary as te, useGovServices as ne } from "../../hooks/useGovApi.js";
|
|
9
|
+
import { useCursorPager as s } from "../../hooks/useCursorPager.js";
|
|
10
10
|
import "../../hooks/index.js";
|
|
11
|
-
import { ErrorView as
|
|
12
|
-
import { SlaBadge as
|
|
13
|
-
import { AssigneeChip as
|
|
14
|
-
import { FilterTabs as
|
|
15
|
-
import { SummaryStrip as
|
|
16
|
-
import { Pagination as
|
|
17
|
-
import { useMemo as
|
|
18
|
-
import { ChevronRight as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { Button as
|
|
11
|
+
import { ErrorView as c } from "../../components/StateViews.js";
|
|
12
|
+
import { SlaBadge as l } from "../../components/SlaBadge.js";
|
|
13
|
+
import { AssigneeChip as u } from "../../components/Avatar.js";
|
|
14
|
+
import { FilterTabs as re } from "../../components/FilterTabs.js";
|
|
15
|
+
import { SummaryStrip as d } from "../../components/SummaryStrip.js";
|
|
16
|
+
import { Pagination as f } from "../../components/Pagination.js";
|
|
17
|
+
import { useMemo as p, useState as m } from "react";
|
|
18
|
+
import { ChevronRight as h, CircleCheck as g, Clock as _, Plus as v, Search as y, TriangleAlert as b, UserCheck as x } from "lucide-react";
|
|
19
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
20
|
+
import { Button as T, GlassCard as E, Input as D, Skeleton as O } from "@burdenoff/fe-libs/ui";
|
|
21
|
+
import { useActorProfiles as k } from "@burdenoff/fe-libs/shared";
|
|
21
22
|
//#region src/govcitizenhub/pages/applications/ApplicationsPage.tsx
|
|
22
|
-
var
|
|
23
|
-
function
|
|
23
|
+
var A = 15;
|
|
24
|
+
function j(e) {
|
|
24
25
|
if (!e) return;
|
|
25
26
|
let t = [e.firstName, e.lastName].filter(Boolean).join(" ").trim();
|
|
26
27
|
return e.name?.trim() || t || e.username?.trim() || e.email;
|
|
27
28
|
}
|
|
28
|
-
var
|
|
29
|
+
var M = (e) => e.slice(0, 8), ie = [
|
|
29
30
|
{
|
|
30
31
|
value: "ALL",
|
|
31
32
|
label: "All"
|
|
@@ -54,164 +55,181 @@ var F = (e) => e.slice(0, 8), ee = [
|
|
|
54
55
|
value: "DRAFT",
|
|
55
56
|
label: "Draft"
|
|
56
57
|
}
|
|
57
|
-
],
|
|
58
|
+
], N = new Set([
|
|
58
59
|
"APPROVED",
|
|
59
60
|
"REJECTED",
|
|
60
61
|
"WITHDRAWN"
|
|
61
62
|
]);
|
|
62
|
-
function
|
|
63
|
+
function P(e) {
|
|
63
64
|
let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
|
|
64
65
|
return Math.round((t(e) - t(/* @__PURE__ */ new Date())) / 864e5);
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
-
if (
|
|
67
|
+
function F(e) {
|
|
68
|
+
if (N.has(e.status) || !e.dueDate) return "none";
|
|
68
69
|
let t = new Date(e.dueDate);
|
|
69
70
|
if (Number.isNaN(t.getTime())) return "none";
|
|
70
|
-
let n =
|
|
71
|
+
let n = P(t);
|
|
71
72
|
return n < 0 ? "overdue" : n <= 2 ? "duesoon" : "ontrack";
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
name: P(t) ?? "You",
|
|
76
|
-
src: t.avatar,
|
|
77
|
-
subtitle: "You"
|
|
78
|
-
}) : /* @__PURE__ */ D(p, {
|
|
79
|
-
name: "Assigned officer",
|
|
80
|
-
subtitle: `#${F(e)}`
|
|
81
|
-
}) : /* @__PURE__ */ O("span", {
|
|
74
|
+
function I({ assignedToId: e, currentUser: t, officerProfiles: n }) {
|
|
75
|
+
if (!e) return /* @__PURE__ */ w("span", {
|
|
82
76
|
className: "inline-flex items-center gap-2 text-sm text-text-muted",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ C("span", {
|
|
84
78
|
"aria-hidden": "true",
|
|
85
79
|
className: "inline-flex size-8 items-center justify-center rounded-full border border-dashed border-border-seam text-text-muted",
|
|
86
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ C(v, { className: "size-3.5" })
|
|
87
81
|
}), "Unassigned"]
|
|
88
82
|
});
|
|
83
|
+
if (t?.id && e === t.id) return /* @__PURE__ */ C(u, {
|
|
84
|
+
name: j(t) ?? "You",
|
|
85
|
+
src: t.avatar,
|
|
86
|
+
subtitle: "You"
|
|
87
|
+
});
|
|
88
|
+
let r = n[e];
|
|
89
|
+
return /* @__PURE__ */ C(u, {
|
|
90
|
+
name: r?.resolved ? r.displayName : `Officer #${M(e)}`,
|
|
91
|
+
src: r?.avatarUrl,
|
|
92
|
+
subtitle: r?.resolved && r.email || "Assigned officer"
|
|
93
|
+
});
|
|
89
94
|
}
|
|
90
|
-
function
|
|
91
|
-
return /* @__PURE__ */
|
|
95
|
+
function L({ app: e, serviceName: t, currentUser: n, officerProfiles: a, onOpen: o }) {
|
|
96
|
+
return /* @__PURE__ */ w("tr", {
|
|
92
97
|
role: "button",
|
|
93
98
|
tabIndex: 0,
|
|
94
99
|
"aria-label": `Open application ${e.reference}`,
|
|
95
|
-
onClick:
|
|
100
|
+
onClick: o,
|
|
96
101
|
onKeyDown: (e) => {
|
|
97
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
102
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
|
|
98
103
|
},
|
|
99
104
|
className: "group cursor-pointer align-middle outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken",
|
|
100
105
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ w("td", {
|
|
102
107
|
className: "px-4 py-3",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ C("span", {
|
|
104
109
|
className: "block truncate font-medium text-action-primary-text",
|
|
105
110
|
children: e.reference
|
|
106
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ w("span", {
|
|
107
112
|
className: "text-xs text-text-muted",
|
|
108
113
|
children: ["Filed ", r(e.createdAt)]
|
|
109
114
|
})]
|
|
110
115
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ C("td", {
|
|
112
117
|
className: "px-4 py-3 text-sm text-text-secondary",
|
|
113
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ C("span", {
|
|
114
119
|
className: "line-clamp-1",
|
|
115
120
|
children: t ?? "—"
|
|
116
121
|
})
|
|
117
122
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ C("td", {
|
|
119
124
|
className: "px-4 py-3",
|
|
120
|
-
children: /* @__PURE__ */
|
|
125
|
+
children: /* @__PURE__ */ C(i, { status: e.priority })
|
|
121
126
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ C("td", {
|
|
123
128
|
className: "px-4 py-3",
|
|
124
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ C(I, {
|
|
125
130
|
assignedToId: e.assignedToId,
|
|
126
|
-
currentUser: n
|
|
131
|
+
currentUser: n,
|
|
132
|
+
officerProfiles: a
|
|
127
133
|
})
|
|
128
134
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ C("td", {
|
|
130
136
|
className: "px-4 py-3",
|
|
131
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ w("div", {
|
|
132
138
|
className: "flex flex-col gap-0.5",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ C(l, {
|
|
134
140
|
dueDate: e.dueDate,
|
|
135
141
|
status: e.status
|
|
136
|
-
}), e.dueDate && /* @__PURE__ */
|
|
142
|
+
}), e.dueDate && /* @__PURE__ */ w("span", {
|
|
137
143
|
className: "text-xs text-text-muted",
|
|
138
144
|
children: ["Due ", r(e.dueDate)]
|
|
139
145
|
})]
|
|
140
146
|
})
|
|
141
147
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ C("td", {
|
|
143
149
|
className: "px-4 py-3",
|
|
144
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ C(i, { status: e.status })
|
|
145
151
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ C("td", {
|
|
147
153
|
className: "px-4 py-3 text-right",
|
|
148
|
-
children: /* @__PURE__ */
|
|
154
|
+
children: /* @__PURE__ */ C(h, { className: "ml-auto size-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
|
|
149
155
|
})
|
|
150
156
|
]
|
|
151
157
|
});
|
|
152
158
|
}
|
|
153
|
-
function
|
|
154
|
-
return /* @__PURE__ */
|
|
159
|
+
function R({ app: e, serviceName: t, currentUser: n, officerProfiles: a, onOpen: o }) {
|
|
160
|
+
return /* @__PURE__ */ w("button", {
|
|
155
161
|
type: "button",
|
|
156
|
-
onClick:
|
|
162
|
+
onClick: o,
|
|
157
163
|
"aria-label": `Open application ${e.reference}`,
|
|
158
164
|
className: "flex w-full flex-col gap-2 px-4 py-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken",
|
|
159
165
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ w("div", {
|
|
161
167
|
className: "flex items-center justify-between gap-2",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ w("span", {
|
|
163
169
|
className: "min-w-0",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ C("span", {
|
|
165
171
|
className: "block truncate font-medium text-action-primary-text",
|
|
166
172
|
children: e.reference
|
|
167
|
-
}), /* @__PURE__ */
|
|
173
|
+
}), /* @__PURE__ */ w("span", {
|
|
168
174
|
className: "text-xs text-text-muted",
|
|
169
175
|
children: ["Filed ", r(e.createdAt)]
|
|
170
176
|
})]
|
|
171
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ C(i, { status: e.status })]
|
|
172
178
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ C("div", {
|
|
174
180
|
className: "text-sm text-text-secondary",
|
|
175
181
|
children: t ?? "—"
|
|
176
182
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ w("div", {
|
|
178
184
|
className: "flex flex-wrap items-center gap-2",
|
|
179
185
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ C(i, { status: e.priority }),
|
|
187
|
+
/* @__PURE__ */ C(l, {
|
|
182
188
|
dueDate: e.dueDate,
|
|
183
189
|
status: e.status
|
|
184
190
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ C(I, {
|
|
186
192
|
assignedToId: e.assignedToId,
|
|
187
|
-
currentUser: n
|
|
193
|
+
currentUser: n,
|
|
194
|
+
officerProfiles: a
|
|
188
195
|
})
|
|
189
196
|
]
|
|
190
197
|
})
|
|
191
198
|
]
|
|
192
199
|
});
|
|
193
200
|
}
|
|
194
|
-
function
|
|
195
|
-
let { navigateTo: r, currentUser: i } = e(),
|
|
196
|
-
status:
|
|
197
|
-
assignedToId:
|
|
201
|
+
function z() {
|
|
202
|
+
let { navigateTo: r, currentUser: i, apiGatewayUrl: l, authToken: u, workspaceId: h } = e(), j = s(), [M, N] = m("ALL"), [P, I] = m(""), [z, B] = m(!1), { data: V, isLoading: H, isError: U, refetch: W } = ee({
|
|
203
|
+
status: M === "ALL" ? void 0 : M,
|
|
204
|
+
assignedToId: z ? i?.id : void 0,
|
|
198
205
|
pagination: {
|
|
199
|
-
limit:
|
|
200
|
-
cursor:
|
|
206
|
+
limit: A,
|
|
207
|
+
cursor: j.cursor
|
|
201
208
|
}
|
|
202
|
-
}), G =
|
|
209
|
+
}), G = ne({ pagination: { limit: 100 } }), K = te(), q = o(), J = p(() => V?.items ?? [], [V]), Y = k(p(() => {
|
|
210
|
+
let e = /* @__PURE__ */ new Set();
|
|
211
|
+
for (let t of J) t.assignedToId && t.assignedToId !== i?.id && e.add(t.assignedToId);
|
|
212
|
+
return [...e].map((e) => ({
|
|
213
|
+
actorId: e,
|
|
214
|
+
actorType: "user"
|
|
215
|
+
}));
|
|
216
|
+
}, [J, i?.id]), {
|
|
217
|
+
apiGatewayUrl: l,
|
|
218
|
+
authToken: u,
|
|
219
|
+
workspaceId: h
|
|
220
|
+
}), X = p(() => {
|
|
203
221
|
let e = /* @__PURE__ */ new Map();
|
|
204
222
|
return G.data?.items.forEach((t) => e.set(t.id, t.name)), e;
|
|
205
|
-
}, [G.data]),
|
|
223
|
+
}, [G.data]), Z = p(() => {
|
|
206
224
|
let e = /* @__PURE__ */ new Map();
|
|
207
225
|
return K.data?.applicationsByStatus.forEach((t) => e.set(t.status, t.count)), e;
|
|
208
|
-
}, [K.data]),
|
|
226
|
+
}, [K.data]), ae = ie.map((e) => ({
|
|
209
227
|
...e,
|
|
210
|
-
count: e.value === "ALL" ? K.data?.applicationsTotal :
|
|
211
|
-
})), Q =
|
|
228
|
+
count: e.value === "ALL" ? K.data?.applicationsTotal : Z.get(e.value)
|
|
229
|
+
})), Q = p(() => {
|
|
212
230
|
let e = 0, t = 0, n = 0;
|
|
213
231
|
for (let r of J) {
|
|
214
|
-
let i =
|
|
232
|
+
let i = F(r);
|
|
215
233
|
i === "ontrack" ? e += 1 : i === "duesoon" ? t += 1 : i === "overdue" && (n += 1);
|
|
216
234
|
}
|
|
217
235
|
return {
|
|
@@ -219,138 +237,138 @@ function H() {
|
|
|
219
237
|
duesoon: t,
|
|
220
238
|
overdue: n
|
|
221
239
|
};
|
|
222
|
-
}, [J]),
|
|
240
|
+
}, [J]), oe = [
|
|
223
241
|
{
|
|
224
242
|
label: "On track",
|
|
225
243
|
value: Q.ontrack,
|
|
226
|
-
icon: /* @__PURE__ */
|
|
244
|
+
icon: /* @__PURE__ */ C(g, {}),
|
|
227
245
|
tone: "success"
|
|
228
246
|
},
|
|
229
247
|
{
|
|
230
248
|
label: "Due soon",
|
|
231
249
|
value: Q.duesoon,
|
|
232
|
-
icon: /* @__PURE__ */
|
|
250
|
+
icon: /* @__PURE__ */ C(_, {}),
|
|
233
251
|
tone: "warning"
|
|
234
252
|
},
|
|
235
253
|
{
|
|
236
254
|
label: "Overdue",
|
|
237
255
|
value: Q.overdue,
|
|
238
|
-
icon: /* @__PURE__ */
|
|
256
|
+
icon: /* @__PURE__ */ C(b, {}),
|
|
239
257
|
tone: "error"
|
|
240
258
|
}
|
|
241
|
-
],
|
|
259
|
+
], se = [
|
|
242
260
|
{
|
|
243
261
|
label: "On track",
|
|
244
262
|
value: q.data?.onTrack ?? 0,
|
|
245
|
-
icon: /* @__PURE__ */
|
|
263
|
+
icon: /* @__PURE__ */ C(g, {}),
|
|
246
264
|
tone: "success"
|
|
247
265
|
},
|
|
248
266
|
{
|
|
249
267
|
label: "Due soon",
|
|
250
268
|
value: q.data?.dueSoon ?? 0,
|
|
251
|
-
icon: /* @__PURE__ */
|
|
269
|
+
icon: /* @__PURE__ */ C(_, {}),
|
|
252
270
|
tone: "warning"
|
|
253
271
|
},
|
|
254
272
|
{
|
|
255
273
|
label: "Overdue",
|
|
256
274
|
value: q.data?.overdue ?? 0,
|
|
257
|
-
icon: /* @__PURE__ */
|
|
275
|
+
icon: /* @__PURE__ */ C(b, {}),
|
|
258
276
|
tone: "error"
|
|
259
277
|
}
|
|
260
|
-
], $ =
|
|
278
|
+
], $ = p(() => {
|
|
261
279
|
let e = P.trim().toLowerCase();
|
|
262
280
|
return e ? J.filter((t) => {
|
|
263
|
-
let n =
|
|
281
|
+
let n = X.get(t.serviceId) ?? "";
|
|
264
282
|
return t.reference.toLowerCase().includes(e) || n.toLowerCase().includes(e) || t.status.toLowerCase().includes(e);
|
|
265
283
|
}) : J;
|
|
266
284
|
}, [
|
|
267
285
|
J,
|
|
268
286
|
P,
|
|
269
|
-
|
|
287
|
+
X
|
|
270
288
|
]);
|
|
271
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ w(n, {
|
|
272
290
|
title: "Applications",
|
|
273
291
|
titleGradient: !0,
|
|
274
292
|
description: "Citizen applications moving through review, decision, and fulfilment.",
|
|
275
|
-
actions: /* @__PURE__ */
|
|
293
|
+
actions: /* @__PURE__ */ w(T, {
|
|
276
294
|
onClick: () => r("applications/new"),
|
|
277
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ C(v, { className: "mr-1.5 h-4 w-4" }), " New application"]
|
|
278
296
|
}),
|
|
279
297
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ w("div", {
|
|
281
299
|
className: "mb-5 flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ w("div", {
|
|
283
301
|
className: "flex flex-wrap items-center gap-2",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
-
options:
|
|
286
|
-
value:
|
|
302
|
+
children: [/* @__PURE__ */ C(re, {
|
|
303
|
+
options: ae,
|
|
304
|
+
value: M,
|
|
287
305
|
onChange: (e) => {
|
|
288
|
-
|
|
306
|
+
N(e), I(""), j.reset();
|
|
289
307
|
}
|
|
290
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ w("button", {
|
|
291
309
|
type: "button",
|
|
292
310
|
disabled: !i?.id,
|
|
293
|
-
"aria-pressed":
|
|
311
|
+
"aria-pressed": z,
|
|
294
312
|
onClick: () => {
|
|
295
|
-
|
|
313
|
+
B((e) => !e), j.reset();
|
|
296
314
|
},
|
|
297
315
|
title: i?.id ? void 0 : "Sign in to filter your queue",
|
|
298
|
-
className: t("inline-flex items-center gap-1.5 rounded-xl border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
316
|
+
className: t("inline-flex items-center gap-1.5 rounded-xl border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", z ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-seam bg-bg-surface text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
317
|
+
children: [/* @__PURE__ */ C(x, {
|
|
300
318
|
className: "size-3.5",
|
|
301
319
|
"aria-hidden": "true"
|
|
302
320
|
}), "My queue"]
|
|
303
321
|
})]
|
|
304
|
-
}), /* @__PURE__ */
|
|
322
|
+
}), /* @__PURE__ */ w("div", {
|
|
305
323
|
className: "relative lg:w-80",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ C(y, {
|
|
307
325
|
className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-muted",
|
|
308
326
|
"aria-hidden": "true"
|
|
309
|
-
}), /* @__PURE__ */ D
|
|
327
|
+
}), /* @__PURE__ */ C(D, {
|
|
310
328
|
value: P,
|
|
311
|
-
onChange: (e) =>
|
|
329
|
+
onChange: (e) => I(e.target.value),
|
|
312
330
|
placeholder: "Search by reference or service…",
|
|
313
331
|
"aria-label": "Search applications on this page",
|
|
314
332
|
className: "pl-9"
|
|
315
333
|
})]
|
|
316
334
|
})]
|
|
317
335
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ w("div", {
|
|
319
337
|
className: "mb-5",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ w("div", {
|
|
321
339
|
className: "mb-2 flex items-center gap-2",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
323
341
|
className: "text-sm font-semibold text-text-primary",
|
|
324
342
|
children: "SLA across all applications"
|
|
325
|
-
}), /* @__PURE__ */
|
|
343
|
+
}), /* @__PURE__ */ C("span", {
|
|
326
344
|
className: "text-xs text-text-muted",
|
|
327
345
|
children: "Corpus-wide, backend-computed"
|
|
328
346
|
})]
|
|
329
|
-
}), q.isLoading ? /* @__PURE__ */
|
|
347
|
+
}), q.isLoading ? /* @__PURE__ */ C(O, { className: "h-16 w-full rounded-card" }) : /* @__PURE__ */ C(d, { stats: se })]
|
|
330
348
|
}),
|
|
331
|
-
H ? /* @__PURE__ */
|
|
349
|
+
H ? /* @__PURE__ */ C("div", {
|
|
332
350
|
className: "space-y-3",
|
|
333
|
-
children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */
|
|
334
|
-
}) : U ? /* @__PURE__ */
|
|
351
|
+
children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ C(O, { className: "h-16 w-full rounded-card" }, t))
|
|
352
|
+
}) : U ? /* @__PURE__ */ C(c, {
|
|
335
353
|
message: "We couldn't load applications.",
|
|
336
354
|
onRetry: () => W()
|
|
337
|
-
}) : J.length === 0 &&
|
|
355
|
+
}) : J.length === 0 && j.page === 0 ? /* @__PURE__ */ C(a, {
|
|
338
356
|
illustration: "empty-data",
|
|
339
357
|
title: "No applications found",
|
|
340
|
-
description:
|
|
341
|
-
action: /* @__PURE__ */
|
|
358
|
+
description: z ? "Nothing is currently assigned to you for this status." : M === "ALL" ? "File the first application from a published service." : "No applications match this status.",
|
|
359
|
+
action: /* @__PURE__ */ w(T, {
|
|
342
360
|
onClick: () => r("applications/new"),
|
|
343
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ C(v, { className: "mr-1.5 h-4 w-4" }), " New application"]
|
|
344
362
|
})
|
|
345
|
-
}) : /* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
363
|
+
}) : /* @__PURE__ */ w(S, { children: [
|
|
364
|
+
/* @__PURE__ */ w("div", {
|
|
347
365
|
className: "mb-4",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ w("div", {
|
|
349
367
|
className: "mb-2 flex items-center gap-2",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
351
369
|
className: "text-sm font-semibold text-text-primary",
|
|
352
370
|
children: "SLA on this page"
|
|
353
|
-
}), /* @__PURE__ */
|
|
371
|
+
}), /* @__PURE__ */ w("span", {
|
|
354
372
|
className: "text-xs text-text-muted",
|
|
355
373
|
children: [
|
|
356
374
|
"Based on due date · ",
|
|
@@ -358,86 +376,88 @@ function H() {
|
|
|
358
376
|
" shown"
|
|
359
377
|
]
|
|
360
378
|
})]
|
|
361
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ C(d, { stats: oe })]
|
|
362
380
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ C(E, {
|
|
364
382
|
treatment: "plain",
|
|
365
383
|
className: "overflow-hidden border-border-seam p-0",
|
|
366
|
-
children: $.length === 0 ? /* @__PURE__ */
|
|
384
|
+
children: $.length === 0 ? /* @__PURE__ */ w("p", {
|
|
367
385
|
className: "px-5 py-10 text-center text-sm text-text-secondary",
|
|
368
386
|
children: [
|
|
369
387
|
"No applications on this page match “",
|
|
370
388
|
P,
|
|
371
389
|
"”."
|
|
372
390
|
]
|
|
373
|
-
}) : /* @__PURE__ */
|
|
391
|
+
}) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
|
|
374
392
|
className: "hidden overflow-x-auto md:block",
|
|
375
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ w("table", {
|
|
376
394
|
className: "w-full text-left text-sm",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ C("thead", { children: /* @__PURE__ */ w("tr", {
|
|
378
396
|
className: "border-b border-border-seam text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
379
397
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ C("th", {
|
|
381
399
|
className: "px-4 py-2.5 font-medium",
|
|
382
400
|
children: "Reference"
|
|
383
401
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ C("th", {
|
|
385
403
|
className: "px-4 py-2.5 font-medium",
|
|
386
404
|
children: "Service"
|
|
387
405
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ C("th", {
|
|
389
407
|
className: "px-4 py-2.5 font-medium",
|
|
390
408
|
children: "Priority"
|
|
391
409
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ C("th", {
|
|
393
411
|
className: "px-4 py-2.5 font-medium",
|
|
394
412
|
children: "Assigned officer"
|
|
395
413
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ C("th", {
|
|
397
415
|
className: "px-4 py-2.5 font-medium",
|
|
398
416
|
children: "Due date (SLA)"
|
|
399
417
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ C("th", {
|
|
401
419
|
className: "px-4 py-2.5 font-medium",
|
|
402
420
|
children: "Status"
|
|
403
421
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ C("th", {
|
|
405
423
|
className: "px-4 py-2.5",
|
|
406
424
|
"aria-hidden": "true"
|
|
407
425
|
})
|
|
408
426
|
]
|
|
409
|
-
}) }), /* @__PURE__ */
|
|
427
|
+
}) }), /* @__PURE__ */ C("tbody", {
|
|
410
428
|
className: "divide-y divide-border-subtle",
|
|
411
|
-
children: $.map((e) => /* @__PURE__ */
|
|
429
|
+
children: $.map((e) => /* @__PURE__ */ C(L, {
|
|
412
430
|
app: e,
|
|
413
|
-
serviceName:
|
|
431
|
+
serviceName: X.get(e.serviceId),
|
|
414
432
|
currentUser: i,
|
|
433
|
+
officerProfiles: Y,
|
|
415
434
|
onOpen: () => r(`applications/${e.id}`)
|
|
416
435
|
}, e.id))
|
|
417
436
|
})]
|
|
418
437
|
})
|
|
419
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ C("ul", {
|
|
420
439
|
className: "divide-y divide-border-subtle md:hidden",
|
|
421
|
-
children: $.map((e) => /* @__PURE__ */
|
|
440
|
+
children: $.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ C(R, {
|
|
422
441
|
app: e,
|
|
423
|
-
serviceName:
|
|
442
|
+
serviceName: X.get(e.serviceId),
|
|
424
443
|
currentUser: i,
|
|
444
|
+
officerProfiles: Y,
|
|
425
445
|
onOpen: () => r(`applications/${e.id}`)
|
|
426
446
|
}) }, e.id))
|
|
427
447
|
})] })
|
|
428
448
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
page:
|
|
431
|
-
pageSize:
|
|
449
|
+
/* @__PURE__ */ C(f, {
|
|
450
|
+
page: j.page,
|
|
451
|
+
pageSize: A,
|
|
432
452
|
itemCount: J.length,
|
|
433
|
-
hasMore:
|
|
434
|
-
onPageChange: (e) =>
|
|
453
|
+
hasMore: V?.pageInfo.hasMore ?? !1,
|
|
454
|
+
onPageChange: (e) => j.onPageChange(e, V?.pageInfo.cursor)
|
|
435
455
|
})
|
|
436
456
|
] })
|
|
437
457
|
]
|
|
438
458
|
});
|
|
439
459
|
}
|
|
440
460
|
//#endregion
|
|
441
|
-
export {
|
|
461
|
+
export { z as ApplicationsPage };
|
|
442
462
|
|
|
443
463
|
//# sourceMappingURL=ApplicationsPage.js.map
|