Page past the 100-row cap in pickers and batch label sheets

This commit is contained in:
2026-08-17 14:17:28 -04:00
parent 7df79e50d9
commit ece0e15f03
12 changed files with 133 additions and 35 deletions

View File

@@ -106,10 +106,13 @@ const applications = ref([])
onMounted(async () => {
try {
// Load applications for topic dropdown
const appsRes = await applicationsApi.list({ perpage: 1000, showhidden: true }) // isactive is the only filter that applies to a topic:
// ishidden governs whether an application shows on the tiles page, which
// says nothing about whether it can be the subject of an article.
applications.value = appsRes.data.data || []
// listAll, not list: the backend clamps perpage to 100 without saying so,
// and the catalogue is past that, so a topic sorting late in the alphabet
// was silently missing from this dropdown.
// isactive is the only filter that applies to a topic: ishidden governs
// whether an application shows on the tiles page, which says nothing about
// whether it can be the subject of an article.
applications.value = await applicationsApi.listAll({ showhidden: true })
// Load article if editing
if (isEdit.value) {

View File

@@ -171,10 +171,13 @@ async function loadArticles() {
async function loadTopics() {
try {
const response = await applicationsApi.list({ perpage: 1000, showhidden: true }) // isactive is the only filter that applies to a topic:
// ishidden governs whether an application shows on the tiles page, which
// says nothing about whether it can be the subject of an article.
topics.value = response.data.data || []
// listAll, not list: the backend clamps perpage to 100 without saying so,
// and the catalogue is past that, so topics sorting late in the alphabet
// were silently missing from this filter.
// isactive is the only filter that applies to a topic: ishidden governs
// whether an application shows on the tiles page, which says nothing about
// whether it can be the subject of an article.
topics.value = await applicationsApi.listAll({ showhidden: true })
} catch (error) {
console.error('Error loading topics:', error)
}

View File

@@ -469,7 +469,7 @@ onMounted(async () => {
locationsApi.list({ perpage: 500 }),
modelsApi.listAll(), // backend caps perpage at 100; page through all
businessunitsApi.list({ perpage: 500 }),
computersApi.list({ perpage: 500 }),
computersApi.listAll(), // backend caps perpage at 100; page through all
assetsApi.types.list() // Used for relationship types, will fix below
])

View File

@@ -428,8 +428,9 @@ async function loadVendors() {
try {
const response = await vendorsApi.list({ perpage: 100 })
vendors.value = response.data.data || []
const modelResponse = await modelsApi.list({ perpage: 500 })
models.value = modelResponse.data.data || []
// listAll: the models catalogue is already past the backend's 100-row
// cap, so list() left the tail of it unselectable.
models.value = await modelsApi.listAll()
} catch (err) {
console.error('Error loading vendors:', err)
}

View File

@@ -318,7 +318,10 @@ onMounted(async () => {
const [typesRes, buRes, appsRes, tzRes] = await Promise.all([
notificationsApi.types.list(),
businessUnitsApi.list().catch(() => ({ data: { data: [] } })),
applicationsApi.list({ perpage: 500 }).catch(() => ({ data: { data: [] } })),
// listAll: perpage is clamped to 100 server-side, and the catalogue is
// already past that, so this dropdown was missing its tail.
applicationsApi.listAll().then(items => ({ data: { data: items } }))
.catch(() => ({ data: { data: [] } })),
settingsApi.get('site_timezone').catch(() => null)
])

View File

@@ -78,8 +78,9 @@ function labelText(item) {
onMounted(async () => {
try {
const response = await printedpartsApi.list({ perpage: 500 })
items.value = response.data.data || []
// listAll: perpage is clamped to 100, and a label sheet must cover every
// item, not the first page of them.
items.value = await printedpartsApi.listAll()
// ?item=<id> preselects one part (the Detail-page print button)
const preselect = new URLSearchParams(window.location.search).get('item')
if (preselect) {

View File

@@ -91,8 +91,9 @@ const pages = computed(() => {
onMounted(async () => {
try {
const response = await printersApi.list({ perpage: 500 })
printers.value = response.data.data || []
// listAll: perpage is clamped to 100, and a batch sheet must cover every
// printer, not the first page of them.
printers.value = await printersApi.listAll()
} catch (error) {
console.error('Error loading printers:', error)
} finally {

View File

@@ -145,8 +145,9 @@ const sheetPages = computed(() => {
onMounted(async () => {
labelStyle.value = (await getSetting('usb_label_style', 'barcode')) === 'qr' ? 'qr' : 'barcode'
try {
const response = await usbApi.list({ perpage: 500 })
devices.value = response.data.data || []
// listAll: perpage is clamped to 100, and a batch sheet must cover every
// device, not the first page of them.
devices.value = await usbApi.listAll()
} catch (error) {
console.error('Error loading USB devices:', error)
} finally {