Compare commits
2 Commits
bba4315a8e
...
fe4426af9e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe4426af9e | ||
|
|
01591c429e |
@ -25,10 +25,9 @@ const AboutProject = () =>
|
||||
{
|
||||
if ( projects_Details?.id )
|
||||
{
|
||||
ClientQuery.invalidateQueries({queryKey:["projectInfo"]})
|
||||
UpdateProjectDetails({ projectId: projects_Details?.id,updatedData: updatedProject,
|
||||
} );
|
||||
|
||||
refetch()
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
||||
@ -400,7 +400,7 @@ export const useUpdateProject = ({ onSuccessCallback }) => {
|
||||
const { projectId } = variables;
|
||||
|
||||
queryClient.invalidateQueries({queryKey:["ProjectsList"]});
|
||||
queryClient.invalidateQueries( {queryKey: [ "projectinfo", projectId ]} );
|
||||
queryClient.invalidateQueries( {queryKey: [ "projectInfo", projectId ]} );
|
||||
queryClient.invalidateQueries({queryKey:['basicProjectNameList']});
|
||||
|
||||
eventBus.emit("project", {
|
||||
|
||||
@ -20,6 +20,7 @@ import Avatar from "../../components/common/Avatar";
|
||||
import AttendancesEmployeeRecords from "./AttendancesEmployeeRecords";
|
||||
import ManageEmployee from "../../components/Employee/ManageEmployee";
|
||||
import { useChangePassword } from "../../components/Context/ChangePasswordContext";
|
||||
import GlobalModel from "../../components/common/GlobalModel";
|
||||
|
||||
const EmployeeProfile = () => {
|
||||
const { profile } = useProfile();
|
||||
@ -39,11 +40,7 @@ const EmployeeProfile = () => {
|
||||
setActivePill(pillKey);
|
||||
};
|
||||
|
||||
const closeModal = () => {
|
||||
setShowModal(false);
|
||||
fetchEmployeeProfile(employeeId);
|
||||
};
|
||||
const handleShow = () => setShowModal(true);
|
||||
|
||||
|
||||
const fetchEmployeeProfile = async (employeeID) => {
|
||||
try {
|
||||
@ -104,24 +101,10 @@ const EmployeeProfile = () => {
|
||||
const { openChangePassword } = useChangePassword();
|
||||
return (
|
||||
<>
|
||||
{" "}
|
||||
{showModal && (
|
||||
<div
|
||||
className={`modal fade ${showModal ? "show" : ""} `}
|
||||
tabIndex="-1"
|
||||
role="dialog"
|
||||
style={{ display: showModal ? "block" : "none" }}
|
||||
aria-hidden={!showModal}
|
||||
>
|
||||
<div className="modal-dialog modal-xl modal-dialog-centered ">
|
||||
<div
|
||||
className="modal-content overflow-y-auto overflow-x-hidden"
|
||||
style={{ maxHeight: "90vh" }}
|
||||
>
|
||||
<ManageEmployee employeeId={employeeId} onClosed={closeModal} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<GlobalModel size="lg" isOpen={showModal} closeModal={()=>setShowModal(false)}>
|
||||
<ManageEmployee employeeId={employeeId} onClosed={()=>setShowModal(false)} />
|
||||
</GlobalModel>
|
||||
)}
|
||||
<div className="container-fluid">
|
||||
<Breadcrumb
|
||||
@ -251,7 +234,7 @@ const EmployeeProfile = () => {
|
||||
</div>
|
||||
<button
|
||||
className="btn btn-primary btn-block"
|
||||
onClick={() => handleShow()}
|
||||
onClick={()=>setShowModal(true)}
|
||||
>
|
||||
Edit Profile
|
||||
</button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user