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);
}
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(<img alt="~~~" src={URL.createObjectURL(res)} style={{ margin: 'auto' }} />);
// 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(<img alt="~~~" src={URL.createObjectURL(res)} style={{ margin: 'auto' }} />);
// // 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 {

@ -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 '<T = unknown>(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);

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

@ -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({

@ -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;

@ -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);

@ -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 (
<Box sx={{ width: '100%' }}>
<Collapse in={open}>

@ -14,7 +14,9 @@ const FileForm = ({
const onChangeFile = (e) => {
const file = e.target.files[0];
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);
};

@ -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(<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);
};

@ -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);

Loading…
Cancel
Save