add additional filter to product page
This commit is contained in:
@@ -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/",
|
||||
|
||||
Reference in New Issue
Block a user