diff --git a/src/views/SimproV2/Gantt/GanttFrame.js b/src/views/SimproV2/Gantt/GanttFrame.js new file mode 100644 index 0000000..0ddb2b9 --- /dev/null +++ b/src/views/SimproV2/Gantt/GanttFrame.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { BASE_SIMPRO_LUMEN } from '../../../const/ApiConst'; + +const GanttFrame = React.memo((props) => { + const { versionGanttId, idProject, token, ro, timestamp } = props; + const iframeSrc = `https://adw-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}×tamp=${timestamp}`; + + return ( + + ); +}); + +export default GanttFrame; diff --git a/src/views/SimproV2/Gantt/index.js b/src/views/SimproV2/Gantt/index.js index 466bb6d..c491af4 100644 --- a/src/views/SimproV2/Gantt/index.js +++ b/src/views/SimproV2/Gantt/index.js @@ -6,7 +6,7 @@ import axios from "../../../const/interceptorApi" import { Fab, Action } from 'react-tiny-fab'; import 'react-tiny-fab/dist/styles.css'; import { useHistory } from "react-router-dom"; - +import GanttFrame from './GanttFrame'; const token = localStorage.getItem("token") const userId = parseInt(localStorage.getItem("user_id")); const HEADER = { @@ -82,24 +82,19 @@ const Gantt = (props) => { } roCount = roCount + 1; } - const RenderGantt = () => ( - - ) return ( <>
- {ready && } + {ready && ( + + )}
);