fix(filters) : repair broken filters on catalog and document pages
- modelTypes.ts: use API Platform OrderFilter format (order[field]=dir) and proper page param - product-catalog: load all products (itemsPerPage: 200) instead of default 30 - documents: load all documents (itemsPerPage: 200) instead of default 30 - useDocuments: support itemsPerPage option in loadDocuments/loadFromEndpoint - pieces-catalog + component-catalog: add force:true to bypass stale cache on sort/filter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -234,7 +234,8 @@ const fetchComposants = async () => {
|
||||
page: currentPage.value,
|
||||
itemsPerPage: itemsPerPage.value,
|
||||
orderBy: sortField.value,
|
||||
orderDir: sortDirection.value
|
||||
orderDir: sortDirection.value,
|
||||
force: true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ const previewDocument = ref(null)
|
||||
const previewVisible = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
loadDocuments()
|
||||
loadDocuments({ itemsPerPage: 200 })
|
||||
})
|
||||
|
||||
const filteredDocuments = computed(() => {
|
||||
|
||||
@@ -256,7 +256,8 @@ const fetchPieces = async () => {
|
||||
page: currentPage.value,
|
||||
itemsPerPage: itemsPerPage.value,
|
||||
orderBy: sortField.value,
|
||||
orderDir: sortDirection.value
|
||||
orderDir: sortDirection.value,
|
||||
force: true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ const resolvePreviewAlt = (product: Record<string, any>) => {
|
||||
}
|
||||
|
||||
const reload = async () => {
|
||||
await loadProducts({ force: true })
|
||||
await loadProducts({ itemsPerPage: 200, force: true })
|
||||
}
|
||||
|
||||
const { confirm } = useConfirm()
|
||||
@@ -409,7 +409,7 @@ const confirmDelete = async (product: Record<string, any>) => {
|
||||
|
||||
onMounted(async () => {
|
||||
await Promise.all([
|
||||
loadProducts(),
|
||||
loadProducts({ itemsPerPage: 200, force: true }),
|
||||
loadProductTypes()
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user