Browse Source

Merge pull request 'update condition' (#147) from dev-wahyun into staging

Reviewed-on: ordo/adw-frontend#147
pull/1/head
farhantock 11 months ago
parent
commit
f7eac87d36
  1. 18
      src/views/Dashboard/DashboardProject.js

18
src/views/Dashboard/DashboardProject.js

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

Loading…
Cancel
Save