Browse Source

stuff

pull/2/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
9229714016
  1. 17
      src/views/Dashboard/DashboardProject.js
  2. 2
      src/views/SimproV2/Gantt/index.js

17
src/views/Dashboard/DashboardProject.js

@ -36,10 +36,7 @@ const DashboardProject = () => {
} }
} }
const { PROJECT_ID, GANTT_ID } = useParams(); const { PROJECT_ID, GANTT_ID } = useParams();
// const URL_GANTT = `http://103.73.125.81:8446/index.html?base_url=http://103.73.125.81:8444/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`; const URL_GANTT = `https://adw-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://adw-gantt.ospro.id/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`;
// const URL_GANTT = '';
const URL_GANTT = `http://192.168.1.104:8446/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`;
const mapRef = useRef() const mapRef = useRef()
const [projectName, setProjectName] = useState(""); const [projectName, setProjectName] = useState("");
const [projectManagerName, setProjectManagerName] = useState(""); const [projectManagerName, setProjectManagerName] = useState("");
@ -379,7 +376,7 @@ const DashboardProject = () => {
if (reportDistribution.length > 0) { if (reportDistribution.length > 0) {
reportDistribution.map((item, idx) => { reportDistribution.map((item, idx) => {
L.marker([item.lat, item.lon]).addTo(mymap).bindPopup(PopupContent(item)); L.marker([item.lat, item.lon]).addTo(mymap).bindPopup(PopupContent(item));
}); });
} }
} }
}, [mymap, reportDistribution]) }, [mymap, reportDistribution])
@ -411,7 +408,7 @@ const DashboardProject = () => {
<div> <div>
{!isReadyComments && <ListLoader />} {!isReadyComments && <ListLoader />}
{isReadyComments && comments && comments.length < 1 && <div style={{flex: 1, textAlign: 'center', color: '#E80053', marginTop: 50, marginBottom: 50}}>No comments found.</div>} {isReadyComments && comments && comments.length < 1 && <div style={{flex: 1, textAlign: 'center', color: '#E80053', marginTop: 50, marginBottom: 50}}>No comments found.</div>}
{comments && comments.length > 0 && comments.map((item, idx) => {comments && comments.length > 0 && comments.map((item, idx) =>
<Comment key={idx} name={item.join_first_name} comment={item.comment} created_at={item.created_at} /> <Comment key={idx} name={item.join_first_name} comment={item.comment} created_at={item.created_at} />
)} )}
</div> </div>
@ -505,7 +502,7 @@ const DashboardProject = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span={12} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Acutal Start</Col> <Col span={12} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Actual Start</Col>
<Col span={12} style={{fontSize: 11}}> <Col span={12} style={{fontSize: 11}}>
{isReadyProjectDetail ? {isReadyProjectDetail ?
actualStart ? moment(actualStart).format('D MMMM YYYY') : '-' actualStart ? moment(actualStart).format('D MMMM YYYY') : '-'
@ -634,13 +631,13 @@ const DashboardProject = () => {
{isReadySCurve ? {isReadySCurve ?
<ProgressPlanningBar progress={planningProgress} /> <ProgressPlanningBar progress={planningProgress} />
: :
<SingleTextLoader width={"100%"} height={30} /> <SingleTextLoader width={"100%"} height={30} />
} }
<div style={{marginTop: 10, marginBottom: 10}}></div> <div style={{marginTop: 10, marginBottom: 10}}></div>
{isReadySCurve ? {isReadySCurve ?
<ProgressActualBar progress={actualProgress} /> <ProgressActualBar progress={actualProgress} />
: :
<SingleTextLoader width={"100%"} height={30} /> <SingleTextLoader width={"100%"} height={30} />
} }
</div> </div>
</Col> </Col>
@ -728,4 +725,4 @@ const DashboardProject = () => {
); );
} }
export default DashboardProject; export default DashboardProject;

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

@ -76,7 +76,7 @@ const Gantt = (props) => {
const RenderGantt = () => ( const RenderGantt = () => (
<iframe <iframe
id="frame-gantt" id="frame-gantt"
src={`https://adw-gantt.ospro.id/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${localStorage.getItem('token')}&ro=${ro}`} src={`https://adw-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}`}
style={{ style={{
width: '100%', width: '100%',
height: '95vh', height: '95vh',

Loading…
Cancel
Save