|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
|
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
|
|
|
|
|
|
|
import _ from 'lodash';
|
|
|
|
|
import format from 'date-fns/format';
|
|
|
|
@ -6,7 +6,7 @@ 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';
|
|
|
|
|
import { Divider, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
|
|
|
|
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
|
|
import MuiTooltip from '@mui/material/Tooltip';
|
|
|
|
|
|
|
|
|
@ -23,6 +23,8 @@ import { useTheme } from '@mui/material/styles';
|
|
|
|
|
import xitCmm from 'commons/XitCmm';
|
|
|
|
|
|
|
|
|
|
const ParkingReview = () => {
|
|
|
|
|
const isInit = useRef(true);
|
|
|
|
|
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
const year = getYear(new Date());
|
|
|
|
|
console.log(typeof year);
|
|
|
|
@ -76,7 +78,12 @@ const ParkingReview = () => {
|
|
|
|
|
field: 'msDate',
|
|
|
|
|
minWidth: 180,
|
|
|
|
|
description: 'dddddd',
|
|
|
|
|
valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`
|
|
|
|
|
valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`,
|
|
|
|
|
renderCell: (params) => (
|
|
|
|
|
<Link underline="hover" href="/board" target="_blank">
|
|
|
|
|
{params.value}
|
|
|
|
|
</Link>
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
headerName: '심사마감일시',
|
|
|
|
@ -96,19 +103,12 @@ const ParkingReview = () => {
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const search = () => {
|
|
|
|
|
let params = {
|
|
|
|
|
const params = {
|
|
|
|
|
page: rowsState.page,
|
|
|
|
|
size: rowsState.pageSize
|
|
|
|
|
};
|
|
|
|
|
if (searchTxt) {
|
|
|
|
|
params = {
|
|
|
|
|
...params,
|
|
|
|
|
msYear: selectedYear,
|
|
|
|
|
msChasu: searchTxt
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
opstBizService.getSimsa680GroupList(params).then((response) => {
|
|
|
|
|
opstBizService.getSimsa680GroupList({ ...params, msYear: selectedYear, msChasu: searchTxt }).then((response) => {
|
|
|
|
|
console.log(response);
|
|
|
|
|
if (response && response.data) {
|
|
|
|
|
setTotalCount(response.count);
|
|
|
|
@ -121,12 +121,20 @@ const ParkingReview = () => {
|
|
|
|
|
if (!selectedYear) return;
|
|
|
|
|
|
|
|
|
|
if (event.type === 'keydown' && event.key === 'Enter') {
|
|
|
|
|
const newString = event?.target.value || selectedYear;
|
|
|
|
|
const newString = event?.target.value;
|
|
|
|
|
setSearchTxt(newString);
|
|
|
|
|
search();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (isInit.current) {
|
|
|
|
|
isInit.current = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
search();
|
|
|
|
|
}, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<MainCard>
|
|
|
|
|
<Grid container spacing={2} alignItems="center">
|
|
|
|
|