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