Browse Source

remove unused codes

pull/2/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
39a2b533d7
  1. 487
      src/views/DashboardSimpro/index.js
  2. 6852
      src/views/Map/Map_16.js
  3. 414
      src/views/Report/ControlMonitoring/index.js

487
src/views/DashboardSimpro/index.js

@ -20,18 +20,18 @@ import { Pagination, Tooltip, Tree, List, Checkbox } from 'antd';
import { getChildrenTree, formatRupiah, DATE_TIME_FORMAT } from '../../const/CustomFunc.js'; import { getChildrenTree, formatRupiah, DATE_TIME_FORMAT } from '../../const/CustomFunc.js';
import { projectTreeConst } from '../../const/LayerTreeConst.js'; import { projectTreeConst } from '../../const/LayerTreeConst.js';
import { import {
Card, Modal, ModalHeader, ModalBody, ModalFooter, Button, Card, Modal, ModalHeader, ModalBody, ModalFooter, Button,
CardBody, CardHeader, Col, Dropdown, DropdownItem, DropdownMenu, DropdownToggle, Row CardBody, CardHeader, Col, Dropdown, DropdownItem, DropdownMenu, DropdownToggle, Row
} from 'reactstrap'; } from 'reactstrap';
import { import {
DONE_COLOR, IZIN_COLOR, NOT_YET_COLOR, DONE_COLOR, IZIN_COLOR, NOT_YET_COLOR,
PRESENT_COLOR, TOTAL_COLOR, PRESENT_COLOR, TOTAL_COLOR,
RED_COLOR, RED_COLOR,
ORANGE_COLOR, ORANGE_COLOR,
GREEN_COLOR, GREEN_COLOR,
DARK_GREY_COLOR, DARK_GREY_COLOR,
BLUE_COLOR, BLUE_COLOR,
PURPLE_COLOR PURPLE_COLOR
} from '../../const/AppConst.js'; } from '../../const/AppConst.js';
const id_org = window.localStorage.getItem('id_org'); const id_org = window.localStorage.getItem('id_org');
const roleName = window.localStorage.getItem('role_name'); const roleName = window.localStorage.getItem('role_name');
@ -40,268 +40,269 @@ Chart.plugins.register(ChartDataLabels);
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
let menu = [ let menu = [
{ {
"id": 3, "id": 3,
"title": "PANIC BUTTON", "title": "PANIC BUTTON",
"key": "absent", "key": "absent",
"color": IZIN_COLOR "color": IZIN_COLOR
}, },
{ {
"id": 4, "id": 4,
"title": "WASPANG ACTIVE", "title": "WASPANG ACTIVE",
"key": "karyawan telat", "key": "karyawan telat",
"color": GREEN_COLOR "color": GREEN_COLOR
}, },
{ {
"id": 5, "id": 5,
"title": "WASPANG ABSENT", "title": "WASPANG ABSENT",
"key": "karyawan tanpa keterangan", "key": "karyawan tanpa keterangan",
"color": ORANGE_COLOR "color": ORANGE_COLOR
} }
] ]
const defaultPersentaseProyek = { const defaultPersentaseProyek = {
labels: [], labels: [],
datasets: [ datasets: [
{ {
label: 'Progress', label: 'Progress',
data: [], data: [],
fill: false, fill: false,
backgroundColor: 'rgb(54, 162, 235)', backgroundColor: 'rgb(54, 162, 235)',
borderColor: 'rgba(54, 162, 235, 0.2)', borderColor: 'rgba(54, 162, 235, 0.2)',
yAxisID: 'y-axis-1', yAxisID: 'y-axis-1',
}, },
], ],
}; };
const defaultCostProyek = { const defaultCostProyek = {
labels: [], labels: [],
datasets: [ datasets: [
{ {
label: 'Perencanaan', label: 'Perencanaan',
data: [], data: [],
fill: false, fill: false,
backgroundColor: 'rgb(255, 99, 132)', backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgba(255, 99, 132, 0.2)', borderColor: 'rgba(255, 99, 132, 0.2)',
yAxisID: 'y-axis-1', yAxisID: 'y-axis-1',
}, },
{ {
label: 'Realisasi', label: 'Realisasi',
data: [], data: [],
fill: false, fill: false,
backgroundColor: 'rgb(54, 162, 235)', backgroundColor: 'rgb(54, 162, 235)',
borderColor: 'rgba(54, 162, 235, 0.2)', borderColor: 'rgba(54, 162, 235, 0.2)',
yAxisID: 'y-axis-1', yAxisID: 'y-axis-1',
}, },
], ],
}; };
const defaultStatusProyek = { const defaultStatusProyek = {
labels: ['Aman', 'Alert', 'Critical'], labels: ['Aman', 'Alert', 'Critical'],
datasets: [ datasets: [
{ {
label: '# of Votes', label: '# of Votes',
data: [], data: [],
backgroundColor: [ backgroundColor: [
'rgba(54, 162, 235, 0.2)', 'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)', 'rgba(255, 206, 86, 0.2)',
'rgba(255, 99, 132, 0.2)', 'rgba(255, 99, 132, 0.2)',
], ],
borderColor: [ borderColor: [
'rgba(54, 162, 235, 1)', 'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)', 'rgba(255, 206, 86, 1)',
'rgba(255, 99, 132, 1)', 'rgba(255, 99, 132, 1)',
], ],
borderWidth: 1, borderWidth: 1,
}, },
], ],
}; };
const DashboardSimpro = () => { const DashboardSimpro = () => {
const token = localStorage.getItem("token") const token = localStorage.getItem("token")
const HEADER = { const HEADER = {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": `Bearer ${token}` "Authorization": `Bearer ${token}`
} }
} }
const [openPlanRealisasi, setopenPlanRealisasi] = useState(false); const [openPlanRealisasi, setopenPlanRealisasi] = useState(false);
const [openCostPlanRealisasi, setopenCostPlanRealisasi] = useState(false); const [openCostPlanRealisasi, setopenCostPlanRealisasi] = useState(false);
const [dataChart, setDataChart] = useState([]); const [dataChart, setDataChart] = useState([]);
const [projectTree, setProjectTree] = useState([]); const [projectTree, setProjectTree] = useState([]);
const [allProyek, setAllProyek] = useState(true); const [allProyek, setAllProyek] = useState(true);
const [dataStatusProyek, setDataStatusProyek] = useState(null); const [dataStatusProyek, setDataStatusProyek] = useState(null);
const [dataPersentaseProyek, setDataPersentaseProyek] = useState(null); const [dataPersentaseProyek, setDataPersentaseProyek] = useState(null);
const [dataCostProyek, setdataCostProyek] = useState(null); const [dataCostProyek, setdataCostProyek] = useState(null);
const [projectTreeVisible, setProjectTreeVisible] = useState(false); const [projectTreeVisible, setProjectTreeVisible] = useState(false);
const [checkedKeysProjectTree, setCheckedKeysProjectTree] = useState([]); const [checkedKeysProjectTree, setCheckedKeysProjectTree] = useState([]);
const [openModalTable, setOpenModalTable] = useState(false); const [openModalTable, setOpenModalTable] = useState(false);
const [dataDashboard, setDataDashboard] = useState(null); const [dataDashboard, setDataDashboard] = useState(null);
const handleGetDataDashboard = async () => { const handleGetDataDashboard = async () => {
const URL = `${BASE_SIMPRO}/dashboard-proyek/search` const URL = `${BASE_SIMPRO}/dashboard-proyek/search`
const payload = { const payload = {
"columns": [ "columns": [
{ "name": "created_at", "logic_operator": "range", "value": "2021-11-06 00:00:00", "value1": "2021-11-06 23:59:59", "operator": "AND" } { "name": "created_at", "logic_operator": "range", "value": "2021-11-06 00:00:00", "value1": "2021-11-06 23:59:59", "operator": "AND" }
], ],
"paging": { "start": 0, "length": -1 } "paging": { "start": 0, "length": -1 }
} }
const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response) const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response)
if (result.data.code === 200) {
setDataDashboard(result.data.data);
} else {
NotificationManager.error('Gaga Menambah Data!!', 'Failed');
}
} if (result.data.code !== 200) {
NotificationManager.error('Gaga Menambah Data!!', 'Failed');
}
const handleGetDataDashboardChart = async () => { setDataDashboard(result.data.data);
const URL = `${BASE_SIMPRO}/dashboard-status/search` }
let str = ''
checkedKeysProjectTree.map((res, idx) => {
if (idx == 0) str += `${res}`
if (idx != 0) str += `,${res}`
})
const payload = {
"columns": [
{ "name": "id", "logic_operator": "in", "value": str ? str : "0", "operator": "AND" }
],
"orders": { "columns": ["nama"], "ascending": true }
}
const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response)
if (result.data.code === 200) {
const { persentase_progress, progress_cost_planning, progress_cost_realisasi, status_proyek } = result.data.data const handleGetDataDashboardChart = async () => {
const URL = `${BASE_SIMPRO}/dashboard-status/search`
let str = ''
const labelPersentaseProyek = persentase_progress ? persentase_progress.map(res => res.label) : [] checkedKeysProjectTree.map((res, idx) => {
const valuePersentaseProyek = persentase_progress ? persentase_progress.map(res => res.total) : [] if (idx == 0) str += `${res}`
const persentaseProyek = { if (idx != 0) str += `,${res}`
labels: labelPersentaseProyek, })
datasets: [
{
label: 'Progress',
data: valuePersentaseProyek,
fill: false,
backgroundColor: 'rgb(54, 162, 235)',
borderColor: 'rgba(54, 162, 235, 0.2)',
yAxisID: 'y-axis-1',
},
],
};
setDataPersentaseProyek(persentaseProyek)
const labelCostPlaning = progress_cost_planning ? progress_cost_planning.map(res => res.label) : []
const valueCostPlaning = progress_cost_planning ? progress_cost_planning.map(res => res.total) : []
const valueCostRealisasi = progress_cost_realisasi ? progress_cost_realisasi.map(res => res.total) : []
const costProyek = { const payload = {
labels: labelCostPlaning, "columns": [
datasets: [ { "name": "id", "logic_operator": "in", "value": str ? str : "0", "operator": "AND" }
{ ],
label: 'Perencanaan', "orders": { "columns": ["nama"], "ascending": true }
data: valueCostPlaning, }
fill: false,
backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgba(255, 99, 132, 0.2)',
yAxisID: 'y-axis-1',
},
{
label: 'Realisasi',
data: valueCostRealisasi,
fill: false,
backgroundColor: 'rgb(54, 162, 235)',
borderColor: 'rgba(54, 162, 235, 0.2)',
yAxisID: 'y-axis-1',
},
],
};
setdataCostProyek(costProyek)
const valueStatusProyek = status_proyek ? status_proyek.map(res => res.total) : [] const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response)
const statusProyek = { if (result.data.code !== 200) {
labels: ['Aman', 'Alert', 'Critical'], NotificationManager.error('Gaga Menambah Data!!', 'Failed');
datasets: [ }
{
label: '# of Votes',
data: valueStatusProyek,
backgroundColor: [
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(255, 99, 132, 0.2)',
],
borderColor: [
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(255, 99, 132, 1)',
],
borderWidth: 1,
},
],
};
setDataStatusProyek(statusProyek) const { persentase_progress, progress_cost_planning, progress_cost_realisasi, status_proyek } = result.data.data
const labelPersentaseProyek = persentase_progress ? persentase_progress.map(res => res.label) : []
const valuePersentaseProyek = persentase_progress ? persentase_progress.map(res => res.total) : []
const persentaseProyek = {
labels: labelPersentaseProyek,
datasets: [
{
label: 'Progress',
data: valuePersentaseProyek,
fill: false,
backgroundColor: 'rgb(54, 162, 235)',
borderColor: 'rgba(54, 162, 235, 0.2)',
yAxisID: 'y-axis-1',
},
],
};
setDataPersentaseProyek(persentaseProyek)
const labelCostPlaning = progress_cost_planning ? progress_cost_planning.map(res => res.label) : []
const valueCostPlaning = progress_cost_planning ? progress_cost_planning.map(res => res.total) : []
const valueCostRealisasi = progress_cost_realisasi ? progress_cost_realisasi.map(res => res.total) : []
} else { const costProyek = {
NotificationManager.error('Gaga Menambah Data!!', 'Failed'); labels: labelCostPlaning,
} datasets: [
{
label: 'Perencanaan',
data: valueCostPlaning,
fill: false,
backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgba(255, 99, 132, 0.2)',
yAxisID: 'y-axis-1',
},
{
label: 'Realisasi',
data: valueCostRealisasi,
fill: false,
backgroundColor: 'rgb(54, 162, 235)',
borderColor: 'rgba(54, 162, 235, 0.2)',
yAxisID: 'y-axis-1',
},
],
};
setdataCostProyek(costProyek)
} const valueStatusProyek = status_proyek ? status_proyek.map(res => res.total) : []
const getProyek = async () => { const statusProyek = {
const URL = `${BASE_SIMPRO}/proyek/list?start=0&length=-1&orderby=nama&asc=true` labels: ['Aman', 'Alert', 'Critical'],
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) datasets: [
if (result.data.code === 200) { {
setProjectTree(result.data.data); label: '# of Votes',
const arr = result.data.data.map(res => res.id) data: valueStatusProyek,
setCheckedKeysProjectTree(arr) backgroundColor: [
} else { 'rgba(54, 162, 235, 0.2)',
NotificationManager.error('Gaga Menambah Data!!', 'Failed'); 'rgba(255, 206, 86, 0.2)',
} 'rgba(255, 99, 132, 0.2)',
} ],
borderColor: [
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(255, 99, 132, 1)',
],
borderWidth: 1,
},
],
};
const renderDailyInfo = () => { setDataStatusProyek(statusProyek)
return (
<>
<div className="daily-info-card" style={{ backgroundColor: IZIN_COLOR, cursor: 'pointer' }} >
<p className="number-style1">{dataDashboard ? dataDashboard.panic_button : 0}</p>
<p style={{ color: "#FFFFFF", fontWeight: "bold" }}>PANIC BUTTON</p>
</div>
<div className="daily-info-card" style={{ backgroundColor: GREEN_COLOR, cursor: 'pointer' }} >
<p className="number-style1">{dataDashboard ? dataDashboard.waspang_status.presensi : 0}</p>
<p style={{ color: "#FFFFFF", fontWeight: "bold" }}>WASPANG ACTIVE</p>
</div>
<div className="daily-info-card" style={{ backgroundColor: ORANGE_COLOR, cursor: 'pointer' }} >
<p className="number-style1">{dataDashboard ? dataDashboard.waspang_status.absensi : 0}</p>
<p style={{ color: "#FFFFFF", fontWeight: "bold" }}>WASPANG ABSENT</p>
</div>
</>
)
}
const handleClickChart = param => {
if (!param.length) return;
const { _datasetIndex, _index } = param[0];
const data = dataPersentaseProyek.datasets[_datasetIndex].label
setOpenModalTable(true)
}
const handleClickProyek = id => { }
const arr = [...checkedKeysProjectTree]
const idx = arr.indexOf(id)
if (idx == -1) {
arr.push(id)
} else {
arr.splice(idx, 1)
}
setCheckedKeysProjectTree(arr)
}
return ( const getProyek = async () => {
<> const URL = `${BASE_SIMPRO}/proyek/list?start=0&length=-1&orderby=nama&asc=true`
<SiopasMap /> const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
</> if (result.data.code !== 200) {
NotificationManager.error('Gaga Menambah Data!!', 'Failed');
}
setProjectTree(result.data.data);
const arr = result.data.data.map(res => res.id)
setCheckedKeysProjectTree(arr)
}
); const renderDailyInfo = () => {
return (
<>
<div className="daily-info-card" style={{ backgroundColor: IZIN_COLOR, cursor: 'pointer' }} >
<p className="number-style1">{dataDashboard ? dataDashboard.panic_button : 0}</p>
<p style={{ color: "#FFFFFF", fontWeight: "bold" }}>PANIC BUTTON</p>
</div>
<div className="daily-info-card" style={{ backgroundColor: GREEN_COLOR, cursor: 'pointer' }} >
<p className="number-style1">{dataDashboard ? dataDashboard.waspang_status.presensi : 0}</p>
<p style={{ color: "#FFFFFF", fontWeight: "bold" }}>WASPANG ACTIVE</p>
</div>
<div className="daily-info-card" style={{ backgroundColor: ORANGE_COLOR, cursor: 'pointer' }} >
<p className="number-style1">{dataDashboard ? dataDashboard.waspang_status.absensi : 0}</p>
<p style={{ color: "#FFFFFF", fontWeight: "bold" }}>WASPANG ABSENT</p>
</div>
</>
)
}
const handleClickChart = param => {
if (!param.length) return;
const { _datasetIndex, _index } = param[0];
const data = dataPersentaseProyek.datasets[_datasetIndex].label
setOpenModalTable(true)
}
const handleClickProyek = id => {
const arr = [...checkedKeysProjectTree]
const idx = arr.indexOf(id)
if (idx == -1) {
arr.push(id)
} else {
arr.splice(idx, 1)
}
setCheckedKeysProjectTree(arr)
}
return (
<>
<SiopasMap />
</>
);
} }
export default DashboardSimpro; export default DashboardSimpro;

