fix: 주정차 심사 반영 완료

source freezing
mpower
minuk926 2 years ago
parent 0303af2827
commit fe405f54ac

@ -143,29 +143,29 @@ export async function removeJudge(params) {
return await axios.post(REMOVE_ADMIN_JUDGE, params); return await axios.post(REMOVE_ADMIN_JUDGE, params);
} }
export async function judgeFileDownload(params, alert) { // export async function judgeFileDownload(params, alert) {
await axios // await axios
.get(GET_JUDGE_FILE_DOWNLOAD, { // .get(GET_JUDGE_FILE_DOWNLOAD, {
responseType: 'blob', // responseType: 'blob',
params // params
}) // })
// eslint-disable-next-line consistent-return // // eslint-disable-next-line consistent-return
.then((res) => { // .then((res) => {
if (res?.isAxiosError || res?.status === 404 || res?.size <= 0) { // if (res?.isAxiosError || res?.status === 404 || res?.size <= 0) {
alert.show('파일을 다운로드 할 수 없습니다 [파일정보 오류]'); // alert.show('파일을 다운로드 할 수 없습니다 [파일정보 오류]');
} else { // } else {
// eslint-disable-next-line no-lonely-if // // eslint-disable-next-line no-lonely-if
if (res?.type.includes('image')) { // if (res?.type.includes('image')) {
// const url = window.URL.createObjectURL(res); // // const url = window.URL.createObjectURL(res);
// alert.show('~~~~~');
alert.show(<img alt="~~~" src={URL.createObjectURL(res)} style={{ margin: 'auto' }} />); // alert.show(<img alt="~~~" src={URL.createObjectURL(res)} style={{ margin: 'auto' }} />);
// URL.revokeObjectURL() // // URL.revokeObjectURL()
} else { // } else {
FileSaver.saveAs(res, 'filename'); // FileSaver.saveAs(res, 'filename');
} // }
} // }
}); // });
} // }
export async function saveJudgeStds(params) { export async function saveJudgeStds(params) {
// eslint-disable-next-line no-return-await // eslint-disable-next-line no-return-await
@ -236,8 +236,8 @@ export async function findJudgeImages(row) {
return res; return res;
} }
async function parkingJudgeImgList(arrImgInfo, fieldName) { async function parkingJudgeImgList(arrImgInfo) {
console.log(arrImgInfo); // console.log(arrImgInfo);
const arrRtn = []; const arrRtn = [];
// eslint-disable-next-line no-restricted-syntax // eslint-disable-next-line no-restricted-syntax
for (const idx of _.range(1, arrImgInfo.length + 1, 1)) { for (const idx of _.range(1, arrImgInfo.length + 1, 1)) {
@ -276,9 +276,9 @@ export async function findParkingImages(rcMaincode) {
]); ]);
const [frecads, contads, picads] = await Promise.all([ const [frecads, contads, picads] = await Promise.all([
parkingJudgeImgList(frecadImgs?.data, 'frecad'), parkingJudgeImgList(frecadImgs?.data),
parkingJudgeImgList(contadImgs?.data, 'contad'), parkingJudgeImgList(contadImgs?.data),
parkingJudgeImgList(picadImgs?.data, 'picad') parkingJudgeImgList(picadImgs?.data)
]); ]);
return { return {

@ -29,8 +29,8 @@ const verifyToken = (accessToken) => {
return false; return false;
} }
const decoded = jwtDecode(accessToken); const decoded = jwtDecode(accessToken);
console.log(decoded); // console.log(decoded);
console.log(decoded.exp > Date.now() / 1000); // console.log(decoded.exp > Date.now() / 1000);
/** /**
* Property 'exp' does not exist on type '<T = unknown>(token, options?: JwtDecodeOptions | undefined) => T'. * Property 'exp' does not exist on type '<T = unknown>(token, options?: JwtDecodeOptions | undefined) => T'.
@ -63,8 +63,7 @@ export const JWTProvider = ({ children }) => {
if (accessToken && verifyToken(accessToken)) { if (accessToken && verifyToken(accessToken)) {
setLocalStorage(ACCESS_TOKEN_NAME, accessToken); setLocalStorage(ACCESS_TOKEN_NAME, accessToken);
const response = await axios.get('/api/v2/ctgy/user/info'); const response = await axios.get('/api/v2/ctgy/user/info');
console.log(response); // console.log(response);
// TODO : 적용 필요
const { userid, email, name, accesstype } = response.data; const { userid, email, name, accesstype } = response.data;
dispatch({ dispatch({
type: LOGIN, type: LOGIN,
@ -99,7 +98,7 @@ export const JWTProvider = ({ children }) => {
// console.log(response); // console.log(response);
if (response && response.data) { if (response && response.data) {
const { accessToken, refreshToken, user } = response.data; const { accessToken, refreshToken, user } = response.data;
console.log(user); // console.log(user);
setLocalStorage(ACCESS_TOKEN_NAME, accessToken); setLocalStorage(ACCESS_TOKEN_NAME, accessToken);
if (refreshToken) setLocalStorage(REFRESH_TOKEN_NAME, refreshToken); if (refreshToken) setLocalStorage(REFRESH_TOKEN_NAME, refreshToken);

@ -97,7 +97,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
}, [search]); }, [search]);
useEffect(() => { useEffect(() => {
console.log('~~~~~~~~~~~'); // console.log('~~~~~~~~~~~');
getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => { getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => {
setScContDocs(res.data); setScContDocs(res.data);
}); });

@ -88,7 +88,7 @@ const JudgeReview = ({ msDatagb, menuName }) => {
} else { } else {
res = await removeParkingJudge(row); res = await removeParkingJudge(row);
} }
console.log(res); // console.log(res);
if (res && res.success) { if (res && res.success) {
setRowsState({ setRowsState({
...rowsState, ...rowsState,
@ -177,7 +177,7 @@ const JudgeReview = ({ msDatagb, menuName }) => {
arrJudgeData.push({ msMaincode: res.data.judgeUserData[idx].msMaincode, msSeq: res.data.judgeUserData[idx].msSeq }); arrJudgeData.push({ msMaincode: res.data.judgeUserData[idx].msMaincode, msSeq: res.data.judgeUserData[idx].msSeq });
} }
} }
console.log(arrJudgeData); // console.log(arrJudgeData);
setJudgeDatas(arrJudgeData); setJudgeDatas(arrJudgeData);
setJudgeResultData({ setJudgeResultData({

@ -22,7 +22,7 @@ const ProcessJudge = (props) => {
const getImgList = (row) => { const getImgList = (row) => {
findJudgeImages(row).then((res) => { findJudgeImages(row).then((res) => {
const { arrFrecadImg, arrContadImg, arrPicadImg } = res; const { arrFrecadImg, arrContadImg, arrPicadImg } = res;
console.log(arrFrecadImg, arrContadImg, arrPicadImg); // console.log(arrFrecadImg, arrContadImg, arrPicadImg);
setFrecadImgs(arrFrecadImg); setFrecadImgs(arrFrecadImg);
setContadImgs(arrContadImg); setContadImgs(arrContadImg);
setPicadImgs(arrPicadImg); setPicadImgs(arrPicadImg);
@ -45,7 +45,7 @@ const ProcessJudge = (props) => {
}; };
const handleSave = () => { const handleSave = () => {
console.log('~~~'); // console.log('~~~');
if (!selectedResult || selectedResult === '0') { if (!selectedResult || selectedResult === '0') {
showAlert.show('심의결정[미부과/부과]을 선택해 주세요'); showAlert.show('심의결정[미부과/부과]을 선택해 주세요');
return; return;

@ -22,7 +22,7 @@ const ProcessParkingJudge = (props) => {
const getImgList = (row) => { const getImgList = (row) => {
findParkingImages(row?.rcMaincode).then((res) => { findParkingImages(row?.rcMaincode).then((res) => {
const { arrFrecadImg, arrContadImg, arrPicadImg } = res; const { arrFrecadImg, arrContadImg, arrPicadImg } = res;
console.log(arrFrecadImg, arrContadImg, arrPicadImg); // console.log(arrFrecadImg, arrContadImg, arrPicadImg);
setFrecadImgs(arrFrecadImg); setFrecadImgs(arrFrecadImg);
setContadImgs(arrContadImg); setContadImgs(arrContadImg);
setPicadImgs(arrPicadImg); setPicadImgs(arrPicadImg);

@ -6,10 +6,11 @@ import CloseIcon from '@mui/icons-material/Close';
import AlertTitle from '@mui/material/AlertTitle'; import AlertTitle from '@mui/material/AlertTitle';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
// TODO : severity double-quote - prettier-ignore
// severity double-quote - prettier-ignore // severity double-quote - prettier-ignore
// prettier-ignore // prettier-ignore
export default function MuiAlert({ severity = "info", title = '', message, open, setOpen }) { export default function MuiAlert({ severity = "info", title = '', message, open, setOpen }) {
console.log(severity); // console.log(severity);
return ( return (
<Box sx={{ width: '100%' }}> <Box sx={{ width: '100%' }}>
<Collapse in={open}> <Collapse in={open}>

@ -14,7 +14,9 @@ const FileForm = ({
const onChangeFile = (e) => { const onChangeFile = (e) => {
const file = e.target.files[0]; const file = e.target.files[0];
if (file.type.includes('image')) { if (file.type.includes('image')) {
alert.show(<img alt={`${file.name}`} src={URL.createObjectURL(file)} style={{ margin: 'auto' }} />); alert.show(
<img alt={`${file.name}`} style={{ maxWidth: '400px', margin: 'auto' }} resizemode="contain" src={URL.createObjectURL(file)} />
);
} }
handleChangeFile(file); handleChangeFile(file);
}; };

@ -7,7 +7,7 @@ const ImageFileInputForms = ({ fieldName, index, labelName, selectedFile, fileNa
const onChangeFile = (e) => { const onChangeFile = (e) => {
const file = e.target.files[0]; const file = e.target.files[0];
if (file.type.includes('image')) { if (file.type.includes('image')) {
alert.show(<img alt={`${file.name}`} src={URL.createObjectURL(file)} style={{ margin: 'auto' }} />); alert.show(<img alt={`${file.name}`} style={{ maxWidth: '400px', margin: 'auto' }} src={URL.createObjectURL(file)} />);
} }
handleChangeFile(e); handleChangeFile(e);
}; };

@ -132,7 +132,7 @@ const Dashboard = () => {
// }; // };
findDashboard().then((res) => { findDashboard().then((res) => {
console.log(res); // console.log(res);
if (res && res?.success) { if (res && res?.success) {
const rows = res.data?.pBoardList.content.map((d, idx) => ({ ...d, rowId: idx + 1 })); const rows = res.data?.pBoardList.content.map((d, idx) => ({ ...d, rowId: idx + 1 }));
setTotalCount(rows.count); setTotalCount(rows.count);

Loading…
Cancel
Save