upadated application cache key in createrole #26

Merged
pramod.mahajan merged 1 commits from pramod_bug#91 into Feature_Task_Management 2025-04-18 07:55:18 +00:00
Showing only changes of commit 1a1c94667c - Show all commits

View File

@ -58,17 +58,17 @@ const onSubmit = (values) => {
MasterRespository.createRole(result).then((resp)=>{ MasterRespository.createRole(result).then((resp)=>{
setIsLoading(false) setIsLoading(false)
const cachedData = getCachedData( "Role" ); const cachedData = getCachedData( "Application Role" );
const updatedData = [...cachedData, resp.data]; const updatedData = [...cachedData, resp.data];
cacheData("Application Role", updatedData); cacheData("Application Role", updatedData);
showToast("Application Role Added successfully.", "success"); showToast( "Application Role Added successfully.", "success" );
onClose() onClose()
} ).catch( ( err ) => } ).catch( ( err ) =>
{ {
showToast(err?.response?.data?.message, "error"); showToast(err?.response?.data?.message, "error");
setIsLoading(false) setIsLoading( false )
onClose()
}) })