|
|
|
@ -4,7 +4,6 @@ import _ from 'lodash';
|
|
|
|
|
import format from 'date-fns/format';
|
|
|
|
|
import getYear from 'date-fns/getYear';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// material-ui
|
|
|
|
|
import { GridActionsCellItem } from '@mui/x-data-grid';
|
|
|
|
|
import { Divider, Grid, InputAdornment, MenuItem, OutlinedInput, Select } from '@mui/material';
|
|
|
|
@ -26,13 +25,10 @@ import xitCmm from 'commons/XitCmm';
|
|
|
|
|
const ParkingReview = () => {
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
const year = getYear(new Date());
|
|
|
|
|
console.log(`year = ${year}`);
|
|
|
|
|
console.log(year instanceof Date);
|
|
|
|
|
const toYear = Number(year);
|
|
|
|
|
console.log(`toYear = ${toYear}`);
|
|
|
|
|
const years = _.range(toYear, toYear - 14, -1);
|
|
|
|
|
console.log(typeof year);
|
|
|
|
|
const years = _.range(year, year - 14, -1);
|
|
|
|
|
|
|
|
|
|
const [selectedYear, setSelectedYear] = useState(toYear);
|
|
|
|
|
const [selectedYear, setSelectedYear] = useState(year);
|
|
|
|
|
const [searchTxt, setSearchTxt] = useState('');
|
|
|
|
|
|
|
|
|
|
const [totalCount, setTotalCount] = useState(0);
|
|
|
|
@ -138,7 +134,7 @@ const ParkingReview = () => {
|
|
|
|
|
<Grid container spacing={1}>
|
|
|
|
|
<Grid item>
|
|
|
|
|
<MuiTooltip title="의견진술 심의 년도">
|
|
|
|
|
<Select id="reviewYear" name="reviewYear" defaultValue={toYear} onChange={(e) => setSelectedYear(e.target.value)}>
|
|
|
|
|
<Select id="reviewYear" name="reviewYear" defaultValue={year} onChange={(e) => setSelectedYear(e.target.value)}>
|
|
|
|
|
{years.map((year, idx) => (
|
|
|
|
|
<MenuItem key={idx} value={year}>
|
|
|
|
|
{year}
|
|
|
|
|