From fe405f54ac97385b8d4a90363935489cc09d091c Mon Sep 17 00:00:00 2001 From: minuk926 Date: Fri, 15 Jul 2022 12:24:01 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A3=BC=EC=A0=95=EC=B0=A8=20=EC=8B=AC?= =?UTF-8?q?=EC=82=AC=20=EB=B0=98=EC=98=81=20=EC=99=84=EB=A3=8C=20=20=20=20?= =?UTF-8?q?=20=20source=20freezing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/judge.js | 56 +++++++++---------- src/contexts/JWTContext.js | 9 ++- src/views/biz/admin/judge/JudgeDataReview.jsx | 2 +- src/views/biz/admin/judge/JudgeReview.jsx | 4 +- src/views/biz/judge/ProcessJudge.jsx | 4 +- src/views/biz/judge/ProcessParkingJudge.jsx | 2 +- src/views/cmm/MuiAlert.jsx | 3 +- src/views/cmm/file-ctl/FileForm.jsx | 4 +- .../cmm/file-ctl/ImageFileInputForms.jsx | 2 +- src/views/dashboard/index.js | 2 +- 10 files changed, 45 insertions(+), 43 deletions(-) diff --git a/src/apis/judge.js b/src/apis/judge.js index 4f200f0..0cb3550 100644 --- a/src/apis/judge.js +++ b/src/apis/judge.js @@ -143,29 +143,29 @@ export async function removeJudge(params) { return await axios.post(REMOVE_ADMIN_JUDGE, params); } -export async function judgeFileDownload(params, alert) { - await axios - .get(GET_JUDGE_FILE_DOWNLOAD, { - responseType: 'blob', - params - }) - // eslint-disable-next-line consistent-return - .then((res) => { - if (res?.isAxiosError || res?.status === 404 || res?.size <= 0) { - alert.show('파일을 다운로드 할 수 없습니다 [파일정보 오류]'); - } else { - // eslint-disable-next-line no-lonely-if - if (res?.type.includes('image')) { - // const url = window.URL.createObjectURL(res); - - alert.show(~~~); - // URL.revokeObjectURL() - } else { - FileSaver.saveAs(res, 'filename'); - } - } - }); -} +// export async function judgeFileDownload(params, alert) { +// await axios +// .get(GET_JUDGE_FILE_DOWNLOAD, { +// responseType: 'blob', +// params +// }) +// // eslint-disable-next-line consistent-return +// .then((res) => { +// if (res?.isAxiosError || res?.status === 404 || res?.size <= 0) { +// alert.show('파일을 다운로드 할 수 없습니다 [파일정보 오류]'); +// } else { +// // eslint-disable-next-line no-lonely-if +// if (res?.type.includes('image')) { +// // const url = window.URL.createObjectURL(res); +// alert.show('~~~~~'); +// alert.show(~~~); +// // URL.revokeObjectURL() +// } else { +// FileSaver.saveAs(res, 'filename'); +// } +// } +// }); +// } export async function saveJudgeStds(params) { // eslint-disable-next-line no-return-await @@ -236,8 +236,8 @@ export async function findJudgeImages(row) { return res; } -async function parkingJudgeImgList(arrImgInfo, fieldName) { - console.log(arrImgInfo); +async function parkingJudgeImgList(arrImgInfo) { + // console.log(arrImgInfo); const arrRtn = []; // eslint-disable-next-line no-restricted-syntax 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([ - parkingJudgeImgList(frecadImgs?.data, 'frecad'), - parkingJudgeImgList(contadImgs?.data, 'contad'), - parkingJudgeImgList(picadImgs?.data, 'picad') + parkingJudgeImgList(frecadImgs?.data), + parkingJudgeImgList(contadImgs?.data), + parkingJudgeImgList(picadImgs?.data) ]); return { diff --git a/src/contexts/JWTContext.js b/src/contexts/JWTContext.js index a7d3ad6..c811def 100755 --- a/src/contexts/JWTContext.js +++ b/src/contexts/JWTContext.js @@ -29,8 +29,8 @@ const verifyToken = (accessToken) => { return false; } const decoded = jwtDecode(accessToken); - console.log(decoded); - console.log(decoded.exp > Date.now() / 1000); + // console.log(decoded); + // console.log(decoded.exp > Date.now() / 1000); /** * Property 'exp' does not exist on type '(token, options?: JwtDecodeOptions | undefined) => T'. @@ -63,8 +63,7 @@ export const JWTProvider = ({ children }) => { if (accessToken && verifyToken(accessToken)) { setLocalStorage(ACCESS_TOKEN_NAME, accessToken); const response = await axios.get('/api/v2/ctgy/user/info'); - console.log(response); - // TODO : 적용 필요 + // console.log(response); const { userid, email, name, accesstype } = response.data; dispatch({ type: LOGIN, @@ -99,7 +98,7 @@ export const JWTProvider = ({ children }) => { // console.log(response); if (response && response.data) { const { accessToken, refreshToken, user } = response.data; - console.log(user); + // console.log(user); setLocalStorage(ACCESS_TOKEN_NAME, accessToken); if (refreshToken) setLocalStorage(REFRESH_TOKEN_NAME, refreshToken); diff --git a/src/views/biz/admin/judge/JudgeDataReview.jsx b/src/views/biz/admin/judge/JudgeDataReview.jsx index ee99bed..be8ca7a 100644 --- a/src/views/biz/admin/judge/JudgeDataReview.jsx +++ b/src/views/biz/admin/judge/JudgeDataReview.jsx @@ -97,7 +97,7 @@ const JudgeDataReview = ({ scDatagb, menuName }) => { }, [search]); useEffect(() => { - console.log('~~~~~~~~~~~'); + // console.log('~~~~~~~~~~~'); getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => { setScContDocs(res.data); }); diff --git a/src/views/biz/admin/judge/JudgeReview.jsx b/src/views/biz/admin/judge/JudgeReview.jsx index c311107..538152a 100644 --- a/src/views/biz/admin/judge/JudgeReview.jsx +++ b/src/views/biz/admin/judge/JudgeReview.jsx @@ -88,7 +88,7 @@ const JudgeReview = ({ msDatagb, menuName }) => { } else { res = await removeParkingJudge(row); } - console.log(res); + // console.log(res); if (res && res.success) { setRowsState({ ...rowsState, @@ -177,7 +177,7 @@ const JudgeReview = ({ msDatagb, menuName }) => { arrJudgeData.push({ msMaincode: res.data.judgeUserData[idx].msMaincode, msSeq: res.data.judgeUserData[idx].msSeq }); } } - console.log(arrJudgeData); + // console.log(arrJudgeData); setJudgeDatas(arrJudgeData); setJudgeResultData({ diff --git a/src/views/biz/judge/ProcessJudge.jsx b/src/views/biz/judge/ProcessJudge.jsx index 4dc6910..97fb884 100644 --- a/src/views/biz/judge/ProcessJudge.jsx +++ b/src/views/biz/judge/ProcessJudge.jsx @@ -22,7 +22,7 @@ const ProcessJudge = (props) => { const getImgList = (row) => { findJudgeImages(row).then((res) => { const { arrFrecadImg, arrContadImg, arrPicadImg } = res; - console.log(arrFrecadImg, arrContadImg, arrPicadImg); + // console.log(arrFrecadImg, arrContadImg, arrPicadImg); setFrecadImgs(arrFrecadImg); setContadImgs(arrContadImg); setPicadImgs(arrPicadImg); @@ -45,7 +45,7 @@ const ProcessJudge = (props) => { }; const handleSave = () => { - console.log('~~~'); + // console.log('~~~'); if (!selectedResult || selectedResult === '0') { showAlert.show('심의결정[미부과/부과]을 선택해 주세요'); return; diff --git a/src/views/biz/judge/ProcessParkingJudge.jsx b/src/views/biz/judge/ProcessParkingJudge.jsx index a7a909b..ce89b36 100644 --- a/src/views/biz/judge/ProcessParkingJudge.jsx +++ b/src/views/biz/judge/ProcessParkingJudge.jsx @@ -22,7 +22,7 @@ const ProcessParkingJudge = (props) => { const getImgList = (row) => { findParkingImages(row?.rcMaincode).then((res) => { const { arrFrecadImg, arrContadImg, arrPicadImg } = res; - console.log(arrFrecadImg, arrContadImg, arrPicadImg); + // console.log(arrFrecadImg, arrContadImg, arrPicadImg); setFrecadImgs(arrFrecadImg); setContadImgs(arrContadImg); setPicadImgs(arrPicadImg); diff --git a/src/views/cmm/MuiAlert.jsx b/src/views/cmm/MuiAlert.jsx index d4e94ea..42a0379 100644 --- a/src/views/cmm/MuiAlert.jsx +++ b/src/views/cmm/MuiAlert.jsx @@ -6,10 +6,11 @@ import CloseIcon from '@mui/icons-material/Close'; import AlertTitle from '@mui/material/AlertTitle'; import PropTypes from 'prop-types'; +// TODO : severity는 double-quote를 써야만 한다 - prettier-ignore 설정 // severity는 double-quote를 써야만 한다 - prettier-ignore 설정 // prettier-ignore export default function MuiAlert({ severity = "info", title = '', message, open, setOpen }) { - console.log(severity); + // console.log(severity); return ( diff --git a/src/views/cmm/file-ctl/FileForm.jsx b/src/views/cmm/file-ctl/FileForm.jsx index 079545e..3c82d50 100644 --- a/src/views/cmm/file-ctl/FileForm.jsx +++ b/src/views/cmm/file-ctl/FileForm.jsx @@ -14,7 +14,9 @@ const FileForm = ({ const onChangeFile = (e) => { const file = e.target.files[0]; if (file.type.includes('image')) { - alert.show({`${file.name}`}); + alert.show( + {`${file.name}`} + ); } handleChangeFile(file); }; diff --git a/src/views/cmm/file-ctl/ImageFileInputForms.jsx b/src/views/cmm/file-ctl/ImageFileInputForms.jsx index cb109af..ee07498 100644 --- a/src/views/cmm/file-ctl/ImageFileInputForms.jsx +++ b/src/views/cmm/file-ctl/ImageFileInputForms.jsx @@ -7,7 +7,7 @@ const ImageFileInputForms = ({ fieldName, index, labelName, selectedFile, fileNa const onChangeFile = (e) => { const file = e.target.files[0]; if (file.type.includes('image')) { - alert.show({`${file.name}`}); + alert.show({`${file.name}`}); } handleChangeFile(e); }; diff --git a/src/views/dashboard/index.js b/src/views/dashboard/index.js index fbb81f2..a009ca8 100644 --- a/src/views/dashboard/index.js +++ b/src/views/dashboard/index.js @@ -132,7 +132,7 @@ const Dashboard = () => { // }; findDashboard().then((res) => { - console.log(res); + // console.log(res); if (res && res?.success) { const rows = res.data?.pBoardList.content.map((d, idx) => ({ ...d, rowId: idx + 1 })); setTotalCount(rows.count);