From 39c9f2c17572af2a0b53a52227fea7f33562a276 Mon Sep 17 00:00:00 2001 From: bnu Date: Thu, 28 Jul 2022 04:03:21 +0700 Subject: [PATCH] update gantt for last_gantt, and hide tableDashboard --- src/views/DashboardProject/ganttDashboard.js | 7 ++++++- src/views/DashboardProject/index.js | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/DashboardProject/ganttDashboard.js b/src/views/DashboardProject/ganttDashboard.js index 775828f..5fe6faa 100644 --- a/src/views/DashboardProject/ganttDashboard.js +++ b/src/views/DashboardProject/ganttDashboard.js @@ -2,12 +2,17 @@ import React, { useEffect, useMemo, useState } from 'react'; import Timeline from 'react-calendar-timeline' // make sure you include the timeline stylesheet or the timeline will not be styled import 'react-calendar-timeline/lib/Timeline.css' +import { useParams } from 'react-router-dom'; // import moment from 'moment'; // import { USER_VERSION_GANTT_SEARCH, BASE_SIMPRO_LUMEN } from '../../../const/ApiConst'; // import axios from "../../../const/interceptorApi" const token = localStorage.getItem("token") -const url = `https://ospro-gantt.ospro.id/src/index.html?base_url=https://ospro-api.ospro.id/api&gantt_id=12&proyek_id=11&token=${token}&ro=0` + const Gantt = (props) => { +const { ID } = useParams(); +const { GANTTID } = useParams(); +const url = `https://ospro-gantt.ospro.id/src/index.html?base_url=https://ospro-api.ospro.id/api&gantt_id=${GANTTID}&proyek_id=${ID}&token=${token}&ro=0` + const RenderGantt = () => (