fix : router fix

main
minuk926 3 years ago
parent fe0157437e
commit 053c1252b0

@ -3,11 +3,11 @@
//----------------------------------------------------------------------------
import axios from 'utils/axios';
import { GET_RESIDENT, GET_RESIDENT_DATA_LIST, SAVE_RESIDENT_DATA } from 'commons/ApiUrl';
import { GET_RESIDENT, GET_RESIDENT_DATA_LIST, GET_RESIDENT_LIST, SAVE_RESIDENT_DATA } from 'commons/ApiUrl';
import { setRowId } from './common';
// eslint-disable-next-line no-return-await
export async function findResidents(params) {
export async function findResidentDatas(params) {
const res = await axios.get(GET_RESIDENT_DATA_LIST, { params });
if (res.success) {
res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) }));
@ -32,3 +32,12 @@ export async function findResident(scCode) {
}
return res;
}
export async function findResidents(params) {
const res = await axios.get(GET_RESIDENT_LIST, { params });
if (res.success) {
res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) }));
return res;
}
return res;
}

@ -24,6 +24,7 @@ export const SAVE_PARKING_TARGET_LIST = '/api/v1/ctgy/parking/target';
export const GET_RESIDENT_DATA_LIST = '/api/v1/ctgy/resident/data';
export const SAVE_RESIDENT_DATA = '/api/v1/ctgy/resident/data';
export const GET_RESIDENT = '/api/v1/ctgy/resident/';
export const GET_RESIDENT_LIST = '/api/v1/ctgy/resident';
// 사용자 관리
export const GET_USER_BOARD_LIST = '/api/v1/ctgy/pboard/';

@ -8,7 +8,7 @@ import MainCard from 'ui-component/cards/MainCard';
// project imports
import MuiDataGrid from 'views/form/MuiDataGrid';
import CmmModal from 'views/form/Modal/CmmModal';
import { findResident, findResidents, saveResidentData } from 'apis/resident';
import { findResident, findResidentDatas, saveResidentData } from 'apis/resident';
import NewResidentDataForm from './NewResidentDataForm';
import ModifyResidentDataForm from './ModifyResidentDataForm';
@ -60,7 +60,7 @@ const ResidentDataReview = () => {
size: rowsState.pageSize
};
findResidents(params).then((response) => {
findResidentDatas(params).then((response) => {
console.log(response);
if (response && response.data) {
setTotalCount(response.count);

@ -7,8 +7,6 @@ import getYear from 'date-fns/getYear';
import { GridActionsCellItem } from '@mui/x-data-grid';
import { Divider, FormControl, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
import DeleteIcon from '@mui/icons-material/Delete';
// assets
import { IconSearch } from '@tabler/icons';
// berry ui
@ -17,8 +15,8 @@ import MainCard from 'ui-component/cards/MainCard';
// project imports
import MuiDataGrid from 'views/form/MuiDataGrid';
import xitCmm from 'commons/XitCmm';
import { findParkings } from 'apis/parking';
import InputLabel from '../../../ui-component/extended/Form/InputLabel';
import InputLabel from 'ui-component/extended/Form/InputLabel';
import { findResidents } from 'apis/resident';
const ResidentReview = () => {
const isInit = useRef(true);
@ -117,7 +115,7 @@ const ResidentReview = () => {
size: rowsState.pageSize
};
findParkings({ ...params, msYear: selectedYear, msChasu: searchTxt }).then((response) => {
findResidents({ ...params, msYear: selectedYear, msChasu: searchTxt }).then((response) => {
if (response && response.data) {
setTotalCount(response.count);
setRowsState((prevState) => ({ ...prevState, rows: response.data }));

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
// material-ui
import { DataGrid, gridClasses } from '@mui/x-data-grid';
import { grey } from '@mui/material/colors';
// import { grey } from '@mui/material/colors';
import Box from '@mui/material/Box';
// import { useTheme } from '@mui/material/styles';
import { useTheme } from '@mui/styles';
@ -180,12 +180,12 @@ const MuiDataGrid = ({
},
[`& .${gridClasses.columnHeaderTitle}`]: {
// bgcolor: (theme) => (theme.palette.mode === 'light' ? grey[200] : grey[800]),
display: 'flex',
alignItems: 'center'
// display: 'flex',
// alignItems: 'center'
// alignSelf: 'stretch'
},
[`& .${gridClasses.row}`]: {
bgcolor: (theme) => (theme.palette.mode === 'light' ? grey[200] : grey[800])
// bgcolor: (theme) => (theme.palette.mode === 'light' ? grey[200] : grey[800])
}
}}
initialState={{

Loading…
Cancel
Save