6852
src/views/Map/Map_16.js

File diff suppressed because it is too large Load Diff

414
src/views/Report/ControlMonitoring/index.js

@ -1,32 +1,56 @@
import '../../../assets/css/customscroll.css'
import './ControlMonitoring.css'
import * as XLSX from 'xlsx';
import ContentLoader from "react-content-loader"
import DialogEdit from './DialogEdit';
import DialogForm from './DialogForm';
import DialogUpdateProgress from './DialogUpdateProgress';
import DialogView from './DialogView';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Card, CardBody, CardHeader, Col, Row, Table, Input, InputGroup, UncontrolledAccordion, UncontrolledCollapse } from 'reactstrap'; import SweetAlert from 'react-bootstrap-sweetalert';
import { Button } from 'reactstrap';
import axios from 'axios'; import axios from 'axios';
import data from '@iconify/icons-ion/save-outline';
import moment from 'moment'; import moment from 'moment';
import SweetAlert from 'react-bootstrap-sweetalert'; import { Button } from 'reactstrap';
import DialogForm from './DialogForm'; import { CONTROL_MONITORING_SEARCH, PLANNING_SEARCH, PROYEK_SEARCH, PROYEK_EDIT } from '../../../const/ApiConst.js';
import DialogEdit from './DialogEdit'; import { Card, CardBody, CardHeader, Col, Row, Table, Input, InputGroup, UncontrolledAccordion, UncontrolledCollapse } from 'reactstrap';
import { DatePicker, Badge } from 'antd';
import { NotificationContainer, NotificationManager } from 'react-notifications'; import { NotificationContainer, NotificationManager } from 'react-notifications';
import { Pagination, Tooltip, Tree } from 'antd'; import { Pagination, Tooltip, Tree } from 'antd';
import { DatePicker, Badge } from 'antd'; import { formatNumber } from '../../../const/CustomFunc.js';
import * as XLSX from 'xlsx';
import { CONTROL_MONITORING_SEARCH, PLANNING_SEARCH, PROYEK_SEARCH, PROYEK_EDIT } from '../../../const/ApiConst.js';
import DialogView from './DialogView';
import DialogUpdateProgress from './DialogUpdateProgress';
import { getChildrenTree, formatRupiah, DATE_TIME_FORMAT } from '../../../const/CustomFunc.js'; import { getChildrenTree, formatRupiah, DATE_TIME_FORMAT } from '../../../const/CustomFunc.js';
import { projectTreeConst } from '../../../const/LayerTreeConst.js'; import { projectTreeConst } from '../../../const/LayerTreeConst.js';
import ContentLoader from "react-content-loader"
import { formatNumber } from '../../../const/CustomFunc.js';
import { import {
RED_COLOR, RED_COLOR,
ORANGE_COLOR, ORANGE_COLOR,
GREEN_COLOR GREEN_COLOR
} from '../../../const/AppConst' } from '../../../const/AppConst'
import '../../../assets/css/customscroll.css' const { RangePicker } = DatePicker;
import './ControlMonitoring.css'
import data from '@iconify/icons-ion/save-outline'; const token = window.localStorage.getItem('token');
const config = {
headers:
{
Authorization : `Bearer ${token}`,
"Content-type" : `application/json`
}
};
const proyek_id = localStorage.getItem('proyek_id');
const role_id = localStorage.getItem('role_id');
const column = [
{ name: "No" },
{ name: "Nama Activity" },
{ name: "UOM" },
{ name: "Activity Mulai" },
{ name: "Activity Selesai" },
{ name: "Jumlah Report"},
{ name: "Lihat" },
]
const LENGTH_DATA = 10
/* /*
Logic Control Monitoring: Logic Control Monitoring:
@ -35,7 +59,6 @@ ada variable
- projectTree - projectTree
- checkedProjectTree - checkedProjectTree
- dataTable (filteran dari tanggal) - dataTable (filteran dari tanggal)
-
1. ambil proyek_id yang ada id projectTree yang tercentang saja 1. ambil proyek_id yang ada id projectTree yang tercentang saja
2. kalau ada yg sama, maka satu saja yg tercentang (dibikin unique proyek_id) 2. kalau ada yg sama, maka satu saja yg tercentang (dibikin unique proyek_id)
@ -88,77 +111,48 @@ ada variable
] ]
*/ */
const { RangePicker } = DatePicker;
const token = window.localStorage.getItem('token');
const config = {
headers:
{
Authorization : `Bearer ${token}`,
"Content-type" : `application/json`
}
};
const proyek_id = localStorage.getItem('proyek_id');
const role_id = localStorage.getItem('role_id');
const column = [
{ name: "No" },
// { name: "Proyek" },
{ name: "Nama Activity" },
{ name: "UOM" },
{ name: "Activity Mulai" },
{ name: "Activity Selesai" },
{ name: "Jumlah Report"},
{ name: "Lihat" },
]
const LENGTH_DATA = 10
export default class index extends Component { export default class index extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
dataTable: [], activityName: "",
dataExport: [],
openDialog: false,
openDialogEdit:false,
typeDialog: 'Save',
dataEdit: null,
alertDelete: false, alertDelete: false,
idDelete: 0, checkedKeysProjectTree: [],
choosenSubProyekId:[],
chosenProyekIds: [],
controlMonitoringData: [],
currentDay: 'today',
currentPage: 1,
dataEdit: null,
dataExport: [],
dataGs: [], dataGs: [],
dataIdHo: [], dataIdHo: [],
search: "", dataMap:"",
dataRealisasi: [],
dataTable: [],
dataUpdateProgress: null,
endDate:moment(moment().format("YYYY-M-D")),
idDelete: 0,
idPlanning:0,
listReport:[],
openDialog: false,
openDialogEdit:false,
openDialogPlan: false,
openDialogUpdateProgress: false,
page: 0, page: 0,
projectTree: [],
projectTreeVisible: false,
rowsPerPage: LENGTH_DATA, rowsPerPage: LENGTH_DATA,
currentPage: 1, search: "",
totalPage: 0,
tooltipMap: false,
tooltipDelete: false,
typeClock: "All",
startDate:moment(moment().format("YYYY-M-D")), startDate:moment(moment().format("YYYY-M-D")),
endDate:moment(moment().format("YYYY-M-D")), tooltipDelete: false,
currentDay: 'today',
dataMap:"",
tooltipExport:false, tooltipExport:false,
openDialogPlan: false, tooltipMap: false,
dataRealisasi: [], totalPage: 0,
projectTreeVisible: false, typeClock: "All",
projectTree: [], typeDialog: 'Save',
checkedKeysProjectTree: [],
openDialogUpdateProgress: false,
chosenProyekIds: [], // buat di samping kanan (setelah dicentang dari tree dan difilter dari tanggal)
choosenSubProyekId:[],
controlMonitoringData: [],
listReport:[],
activityName: "",
dataUpdateProgress: null,
idPlanning:0
} }
// this.updateProgress = this.updateProgress.bind(this);
this.chosenProyekTemp = []; this.chosenProyekTemp = [];
this.choosenSubProyekTemp = []; this.choosenSubProyekTemp = [];
} }
@ -202,12 +196,6 @@ export default class index extends Component {
if(proyekIds.length < 1){ if(proyekIds.length < 1){
proyekIds.push(0); proyekIds.push(0);
} }
// {
// "name": "created_at",
// "logic_operator": "range",
// "value": dateStart,
// "value1": dateEnd
// }
let dateStart = moment(this.state.startDate).format("YYYY-MM-DD 00:00:00"); let dateStart = moment(this.state.startDate).format("YYYY-MM-DD 00:00:00");
let dateEnd = moment(this.state.endDate).format("YYYY-MM-DD 23:59:59"); let dateEnd = moment(this.state.endDate).format("YYYY-MM-DD 23:59:59");
@ -241,32 +229,11 @@ export default class index extends Component {
} }
} }
// if(parseInt(role_id)!==1){
// formData.columns.push(
// {
// "name": "id",
// "logic_operator": "=",
// "value": proyek_id,
// "operator": "AND",
// "table_name": "m_proyek"
// }
// )
// }
// console.log("cek choosenSubProyekId", this.state.chosenProyekIds.join())
// if (this.state.choosenSubProyekId.length > 0) {
// formData.columns.push({
// "name": "subproyek_id",
// "logic_operator": "in",
// "value": this.state.choosenSubProyekId.join(),
// "operator": "AND"
// })
// }
const result = await axios const result = await axios
.post(CONTROL_MONITORING_SEARCH, formData, config) .post(CONTROL_MONITORING_SEARCH, formData, config)
.then(res => res) .then(res => res)
.catch((error) => error.response); .catch((error) => error.response);
if(result && result.data && result.data.code==200){ if(result && result.data && result.data.code==200){
console.log("cek data res", result.data.data) console.log("cek data res", result.data.data)
this.setState({ dataTable: result.data.data, totalPage: result.data.totalRecord }, () => this.buildProyekView() ); this.setState({ dataTable: result.data.data, totalPage: result.data.totalRecord }, () => this.buildProyekView() );
@ -283,30 +250,13 @@ export default class index extends Component {
"orders": { "columns": ["id"], "ascending": false } "orders": { "columns": ["id"], "ascending": false }
} }
// if(parseInt(localStorage.getItem('role_id'))!==1){
// payload.columns.push(
// {
// "name": "id",
// "logic_operator": "=",
// "value": localStorage.getItem('proyek_id') ? localStorage.getItem('proyek_id') : '0',
// "operator": "AND"
// }
// )
// }
const config = { const config = {
method: 'POST', // *GET, POST, PUT, DELETE, etc. method: 'POST',
// mode: 'cors', // no-cors, *cors, same-origin
// cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
// credentials: 'same-origin', // include, *same-origin, omit
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer '+window.localStorage.getItem('token') 'Authorization': 'Bearer '+window.localStorage.getItem('token')
// 'Content-Type': 'application/x-www-form-urlencoded',
}, },
// redirect: 'follow', // manual, *follow, error body: JSON.stringify(payload)
// referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
body: JSON.stringify(payload) // body data type must match "Content-Type" header
} }
const result = await fetch(PROYEK_SEARCH, config).then(response => response.json()).then(res => res); const result = await fetch(PROYEK_SEARCH, config).then(response => response.json()).then(res => res);
@ -314,7 +264,6 @@ export default class index extends Component {
if (result && result.code == 200) { if (result && result.code == 200) {
let children = getChildrenTree(result.data); let children = getChildrenTree(result.data);
projectTreeConst[0].children = children; projectTreeConst[0].children = children;
// console.log('projectTreeConst', projectTreeConst);
this.setState({projectTree: projectTreeConst, projectTreeVisible: true}); this.setState({projectTree: projectTreeConst, projectTreeVisible: true});
} else { } else {
NotificationManager.error('Gagal Mengambil Data!!', 'Failed'); NotificationManager.error('Gagal Mengambil Data!!', 'Failed');
@ -326,11 +275,9 @@ export default class index extends Component {
} }
handleOpenDialogPlan = (param, name) => { handleOpenDialogPlan = (param, name) => {
// console.log("cek cek list report", param)
this.setState({listReport:param, activityName: name}, () => { this.setState({listReport:param, activityName: name}, () => {
this.setState({openDialogPlan: true}) this.setState({openDialogPlan: true})
}) })
// await this.setState({idPlanning: param})
} }
toggleAddDialogPlan = () => { toggleAddDialogPlan = () => {
@ -350,8 +297,6 @@ export default class index extends Component {
this.setState({ openDialogUpdateProgress: true }) this.setState({ openDialogUpdateProgress: true })
this.showDialogUpdateProgress(); this.showDialogUpdateProgress();
} }
} }
handleCloseDialog = () => { handleCloseDialog = () => {
@ -455,7 +400,6 @@ export default class index extends Component {
"column_results": [ "column_results": [
"nama", "nama",
"biaya", "biaya",
// "color_progress",
"jumlah_pekerja", "jumlah_pekerja",
"pic", "pic",
"mulai_proyek", "mulai_proyek",
@ -498,19 +442,7 @@ export default class index extends Component {
"length": -1 "length": -1
} }
} }
// if(parseInt(role_id)!==1){
// payload.columns.push(
// {
// "name": "id",
// "logic_operator": "=",
// "value": proyek_id,
// "operator": "AND",
// "table_name": "m_proyek"
// }
// )
// }
// console.log("cek choosenSubProyekId", this.state.choosenSubProyekId)
if (this.state.choosenSubProyekId.length > 0) { if (this.state.choosenSubProyekId.length > 0) {
payload.columns.push({ payload.columns.push({
"name": "subproyek_id", "name": "subproyek_id",
@ -519,25 +451,15 @@ export default class index extends Component {
"operator": "AND" "operator": "AND"
}) })
} }
const result = await axios const result = await axios
.post(CONTROL_MONITORING_SEARCH, payload, config) .post(CONTROL_MONITORING_SEARCH, payload, config)
.then(res => res) .then(res => res)
.catch((error) => error.response); .catch((error) => error.response);
// console.log(result)
if(result && result.data && result.data.code == 200){ if(result && result.data && result.data.code == 200){
let resData = result.data.data; let resData = result.data.data;
const excelData = []; const excelData = [];
// <td>{index + 1}</td>
// <td>{ n.join ? n.join.m_proyek_nama : "-" }</td>
// <td>{ n.nama ? n.nama : "-"}</td>
// <td>{ n.jumlah_titik ? n.jumlah_titik : "0" }</td>
// <td>{ n.realisasi ? this.renderActual(n.realisasi) : "0" }</td>
// <td>{ n.join.m_subproyek_pic ? `${n.join.m_subproyek_pic}` : "-" }</td>
// <td>{ n.join.m_users_name ? `${n.join.m_users_name}` : "-" }</td>
// <td>{ n.target_planning ? moment(n.target_planning).format("DD-MM-YYYY") : "-" }</td>
resData.map((n, index) => { resData.map((n, index) => {
let dataRow = { let dataRow = {
"Proyek": n.join ? n.join.m_proyek_nama : "-", "Proyek": n.join ? n.join.m_proyek_nama : "-",
@ -549,12 +471,10 @@ export default class index extends Component {
} }
excelData.push(dataRow) excelData.push(dataRow)
}) })
// console.log("cek excel data", excelData)
this.setState({dataExport:excelData}) this.setState({dataExport:excelData})
// exportExcel();
}else{ }else{
NotificationManager.error('Gagal Export Data!!', 'Failed'); NotificationManager.error('Gagal Export Data!!', 'Failed');
} }
} }
exportExcel = () => { exportExcel = () => {
@ -580,7 +500,6 @@ export default class index extends Component {
.post(url, formData) .post(url, formData)
.then(res => res) .then(res => res)
.catch((error) => error.response); .catch((error) => error.response);
// console.log(result)
if(result && result.data){ if(result && result.data){
if (result.data.code_status == 200) { if (result.data.code_status == 200) {
NotificationManager.success('Berhasil update status response!!', 'Success!'); NotificationManager.success('Berhasil update status response!!', 'Success!');
@ -605,32 +524,18 @@ export default class index extends Component {
} }
renderTable = (realisasi) => { renderTable = (realisasi) => {
// const dataTable2 = this.state.dataTable || [];
return ( return (
<tbody> <tbody>
{realisasi.length!==0 ? realisasi.map((n, index) => { {realisasi.length!==0 ? realisasi.map((n, index) => {
// console.log("real real real", n)
return ( return (
<tr key={index}> <tr key={index}>
<td>{index + 1}</td> <td>{index + 1}</td>
{/* <td>{ n.join ? n.join.m_proyek_nama : "-" }</td> */}
<td>{ n.name ? n.name : "-"}</td> <td>{ n.name ? n.name : "-"}</td>
{/* <td>{ n.jumlah_pekerja ? jumlah_pekerja : "0" }</td> */}
<td>{ n.uom ? n.uom : "-" }</td> <td>{ n.uom ? n.uom : "-" }</td>
<td>{ n.start_date ? `${ moment(n.start_date).format("DD-MM-YYYY") }` : "-" }</td> <td>{ n.start_date ? `${ moment(n.start_date).format("DD-MM-YYYY") }` : "-" }</td>
<td>{ n.end_date ? `${ moment(n.end_date).format("DD-MM-YYYY") }` : "-" }</td> <td>{ n.end_date ? `${ moment(n.end_date).format("DD-MM-YYYY") }` : "-" }</td>
<td>{ n.list_report ? n.list_report.length : 0 }</td> <td>{ n.list_report ? n.list_report.length : 0 }</td>
<td> <td>
{/* <i id="TooltipDelete" className="cil-trash fa-lg" style={{ color: 'red', marginRight: '10px', cursor: "pointer" }} onClick={() => this.handleDelete(n.id)}></i>
<Tooltip placement="right" isOpen={this.state.tooltipDelete} target="TooltipDelete" toggle={() => this.toggle("delete")}>
Delete
</Tooltip>*/}
{/* <i id="TooltipEdit" className="cil-pencil fa-lg" style={{ color: 'green', cursor: "pointer" }} onClick={() => this.handleEdit(n)}></i>
<Tooltip placement="right" isOpen={this.state.tooltipEdit} target="TooltipEdit" toggle={() => this.toggle("edit")}>
Edit
</Tooltip>
{' '} */}
<Tooltip title="Lihat Report List"> <Tooltip title="Lihat Report List">
<i onClick={() => this.handleOpenDialogPlan(n.list_report ? n.list_report : [], n.name)} id="tooltipMap" className="fa fa-eye fa-lg" style={{ color: 'black', cursor: "pointer" }}></i> <i onClick={() => this.handleOpenDialogPlan(n.list_report ? n.list_report : [], n.name)} id="tooltipMap" className="fa fa-eye fa-lg" style={{ color: 'black', cursor: "pointer" }}></i>
</Tooltip> </Tooltip>
@ -640,7 +545,7 @@ export default class index extends Component {
}) : <tr> }) : <tr>
<td colSpan="9" align="center">No Data Available</td> <td colSpan="9" align="center">No Data Available</td>
</tr> </tr>
} }
</tbody> </tbody>
) )
} }
@ -649,46 +554,36 @@ export default class index extends Component {
const val = e.target.value; const val = e.target.value;
this.setState({ currentDay:val }); this.setState({ currentDay:val });
if(val==="today"){ if(val==="today"){
// console.log("test 1 test",val);
this.setState({ this.setState({
startDate:moment(moment().format("YYYY-M-D")), startDate:moment(moment().format("YYYY-M-D")),
endDate:moment(moment().format("YYYY-M-D")), endDate:moment(moment().format("YYYY-M-D")),
currentPage: 1 currentPage: 1
}) })
}else if(val==="3 day"){ }else if(val==="3 day"){
// console.log("test test",val);
this.setState({ this.setState({
startDate:moment(moment().subtract(3, "days").format("YYYY-M-D")), startDate:moment(moment().subtract(3, "days").format("YYYY-M-D")),
endDate:moment(moment().format("YYYY-M-D")), endDate:moment(moment().format("YYYY-M-D")),
currentPage: 1 currentPage: 1
}) })
}else if(val==="7 day"){ }else if(val==="7 day"){
// console.log("test test",val);
this.setState({ this.setState({
startDate:moment(moment().subtract(7, "days").format("YYYY-M-D")), startDate:moment(moment().subtract(7, "days").format("YYYY-M-D")),
endDate:moment(moment().format("YYYY-M-D")), endDate:moment(moment().format("YYYY-M-D")),
currentPage: 1 currentPage: 1
}) })
}else{ }else{
// console.log("test 2 test",val);
this.setState({ this.setState({
startDate:moment(moment().format("YYYY-M-D")), startDate:moment(moment().format("YYYY-M-D")),
endDate:moment(moment().format("YYYY-M-D")), endDate:moment(moment().format("YYYY-M-D")),
currentPage: 1 currentPage: 1
}) })
} }
} }
// when checking chekbox on Layer Tree Panel
onCheckOpt = (state, checkedKeys) => { onCheckOpt = (state, checkedKeys) => {
this.setState({[state]: checkedKeys}); this.setState({[state]: checkedKeys});
} }
// updateProgress = (item) => {
// console.log('update progress', item);
// this.setState({dataUpdateProgress: item, openDialogUpdateProgress: true});
// }
getChosenProyekRealisasi = () => { getChosenProyekRealisasi = () => {
const { chosenProyek, projectTree, checkedKeysProjectTree } = this.state; const { chosenProyek, projectTree, checkedKeysProjectTree } = this.state;
@ -697,14 +592,12 @@ export default class index extends Component {
let chosenProyekId = []; let chosenProyekId = [];
if (checkedKeysProjectTree.length > 0) { if (checkedKeysProjectTree.length > 0) {
chosenProyekId = this.getChosenProyekId(); // ini yang sudah diambil uniquenya chosenProyekId = this.getChosenProyekId();
} }
else { else {
chosenProyekId = [] chosenProyekId = []
} }
// console.log('choosenSubProyekTemp', this.choosenSubProyekTemp);
// this.setState({choosenSubProyekId: this.choosenSubProyekTemp});
this.setState({chosenProyekIds: chosenProyekId}); this.setState({chosenProyekIds: chosenProyekId});
} }
@ -717,7 +610,6 @@ export default class index extends Component {
// ambil unique nya aja lalu return uniquenya // ambil unique nya aja lalu return uniquenya
getChosenProyekId = () => { getChosenProyekId = () => {
const { checkedKeysProjectTree, projectTree } = this.state; const { checkedKeysProjectTree, projectTree } = this.state;
// console.log('checkedKeysProjectTree', checkedKeysProjectTree);
if (checkedKeysProjectTree.length > 0) { if (checkedKeysProjectTree.length > 0) {
if (checkedKeysProjectTree.includes('project-0')) { if (checkedKeysProjectTree.includes('project-0')) {
// langsung ambil semua children di level pertama // langsung ambil semua children di level pertama
@ -726,105 +618,26 @@ export default class index extends Component {
} }
} }
else { else {
// for (let i=0; i < projectTree[0].children.length; i++) {
this.getChosenProyekIdByKey(projectTree[0].children); this.getChosenProyekIdByKey(projectTree[0].children);
// }
} }
} }
// usage example:
// var myArray = ['a', 1, 'a', 2, '1'];
// var unique = myArray.filter((v, i, a) => a.indexOf(v) === i);
let unique = this.chosenProyekTemp.filter((v, i, a) => a.indexOf(v) === i); let unique = this.chosenProyekTemp.filter((v, i, a) => a.indexOf(v) === i);
// console.log("cek unique", unique)
return unique; return unique;
} }
getChosenProyekIdByKey = (dataTree) => { getChosenProyekIdByKey = (dataTree) => {
const { checkedKeysProjectTree } = this.state; const { checkedKeysProjectTree } = this.state;
// console.log("dataTree", dataTree)
for (let i=0; i < dataTree.length; i++) { for (let i=0; i < dataTree.length; i++) {
if (checkedKeysProjectTree.includes(dataTree[i].key)) { if (checkedKeysProjectTree.includes(dataTree[i].key)) {
console.log('matched!!!', dataTree[i].id); console.log('matched!!!', dataTree[i].id);
this.chosenProyekTemp.push(dataTree[i].id); this.chosenProyekTemp.push(dataTree[i].id);
// get the proyek_id, then stop
// if (dataTree[i].parent_id === undefined) {
// this.chosenProyekTemp.push(dataTree[i].id) // ambil idnya, karena dia adalah level paling atas (proyek)
// this.getSubProyeksFromProyek(dataTree[i]);
// }
// else if (dataTree[i].parent_id !== undefined && dataTree[i].parent_id === null) { // dia adalah subproyek pertama
// this.chosenProyekTemp.push(dataTree[i].proyek_id);
// this.choosenSubProyekTemp.push(dataTree[i].id); // ambil proyek_id
// }
// else if (dataTree[i].parent_id !== undefined && dataTree[i].parent_id !== null) { // dia adalah subproyek kedua, dst
// this.chosenProyekTemp.push(dataTree[i].proyek_id);
// this.choosenSubProyekTemp.push(dataTree[i].id); // ambil proyek_id
// }
} }
// else {
// console.log('not matched, keep looping!', dataTree[i]);
// keep looping until get the matched key
// if (dataTree[i].subproyeks) {
// this.getChosenProyekIdByKey(dataTree[i].children);
// }
// }
} }
} }
// get subproyeks_id
// getSubProyeksFromProyek = (dataProyek) => {
// console.log("dataProyek getSubProyeksFromProyek", dataProyek)
// if(dataProyek.children){
// dataProyek.children.map((val, index) => {
// if(val.children){
// this.getSubProyeksFromProyek(val.children)
// }else{
// this.choosenSubProyekTemp.push(val.id);
// }
// });
// }else{
// this.choosenSubProyekTemp.push(dataProyek.id);
// }
// }
// loopForSubProyekId = (dataSubproyek) => {
// }
// proses menampilkan proyek yg terselect dan data realisasinya
buildProyekView = () => { buildProyekView = () => {
const {dataTable} = this.state; const {dataTable} = this.state;
// let finalData = [];
// console.log("projectTree build view", projectTree)
// ambil object project yg terseleksi dan masukin ke controlMonitoringData
// if (chosenProyekIds.length > 0) {
// for (let i=0; i < chosenProyekIds.length; i++) {
// if (projectTree && projectTree.length > 0) {
// let found = projectTree[0].children.find((item) => item.id === chosenProyekIds[i]);
// // remove children and subproyeks object
// // if (found.children) delete found.children;
// // if (found.subproyeks) delete found.subproyeks;
// // add key realisasi
// if (found) {
// found.realisasi = [];
// finalData.push(found);
// }
// }
// }
// console.log("dataTable build view", dataTable)
// plot response planning-realisasi api dan masukin ke controlMonitoringData
// if (dataTable.length > 0) {
// for (let i=0; i < dataTable.length; i++) {
// let foundProyekIndex = finalData.findIndex((item) => item.id === dataTable[i].proyek_id);
// finalData[foundProyekIndex].realisasi.push(dataTable[i]);
// }
// }
// }
// else {
// finalData = [];
// }
// console.log('finalData', finalData);
this.setState({controlMonitoringData: dataTable}); this.setState({controlMonitoringData: dataTable});
} }
@ -899,7 +712,6 @@ export default class index extends Component {
<Row style={{paddingTop:'10%'}}> <Row style={{paddingTop:'10%'}}>
<Col md={9}> <Col md={9}>
<div> <div>
{/* <Button color="success" size="sm" onClick={() => this.handleUpdateProgress(item)} disabled={parseInt(localStorage.getItem('role_id'))!==1 ? true : false}>Update</Button> */}
</div> </div>
</Col> </Col>
<Col md={3}> <Col md={3}>
@ -935,9 +747,7 @@ export default class index extends Component {
pageSizeOptions={["10", "15", "20", "25", "30", "35", "40"]} pageSizeOptions={["10", "15", "20", "25", "30", "35", "40"]}
/> />
</UncontrolledCollapse> </UncontrolledCollapse>
<hr style={{marginTop: 50}} /> <hr style={{marginTop: 50}} />
</div> </div>
) )
}) })
@ -962,18 +772,11 @@ export default class index extends Component {
sendUpdateProgress = async (data) => { sendUpdateProgress = async (data) => {
let urlEdit = PROYEK_EDIT(data.id) let urlEdit = PROYEK_EDIT(data.id)
const formData = data const formData = data
const result = await axios.put(urlEdit, formData, config) const result = await axios.put(urlEdit, formData, config)
.then(res => res) .then(res => res)
.catch((error) => error.response); .catch((error) => error.response);
if (result && result.data && result.data.code === 200) { if (result && result.data && result.data.code === 200) {
NotificationManager.success(`Data proyek berhasil diupdate`, 'Success!!'); NotificationManager.success(`Data proyek berhasil diupdate`, 'Success!!');
// this.setState({controlMonitoringData: []}, () => {
// this.getLayerTreeData();
// this.getDataReportPlanning();
// this.renderControlMonitoringData();
// })
window.location.reload(); // solusi sementara, soalnya pas rebuilding tree pada missing key karena keynya random window.location.reload(); // solusi sementara, soalnya pas rebuilding tree pada missing key karena keynya random
} else { } else {
NotificationManager.error(`Data proyek gagal diupdate`, `Failed!!`); NotificationManager.error(`Data proyek gagal diupdate`, `Failed!!`);
@ -986,19 +789,6 @@ export default class index extends Component {
return ( return (
<div> <div>
<NotificationContainer /> <NotificationContainer />
{/* <SweetAlert
show={this.state.alertDelete}
warning
showCancel
confirmBtnText="Delete"
confirmBtnBsStyle="danger"
title="Are you sure?"
onConfirm={this.onConfirmDelete}
onCancel={() => this.setState({ alertDelete: false, idDelete: 0 })}
focusCancelBtn
>
Data tipe karyawan akan terhapus!!
</SweetAlert> */}
<DialogForm <DialogForm
openDialog={openDialog} openDialog={openDialog}
closeDialog={this.handleCloseDialog} closeDialog={this.handleCloseDialog}
@ -1017,31 +807,10 @@ export default class index extends Component {
<CardHeader style={{ display: "flex", justifyContent: "space-between" }}> <CardHeader style={{ display: "flex", justifyContent: "space-between" }}>
<h4>Control & Monitoring</h4> <h4>Control & Monitoring</h4>
<div> <div>
{/* <Button color="primary" onClick={() => this.handleOpenDialog('Save')}>Tambah Broadcast</Button>{' '} */}
{/* <Tooltip title="Export Excel">
<Button id="TooltipExport" color="primary" onClick={()=> this.handleExportExcel()}><i className="fa fa-print"></i></Button>
</Tooltip> */}
</div> </div>
</CardHeader> </CardHeader>
<CardBody> <CardBody>
{/* <div style={{ display: "flex", justifyContent: "space-between", marginBottom:"25px" }}>
<div style={{ width:"100%",display:"inline-flex",alignItems:"center" }}>
<div style={{ width:"50%",marginRight:"10px",maxWidth:"200px" }}>
<Input type="select" onChange={(e) => this.handleChangeDay(e)} defaultValue={this.state.currentDay}>
<option value="today">Hari Ini</option>
<option value="3 day">3 Hari yang lalu</option>
<option value="7 day">7 Hari yang lalu</option>
</Input>
</div>
<div style={{ width:"50%" }}>
<RangePicker size="default" allowClear={false} value={[this.state.startDate, this.state.endDate]} onChange={this.handleDatePicker}/>{' '}
<Button color="primary" onClick={() => this.getDataReportPlanning()}>Cari</Button>
</div>
</div>
<Input onChange={this.handleSearch} value={search} type="text" name="search" id="search" placeholder="Cari Nama Pekerjaan" style={{ maxWidth: "200px", marginBottom: "20px" }} />
</div> */}
<Row style={{marginBottom: 15}}> <Row style={{marginBottom: 15}}>
{/* <Col md={12}>Breadcrumbs of proyek here...</Col> */}
</Row> </Row>
<Row> <Row>
<Col md={projectTreeVisible? 3 : 1}> <Col md={projectTreeVisible? 3 : 1}>
@ -1070,10 +839,10 @@ export default class index extends Component {
<option value="7 day">7 Hari yang lalu</option> <option value="7 day">7 Hari yang lalu</option>
</Input> </Input>
</div> </div>
<RangePicker <RangePicker
size="default" size="default"
allowClear={false} allowClear={false}
value={[this.state.startDate, this.state.endDate]} value={[this.state.startDate, this.state.endDate]}
onChange={this.handleDatePicker} onChange={this.handleDatePicker}
/> />
<hr style={{marginVertical: 15}} /> <hr style={{marginVertical: 15}} />
@ -1088,7 +857,7 @@ export default class index extends Component {
style={{marginLeft: -10}} style={{marginLeft: -10}}
/> />
: :
<ContentLoader <ContentLoader
speed={2} speed={2}
width="100%" width="100%"
height={150} height={150}
@ -1098,11 +867,11 @@ export default class index extends Component {
style={{marginLeft: 24, marginTop: -25}} style={{marginLeft: 24, marginTop: -25}}
> >
<rect x="4" y="13" rx="3" ry="3" width="25" height="25" /> <rect x="4" y="13" rx="3" ry="3" width="25" height="25" />
<rect x="45" y="17" rx="5" ry="5" width="290" height="16" /> <rect x="45" y="17" rx="5" ry="5" width="290" height="16" />
<rect x="45" y="50" rx="3" ry="3" width="25" height="25" /> <rect x="45" y="50" rx="3" ry="3" width="25" height="25" />
<rect x="80" y="54" rx="5" ry="5" width="251" height="16" /> <rect x="80" y="54" rx="5" ry="5" width="251" height="16" />
<rect x="45" y="90" rx="3" ry="3" width="25" height="25" /> <rect x="45" y="90" rx="3" ry="3" width="25" height="25" />
<rect x="80" y="94" rx="5" ry="5" width="251" height="16" /> <rect x="80" y="94" rx="5" ry="5" width="251" height="16" />
<rect x="45" y="130" rx="3" ry="3" width="25" height="25" /> <rect x="45" y="130" rx="3" ry="3" width="25" height="25" />
<rect x="80" y="134" rx="5" ry="5" width="251" height="16" /> <rect x="80" y="134" rx="5" ry="5" width="251" height="16" />
</ContentLoader> </ContentLoader>
@ -1129,7 +898,6 @@ export default class index extends Component {
toggleDialog={() => this.toggleAddDialogPlan()} toggleDialog={() => this.toggleAddDialogPlan()}
listReport={this.state.listReport} listReport={this.state.listReport}
activityName={this.state.activityName} activityName={this.state.activityName}
// nameProyekParent={nameProyek}
/> />
<DialogUpdateProgress <DialogUpdateProgress
openDialog={this.state.openDialogUpdateProgress} openDialog={this.state.openDialogUpdateProgress}

Loading…
Cancel
Save