Skip to content

Commit df24b1a

Browse files
committed
chore: release v1.5.1
1 parent 04df568 commit df24b1a

2 files changed

Lines changed: 66 additions & 12 deletions

File tree

packages/frontend/src/changelog.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.5.1",
5+
"date": "April 2026",
6+
"status": "Released",
7+
"statusColor": "green",
8+
"borderColor": "green",
9+
"sections": [
10+
{
11+
"icon": "",
12+
"title": "Improvements",
13+
"iconColor": "emerald",
14+
"items": [
15+
"Child activities in the detail panel now show human-readable names instead of raw URNs — names are fetched in parallel after the parent detail loads and swap in progressively as requests resolve",
16+
"Activities without an omschrijving in DSO gracefully fall back to their URN in both the list and the detail panel child links"
17+
]
18+
}
19+
]
20+
},
321
{
422
"version": "1.5.0",
523
"date": "April 2026",

packages/frontend/src/components/DsoExplorer/DsoExplorer.tsx

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,37 @@ const ActivityDetailPanel: React.FC<{
194194
const [detail, setDetail] = useState<DsoActiviteitDetail | null>(null);
195195
const [loading, setLoading] = useState(true);
196196
const [error, setError] = useState<string | null>(null);
197+
const [childNames, setChildNames] = useState<Record<string, string>>({});
197198

198199
useEffect(() => {
199200
setLoading(true);
200201
setError(null);
201202
setDetail(null);
203+
setChildNames({});
202204
getActiviteitDetail(urn, datum)
203-
.then(setDetail)
205+
.then((d) => {
206+
setDetail(d);
207+
// Fetch child names in parallel after parent loads
208+
const children = d._links?.onderliggendeActiviteiten ?? [];
209+
if (children.length > 0) {
210+
Promise.allSettled(
211+
children.map((c) =>
212+
getActiviteitDetail(urnFromHref(c.href), datum).then((child) => ({
213+
urn: urnFromHref(c.href),
214+
name: child.omschrijving ?? null,
215+
}))
216+
)
217+
).then((results) => {
218+
const names: Record<string, string> = {};
219+
results.forEach((r) => {
220+
if (r.status === 'fulfilled' && r.value.name) {
221+
names[r.value.urn] = r.value.name;
222+
}
223+
});
224+
setChildNames(names);
225+
});
226+
}
227+
})
204228
.catch((e) => setError(e instanceof Error ? e.message : 'Failed to load'))
205229
.finally(() => setLoading(false));
206230
}, [urn, datum]);
@@ -331,17 +355,29 @@ const ActivityDetailPanel: React.FC<{
331355
<Section
332356
title={`Child activities (${detail._links.onderliggendeActiviteiten.length})`}
333357
>
334-
<ul className="space-y-1">
335-
{detail._links.onderliggendeActiviteiten.map((c) => (
336-
<li key={c.href}>
337-
<button
338-
onClick={() => onNavigate(urnFromHref(c.href))}
339-
className="text-xs text-blue-600 hover:underline text-left font-mono break-all"
340-
>
341-
{urnFromHref(c.href)}
342-
</button>
343-
</li>
344-
))}
358+
<ul className="space-y-1.5">
359+
{detail._links.onderliggendeActiviteiten.map((c) => {
360+
const childUrn = urnFromHref(c.href);
361+
const name = childNames[childUrn];
362+
return (
363+
<li key={c.href}>
364+
<button
365+
onClick={() => onNavigate(childUrn)}
366+
className="w-full text-left group"
367+
>
368+
{name ? (
369+
<span className="text-xs text-blue-600 group-hover:underline font-medium">
370+
{name}
371+
</span>
372+
) : (
373+
<span className="text-[10px] text-blue-400 group-hover:underline font-mono break-all">
374+
{childUrn}
375+
</span>
376+
)}
377+
</button>
378+
</li>
379+
);
380+
})}
345381
</ul>
346382
</Section>
347383
)}

0 commit comments

Comments
 (0)