From 7d3ddba61e04275a54b018196411834d12d661f1 Mon Sep 17 00:00:00 2001 From: "benjamin.baker" Date: Sun, 6 Sep 2026 18:39:00 -0400 Subject: [PATCH] Fix PC Types list rendering empty listAll() pages past the server's 100-row cap and returns the ROWS, not an axios response - there is no .data to unwrap. PCTypesList still read response.data.data, which threw, and the || [] fallback swallowed it and rendered an empty list every time regardless of what was in the table. The call was switched from list() to listAll() in fd513c0 to page past the cap, but the line below it kept the unwrap that was correct for list(). Half a change. The add/edit dropdown was unaffected because PCForm calls list() with perpage, so a newly added type appeared there while the management screen stayed blank - which is what made this look like a write problem rather than a read one. Every other listAll() call site in the tree already assigns the array directly; this was the only outlier. NotificationForm deliberately re-wraps to match its .list() siblings in the same destructure and is left alone. Inactive types now render too, which is what active=false was always asking for. --- plugins/computers/frontend/views/PCTypesList.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/computers/frontend/views/PCTypesList.vue b/plugins/computers/frontend/views/PCTypesList.vue index 5afef7e4..b21e6ccc 100644 --- a/plugins/computers/frontend/views/PCTypesList.vue +++ b/plugins/computers/frontend/views/PCTypesList.vue @@ -107,8 +107,9 @@ onMounted(() => loadData()) async function loadData() { loading.value = true try { - const response = await computersApi.types.listAll({ active: false }) - pcTypes.value = response.data.data || [] + // listAll() pages past the server's 100-row cap and returns the ROWS, not + // an axios response - there is no .data to unwrap. + pcTypes.value = await computersApi.types.listAll({ active: false }) } catch (err) { console.error('Error loading PC types:', err) } finally {