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