removed console
This commit is contained in:
parent
2d57ab23da
commit
23223661f0
@ -57,12 +57,9 @@ const onSubmit = (values) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
MasterRespository.createRole(result).then((resp)=>{
|
MasterRespository.createRole(result).then((resp)=>{
|
||||||
console.log(resp)
|
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
|
|
||||||
const cachedData = getCachedData( "Role" );
|
const cachedData = getCachedData( "Role" );
|
||||||
console.log(cachedData)
|
const updatedData = [...cachedData, resp.data];
|
||||||
const updatedData = [...cachedData, resp];
|
|
||||||
|
|
||||||
cacheData("Role", updatedData);
|
cacheData("Role", updatedData);
|
||||||
showToast("Role Added successfully.", "success");
|
showToast("Role Added successfully.", "success");
|
||||||
|
|||||||
@ -10,7 +10,6 @@ const DeleteMaster = ({ master, onClose }) => {
|
|||||||
const index = mastersdata[master?.masterType]?.findIndex(
|
const index = mastersdata[master?.masterType]?.findIndex(
|
||||||
(item) => String(item?.id) === String(master?.item?.id)
|
(item) => String(item?.id) === String(master?.item?.id)
|
||||||
);
|
);
|
||||||
console.log(index);
|
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
mastersdata[master?.masterType].splice(index, 1);
|
mastersdata[master?.masterType].splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user