From af4c6705f96411da42e220e4c71ffdcff1c750d3 Mon Sep 17 00:00:00 2001 From: Srinath Date: Wed, 4 Feb 2026 13:14:50 +0530 Subject: [PATCH] Added new Get Post Delete --- src/Features/ProductCatlog/ProductCatlogue.js | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/src/Features/ProductCatlog/ProductCatlogue.js b/src/Features/ProductCatlog/ProductCatlogue.js index c26765f..97897d8 100644 --- a/src/Features/ProductCatlog/ProductCatlogue.js +++ b/src/Features/ProductCatlog/ProductCatlogue.js @@ -21,6 +21,76 @@ export const getProdcataloguedata = createAsyncThunk( } } ); +// get /ProductCatalogue +export const getProductCatalogueData = createAsyncThunk( + 'product/ProductCatalogue', + async (data) => { + if ( + data?.AppId != null && + data?.AppId != undefined && + data?.CompId != null && + data?.CompId != undefined && + data?.BranchId != null && + data?.BranchId != undefined + ) { + return await axiosRetailInstanceData.get( + // `/ProductCatalogue?compId=${data?.CompId}&branchId=${data?.BranchId}&appId=${data?.AppId}&pageNumber=${data?.PageNumber}` + `/ProductCatalogue?compId=${data?.CompId}&branchId=${data?.BranchId}&appId=${data?.AppId}` + ); + } + } +); +// post /ProductCatalogue +export const postProductCatalogue = createAsyncThunk( + 'product/ProductCatalogue', + async (data) => { + return await axiosRetailInstanceData.post(`/ProductCatalogue`, data); + } +); +// put /ProductCatalogue +export const putProductCatalogue = createAsyncThunk( + 'put/ProductCatalogue', + async (data) => { + return await axiosRetailInstanceData.put(`/ProductCatalogue`, data); + } +); +// get /GetProductCatalogueByType +export const GetProductCatalogueByTypeData = createAsyncThunk( + 'product/ProductCatalogue', + async (data) => { + if ( + data?.AppId != null && + data?.AppId != undefined && + data?.CompId != null && + data?.CompId != undefined && + data?.BranchId != null && + data?.BranchId != undefined + ) { + return await axiosRetailInstanceData.get( + `/GetProductCatalogueByType?compId=${data?.CompId}&branchId=${data?.BranchId}&appId=${data?.AppId}&catalogType=${data?.CatalogType}` + ); + } + } +); +// delete /ProductCatalogue +export const deleteProductCatalogue = createAsyncThunk( + 'ProductCatalogue/deleteProductCatalogue', + async (data) => { + if ( + data?.AppId != null && + data?.AppId != undefined && + data?.CompId != null && + data?.CompId != undefined && + data?.BranchId != null && + data?.BranchId != undefined + ) { + return await axiosRetailInstanceData.delete( + `/ProductCatalogue?compId=${data?.CompId}&branchId=${data?.BranchId}&appId=${data?.AppId}&catalogType=${data?.CatalogType}&activeStatus=${data?.ActiveStatus}&updatedBy=${data?.UpdatedBy}` + + ); + } + } +); export const onlineimages = createAsyncThunk( 'image/onlineimages',