vissible data after updated inside projecr details page
This commit is contained in:
parent
87edce4c3d
commit
d818ea9265
@ -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 )
|
||||
@ -16,6 +17,7 @@ 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 (
|
||||
|
@ -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);
|
||||
},
|
||||
|
@ -109,7 +109,6 @@ 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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user