Browse Source

Merge pull request 'add param company_id & role_name' (#42) from dev-wahyun into staging

Reviewed-on: ibnu/generic-ospro-frontend#42
pull/1/head
farhantock 10 months ago
parent
commit
41f8010739
  1. 3
      src/views/Dashboard/DashboardProject.js
  2. 5
      src/views/SimproV2/Gantt/GanttFrame.js
  3. 2
      src/views/SimproV2/Gantt/index.js

3
src/views/Dashboard/DashboardProject.js

@ -86,7 +86,8 @@ const DashboardProject = (props) => {
},
};
const { PROJECT_ID, GANTT_ID, SCURVE } = useParams();
const URL_GANTT = `https://project-gantt.ospro.id/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`;
const URL_GANTT = `https://project-gantt.ospro.id/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1&role_name=${role_name}&company_id=${company_id}`;
// const URL_GANTT = `http://localhost:8444/generic-ospro-gantt/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1&role_name=${role_name}&company_id=${company_id}`;
const mapRef = useRef();
const [projectName, setProjectName] = useState("");
const [projectManagerName, setProjectManagerName] = useState("");

5
src/views/SimproV2/Gantt/GanttFrame.js

@ -4,8 +4,9 @@ import { BASE_SIMPRO_LUMEN } from '../../../const/ApiConst';
const GanttFrame = React.memo((props) => {
const history = useHistory();
const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token } = 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}&timestamp=${timestamp}&start=${dataViewStartDate}`;
const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, company_id, 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}&timestamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${company_id}`;
// 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}&timestamp=${timestamp}&start=${dataViewStartDate}&role_name=${role_name}&company_id=${company_id}`;
const [batchEntityData, setBatchEntityData] = useState(null);
useEffect(() => {

2
src/views/SimproV2/Gantt/index.js

@ -113,6 +113,8 @@ const Gantt = (props) => {
idProject={idProject}
token={token}
ro={ro}
role_name={role_name}
company_id={company_id}
timestamp={timestamp}
/>
)}

Loading…
Cancel
Save