Page past the 100-row cap in pickers and batch label sheets
This commit is contained in:
@@ -295,8 +295,10 @@ onMounted(async () => {
|
||||
codetype.value = (await getSetting('label_default_codetype', 'qr')) === 'barcode' ? 'barcode' : 'qr'
|
||||
encodes.value = await resolveDefaultEncodes(assettype)
|
||||
try {
|
||||
const response = await config.api.list({ perpage: 500 })
|
||||
assets.value = response.data.data || []
|
||||
// listAll, not list: perpage is clamped to 100 server-side, so a batch
|
||||
// sheet built from list() silently omitted every asset past the first
|
||||
// 100 and printed a short run that looked complete.
|
||||
assets.value = await config.api.listAll()
|
||||
} catch (err) {
|
||||
console.error('Error loading assets:', err)
|
||||
} finally {
|
||||
|
||||
@@ -270,8 +270,10 @@ async function loadFilterOptions(fields) {
|
||||
filterOptions.value.locations = response.data.data || []
|
||||
}
|
||||
if (fields.includes('application') && !filterOptions.value.applications.length) {
|
||||
const response = await applicationsApi.list({ perpage: 100 })
|
||||
filterOptions.value.applications = response.data.data || []
|
||||
// listAll: 100 is the server-side cap, not a generous limit, and the
|
||||
// catalogue is past it - a report filtered by a late-alphabet
|
||||
// application could not be built.
|
||||
filterOptions.value.applications = await applicationsApi.listAll()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error loading filter options:', error)
|
||||
|
||||
Reference in New Issue
Block a user