Organization_Management : Organization Hierarchy #443
@ -19,7 +19,7 @@ import ManageProjectInfo from "../../components/Project/ManageProjectInfo";
|
|||||||
import showToast from "../../services/toastService";
|
import showToast from "../../services/toastService";
|
||||||
import { getCachedData, cacheData } from "../../slices/apiDataManager";
|
import { getCachedData, cacheData } from "../../slices/apiDataManager";
|
||||||
import GlobalModel from "../../components/common/GlobalModel";
|
import GlobalModel from "../../components/common/GlobalModel";
|
||||||
import {formatNumber} from "../../utils/dateUtils";
|
import { formatNumber } from "../../utils/dateUtils";
|
||||||
import { setProjectId } from "../../slices/localVariablesSlice";
|
import { setProjectId } from "../../slices/localVariablesSlice";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ const ProjectListView = ({ projectData, recall }) => {
|
|||||||
const [projectInfo, setProjectInfo] = useState(projectData);
|
const [projectInfo, setProjectInfo] = useState(projectData);
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const { projects_Details, loading, error, refetch } = useProjectDetails(
|
const { projects_Details, loading, error, refetch } = useProjectDetails(
|
||||||
projectInfo?.id,false
|
projectInfo?.id, false
|
||||||
);
|
);
|
||||||
const [showModal, setShowModal] = useState(false);
|
const [showModal, setShowModal] = useState(false);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@ -40,11 +40,11 @@ const ProjectListView = ({ projectData, recall }) => {
|
|||||||
isPending,
|
isPending,
|
||||||
isSuccess,
|
isSuccess,
|
||||||
isError,
|
isError,
|
||||||
} = useUpdateProject({
|
} = useUpdateProject({
|
||||||
onSuccessCallback: () => {
|
onSuccessCallback: () => {
|
||||||
setShowModal(false);
|
setShowModal(false);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleShow = async () => {
|
const handleShow = async () => {
|
||||||
try {
|
try {
|
||||||
@ -65,6 +65,7 @@ const ProjectListView = ({ projectData, recall }) => {
|
|||||||
const handleClose = () => setShowModal(false);
|
const handleClose = () => setShowModal(false);
|
||||||
|
|
||||||
const handleViewProject = () => {
|
const handleViewProject = () => {
|
||||||
|
dispatch(setProjectId(projectInfo.id))
|
||||||
navigate(`/projects/details`);
|
navigate(`/projects/details`);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -168,7 +169,7 @@ const ProjectListView = ({ projectData, recall }) => {
|
|||||||
<a
|
<a
|
||||||
aria-label="click to View details"
|
aria-label="click to View details"
|
||||||
className="dropdown-item"
|
className="dropdown-item"
|
||||||
onClick={() => navigate(`/projects/details`)}
|
onClick={handleViewProject}
|
||||||
>
|
>
|
||||||
<i className="bx bx-detail me-2"></i>
|
<i className="bx bx-detail me-2"></i>
|
||||||
<span className="align-left">View details</span>
|
<span className="align-left">View details</span>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user