feat(prob): added filter for tag and storage

This commit is contained in:
2025-11-06 18:06:27 +01:00
parent 61450312ff
commit 7567cb51af
7 changed files with 110 additions and 8 deletions

View File

@@ -314,12 +314,14 @@ window.updateUrlParams = function(params, resetPage = true) {
window.location.href = currentUrl.toString();
};
// Shared filter application (supports owner, color, theme, year, and problems filters)
// Shared filter application (supports owner, color, theme, year, storage, tag, and problems filters)
window.applyPageFilters = function(tableId) {
const ownerSelect = document.getElementById('filter-owner');
const colorSelect = document.getElementById('filter-color');
const themeSelect = document.getElementById('filter-theme');
const yearSelect = document.getElementById('filter-year');
const storageSelect = document.getElementById('filter-storage');
const tagSelect = document.getElementById('filter-tag');
const problemsSelect = document.getElementById('filter-problems');
const params = {};
@@ -343,6 +345,16 @@ window.applyPageFilters = function(tableId) {
params.year = yearSelect.value;
}
// Handle storage filter
if (storageSelect) {
params.storage = storageSelect.value;
}
// Handle tag filter
if (tagSelect) {
params.tag = tagSelect.value;
}
// Handle problems filter (for minifigures page)
if (problemsSelect) {
params.problems = problemsSelect.value;