diff --git a/src/views/SimproV2/Gantt/GanttFrame.js b/src/views/SimproV2/Gantt/GanttFrame.js index fed3f82..738dbe8 100644 --- a/src/views/SimproV2/Gantt/GanttFrame.js +++ b/src/views/SimproV2/Gantt/GanttFrame.js @@ -4,9 +4,9 @@ import { BASE_SIMPRO_LUMEN } from '../../../const/ApiConst'; const GanttFrame = React.memo((props) => { const history = useHistory(); - const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name } = props; - const iframeSrc = `https://project-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}×tamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}`; - // const iframeSrc = `http://localhost:8444/generic-ospro-gantt/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}×tamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}`; + const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name, company_name } = props; + const iframeSrc = `https://project-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}×tamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}&company_name=${company_name}`; + // const iframeSrc = `http://localhost:8444/generic-ospro-gantt/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}×tamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${companyId}&company_name=${company_name}`; const [batchEntityData, setBatchEntityData] = useState(null); useEffect(() => { @@ -18,7 +18,6 @@ const GanttFrame = React.memo((props) => { window.addEventListener('message', handleMessage); }, []); - useEffect(() => { const handleNavigation = (event) => { if (batchEntityData && batchEntityData !== '') { diff --git a/src/views/SimproV2/Gantt/index.js b/src/views/SimproV2/Gantt/index.js index e07e9d8..1bc6558 100644 --- a/src/views/SimproV2/Gantt/index.js +++ b/src/views/SimproV2/Gantt/index.js @@ -15,7 +15,7 @@ import GanttFrame from "./GanttFrame"; let roCount = 0; const Gantt = (props) => { - let role_id = 0, user_id = 0, isLogin = false, token = '', companyId = 0, all_project = null, role_name='', hierarchy=[], user_name=''; + let role_id = 0, user_id = 0, isLogin = false, token = '', companyId = 0, all_project = null, role_name='', hierarchy=[], user_name='', configApp=''; if (props && props.role_id && props.user_id) { role_id = props.role_id; user_id = props.user_id; @@ -27,6 +27,7 @@ const Gantt = (props) => { isLogin = props.isLogin; hierarchy = props.hierarchy; user_name = props.user_name; + configApp = props.configApp; } const HEADER = { headers: { @@ -116,6 +117,7 @@ const Gantt = (props) => { role_name={role_name} companyId={companyId} timestamp={timestamp} + company_name={JSON.parse(configApp).company_name} /> )}