Added new Get Post Delete
This commit is contained in:
parent
4a05b53701
commit
af4c6705f9
|
|
@ -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(
|
export const onlineimages = createAsyncThunk(
|
||||||
'image/onlineimages',
|
'image/onlineimages',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue