diff --git a/src/routes.js b/src/routes.js index d20246d..2719201 100644 --- a/src/routes.js +++ b/src/routes.js @@ -56,7 +56,7 @@ const routes = [ { path: '/dashboard', name: 'DashboardBOD', component: DashboardBOD }, { path: '/dashboard-customer/:PROJECT_ID/:GANTT_ID/:SCURVE', name: 'DashboardCustomer', component: DashboardCustomer }, { path: '/dashboard-project/:PROJECT_ID/:GANTT_ID', exact: true, name: 'Dashboard Project', component: DashboardProject }, - { path: '/dashboard-project-carousell', exact: true, name: 'Dashboard Project Carousell', component: DashboardProjectCarousell }, + { path: '/dashboard-perproject', exact: true, name: 'Dashboard Project Carousell', component: DashboardProjectCarousell }, { path: '/dashboard-project/:PROJECT_ID/:GANTT_ID/:SCURVE', exact: true, name: 'Dashboard Project', component: DashboardProject }, { path: '/projects', exact: true, name: 'Projects', component: CreatedProyek }, { path: '/projects/:id/import/activity', exact: true, name: 'Gantt Import Activity', component: GanttImportActivity }, diff --git a/src/services/api/modules/project/index.js b/src/services/api/modules/project/index.js index b058929..127b5c9 100644 --- a/src/services/api/modules/project/index.js +++ b/src/services/api/modules/project/index.js @@ -2,61 +2,60 @@ import { BASE_SIMPRO_LUMEN } from "../../../../const/ApiConst"; import RequestApi from '../../base'; export default class ApiProject extends RequestApi { - static async list() { + static async search(role_id) { // const user_id = store.getState().userReducer && store.getState().userReducer.user && store.getState().userReducer.user.data_user ? store.getState().userReducer.user.data_user.id : 0; - const URL = `${BASE_SIMPRO_LUMEN}/project/list` - // const payload = { - // "paging": { "start": 0, "length": 25 }, - // // "columns": [ - // // { "name": "user_id", "logic_operator": "=", "value": user_id } - // // ], - // // "joins": [ - // // { - // // "name": "m_proyek", - // // "column_join": "proyek_id", - // // "column_results": [ - // // "nama", "kode_sortname", "mulai_proyek", "akhir_proyek" - // // ] - // // }, - // // { - // // "name": "m_activity", - // // "column_join": "activity_id", - // // "column_results": [ - // // "name", "start_date", "end_date", "persentase_progress" - // // ] - // // } - // // ], - // "orders": { "columns": ["id"], "ascending": false } - // } - return await RequestApi.Request().get( - URL, + const URL = `${BASE_SIMPRO_LUMEN}/project/search` + let hierarchy = []; + hierarchy.push(JSON.parse(localStorage.getItem("hierarchy"))); + const payload = { + columns: [], + select: [ + "id", + "nama", + "kode_sortname", + "type_proyek_id", + "currency_symbol", + "mulai_proyek", + "akhir_proyek", + ], + + orders: { columns: ["nama"], ascending: true }, + paging: { start: 0, length: -1 }, + }; + if (parseInt(role_id) !== 70) { + payload["columns"] = [ + { name: "created_by_id", logic_operator: "IN", value: hierarchy, operator: "AND" } + ]; + } + return await RequestApi.Request().post( + URL, payload, RequestApi.HeaderWithToken()).then(res => { - if (res) { - if (res && res.data && res.data.data) { - // console.log('ApiProject search', res.data.data) - if (res.data.data.length > 0) { - return {status: true, data: res.data.data}; + if (res) { + if (res && res.data && res.data.data) { + // console.log('ApiProject search', res.data.data) + if (res.data.data.length > 0) { + return { status: true, data: res.data.data }; + } + else { + return { status: false, data: null } + } } else { - return {status: false, data: null} + return { status: false, data: null }; } } else { - return {status: false, data: null}; + alert("Please check your internet connection.", "error"); + return { status: false, data: null }; + } + }).catch(e => { + // console.log('error search project', e); + let error = JSON.parse(JSON.stringify(e)); + console.log('error search project', error); + if (error.message) { + alert(error.message); } - } - else { - alert("Please check your internet connection.", "error"); - return {status: false, data: null}; - } - }).catch(e => { - // console.log('error search project', e); - let error = JSON.parse(JSON.stringify(e)); - console.log('error search project', error); - if (error.message) { - alert(error.message); - } - return {status: false, data: null}; - }); + return { status: false, data: null }; + }); } } \ No newline at end of file diff --git a/src/views/Dashboard/DashboardBOD.js b/src/views/Dashboard/DashboardBOD.js index 5d14a67..8b1c940 100644 --- a/src/views/Dashboard/DashboardBOD.js +++ b/src/views/Dashboard/DashboardBOD.js @@ -15,18 +15,18 @@ import { HealthByBudget, HealthBySchedule } from './Components'; import { Link } from 'react-router-dom'; const DashboardBOD = (props) => { - let role_id = '', user_id='',isLogin='',token=''; - if (props.location.state && props.location.state.role_id && props.location.state.user_id) { - role_id = props.location.state.role_id; - user_id = props.location.state.user_id; - token = props.location.state.token; - isLogin = props.location.state.isLogin; - } else { - role_id = localStorage.getItem("role_id"); - user_id = localStorage.getItem("user_id"); - token = localStorage.getItem("token"); - isLogin = localStorage.getItem("isLogin"); - } + let role_id = '', user_id = '', isLogin = '', token = ''; + if (props.location.state && props.location.state.role_id && props.location.state.user_id) { + role_id = props.location.state.role_id; + user_id = props.location.state.user_id; + token = props.location.state.token; + isLogin = props.location.state.isLogin; + } else { + role_id = localStorage.getItem("role_id"); + user_id = localStorage.getItem("user_id"); + token = localStorage.getItem("token"); + isLogin = localStorage.getItem("isLogin"); + } const HEADER = { headers: { "Content-Type": "application/json", @@ -256,9 +256,9 @@ const DashboardBOD = (props) => { return; } - if (result.status == 200 && result.data.data) { - let dataRes = result.data.data; - const filteredData = dataRes.filter(item => item.parent === null); + if (result.status == 200 && result.data.data) { + let dataRes = result.data.data; + const filteredData = dataRes.filter(item => item.parent === null); SET_PROJECT_PER_DIVISION(filteredData); } SET_READY_PROJECT_PER_DIVISION(true); @@ -317,16 +317,16 @@ const DashboardBOD = (props) => { let tableData = []; result.data.data.map((item, idx) => { let statusHealthBySchedule = 'on-schedule'; - let planningProgress = 0; - let actualProgress = 0; - let selisihProgress = 0; + let planningProgress = 0; + let actualProgress = 0; + let selisihProgress = 0; - if(item.scurve && item.scurve[0]) { - planningProgress = item.scurve[0].data.percentagePlan[item.scurve[0].data.percentagePlan.length - 1] - actualProgress = item.scurve[0].data.percentageReal[item.scurve[0].data.percentageReal.length - 1] - } + if (item.scurve && item.scurve[0]) { + planningProgress = item.scurve[0].data.percentagePlan[item.scurve[0].data.percentagePlan.length - 1] + actualProgress = item.scurve[0].data.percentageReal[item.scurve[0].data.percentageReal.length - 1] + } - selisihProgress = planningProgress - actualProgress + selisihProgress = planningProgress - actualProgress if (selisihProgress > 0 && selisihProgress <= 5) { statusHealthBySchedule = 'warning' @@ -378,7 +378,7 @@ const DashboardBOD = (props) => { return ( {
- -
- View All Gantt -
- -
+ +
+ All Dashboard +
+ + :
diff --git a/src/views/Dashboard/DashboardProjectCarousell.js b/src/views/Dashboard/DashboardProjectCarousell.js index 5d37ea0..9b21734 100644 --- a/src/views/Dashboard/DashboardProjectCarousell.js +++ b/src/views/Dashboard/DashboardProjectCarousell.js @@ -1,6 +1,6 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import axios from "axios"; -import { Row, Col, Button, Input,Spin } from "antd"; +import { Row, Col, Button, Input, Spin } from "antd"; import { CardDashboard, CardExpenditure, @@ -77,14 +77,8 @@ const DashboardProject = (args) => { Authorization: `Bearer ${token}`, }, }; - const { PROJECT_ID } = useParams(); - const mapRef = useRef(); - const [mymap, setMymap] = useState(null); const [activeTabIdx, setActiveTabIdx] = useState(0); const [activeTabCommentIdx, setActiveTabCommentIdx] = useState(0); - const [planningProgress, setPlanningProgress] = useState(0); - const [actualProgress, setActualProgress] = useState(0); - const [isReadyComments, setIsReadyComments] = useState(false); const [isSendingComment, setIsSendingComment] = useState(false); const [isReadyProjectDetail, setIsReadyProjectDetail] = useState(false); const [isReadySCurve, setIsReadySCurve] = useState(false); @@ -95,23 +89,17 @@ const DashboardProject = (args) => { const [healthBySchedule, setHealthBySchedule] = useState("-"); const [allDataMaster, sourceData] = useState([]); const [isHierarchy, setIsHierarchy] = useState(false); - let history = useHistory(); // Carousell const [activeIndex, setActiveIndex] = useState(0); const [animating, setAnimating] = useState(false); const [loading, setLoading] = useState(true); + const [carouselPaused, setCarouselPaused] = useState(false); useEffect(() => { setLoading(true); - getReportDistribution(); - },[]); - - useEffect(() => { - if (activeTabIdx === 1) { - initMap(); - } - }, [activeTabIdx]); + getAllData(); + }, []); const getAllData = async () => { setIsReadyProjectDetail(false); @@ -141,7 +129,7 @@ const DashboardProject = (args) => { return; } else if (result.status == 200 && result.data.data) { const dataResault = result.data.data; - console.log("Resault Data",dataResault); + console.log("Resault Data", dataResault); sourceData(dataResault); setIsReadyGantt(true); setIsReadyProjectDetail(true); @@ -158,63 +146,6 @@ const DashboardProject = (args) => { } }; - const getReportDistribution = async () => { - const URL = `${BASE_OSPRO}/api/project/get-report-distribution`; - const payload = { - project_id: 138, - start_date: moment() - .startOf("month") - .subtract(1, "years") - .format("YYYY-MM-DD"), - end_date: moment(new Date()).subtract(1, "years").format("YYYY-MM-DD"), - }; - const result = await axios - .post(URL, payload, HEADER) - .then((res) => res) - .catch((err) => err.response); - console.log("getReportDistribution", result); - if (!result) { - NotificationManager.error(`Could not connect to internet.`, "Failed"); - return; - } - - if (result.status !== 200) { - NotificationManager.error( - `Get report distribution failed, ${result.data.message}`, - "Failed" - ); - setLoading(false); - return; - } else if (result.status == 200 && result.data.data) { - setLoading(false); - setReportDistribution(result.data.data); - } - }; - - const initMap = () => { - let mymap = L.map("map-area", { - center: center, - zoom: 13, - }); - - setMymap(mymap); - L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { - attribution: - '© OpenStreetMap contributors', - }).addTo(mymap); - }; - - useEffect(() => { - if (mymap) { - if (reportDistribution.length > 0) { - reportDistribution.map((item, idx) => { - L.marker([item.lat, item.lon]) - .addTo(mymap) - .bindPopup(PopupContent(item)); - }); - } - } - }, [mymap, reportDistribution]); useEffect(() => { // Add event listener for receiving messages from the iframe @@ -238,1283 +169,555 @@ const DashboardProject = (args) => { } }; - const next = () => { - if (animating) return; - const nextIndex = activeIndex === dummyData.length - 1 ? 0 : activeIndex + 1; - setActiveIndex(nextIndex); - }; + const next = () => { + if (animating) return; + const nextIndex = activeIndex === allDataMaster.length - 1 ? 0 : activeIndex + 1; + setActiveIndex(nextIndex); + }; - const previous = () => { - if (animating) return; - const nextIndex = activeIndex === 0 ? dummyData.length - 1 : activeIndex - 1; - setActiveIndex(nextIndex); - }; + const previous = () => { + if (animating) return; + const nextIndex = activeIndex === 0 ? allDataMaster.length - 1 : activeIndex - 1; + setActiveIndex(nextIndex); + }; - const goToIndex = (newIndex) => { - if (animating) return; - setActiveIndex(newIndex); - }; + const goToIndex = (newIndex) => { + if (animating) return; + setActiveIndex(newIndex); + }; - const dummyData = [ - { - "project": { - "id": 138, - "nama":"Survey Tanah Bidang", - "budget_health":"on-budget", - "schedule_health":"on-schedule", - "company": "Kementrian PUPR", - "gantt": { - "gantt_id": 896, - "name_version":"Proses Tender", - } - }, - "manpower":1, - "assigned":0, - "actual":0, - "project_manager": "FATHAN", - "activity" : { - "start_date":"-", - "end_date":"13 September 2023", - "planned_start":"-", - "planned_end":"-", - "planning":0, - "actual":0 - }, - "key":1 - }, - { - "project": { - "id": 138, - "nama":"Survey Tanah Bidang", - "budget_health":"on-budget", - "schedule_health":"on-schedule", - "company": "Kementrian PUPR", - "gantt": { - "gantt_id": 897, - "name_version":"Eksekusi", - } - }, - "manpower":1, - "assigned":0, - "actual":0, - "project_manager": "FATHAN", - "activity" : { - "start_date":"11 September 2023", - "end_date":"11 September 2023", - "planned_start":"-", - "planned_end":"-", - "planning":0, - "actual":0 - }, - "key":2 - }, - { - "project": { - "id": 138, - "nama":"Survey Tanah Bidang", - "budget_health":"on-budget", - "schedule_health":"on-schedule", - "company": "Kementrian PUPR", - "gantt": { - "gantt_id": 898, - "name_version":"Document meeting", - } - }, - "manpower":1, - "assigned":0, - "actual":0, - "project_manager": "FATHAN", - "activity" : { - "start_date":"11 September 2023", - "end_date":"11 September 2023", - "planned_start":"-", - "planned_end":"-", - "planning":0, - "actual":0 - }, - "key":3 - } - ] - // const slides = allDataMaster.map((item, index) => { - // let URL_GANTT = ""; - // let version_gantt = ""; - // item.project.gantt.map((itemGantt, index) => { - // URL_GANTT = `http://localhost:8444/adw-gantt/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${itemGantt.gantt_id}&proyek_id=${itemGantt.proyek_id}&token=${token}&ro=1`; - // version_gantt = itemGantt.name_version - // }); - // const today = moment(); - // const assignedList = item.assigned - // .filter((itemAssigned) => - // today.isBetween(moment(itemAssigned.start_date), moment(itemAssigned.end_date)) - // ) - // .map((itemMap) => itemMap.user_id); - // // SCurve - // let statusHealthBySchedule = "on-schedule"; - // let selisihProgress = 0; - // let SetplanningProgress = 0; - // let SetactualProgress = 0; - // let now = new Date().toISOString().slice(0, 10); - // let dates = item.SCurve[0].data?.date; - // let n = dates.findIndex( - // (element) => new Date(now) < new Date(element) - // ); - // if ( - // item.SCurve[0].length > 0 && - // item.SCurve[0].data?.percentagePlan && - // item.SCurve[0].data?.percentagePlan.length > 0 - // ) { - // SetplanningProgress = item.SCurve[0].data?.percentagePlan[n]; - // if (n < 0) { - // SetplanningProgress = 100; - // } - // } - // if ( - // item.SCurve[0].length > 0 && - // item.SCurve[0].data?.percentageReal && - // item.SCurve[0].data?.percentageReal.length > 0 - // ) { - // SetactualProgress = - // item.SCurve[0].data?.percentageReal[ - // item.SCurve[0].data?.percentageReal.length - 1 - // ]; - // } - // selisihProgress = SetplanningProgress - SetactualProgress; - // if (selisihProgress > 0 && selisihProgress <= 5) { - // statusHealthBySchedule = "warning"; - // } else if (selisihProgress > 5) { - // statusHealthBySchedule = "danger"; - // } - // return ( - // setAnimating(true)} - // onExited={() => setAnimating(false)} - // key={parseInt(item.key)}> - // - // - // - // - //
- //
- //
- //
- // Project - //
- //
- // {isReadyProjectDetail && - // isReadyGantt ? ( - // (() => { - // let parentNames = ""; - // if (item.hierarchy.length > 0) - // { - // for ( let i = item.hierarchy.length - 1; i >= 0; i--) { - // parentNames += " - "; - // parentNames += item.hierarchy[i].name; - // } - // } - // return item.project.nama + - // parentNames + - // " - " + - // version_gantt - // })() - // ) : ( - // - // )} - //
- //
- //
- // - //
- //
- //
- // - // - //
- //
- //
- //
- // Project Manager - //
- //
- // {isReadyProjectDetail ? ( - // item.project_manager - // ) : ( - // - // )} - //
- //
- //
- // - //
- //
- //
- // - // - //
- //
- //
- //
- // Customer - //
- //
- // {isReadyProjectDetail ? ( - // item.project.company - // ) : ( - // - // )} - //
- //
- //
- // - //
- //
- //
- // - //
- // - // - //
- //
- //
- //
- // Schedule - //
- //
- //
- // - // - // - // Planned Start - // - // - // {isReadyProjectDetail ? ( - // item.activity.planned_start ? ( - // moment(item.activity.planned_start).format("D MMMM YYYY") - // ) : ( - // "-" - // ) - // ) : ( - // - // )} - // - // - // - // - // - // Actual Start - // - // - // {isReadyProjectDetail ? ( - // item.activity.start_date ? ( - // moment(item.activity.start_date).format("D MMMM YYYY") - // ) : ( - // "-" - // ) - // ) : ( - // - // )} - // - // - // - // - // - // Planned Finish - // - // - // {isReadyProjectDetail ? ( - // item.activity.planned_end ? ( - // moment(item.activity.planned_end).format("D MMMM YYYY") - // ) : ( - // "-" - // ) - // ) : ( - // - // )} - // - // - // - // - // - // Estimated Finish - // - // - // {isReadyProjectDetail ? ( - // item.activity.end_date ? ( - // moment(item.activity.end_date).format("D MMMM YYYY") - // ) : ( - // "-" - // ) - // ) : ( - // - // )} - // - // - //
- //
- //
- // - //
- //
- // - // - //
setActiveTabIdx(0)} - // > - // S Curve - //
- // - // - //
setActiveTabIdx(1)} - // > - // Maps - //
- // - //
- // - // - //
- //
- // - //
- // {activeTabIdx === 1 && ( - //
- // )} - //
- // - //
- //
- // - // - //
- // - // - //
- //
- // Progress - //
- // {isReadySCurve ? ( - // 100 ? 100 : SetplanningProgress} - // /> - // ) : ( - // - // )} - //
- // {isReadySCurve ? ( - // 100 || SetactualProgress > 100 - // ? parseFloat( - // (SetactualProgress / SetplanningProgress) * 100 - // ).toFixed(0) - // : SetactualProgress - // } - // /> - // ) : ( - // - // )} - //
- // - //
- // - // - //
- // {isReadyOverdueActivities && ( - // - // )} - // {isReadySCurve && ( - // - // )} - //
- // - // - // - // - //
- // Manpower : {item.manpower} - //
- // - //
- // - // - //
- // Assigned: {item.assigned && assignedList.length} - //
- // - // - //
- // Actual : {item.actual} - //
- // - //
- // - //
- // - // - //
- // - // - //
setActiveTabCommentIdx(0)} - // > - // Behind Task - //
- // - // - //
setActiveTabCommentIdx(1)} - // > - // Comment From Customer - //
- // - //
- //
- // {activeTabCommentIdx === 0 && ( - //
- // {isReadyOverdueActivities && item.overdueActivities != [] && item.overdueActivities.length > 0 ? ( - // item.overdueActivities.map((overdueItem, idx) => { - // let end_date; - // let planned_end; - // let diffDays = 0; - // let message = ""; - // if (overdueItem.end_date && overdueItem.end_date !== null) { - // end_date = moment(overdueItem.end_date); - // planned_end = moment(overdueItem.planned_end); - // diffDays = end_date.diff(planned_end, "days"); + const renderProjectIssues = (issues) => { + return issues.map((data, index) => ( +
+
Tingkat Kepelikan Isu {data.level_issue}
+
Penjelasan {data.description}
+
+ )); + }; + - // if (isNaN(diffDays)) { - // return null; - // } else { - // if (diffDays > 0) { - // message = `Overdue by ${diffDays + 1} days`; - // } else { - // return null; - // } - // } - // } + const renderProjectRisks = (risks) => ( + risks.map((data, index) => ( +
+
Tingkat Dampak Resiko {data.level_risk}
+
Penjelasan {data.description}
+
Pencegahan {data.preventive_risk}
+
+ )) + ); - // return ; - // }) - // ) : ( - //
- // No overdue activity found. - //
- // )} - //
- // )} - // {activeTabCommentIdx === 1 &&( - //
- // {item.project_comment && item.project_comment != [] ? ( - // item.project_comment.map((commentItem, idx) => { - // return - // }) - // ) : ( - //
- // No comments found. - //
- // )} - //
- // )} - //
- //
- // - //
- //
- // - //
- // - //
- // ); - // }); - const slides = dummyData.map((item, index) => { - const URL_GANTT = `https://konstruksi-gantt.ospro.id/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${item.project.gantt.gantt_id}&proyek_id=${item.project.id}&token=${token}&ro=1`; + const slides = allDataMaster.map((item, index) => { + let URL_GANTT = ""; + let version_gantt = ""; + if (item.gantt !== null) { + URL_GANTT = `http://localhost:8444/adw-gantt/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${item.gantt.id}&proyek_id=${item.gantt.proyek_id}&token=${token}&ro=1`; + version_gantt = item.gantt.name_version + } else { + URL_GANTT = ""; + version_gantt = ""; + } + return ( setAnimating(true)} onExited={() => setAnimating(false)} key={parseInt(item.key)}> - - - - + + + + +
-
- Project -
-
- {item.project ? ( - item.project.nama + "-" + item.project.gantt.name_version - ) : ( - - )} -
+ Project
-
- +
+ {item.project ? ( + item.project.nama + "-" + item.project?.gantt?.name_version + ) : ( + + )}
+
+ +
- - +
+ + +
-
- Project Manager -
-
- {item.project_manager ? ( - item.project_manager - ) : ( - - )} -
+ Project Manager
-
- +
+ {item.project_manager ? ( + item.project_manager + ) : ( + + )}
+
+ +
- - +
+ + +
-
- Customer -
-
- {item.project ? ( + Customer +
+
+ {item.project ? ( + item.project.company !== "" && item.project.company !== undefined ? ( item.project.company ) : ( - - )} -
-
-
- + "-" + ) + ) : ( + + )} +
+
+ +
- - +
+ + + + +
+
+ Schedule +
+ + + + + + Planned Start + + + {item.project ? ( + item.project.mulai_proyek + ) : ( + + )} + + + + + + Planned Finish + + + {item.project ? ( + item.project.akhir_proyek + ) : ( + + )} + + + + + + + + Actual Start + + + {item.activity ? ( + item.activity.start_date + ) : ( + + )} + + + + + + Actual Finish + + + {item.activity ? ( + item.activity.end_date + ) : ( + + )} + + + + +
+ +
+
- +
setActiveTabIdx(0)} > -
-
-
- Schedule -
-
-
- - - - Planned Start - - - {item.activity ? ( - item.activity.planned_start - ) : ( - - )} - - - - - - Actual Start - - - {item.activity ? ( - item.activity.start_date - ) : ( - - )} - - - - - - Planned Finish - - - {item.activity ? ( - item.activity.planned_end - ) : ( - - )} - - - - - - Estimated Finish - - - {item.activity ? ( - item.activity.end_date - ) : ( - - )} - - -
-
+ S Curve +
+ + +
setActiveTabIdx(1)} + > + Issue & Risk
-
- - + + +
setActiveTabIdx(0)} > - S Curve +
- - + {activeTabIdx === 1 && ( + + +
+ Issue +
+
+ {console.log('item.project_issue', item.project_issue)} + {item.project_issue && item.project_issue.length > 0 ? ( + renderProjectIssues(item.project_issue) + ) :
+ tidak ada data +
} +
+ + +
+ Risk +
+
+ {console.log('item.project_risk', item.project_risk)} + {item.project_risk && item.project_risk.length > 0 ? ( + renderProjectRisks(item.project_risk) + ) :
+ tidak ada data +
} +
+ +
+ )} +
+ +
+
+ + +
+ + +
setActiveTabIdx(1)} > - Maps + Progress
- - - - -
+ {item.activity ? ( + 100 ? 100 : item.activity.planning} + /> + ) : ( + + )} +
+ {item.activity ? ( + 100 || item.activity.actual > 100 + ? parseFloat( + (item.activity.actual / item.activity.planning) * 100 + ).toFixed(0) + : item.activity.actual + } + /> + ) : ( + + )} +
+ +
+ + +
+ {item.project.budget_health && ( + + )} + {item.project.schedule_health && ( + + )} +
+ + + +
- + Manpower : {item.manpower}
- {activeTabIdx === 1 && ( -
- )} -
- -
-
- - -
- - -
+ + + +
- Progress + Assigned: {item.assigned}
- {item.activity ? ( - 100 ? 100 : item.activity.planning} - /> - ) : ( - - )} -
- {item.activity ? ( - 100 || item.activity.actual > 100 - ? parseFloat( - (item.activity.actual / item.activity.planning) * 100 - ).toFixed(0) - : item.activity.actual - } - /> - ) : ( - - )} -
- -
- - -
- {item.project.budget_health && ( - - )} - {item.project.schedule_health && ( - - )} -
- - - - -
- Manpower : {item.manpower} -
- -
- + + +
+ Actual : {item.actual} +
+ +
+ +
+ + +
+
setActiveTabCommentIdx(0)} > - Assigned: {item.assigned} + Behind Task
setActiveTabCommentIdx(1)} > - Actual : {item.actual} + Comment From Customer
- - - -
- - -
setActiveTabCommentIdx(0)} - > - Behind Task -
- - -
setActiveTabCommentIdx(1)} - > - Comment From Customer -
- -
-
{activeTabCommentIdx === 0 && ( -
{ > No overdue activity found.
- )} + )} {activeTabCommentIdx === 1 && ( <> -
-