add additional filter to product page

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-03-07 21:16:56 +05:00
parent 809438735f
commit f396125acf
10 changed files with 393 additions and 34 deletions

View File

@@ -29,6 +29,13 @@ export const endPoints = {
return link;
},
byCatalogSection: ({ id, currentPage }: ProductTypes) => {
let link = "product";
if (id) link += `?catalog_section=${id}`;
if (currentPage) link += `&page=${currentPage}`;
return link;
},
detail: (id: number) => `product/${id}/`,
},
faq: "faq/",
@@ -41,9 +48,18 @@ export const endPoints = {
normative: "document/?type=normative",
guides: "guide/",
filter: {
catalog: "catalogsection/?page_size=500",
child: (parenId: number) =>
`catalogsection/?page_size=500&parent=${parenId}`,
size: "size/",
sizePageItems: "size/?page_size=500",
sizeCategoryId: (id: number) => `size/?category=${id}&page_size=500`,
catalog: "catalog/",
catalogPageItems: "catalog/?page_size=500",
catalogCategoryId: (id: number) => `catalog/?category=${id}&page_size=500`,
child: ({ id }: { id?: number }) => {
const link = "catalogsection/?page_size=500";
if (id) return `${link}&parent=${id}`;
return link;
},
catalogSection: "catalogsection/?page_size=500",
},
post: {
sendNumber: "callBack/",