diff --git a/src/components/master/CreateRole.jsx b/src/components/master/CreateRole.jsx index 90f608e6..48c2fa3c 100644 --- a/src/components/master/CreateRole.jsx +++ b/src/components/master/CreateRole.jsx @@ -58,17 +58,17 @@ const onSubmit = (values) => { MasterRespository.createRole(result).then((resp)=>{ setIsLoading(false) - const cachedData = getCachedData( "Role" ); + const cachedData = getCachedData( "Application Role" ); const updatedData = [...cachedData, resp.data]; - cacheData("Application Role", updatedData); - showToast("Application Role Added successfully.", "success"); + showToast( "Application Role Added successfully.", "success" ); onClose() } ).catch( ( err ) => { - + showToast(err?.response?.data?.message, "error"); - setIsLoading(false) + setIsLoading( false ) + onClose() })