From 95108241f253852d29f97a7c6586c198dbc0c677 Mon Sep 17 00:00:00 2001 From: Pradeeppon01 Date: Sat, 15 Jun 2024 14:27:06 +0530 Subject: [PATCH] justforsake --- .env | 4 +- src/App.jsx | 2 + src/Components/PartACorrection.jsx | 47 +++- src/Components/QueryExecutor.jsx | 339 +++++++++++++++++++++++++++++ src/index.css | 18 ++ 5 files changed, 396 insertions(+), 14 deletions(-) create mode 100644 src/Components/QueryExecutor.jsx diff --git a/.env b/.env index f165e2c..d5f5fbc 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ # VITE_REACT_APP_BACKEND_URL="https://sandbox.exampaper.vidh.ai" -# VITE_REACT_APP_BACKEND_URL="http://localhost:9999" +VITE_REACT_APP_BACKEND_URL="http://localhost:9999" METABASE_BASE_URL="http://metabase.usln.in/public/question/d8774923-09bb-4cd9-903b-559d417e12cf" -VITE_REACT_APP_BACKEND_URL="https://api.exampaper.vidh.ai" \ No newline at end of file +# VITE_REACT_APP_BACKEND_URL="https://api.exampaper.vidh.ai" \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 8f453a6..4ee18ce 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -15,6 +15,7 @@ import Statistics from "./Components/Statistics"; import AnomolyAttendencePage from "./Components/AnomolyAttendencePage"; import AttendenceAdditionalRecord from "./Components/AttendenceAdditionalRecord"; import AttendenceAdditionalRecordCorrection from "./Components/AttendenceAdditionalRecordCorrection"; +import QueryExecutor from "./Components/QueryExecutor"; function App() { return ( @@ -22,6 +23,7 @@ function App() { }> + }> } diff --git a/src/Components/PartACorrection.jsx b/src/Components/PartACorrection.jsx index 8debf34..6eabbee 100644 --- a/src/Components/PartACorrection.jsx +++ b/src/Components/PartACorrection.jsx @@ -106,17 +106,34 @@ const PartACorrection = () => { const examDateInputRef = useRef(null); const studentNameInputRef = useRef(null); const bookletInputRef = useRef(null); + const registerNumberInputRef = useRef(null); // Handle the Enter key press in the register number input const handleRegisterNumberKeyDown = (e) => { + console.log("Handle register number key down ....") if (e.key === 'Enter') { + console.log("Entering subject code field ...") // Focus on the subject code input + registerNumberInputRef.current.unfocus() const subjectCodeInput = subjectCodeInputRef.current; + console.log("Subject code input :: ",subjectCodeInput) subjectCodeInput.focus(); subjectCodeInput.select(); } }; + const handleBookletSerialNoKeyDown = (e) =>{ + console.log("Handdle booklet serial no key down.....") + if(e.key === 'Enter'){ + console.log("Entering register number field...") + const registerNumberInputField = registerNumberInputRef.current + console.log("Register number input :: ",registerNumberInputField) + registerNumberInputField.focus() + // const ele = document.getElementById("corrected-register-number-input") + // console.log("ELE : ",ele) + // ele.focus() + } + } const dispatch = useDispatch(); @@ -460,6 +477,7 @@ const PartACorrection = () => { }; const updatePartAanomoly = async (e) => { + subjectCodeInputRef.current.blur() setIsLoading(true); setMetaBaseRegnoLink(null); setMetaBaseSubjectLinkWithTitle(null); @@ -768,7 +786,7 @@ const PartACorrection = () => { /> */} - {showSubjectTitleInput && ( + {/* {showSubjectTitleInput && ( - )} + )} */} {showAdditionalStudentInputs && ( <> - + {/* @@ -806,8 +824,8 @@ const PartACorrection = () => { }} /> - - + */} + {/* @@ -824,8 +842,8 @@ const PartACorrection = () => { placeholder="(DD-MM-YYYY)" /> - - + */} + {/* @@ -841,7 +859,7 @@ const PartACorrection = () => { }} /> - + */} {batchType === "old" && ( */} - {showSubjectTitleInput && ( + {/* {showSubjectTitleInput && ( - )} + )} */} {showAdditionalStudentInputs && ( <> - + {/* @@ -1050,7 +1070,7 @@ const PartACorrection = () => { }} /> - + */}