feat: implement fully dynamic filter sidebar in backend getActiveFilters and frontend ArchivePage mapping with URL sync

This commit is contained in:
parsa aghaei committed 2026-07-15 13:49:13 +03:30
1 parent 2745125c5b
commit 0ccf37f922
5 files changed
+142 -37

No files matched your search

@@ -154,6 +154,20 @@ export class ProductService {
return [];
}
}
public async getActiveFilters(): Promise<{
categories: { id: string; name: string; slug: string }[];
symptoms: string[];
petTypes: string[];
}> {
try {
const response = await api.get('/products/filters');
return response.data;
} catch (error) {
console.error("[ProductService] Failed to fetch active filters:", error);
return { categories: [], symptoms: [], petTypes: [] };
}
}
}
export const productService = ProductService.getInstance();