staging #6

Merged
farhantock merged 5 commits from staging into master 4 months ago
  1. 4
      src/views/Dashboard/DashboardBOD.js
  2. 4
      src/views/Dashboard/DashboardProject.js
  3. 8
      src/views/SimproV2/CreatedProyek/DialogFormProyek.js
  4. 3
      src/views/SimproV2/CreatedProyek/DialogGantt.js
  5. 3
      src/views/SimproV2/CreatedProyek/index.js
  6. 8
      src/views/SimproV2/Gantt/GanttFrame.js
  7. 4
      src/views/SimproV2/Gantt/index.js

4
src/views/Dashboard/DashboardBOD.js

@ -925,8 +925,8 @@ const DashboardBOD = (props) => {
<Col span={24}> <Col span={24}>
<CardScheduleHealthPerDivision <CardScheduleHealthPerDivision
isReady={READY_PROJECT_SCHEDULE_BUDGET_HEALTH_PER_DIVISION} isReady={READY_PROJECT_SCHEDULE_BUDGET_HEALTH_PER_DIVISION}
title={`Projects by ${capitalizeFirstLetter(healthPerDivisionMode)} Health per Division`} title={`Projects by ${capitalizeFirstLetter(healthPerDivisionMode)} Health per MP`}
subtitle={`${capitalizeFirstLetter(healthPerDivisionMode)} health per division.`} subtitle={`${capitalizeFirstLetter(healthPerDivisionMode)} health per MP.`}
mode={healthPerDivisionMode} mode={healthPerDivisionMode}
changeMode={(mode) => setHealthPerDivisionMode(mode)} changeMode={(mode) => setHealthPerDivisionMode(mode)}
chartType="vertical-bar" chartType="vertical-bar"

4
src/views/Dashboard/DashboardProject.js

@ -385,7 +385,7 @@ const DashboardProject = (props) => {
let selisihProgress = 0; let selisihProgress = 0;
let planningProgress = 0; let planningProgress = 0;
let actualProgress = 0; let actualProgress = 0;
let statusHealthBySchedule = "on-schedule"; let statusHealthBySchedule = "behind-schedule";
if ( if (
result.data.data.length > 0 && result.data.data.length > 0 &&
result.data.data[0].data?.budget_control result.data.data[0].data?.budget_control
@ -438,7 +438,7 @@ const DashboardProject = (props) => {
selisihProgress = planningProgress - actualProgress; selisihProgress = planningProgress - actualProgress;
if (selisihProgress > 0 && selisihProgress <= 20) { if (selisihProgress > 0 && selisihProgress <= 20) {
statusHealthBySchedule = "warning"; statusHealthBySchedule = "warning";
} else if (selisihProgress > 5) { } else if (selisihProgress == 0 || selisihProgress < 0) {
statusHealthBySchedule = "behind-schedule"; statusHealthBySchedule = "behind-schedule";
} }
setHealthBySchedule(statusHealthBySchedule); setHealthBySchedule(statusHealthBySchedule);

8
src/views/SimproV2/CreatedProyek/DialogFormProyek.js

@ -389,10 +389,18 @@ const DialogFormProyek = ({
const handleDatePickerStart = (date, dateString) => { const handleDatePickerStart = (date, dateString) => {
setStartDate(date); setStartDate(date);
if (endDate) {
const duration = moment(endDate).diff(moment(date), 'days');
setProjectDuration(duration);
}
}; };
const handleDatePickerEnd = (date, dateString) => { const handleDatePickerEnd = (date, dateString) => {
setEndDate(date); setEndDate(date);
if (startDate) {
const duration = moment(date).diff(moment(startDate), 'days');
setProjectDuration(duration);
}
}; };
const nextStep = () => { const nextStep = () => {

3
src/views/SimproV2/CreatedProyek/DialogGantt.js

@ -135,7 +135,8 @@ const DialogGantt = ({ openDialog, closeDialog, role_name, toggleDialog, idTask,
company_id: companyId, company_id: companyId,
dataViewStartDate, dataViewStartDate,
companyName, companyName,
role_name role_name,
ganttName : text.name_version
} }
}}> }}>
<Tooltip title="Gantt"> <Tooltip title="Gantt">

3
src/views/SimproV2/CreatedProyek/index.js

@ -1718,7 +1718,8 @@ const CreatedProyek = ({ params, ...props }) => {
role_name, role_name,
company_id: text.company_id, company_id: text.company_id,
dataViewStartDate, dataViewStartDate,
companyName: (role_name === 'Super Admin' ? text.join_third_company_name : JSON.parse(configApp).company_name) companyName: (role_name === 'Super Admin' ? text.join_third_company_name : JSON.parse(configApp).company_name),
ganttName : res.name_version
} }
}}> }}>
<div className="menu-list"> <div className="menu-list">

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

@ -2,11 +2,11 @@ import React, { useEffect, useState } from 'react';
import { useHistory, withRouter } from 'react-router-dom'; import { useHistory, withRouter } from 'react-router-dom';
import { BASE_SIMPRO_LUMEN } from '../../../const/ApiConst'; import { BASE_SIMPRO_LUMEN } from '../../../const/ApiConst';
const GanttFrame = React.memo(({ versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name, company_name }) => { const GanttFrame = React.memo(({ versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name, company_name, ganttName }) => {
const history = useHistory(); const history = useHistory();
const { versionGanttId, idProject, ro, timestamp, dataViewStartDate, token, companyId, role_name, company_name } = props;
const iframeSrc = `https://si-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=${companyId}&company_name=${company_name}`; const iframeSrc = `https://si-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=${companyId}&company_name=${company_name}&gantt_name=${ganttName}`;
// 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=${companyId}&company_name=${company_name}`; // const iframeSrc = `http://localhost:8444/surveyor_indonesia_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=${companyId}&company_name=${company_name}&gantt_name=${ganttName}`;
const [batchEntityData, setBatchEntityData] = useState(null); const [batchEntityData, setBatchEntityData] = useState(null);
useEffect(() => { useEffect(() => {

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

@ -12,12 +12,13 @@ const Gantt = (props) => {
const location = useLocation(); const location = useLocation();
const { company_id, dataViewStartDate, companyName, role_name } = location.state || {}; const { company_id, dataViewStartDate, companyName, role_name } = location.state || {};
let role_id = '', userId = '', isLogin = '', token = ''; let role_id = '', userId = '', isLogin = '', token = '', ganttName = '';
if (props.location.state && props.location.state.role_id && props.location.state.user_id) { if (props.location.state && props.location.state.role_id && props.location.state.user_id) {
role_id = props.location.state.role_id; role_id = props.location.state.role_id;
userId = props.location.state.user_id; userId = props.location.state.user_id;
token = props.location.state.token; token = props.location.state.token;
isLogin = props.location.state.isLogin; isLogin = props.location.state.isLogin;
ganttName = props.location.state.ganttName;
} else { } else {
role_id = localStorage.getItem("role_id"); role_id = localStorage.getItem("role_id");
userId = localStorage.getItem("user_id"); userId = localStorage.getItem("user_id");
@ -116,6 +117,7 @@ const Gantt = (props) => {
timestamp={timestamp} timestamp={timestamp}
dataViewStartDate={dataViewStartDate} dataViewStartDate={dataViewStartDate}
company_name={companyName} company_name={companyName}
ganttName={ganttName}
/> />
)} )}
</div> </div>

Loading…
Cancel
Save