From 215a5d6a1752dad3e575515dca1153627e13fa0b Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 13 Jul 2022 14:18:57 +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=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/judge.js | 8 +++++++- src/commons/ApiUrl.js | 1 + src/views/biz/judge/ProcessParkingJudge.jsx | 10 ++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/apis/judge.js b/src/apis/judge.js index 4663d65..517ed2c 100644 --- a/src/apis/judge.js +++ b/src/apis/judge.js @@ -19,7 +19,8 @@ import { SAVE_JUDGE_RESULT, SAVE_ADMIN_JUDGE_STDS, GET_DASHBOARD, - GET_PARKING_IMAGE + GET_PARKING_IMAGE, + SAVE_PARKING_JUDGE_RESULT } from 'commons/ApiUrl'; import { setRowId } from './common'; import FileSaver from 'file-saver'; @@ -265,3 +266,8 @@ export async function findParkingImages(row) { arrPicadImg: [] }; } + +export async function saveParkingJudgeResult(params) { + // eslint-disable-next-line no-return-await + return await axios.post(SAVE_PARKING_JUDGE_RESULT, params); +} diff --git a/src/commons/ApiUrl.js b/src/commons/ApiUrl.js index 19ca86c..154580a 100644 --- a/src/commons/ApiUrl.js +++ b/src/commons/ApiUrl.js @@ -45,6 +45,7 @@ export const SAVE_ADMIN_JUDGE_STDS = '/api/v2/ctgy/admin/judge'; export const GET_JUDGE_LIST = '/api/v2/ctgy/judge'; export const SAVE_JUDGE_RESULT = '/api/v2/ctgy/judge'; export const GET_PARKING_IMAGE = '/api/v2/ctgy/parking/judge/'; +export const SAVE_PARKING_JUDGE_RESULT = '/api/v2/ctgy/parking/judge'; export const GET_JUDGE_FILE_DOWNLOAD = '/api/v2/ctgy/cmm/download/judge'; diff --git a/src/views/biz/judge/ProcessParkingJudge.jsx b/src/views/biz/judge/ProcessParkingJudge.jsx index d14ee3a..fe0723b 100644 --- a/src/views/biz/judge/ProcessParkingJudge.jsx +++ b/src/views/biz/judge/ProcessParkingJudge.jsx @@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react'; import PropTypes from 'prop-types'; import { Button, Divider, FormControl, Grid, ImageList, InputLabel, MenuItem, Select, TextField } from '@mui/material'; -import { findJudgeImages, findParkingImages, saveJudgeResult } from 'apis/judge'; +import { findJudgeImages, findParkingImages, saveJudgeResult, saveParkingJudgeResult } from 'apis/judge'; import { SkipNext, SkipPrevious, Save } from '@mui/icons-material'; import ImgItem from '../../cmm/ImgItem'; import NumberFormat from 'react-number-format'; @@ -52,11 +52,17 @@ const ProcessParkingJudge = (props) => { showAlert.show('결정사유는 필수 입력해야 합니다.'); return; } - saveJudgeResult({ msuCode: curDataRef.current.msuCode, msuResult: selectedResult, msuReason: reason }).then((res) => { + saveParkingJudgeResult({ + msuCode: curDataRef.current.msuCode, + msuUserid: rowDatas[pageRef.current].msuUserid, + msuResult: selectedResult, + msuReason: reason + }).then((res) => { if (res?.success) { curDataRef.current.msuResult = selectedResult; curDataRef.current.msuReason = reason; showAlert.show('심의처리 되었습니다'); + // setOpen(false) } else { showAlert.show(`${res?.data.message}`); }