vissible data after updated inside projecr details page

This commit is contained in:
Pramod Mahajan 2025-07-09 11:48:42 +05:30
parent 87edce4c3d
commit d818ea9265
3 changed files with 7 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import {useHasUserPermission} from "../../hooks/useHasUserPermission";
import {MANAGE_PROJECT} from "../../utils/constants";
import GlobalModel from "../common/GlobalModel";
import ManageProjectInfo from "./ManageProjectInfo";
import {useQueryClient} from "@tanstack/react-query";
const AboutProject = () =>
{
const [ IsOpenModal, setIsOpenModal ] = useState( false )
@ -15,7 +16,8 @@ const AboutProject = () =>
{
setIsOpenModal(false)
}
})
} )
const ClientQuery = useQueryClient()
const {projectId} = useParams();
const manageProject = useHasUserPermission(MANAGE_PROJECT);
const {projects_Details, isLoading, error,refetch} = useProjectDetails( projectId )
@ -23,9 +25,10 @@ const AboutProject = () =>
{
if ( projects_Details?.id )
{
ClientQuery.invalidateQueries({queryKey:["projectInfo"]})
UpdateProjectDetails({ projectId: projects_Details?.id,updatedData: updatedProject,
} );
refetch()
}
};
return (

View File

@ -108,6 +108,7 @@ export const useReportTask = ( {onSuccessCallback, onErrorCallback} = {} ) =>
const {workAreaId} = variables;
queryClient.invalidateQueries( {queryKey: [ "taskList" ]} );
queryClient.invalidateQueries( {queryKey: [ "WorkItems", workAreaId ]} );
queryClient.invalidateQueries( {queryKey: [ 'ProjectsList' ]} );
showToast( "Task Reported Successfully.", "success" );
if (onSuccessCallback) onSuccessCallback(data);
},

View File

@ -109,8 +109,7 @@ export function startSignalR(loggedUser) {
queryClient.invalidateQueries(['allEmployee', false]);
queryClient.invalidateQueries(['employeeProfile', data.response?.employeeId]);
queryClient.invalidateQueries(['employeeListByProject']); // optional if scope
queryClient
eventBus.emit("employee", data);
eventBus.emit("employee", data);
}
if (data.keyword == "Task_Report") {