diff --git a/src/commons/ApiUrl.js b/src/commons/ApiUrl.js index a0bd325..4e425d4 100644 --- a/src/commons/ApiUrl.js +++ b/src/commons/ApiUrl.js @@ -1,10 +1,10 @@ // const URL = process.env.NODE_ENV !== 'development' ? process.env.REACT_APP_API_URL : '' // console.log(process.env.NODE_ENV) -export const LOGIN_URL = '/api/v1/ctgy/account/login'; -export const GET_CMM_CODE_LIST = '/api/v1/biz/cmm/combo'; +export const LOGIN_URL = '/api/v2/ctgy/account/login'; +export const GET_CMM_CODE_LIST = '/api/v2/biz/cmm/combo'; export const GET_FILE_DOWNLOAD = '/api/v2/ctgy/file/download/'; -export const GET_DASHBOARD = '/api/v1/ctgy/dashboard'; +export const GET_DASHBOARD = '/api/v2/ctgy/dashboard'; // 공지사항 export const GET_PUBLIC_BOARD_LIST = '/api/v2/ctgy/pboard'; @@ -19,35 +19,35 @@ export const SAVE_BOARD = '/api/v2/ctgy/board'; export const REMOVE_BOARD = '/api/v2/ctgy/board/'; // 주정차 의견 진술 -export const GET_PARKING_LIST = '/api/v1/ctgy/parking'; -export const GET_PARKING_JUDGE_RESULT_LIST = '/api/v1/ctgy/parking/result'; -export const GET_PARKING_JUDGE_TARGET_LIST = '/api/v1/ctgy/parking/target'; -export const SAVE_PARKING_JUDGE_TARGET_LIST = '/api/v1/ctgy/parking/target'; -export const REMOVE_PARKING_JUDGE = '/api/v1/ctgy/parking/remove'; +export const GET_PARKING_LIST = '/api/v2/ctgy/parking'; +export const GET_PARKING_JUDGE_RESULT_LIST = '/api/v2/ctgy/parking/result'; +export const GET_PARKING_JUDGE_TARGET_LIST = '/api/v2/ctgy/parking/target'; +export const SAVE_PARKING_JUDGE_TARGET_LIST = '/api/v2/ctgy/parking/target'; +export const REMOVE_PARKING_JUDGE = '/api/v2/ctgy/parking/remove'; -export const GET_PARKING_JUDGE_LIST = '/api/v1/ctgy/parking/judge'; +export const GET_PARKING_JUDGE_LIST = '/api/v2/ctgy/parking/judge'; // 거주자/장애인 의견 진술 -export const GET_ADMIN_JUDGE_DATA_LIST = '/api/v1/ctgy/admin/data'; -export const SAVE_ADMIN_JUDGE_DATA = '/api/v1/ctgy/admin/data'; -export const GET_ADMIN_JUDGE_DATA = '/api/v1/ctgy/admin/data/'; -export const REMOVE_ADMIN_JUDGE_DATA = '/api/v1/ctgy/admin/data/remove'; +export const GET_ADMIN_JUDGE_DATA_LIST = '/api/v2/ctgy/admin/data'; +export const SAVE_ADMIN_JUDGE_DATA = '/api/v2/ctgy/admin/data'; +export const GET_ADMIN_JUDGE_DATA = '/api/v2/ctgy/admin/data/'; +export const REMOVE_ADMIN_JUDGE_DATA = '/api/v2/ctgy/admin/data/remove'; -export const GET_ADMIN_JUDGE_LIST = '/api/v1/ctgy/admin'; -export const GET_ADMIN_JUDGE_RESULT_LIST = '/api/v1/ctgy/admin/result'; +export const GET_ADMIN_JUDGE_LIST = '/api/v2/ctgy/admin'; +export const GET_ADMIN_JUDGE_RESULT_LIST = '/api/v2/ctgy/admin/result'; -export const GET_ADMIN_JUDGE_TARGET_LIST = '/api/v1/ctgy/admin/target'; -export const SAVE_ADMIN_JUDGE_TARGET_LIST = '/api/v1/ctgy/admin/target'; -export const REMOVE_ADMIN_JUDGE = '/api/v1/ctgy/admin/remove'; +export const GET_ADMIN_JUDGE_TARGET_LIST = '/api/v2/ctgy/admin/target'; +export const SAVE_ADMIN_JUDGE_TARGET_LIST = '/api/v2/ctgy/admin/target'; +export const REMOVE_ADMIN_JUDGE = '/api/v2/ctgy/admin/remove'; -export const SAVE_ADMIN_JUDGE_STDS = '/api/v1/ctgy/admin/judge'; +export const SAVE_ADMIN_JUDGE_STDS = '/api/v2/ctgy/admin/judge'; -export const GET_JUDGE_LIST = '/api/v1/ctgy/judge'; -export const SAVE_JUDGE_RESULT = '/api/v1/ctgy/judge'; +export const GET_JUDGE_LIST = '/api/v2/ctgy/judge'; +export const SAVE_JUDGE_RESULT = '/api/v2/ctgy/judge'; -export const GET_JUDGE_FILE_DOWNLOAD = '/api/v1/ctgy/cmm/download/judge'; +export const GET_JUDGE_FILE_DOWNLOAD = '/api/v2/ctgy/cmm/download/judge'; // 사용자 관리 -export const GET_USER_LIST = '/api/v1/ctgy/user'; -export const SAVE_USER = '/api/v1/ctgy/user'; -export const REMOVE_USER = '/api/v1/ctgy/user'; +export const GET_USER_LIST = '/api/v2/ctgy/user'; +export const SAVE_USER = '/api/v2/ctgy/user'; +export const REMOVE_USER = '/api/v2/ctgy/user'; diff --git a/src/views/biz/admin/judge/JudgeDataReview.jsx b/src/views/biz/admin/judge/JudgeDataReview.jsx index a2566cb..ee99bed 100644 --- a/src/views/biz/admin/judge/JudgeDataReview.jsx +++ b/src/views/biz/admin/judge/JudgeDataReview.jsx @@ -97,6 +97,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => { }, [search]); useEffect(() => { + console.log('~~~~~~~~~~~'); getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => { setScContDocs(res.data); }); diff --git a/src/views/biz/user/UserManagerForm.jsx b/src/views/biz/user/UserManagerForm.jsx index 3a35aa7..1eda86f 100644 --- a/src/views/biz/user/UserManagerForm.jsx +++ b/src/views/biz/user/UserManagerForm.jsx @@ -41,15 +41,15 @@ const UserManagementForm = (props) => { isenable, newYn: create ? 'Y' : 'N' }; - if (userid.length < 1) { + if (userid.length < 4) { showAlert.show('사용자 ID는 필수입니다.'); return; } - if (passwd.length < 1) { + if (passwd.length < 4) { showAlert.show('비밀번호는 필수입니다.'); return; } - if (name.length < 1) { + if (name.length < 2) { showAlert.show('이름은 필수입니다.'); return; } diff --git a/src/views/dashboard/index.js b/src/views/dashboard/index.js index b825ac3..2743dfc 100644 --- a/src/views/dashboard/index.js +++ b/src/views/dashboard/index.js @@ -11,11 +11,13 @@ import MuiDataGrid from 'views/cmm/mui-grid/MuiDataGrid'; import { IconFileText } from '@tabler/icons'; import { useTheme } from '@mui/material/styles'; import Box from '@mui/material/Box'; +import { useAlert } from 'react-alert'; // ==============================|| DEFAULT DASHBOARD ||============================== // const Dashboard = () => { const theme = useTheme(); + const showAlert = useAlert(); const [totalCount, setTotalCount] = useState(0); const [rowsState, setRowsState] = useState({ page: 0, @@ -129,25 +131,27 @@ const Dashboard = () => { findDashboard().then((res) => { console.log(res); - if (res && res.data) { + if (res && res?.success) { const rows = res.data?.pBoardList.content.map((d, idx) => ({ ...d, rowId: idx + 1 })); setTotalCount(rows.count); setRowsState((prevState) => ({ ...prevState, rows })); const parkRows = res.data.parkJudgeList.map((d, idx) => ({ ...d, rowId: idx + 1 })); - setMsEdate1(parkRows[0].msEdate); + setMsEdate1(parkRows[0]?.msEdate); setTotalCount1(parkRows.count); setRowsState1((prevState) => ({ ...prevState, rows: parkRows })); const residentRows = res.data.residentJudgeList.map((d, idx) => ({ ...d, rowId: idx + 1 })); - setMsEdate2(residentRows[0].msEdate); + setMsEdate2(residentRows[0]?.msEdate); setTotalCount2(residentRows.count); setRowsState2((prevState) => ({ ...prevState, rows: residentRows })); const disabledRows = res.data.disabledJudgeList.map((d, idx) => ({ ...d, rowId: idx + 1 })); - setMsEdate3(disabledRows[0].msEdate); + setMsEdate3(disabledRows[0]?.msEdate); setTotalCount3(disabledRows.count); setRowsState3((prevState) => ({ ...prevState, rows: disabledRows })); + } else { + showAlert.show(res.data.methodName); } }); }, []);