From ed3b77140d48e6f78f947bdf7a5145c0fab8059c Mon Sep 17 00:00:00 2001 From: bnu Date: Wed, 27 Jul 2022 10:21:48 +0700 Subject: [PATCH] update page project-dashboard --- src/views/DashboardProject/chatDashboard.js | 42 +++++ src/views/DashboardProject/ganttDashboard.js | 33 ++++ src/views/DashboardProject/index.js | 174 +++++++++++++++++++ src/views/DashboardProject/tableDashboard.js | 77 ++++++++ 4 files changed, 326 insertions(+) create mode 100644 src/views/DashboardProject/chatDashboard.js create mode 100644 src/views/DashboardProject/ganttDashboard.js create mode 100644 src/views/DashboardProject/index.js create mode 100644 src/views/DashboardProject/tableDashboard.js diff --git a/src/views/DashboardProject/chatDashboard.js b/src/views/DashboardProject/chatDashboard.js new file mode 100644 index 0000000..4186a07 --- /dev/null +++ b/src/views/DashboardProject/chatDashboard.js @@ -0,0 +1,42 @@ +import React from 'react'; + +const ChatDashboard = () => { + return ( +
+
+
COMUNICATION
+
+
+
+
+
+ Robert William +
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +
+
+ 14/01/22 14:21 +
+
+
+
+
+
+ Jennifer lawrence +
+
+ Curabitur lobortis tellus nibh, at tincidunt turpis viverra at. Integer aliquam in quam eu fringilla. Nullam eu mauris gravida +
+
+ 14/01/22 10:20 +
+
+
+ +
+
+ ); +} + +export default ChatDashboard; \ No newline at end of file diff --git a/src/views/DashboardProject/ganttDashboard.js b/src/views/DashboardProject/ganttDashboard.js new file mode 100644 index 0000000..3beeae8 --- /dev/null +++ b/src/views/DashboardProject/ganttDashboard.js @@ -0,0 +1,33 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import Timeline from 'react-calendar-timeline' +// make sure you include the timeline stylesheet or the timeline will not be styled +import 'react-calendar-timeline/lib/Timeline.css' +// import moment from 'moment'; +// import { USER_VERSION_GANTT_SEARCH, BASE_SIMPRO_LUMEN } from '../../../const/ApiConst'; +// import axios from "../../../const/interceptorApi" +const token = localStorage.getItem("token") +const url = `https://ospro-gantt.ospro.id/src/index.html?base_url=https://ospro-api.ospro.id/api&gantt_id=12&proyek_id=11&token=${token}&ro=0` + +const Gantt = (props) => { + + const RenderGantt = () => ( + + ) + + return ( +
+ +
+ ); +} + +export default Gantt; \ No newline at end of file diff --git a/src/views/DashboardProject/index.js b/src/views/DashboardProject/index.js new file mode 100644 index 0000000..92869ba --- /dev/null +++ b/src/views/DashboardProject/index.js @@ -0,0 +1,174 @@ +import React from 'react'; +import { Row, Col, Select, Divider } from 'antd'; +import moment from 'moment' +import Gantt from './ganttDashboard'; +import TableDashboard from './tableDashboard'; +import ChatDashboard from './chatDashboard'; +import { useParams } from 'react-router-dom'; + +function BoxDashboard({ value, title, secondaryTitle, icon, bgColor }) { + return ( +
+
+
{title}
+
{icon}
+
+
Rp. {value}
+
+ ) +} + +const DashboardProject = () => { + const { id } = useParams(); + console.log("test ", id) + return ( +
+ + +
+
+
Project Status
+
+
+ + +
+
+
Project Manager
+
Mark Julius
+
+ + +
+
+
RO
+
Capitol Corp
+
+ + +
+
+
Date
+
{moment().format("DD-MM-YYYY")}
+
+ + +
+ + +
+
SCHEDULE
+
+ + + +
+
Start Date
+
April 1, 2022
+
+ +
+
+
+ + + +
+
Baseline Finish Date
+
September 30, 2022
+
+ +
+
+
+ + + +
+
Estimated Finish Date
+
April 1, 2023
+
+ +
+
+
+ + +
+
FINANCIALS
+
+ + + +
+
Budget To Date (BCWP)
+
Rp. 2.000.000.000
+
+ +
+
+
+ + + +
+
Actual To Date (ACWP)
+
Rp. 1.700.000.000
+
+ +
+
+
+ + + +
+
Variance
+
Rp. 300.000.000
+
+ +
+
+
+ + + + } + value="3.200.000.000" + bgColor="#059669" + title="Budget" /> + +
+
+
ICON SET
+
+
+
+
+
+
+
+ + + +
+
+ + + +
+
Car Status
+ +
+ + + + +
+
+
+ ); +} + +export default DashboardProject; \ No newline at end of file diff --git a/src/views/DashboardProject/tableDashboard.js b/src/views/DashboardProject/tableDashboard.js new file mode 100644 index 0000000..2afefe4 --- /dev/null +++ b/src/views/DashboardProject/tableDashboard.js @@ -0,0 +1,77 @@ +import React from 'react'; +import { Table, Tag, Space } from 'antd'; + +const columns = [ + { + title: 'No', + dataIndex: 'carNo', + key: 'carNo', + fixed: 'left', + }, + { + title: 'Description', + dataIndex: 'description', + key: 'description', + width: 350 + }, + { + title: 'Severity', + dataIndex: 'severity', + key: 'severity', + render: text => { + return text == 'low' ?
LOW
: + text == 'medium' ?
MEDIUM
: +
HIGH
+ }, + }, + { + title: 'Status', + dataIndex: 'status', + key: 'status', + render: text => { + return text == 'open' ?
OPEN
: + text == 'on-progress' ?
ON PROGRESS
: +
DONE
+ }, + }, + { + title: 'Assigned', + dataIndex: 'assigned', + key: 'assigned', + + }, + { + title: 'Due', + dataIndex: 'due', + key: 'due', + } +]; + +const data = [ + { + key: '1', + carNo: 'RIS001', + description: 'Test Analyst on unplanned leave, risk to project if leave extends pas 5/20', + severity: 'medium', + status: 'on-progress', + due: '05/04/2022', + assigned: 'John Lennon' + }, + { + key: '2', + carNo: 'RIS002', + description: 'Coffee machine broken, result in extra long breaks to find coffee', + severity: 'low', + status: 'open', + due: '14/011/2022', + assigned: 'Robert William' + }, +]; + +const TableDashboard = () => { + return ( + + ); +} + +export default TableDashboard; \ No newline at end of file