Browse Source

update bug in condition S curve

pull/1/head
wahyuun 1 year ago
parent
commit
64ca56c77f
  1. 18
      src/views/Dashboard/DashboardProject.js

18
src/views/Dashboard/DashboardProject.js

@ -7,7 +7,6 @@ import {
CardScheduleHealthPerDivision, CardScheduleHealthPerDivision,
} from "../../components/CardDashboard/CardDashboard"; } from "../../components/CardDashboard/CardDashboard";
import L from "leaflet"; import L from "leaflet";
import { useParams } from "react-router-dom";
import "../../assets/css/customscroll.css"; import "../../assets/css/customscroll.css";
import moment from "moment"; import moment from "moment";
import { renderFormatRupiah } from "../../const/CustomFunc"; import { renderFormatRupiah } from "../../const/CustomFunc";
@ -31,7 +30,7 @@ import {
} from "./Components"; } from "./Components";
import { Fab, Action } from "react-tiny-fab"; import { Fab, Action } from "react-tiny-fab";
import "react-tiny-fab/dist/styles.css"; import "react-tiny-fab/dist/styles.css";
import { useHistory } from "react-router-dom"; import { useHistory, useLocation, useParams } from "react-router-dom";
const { TextArea } = Input; const { TextArea } = Input;
@ -126,8 +125,9 @@ const DashboardProject = () => {
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(false);
const [isScurve, setIsScurve] = useState(false);
let history = useHistory(); let history = useHistory();
let location = useLocation();
const isDashboardProject = location.pathname.includes('dashboard-project');
useEffect(() => { useEffect(() => {
getProjectDetail(); getProjectDetail();
@ -137,12 +137,6 @@ const DashboardProject = () => {
getComments(); getComments();
getGantt(); getGantt();
getGanttParents(); getGanttParents();
const currentURL = window.location.href;
if (currentURL.includes("dashboard-project")) {
setIsScurve(true);
} else {
setIsScurve(false);
}
return () => { return () => {
console.log("unmount RenderMap"); console.log("unmount RenderMap");
}; };
@ -1025,7 +1019,7 @@ const DashboardProject = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span={isScurve === true ? 8 : 10}> <Col span={isDashboardProject ? 8 : 10}>
<div <div
style={{ style={{
border: "solid", border: "solid",
@ -1150,7 +1144,7 @@ const DashboardProject = () => {
</div> </div>
</div> </div>
</Col> </Col>
{isScurve === true ? ( {isDashboardProject ? (
<Col span={16}> <Col span={16}>
<div <div
style={{ style={{
@ -1563,7 +1557,7 @@ const DashboardProject = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
{isScurve === true ? ( {isDashboardProject ? (
<Col span={24}> <Col span={24}>
<div <div
style={{ style={{

Loading…
Cancel
Save