Browse Source

update scurve

pull/1/head
wahyu 1 year ago
parent
commit
d8f5804e0b
  1. 16
      src/views/Dashboard/DashboardProject.js

16
src/views/Dashboard/DashboardProject.js

@ -125,12 +125,11 @@ const DashboardProject = () => {
const [dataGanttParents, setDataGanttParents] = useState({});
const [isReadyGanttParents, setIsReadyGanttParents] = useState(false);
const [calculationStatus, setCalculationStatus] = useState(false);
const [isHierarchy, setIsHierarchy] = useState(false);
const [isHierarchy, setIsHierarchy] = useState(null);
let history = useHistory();
useEffect(() => {
getProjectDetail();
getSCurve();
getOverdueActivities();
getReportDistribution();
getComments();
@ -141,6 +140,17 @@ const DashboardProject = () => {
};
}, []);
useEffect(() => {
if (isHierarchy != null) {
getSCurve();
}
window.addEventListener("message", handleIframeMessage);
return () => {
window.removeEventListener("message", handleIframeMessage);
};
}, [isHierarchy]);
useEffect(() => {
if (activeTabIdx === 1) {
initMap();
@ -188,6 +198,8 @@ const DashboardProject = () => {
setDataGantt(response);
if (response.data.data.hierarchy_ftth_id) {
setIsHierarchy(true);
} else {
setIsHierarchy(false);
}
setIsReadyGantt(true);
} catch (error) {

Loading…
Cancel
Save