From 7622b8523247882ca0483bee37084ee9ee52cad8 Mon Sep 17 00:00:00 2001 From: sjh88 Date: Tue, 4 Apr 2023 09:44:47 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A3=BC=EC=A0=95=EC=B0=A8=20=EC=9C=84?= =?UTF-8?q?=EB=B0=98=20=EC=8B=AC=EC=9D=98=EB=93=B1=EB=A1=9D=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=20=EB=B0=8F?= =?UTF-8?q?=20=EC=8B=AC=EC=9D=98=20=EC=B2=98=EB=A6=AC=20=EC=8B=9C=20?= =?UTF-8?q?=EB=A1=9C=EB=94=A9=EB=B0=94=20=ED=91=9C=EC=8B=9C=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 16 ++ package.json | 1 + src/views/biz/admin/judge/JudgeModal.jsx | 5 + .../biz/admin/judge/JudgeTargetSaveForm.jsx | 9 +- .../biz/admin/parking/ParkingRegister.jsx | 19 ++- .../admin/parking/SaveParkingTargetForm.jsx | 139 +++++------------- src/views/cmm/Loding.jsx | 31 ++++ 7 files changed, 107 insertions(+), 113 deletions(-) create mode 100644 src/views/cmm/Loding.jsx diff --git a/package-lock.json b/package-lock.json index b4ba36c..675b769 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,6 +79,7 @@ "react-router-dom": "^6.2.1", "react-scripts": "^4.0.3", "react-slick": "^0.28.1", + "react-spinners": "^0.13.8", "react-syntax-highlighter": "^15.4.5", "react-timer-hook": "^3.0.5", "react-to-print": "^2.14.4", @@ -21456,6 +21457,15 @@ "react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0" } }, + "node_modules/react-spinners": { + "version": "0.13.8", + "resolved": "https://registry.npmjs.org/react-spinners/-/react-spinners-0.13.8.tgz", + "integrity": "sha512-3e+k56lUkPj0vb5NDXPVFAOkPC//XyhKPJjvcGjyMNPWsBKpplfeyialP74G7H7+It7KzhtET+MvGqbKgAqpZA==", + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-style-singleton": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", @@ -44239,6 +44249,12 @@ "resize-observer-polyfill": "^1.5.0" } }, + "react-spinners": { + "version": "0.13.8", + "resolved": "https://registry.npmjs.org/react-spinners/-/react-spinners-0.13.8.tgz", + "integrity": "sha512-3e+k56lUkPj0vb5NDXPVFAOkPC//XyhKPJjvcGjyMNPWsBKpplfeyialP74G7H7+It7KzhtET+MvGqbKgAqpZA==", + "requires": {} + }, "react-style-singleton": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", diff --git a/package.json b/package.json index fa552d6..c0cde6b 100755 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "react-router-dom": "^6.2.1", "react-scripts": "^4.0.3", "react-slick": "^0.28.1", + "react-spinners": "^0.13.8", "react-syntax-highlighter": "^15.4.5", "react-timer-hook": "^3.0.5", "react-to-print": "^2.14.4", diff --git a/src/views/biz/admin/judge/JudgeModal.jsx b/src/views/biz/admin/judge/JudgeModal.jsx index 8014c8b..68673c2 100644 --- a/src/views/biz/admin/judge/JudgeModal.jsx +++ b/src/views/biz/admin/judge/JudgeModal.jsx @@ -9,6 +9,7 @@ import Button from '@mui/material/Button'; import combo from 'commons/combo_data'; import { useState } from 'react'; import { saveJudgeStds } from 'apis/judge'; +import Loading from 'views/cmm/Loding'; const style = { position: 'relative', @@ -25,12 +26,14 @@ const style = { const CmmModal = ({ isBackdrop = false, open, setOpen, title, judgeData = () => {}, dataGb, showAlert, callback }) => { const [judgeStd, setJudgeStd] = useState('1'); + const [loading, setLoading] = useState(false); const handleClose = () => { setOpen(false); }; const handleJudge = () => { if (window.confirm(`${judgeStd}명[부과] 기준으로 ${judgeData.length}건 심사 처리 하시겠습니까?`)) { + setLoading(true); const param = { dataGb, judgeStdCnt: judgeStd, @@ -38,6 +41,7 @@ const CmmModal = ({ isBackdrop = false, open, setOpen, title, judgeData = () => }; saveJudgeStds(param).then((res) => { + setLoading(false); if (res?.success) { showAlert.show(`${judgeData.length}건 처리되었습니다`); setOpen(false); @@ -87,6 +91,7 @@ const CmmModal = ({ isBackdrop = false, open, setOpen, title, judgeData = () => + {loading && } diff --git a/src/views/biz/admin/judge/JudgeTargetSaveForm.jsx b/src/views/biz/admin/judge/JudgeTargetSaveForm.jsx index e43aaf4..57be379 100644 --- a/src/views/biz/admin/judge/JudgeTargetSaveForm.jsx +++ b/src/views/biz/admin/judge/JudgeTargetSaveForm.jsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import NumberFormat from 'react-number-format'; import format from 'date-fns/format'; -import { Grid, TextField, MenuItem, Select, FormControl, InputLabel, Divider } from '@mui/material'; +import { Grid, TextField, MenuItem, Select, FormControl, InputLabel } from '@mui/material'; import Button from '@mui/material/Button'; import PropTypes from 'prop-types'; import { IconFileExport } from '@tabler/icons'; @@ -93,7 +93,7 @@ const JudgeTargetSaveForm = ({ handleModalSave }) => { label="심의차수" format="######" fullWidth - value={msChasu || ''} + value={msChasu} onValueChange={(values) => setMsChasu(values.value)} /> @@ -114,11 +114,6 @@ const JudgeTargetSaveForm = ({ handleModalSave }) => { - - - - -