Browse Source

wip

pull/2/head
Yusuf 2 years ago
parent
commit
962ebdc440
  1. 8
      src/views/DashboardPMOV1/index.js
  2. 22
      src/views/DashboardPMOV1/tableDashboardv1.js

8
src/views/DashboardPMOV1/index.js

@ -62,6 +62,7 @@ const DashboardPM = () => {
const [MANPOWERS, SET_MANPOWERS] = useState(0)
const [PROJECTPHASES, SET_PROJECTPHASES] = useState([])
const [PROJECTSBYPHASE, SET_PROJECTSBYPHASE] = useState([])
const [PROJECTSONDANGER, SET_PROJECTSONDANGER] = useState(0)
const [PROJECTTYPES, SET_PROJECTTYPES] = useState([])
const [PROJECTSBYTYPE, SET_PROJECTSBYTYPE] = useState([])
@ -87,6 +88,7 @@ const DashboardPM = () => {
result.data.projectsByPhase != undefined ? SET_PROJECTSBYPHASE(result.data.projectsByPhase) : SET_PROJECTSBYPHASE([])
result.data.projectTypes != undefined ? SET_PROJECTTYPES(result.data.projectTypes) : SET_PROJECTTYPES([])
result.data.projectsByType != undefined ? SET_PROJECTSBYTYPE(result.data.projectsByType) : SET_PROJECTSBYTYPE([])
result.data.projectsOnDanger != undefined ? SET_PROJECTSONDANGER(result.data.projectsOnDanger) : SET_PROJECTSONDANGER(0)
}
@ -114,7 +116,7 @@ const DashboardPM = () => {
</Col>
<Col span={3} style={{ margin: '' }}>
<BoxDashboardNoIcon
value={PROJECTCOUNT}
value={PROJECTSONDANGER}
bgColor="#f51d1d"
title="Projects on Danger"
fSize="0.7rem"
@ -148,7 +150,7 @@ const DashboardPM = () => {
<BoxDashboardNoIcon
value={MANPOWERS}
bgColor="#0287c7"
title="Manpowers"
title="Manpower"
/>
</Col>
<Col span={2} style={{ margin: '' }}>
@ -163,7 +165,7 @@ const DashboardPM = () => {
<Col span={24} style={{ margin: '0px 0px 0px 0px' }}>
<Collapse>
<Panel header="More Information Chart" key="1">
<Panel header="More Information" key="1">
<Row style={{ margin: '10px 10px 0px 10px' }}>
<Col span={8} >
<Row></Row>

22
src/views/DashboardPMOV1/tableDashboardv1.js

@ -18,13 +18,16 @@ const TableDashboardV1 = () => {
}
}
const [MANPOWERS, SET_MANPOWERS] = useState(0)
const [dataTable, setDataTable] = useState([])
const getProjects = async () => {
const URL = `${BASE_OSPRO}/api/project/list`
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
console.log("qqq", result)
if (result.data.code == 200) {
setDataTable(result.data.data);
result.data.manpowers != undefined ? SET_MANPOWERS(result.data.manpowers) : SET_MANPOWERS(0)
}
}
@ -33,13 +36,28 @@ const TableDashboardV1 = () => {
title: 'Project',
dataIndex: 'nama',
key: 'nama',
render: (text, record) => <Link to={`/dashboard-project/${record.id}/${record.lastGanttId}`}>{text}</Link>,
render: (text, record) =>
<Link to={`/dashboard-project/${record.id}/${record.lastGanttId}`}>
{record.kode_sortname} <br /> {text}
</Link>,
},
{
title: 'Project Manager',
dataIndex: 'projectManager',
key: 'projectManager',
},
{
title: 'Planned Interval',
dataIndex: 'plannedInterval',
key: 'plannedInterval',
},
{
title: 'Manpower',
dataIndex: 'manpower',
render: (text) => {
return `${text}/${MANPOWERS}`
}
},
{
title: 'Budget Project',
dataIndex: 'plannedCost',

Loading…
Cancel
Save