From caf3eca0000e1b05e580e85735efa299f429c2e4 Mon Sep 17 00:00:00 2001 From: Pradeeppon01 Date: Mon, 2 Dec 2024 14:13:16 +0530 Subject: [PATCH] modified edit container --- .env | 2 +- src/Components/IndividualMarksheetGen.jsx | 26 ---------------------- src/Components/PlayGroundEditContainer.jsx | 7 ++++++ 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/.env b/.env index 75d0e85..68a1d6f 100644 --- a/.env +++ b/.env @@ -2,5 +2,5 @@ METABASE_BASE_URL="http://metabase.usln.in/public/question/d8774923-09bb-4cd9-903b-559d417e12cf" VITE_REACT_APP_BACKEND_URL="http://localhost:9999" -#VITE_REACT_APP_BACKEND_URL="https://api.exampaper.vidh.ai" +#VITE_REACT_APP_BACKEND_URL="https://api.dev.exampaper.usln.in" #VITE_REACT_APP_BACKEND_URL="https://api.exampaper.usln.in" diff --git a/src/Components/IndividualMarksheetGen.jsx b/src/Components/IndividualMarksheetGen.jsx index aa611b1..d2851b9 100644 --- a/src/Components/IndividualMarksheetGen.jsx +++ b/src/Components/IndividualMarksheetGen.jsx @@ -111,32 +111,6 @@ const IndividualMarksheetGen = () => { } }; - const parseCreatedOn = (dateValue) => { - console.log("parse created on ....", typeof dateValue); - if (!dateValue) { - return null; // Handle invalid input - } else if (typeof dateValue == "number") { - dateValue = String(dateValue); - } - - const year = parseInt(dateValue.substring(0, 4), 10); - console.log("year ===== ", year); - const month = parseInt(dateValue.substring(4, 6), 10) - 1; // Month is 0-based in JS - const day = parseInt(dateValue.substring(6, 8), 10); - const hours = parseInt(dateValue.substring(8, 10), 10); - const minutes = parseInt(dateValue.substring(10, 12), 10); - const seconds = parseInt(dateValue.substring(12, 14), 10); - - const parsedDate = new Date(year, month, day, hours, minutes, seconds); - - // Check if the date is valid - if (isNaN(parsedDate.getTime())) { - return null; // Invalid date - } - - return parsedDate; - }; - return ( { @@ -135,6 +136,7 @@ const PlayGroundEditContainer = ({ table: tableName, s3Path, subjectCode, + registerNumber, marks, marksR1, marksR2, @@ -272,6 +274,11 @@ const PlayGroundEditContainer = ({ setValue={setSubjectCode} placeholder={"Subject code"} /> + ) : ( <>