diff --git a/src/views/DashboardPMOV1/tableDashboardv1.js b/src/views/DashboardPMOV1/tableDashboardv1.js index 4f0e641..dd53fd2 100644 --- a/src/views/DashboardPMOV1/tableDashboardv1.js +++ b/src/views/DashboardPMOV1/tableDashboardv1.js @@ -4,13 +4,15 @@ import './../DashboardPMO/Dashboard.css'; import { BASE_OSPRO } from '../../const/ApiConst'; import React, { useEffect, useState, useRef } from 'react'; import axios from 'axios' -import { Table, Row, Col, Button, Input, Space } from 'antd'; +import { Table, Row, Col, Button, Input, InputNumber, Space } from 'antd'; import { formatRibuanDecimal } from '../../const/CustomFunc.js'; import { Badge } from 'reactstrap'; import { Link } from "react-router-dom"; import { SearchOutlined } from '@ant-design/icons'; import Highlighter from 'react-highlight-words'; import _ from "lodash"; +import Slider from "antd/lib/slider"; +import numeral from "numeral"; const filterData = data => formatter => data.map(item => ({ text: formatter(item), @@ -28,23 +30,112 @@ const TableDashboardV1 = () => { const [MANPOWERS, SET_MANPOWERS] = useState(0) const [dataTable, setDataTable] = useState([]) - const [searchText, setSearchText] = useState(''); - const [searchedColumn, setSearchedColumn] = useState(''); - const searchInput = useRef(null); + const [searchText, setSearchText] = useState('') + const [searchedColumn, setSearchedColumn] = useState('') + const searchInput = useRef(null) + const [maxSlider, setMaxSlider] = useState(MANPOWERS) + //const [sliderValue, setSliderValue] = useState([]); const handleSearch = (selectedKeys, confirm, dataIndex) => { - confirm(); - setSearchText(selectedKeys[0]); - setSearchedColumn(dataIndex); + confirm() + setSearchText(selectedKeys[0]) + setSearchedColumn(dataIndex) }; + const handleSlide = (dataIndex, value, confirm) => { + confirm({ closeDropdown: false }); + }; + + const slider = (dataIndex) => ({ + filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => { + if(dataIndex == 'manpower'){ + setMaxSlider(MANPOWERS) + } + + return ( +