diff --git a/src/routes.js b/src/routes.js index 5ea7f5f..a0ae20e 100644 --- a/src/routes.js +++ b/src/routes.js @@ -77,9 +77,6 @@ const routes = [ { path: '/config-alert', exact: true, name: 'Config Alert', component: ConfigAlert }, // todo : remove - { path: '/dashboard-pmo', exact: true, name: 'Dashboard PMO', component: DashboardPMO }, - { path: '/dashboard-project', exact: true, name: 'Dashboard Project', component: DashboardProject }, - { path: '/dashboard-security', exact: true, name: 'Dashboard Security', component: DashboardSecurity }, { path: '/checklist-k3', exact: true, name: 'Checklist K3', component: ChecklistK3 }, { path: '/absensi', exact: true, name: 'Absensi', component: Absensi }, { path: '/divisi-karyawan', exact: true, name: 'Divisi Karyawan', component: DivisiKaryawan }, diff --git a/src/views/DashboardPMO/chartDashboard.js b/src/views/DashboardPMO/chartDashboard.js deleted file mode 100644 index ac73bd0..0000000 --- a/src/views/DashboardPMO/chartDashboard.js +++ /dev/null @@ -1,106 +0,0 @@ -import React from 'react'; -import { Doughnut, Bar } from 'react-chartjs-2'; -import faker from '@faker-js/faker'; - -export const optionsDoughnut = { - title: { - display: true, - text: 'PROJECT BY TYPE' - }, -}; - -export const data = { - labels: ['Manned guarding ', 'C&T', 'CMS ', 'ESS', 'RSO'], - datasets: [ - { - label: '# of Votes', - data: [12, 19, 3, 5, 2], - backgroundColor: [ - 'rgba(255, 99, 132, 0.2)', - 'rgba(54, 162, 235, 0.2)', - 'rgba(255, 206, 86, 0.2)', - 'rgba(75, 192, 192, 0.2)', - 'rgba(153, 102, 255, 0.2)', - // 'rgba(255, 159, 64, 0.2)', - ], - borderColor: [ - 'rgba(255, 99, 132, 1)', - 'rgba(54, 162, 235, 1)', - 'rgba(255, 206, 86, 1)', - 'rgba(75, 192, 192, 1)', - 'rgba(153, 102, 255, 1)', - // 'rgba(255, 159, 64, 1)', - ], - borderWidth: 1, - }, - ], -}; - -export const DoughnutChart = () => { - return ; -} - - -export const options = { - title: { - display: true, - text: 'PROJECT BY GOVERNANCE PHASE' - }, - legend: { - position: 'right', - }, - responsive: true, - scales: { - yAxes: [{ - display: true, - - // position: 'right', - stacked: true, - }], - xAxes: [{ - display: true, - // position: 'right', - stacked: true, - }], - }, -}; - -const labels = ['']; - -export const dataBar = { - labels, - datasets: [ - { - indexAxis: 'y', - label: 'Initiation', - data: labels.map(() => faker.datatype.number({ min: 0, max: 10 })), - backgroundColor: 'rgb(255, 99, 132)', - }, - { - indexAxis: 'y', - label: 'Execution', - data: labels.map(() => faker.datatype.number({ min: 0, max: 10 })), - backgroundColor: 'rgb(75, 192, 192)', - }, - { - indexAxis: 'y', - label: 'Closing', - data: labels.map(() => faker.datatype.number({ min: 0, max: 10 })), - backgroundColor: 'rgb(53, 162, 235)', - }, - // { - // indexAxis: 'y', - // label: 'Excecution', - // data: labels.map(() => faker.datatype.number({ min: 0, max: 10 })), - // backgroundColor: 'rgba(255, 159, 64, 1)', - // }, - ], -}; - -export function BarChart() { - return ; -} - - - - diff --git a/src/views/DashboardPMO/index.js b/src/views/DashboardPMO/index.js deleted file mode 100644 index c3724f3..0000000 --- a/src/views/DashboardPMO/index.js +++ /dev/null @@ -1,173 +0,0 @@ -import React from 'react'; -import { Row, Col, Select } from 'antd'; -import TableDashboard from './tableDashboard'; -import { BarChart, DoughnutChart } from './chartDashboard'; - -function BoxDashboard({ value, title, secondaryTitle, icon, bgColor }) { - return ( -
- - -
- {icon} -
- - -
-
{value}
-
{title.toUpperCase()}
-
{secondaryTitle && secondaryTitle.toUpperCase()}
-
- -
-
- ) -} - -const { Option } = Select; - -const DashbaoardPM = () => { - const onChange = (value) => { - console.log(`selected ${value}`); - } - - const onSearch = (val) => { - console.log('search:', val); - } - return ( -
- -
PORTOFOLIO DASHBOARD
- - - - - - - - - - - - -
- -
- - - } - value="100" - bgColor="teal" - title="Project Count" /> - {/* } - value="19 M" - bgColor="#059669" - title="Project Cost" - secondaryTitle="(dollars)" /> */} - } - value="7.2 M" - bgColor="#047857" - title="Cost Variance" - secondaryTitle="(dollars)" /> - } - value="2000" - bgColor="#0284c7" - title="Project Manpower" - /> - -
-
- ); -} - -export default DashbaoardPM; \ No newline at end of file diff --git a/src/views/DashboardPMO/tableDashboard.js b/src/views/DashboardPMO/tableDashboard.js deleted file mode 100644 index efde38c..0000000 --- a/src/views/DashboardPMO/tableDashboard.js +++ /dev/null @@ -1,130 +0,0 @@ -import React from 'react'; -import { Table, Tag, Space } from 'antd'; - -const columns = [ - { - title: 'Project Name', - dataIndex: 'project', - key: 'project', - fixed: 'left', - width: 200, - // render: text => {text}, - }, - { - title: 'Project Owner', - dataIndex: 'owner', - key: 'owner', - }, - { - title: 'Start Date', - dataIndex: 'startDate', - key: 'startDate', - }, - { - title: 'End Date', - dataIndex: 'endDate', - key: 'endDate', - }, - { - title: 'Cost', - dataIndex: 'cost', - key: 'cost', - render: text => `Rp. ${text.toLocaleString()}`, - align: 'right' - }, - { - title: 'Cost Health', - dataIndex: 'costHealth', - key: 'costHealth', - render: text => - text === 'good' ?
: - text === 'danger' ?
: - text === 'warning' ?
:
- , - align: 'center', - }, - { - title: 'Work Health', - dataIndex: 'workHealth', - key: 'workHealth', - render: text => - text === 'good' ?
: - text === 'danger' ?
: - text === 'warning' ?
:
, - align: 'center', - }, - { - title: 'Schedule Health', - dataIndex: 'scheduleHealth', - key: 'scheduleHealth', - render: text => - text === 'good' ?
: - text === 'danger' ?
: - text === 'warning' ?
:
, - align: 'center', - }, - { - title: '% Complete', - dataIndex: 'complete', - key: 'complete', - render: text => `${text}%`, - align: 'right' - }, - // { - // title: 'Action', - // key: 'action', - // render: (text, record) => ( - // - // Invite {record.name} - // Delete - // - // ), - // }, -]; - -const data = [ - { - key: '1', - project: 'Bay Plaza', - owner: 'John Brown', - startDate: '1/22/2022', - endDate: '1/22/2023', - complete: 20, - cost: 40000000, - costHealth: 'good', - workHealth: 'default', - scheduleHealth: 'warning' - }, - { - key: '2', - project: 'Jambi Bridge', - owner: 'Jim Green', - startDate: '4/22/2022', - endDate: '11/22/2023', - complete: 65, - cost: 20000000, - costHealth: 'good', - workHealth: 'default', - scheduleHealth: 'danger' - }, - { - key: '3', - project: 'Banten International Airport', - owner: 'Joe Black', - startDate: '1/22/2022', - endDate: '1/22/2025', - complete: 50, - cost: 200000000, - costHealth: 'default', - workHealth: 'default', - scheduleHealth: 'default' - }, -]; - -const TableDashboard = () => { - return ( - - ); -} - -export default TableDashboard; \ No newline at end of file diff --git a/src/views/DashboardProject/chatDashboard.js b/src/views/DashboardProject/chatDashboard.js deleted file mode 100644 index ee8b168..0000000 --- a/src/views/DashboardProject/chatDashboard.js +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index 89eabf7..0000000 --- a/src/views/DashboardProject/ganttDashboard.js +++ /dev/null @@ -1,29 +0,0 @@ -import React, { useEffect, useMemo, useState } from 'react'; -import Timeline from 'react-calendar-timeline' -import 'react-calendar-timeline/lib/Timeline.css' -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 deleted file mode 100644 index 652a9b6..0000000 --- a/src/views/DashboardProject/index.js +++ /dev/null @@ -1,171 +0,0 @@ -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'; - -function BoxDashboard({ value, title, secondaryTitle, icon, bgColor }) { - return ( -
-
-
{title}
-
{icon}
-
-
Rp. {value}
-
- ) -} - -const DashboardProject = () => { - 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 deleted file mode 100644 index 85d00c6..0000000 --- a/src/views/DashboardProject/tableDashboard.js +++ /dev/null @@ -1,77 +0,0 @@ -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 diff --git a/src/views/DashboardSecurity/index.js b/src/views/DashboardSecurity/index.js deleted file mode 100644 index 0e587ac..0000000 --- a/src/views/DashboardSecurity/index.js +++ /dev/null @@ -1,124 +0,0 @@ -import React from 'react'; -import { Row, Col, Select, DatePicker } from 'antd'; -import TableDashboard from './tableDashboard'; -import MapDashboard from './mapDashboard'; -const { Option } = Select; - -const DashboardSecurity = () => { - const onChange = (value) => { - console.log(`selected ${value}`); - } - - const onSearch = (val) => { - console.log('search:', val); - } - - const onChangeDate = (date, dateString) => { - console.log(date, dateString); - } - return ( -
- -
- - - - - - - - - - - - - - - - - - -
-
- - -
- - ); -} - -export default DashboardSecurity; \ No newline at end of file diff --git a/src/views/DashboardSecurity/mapDashboard.js b/src/views/DashboardSecurity/mapDashboard.js deleted file mode 100644 index 1ebece3..0000000 --- a/src/views/DashboardSecurity/mapDashboard.js +++ /dev/null @@ -1,51 +0,0 @@ -import React, { useEffect } from 'react'; -import L from 'leaflet'; - - -let map = null - -const MapDashboard = () => { - - useEffect(() => { - - // INITIALIZE Dashboard - if (!map) { - map = L.map('map', { zoomControl: false }).setView([-2.721044, 116.62442], 5); - L.tileLayer( - 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - maxZoom: 18, - attribution: '© OpenStreetMap contributors' - } - ).addTo(map); - L.marker([-6.142719569327774, 106.55132520955486]).addTo(map) - .bindPopup(` - ICN 1 -
- 8 Pencurian`) - .openPopup(); - - L.marker([-1.9277364358639633, 102.86230604426582]).addTo(map) - .bindPopup(` - ICN 2 -
- 2 Demonstrasi`) - .openPopup(); - - L.marker([-1.4977487818768103, 114.87755236966134]).addTo(map) - .bindPopup(` - ICN 3 -
- 1 Demonstrasi`) - .openPopup(); - } - }, []); - - return ( - <> -
- - - ); -} - -export default MapDashboard; \ No newline at end of file diff --git a/src/views/DashboardSecurity/tableDashboard.js b/src/views/DashboardSecurity/tableDashboard.js deleted file mode 100644 index f14b01b..0000000 --- a/src/views/DashboardSecurity/tableDashboard.js +++ /dev/null @@ -1,85 +0,0 @@ -import React from 'react'; -import { Table, Tag, Space } from 'antd'; - -const columns = [ - { - title: 'No', - dataIndex: 'key', - key: 'key', - width: 50 - }, - { - title: 'ICN', - dataIndex: 'icn', - key: 'icn', - }, - { - title: 'Project Name', - dataIndex: 'project', - key: 'project', - width: 300 - }, - { - title: 'Project Location', - dataIndex: 'location', - key: 'location', - }, - { - title: 'Incident Date', - dataIndex: 'startDate', - key: 'startDate', - }, - { - title: 'Incident', - dataIndex: 'incident', - key: 'incident', - }, - { - title: 'Status', - dataIndex: 'status', - key: 'status', - render: text => { - return text == 'open' ?
OPEN
:
CLOSE
- }, - } -]; - -const data = [ - { - key: '1', - icn: 'ICN 1', - project: 'Banten International Airport', - status: 'close', - location: 'Banten', - startDate: '17/01/2022', - incident: 'Pencurian', - }, - { - key: '2', - icn: 'ICN 2', - project: 'Jambi Bridge', - location: 'Jambi', - status: 'open', - startDate: '04/2/2022', - incident: 'Demonstrasi', - }, - { - key: '3', - icn: 'ICN 3', - project: 'Bay Plaza', - location: 'Kalimantan', - status: 'open', - startDate: '28/3/2022', - incident: 'Demonstrasi', - } - - -]; - -const TableDashboard = () => { - return ( -
- ); -} - -export default TableDashboard; \ No newline at end of file