latest
This commit is contained in:
parent
e12f9af402
commit
3161bf2437
4
.env
4
.env
|
|
@ -1,5 +1,5 @@
|
||||||
#VITE_REACT_APP_BACKEND_URL="https://sandbox.exampaper.vidh.ai"
|
#VITE_REACT_APP_BACKEND_URL="https://sandbox.exampaper.vidh.ai"
|
||||||
METABASE_BASE_URL="http://metabase.usln.in/public/question/d8774923-09bb-4cd9-903b-559d417e12cf"
|
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="http://localhost:9999"
|
||||||
#VITE_REACT_APP_BACKEND_URL="https://api.exampaper.vidh.ai"
|
VITE_REACT_APP_BACKEND_URL="https://api.exampaper.vidh.ai"
|
||||||
|
|
@ -13,6 +13,7 @@ import { useDispatch, useSelector } from "react-redux";
|
||||||
import TableComponentAdditionalSheet from "./TableComponentAdditionalSheet";
|
import TableComponentAdditionalSheet from "./TableComponentAdditionalSheet";
|
||||||
const { Header, Content, Footer, Sider } = Layout;
|
const { Header, Content, Footer, Sider } = Layout;
|
||||||
|
|
||||||
|
|
||||||
function AttendanceAdditionalSheet() {
|
function AttendanceAdditionalSheet() {
|
||||||
const [tableRowData, setTableRowData] = useState([]);
|
const [tableRowData, setTableRowData] = useState([]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import Snackbar from "@mui/material/Snackbar";
|
||||||
import ImageDialog from "./ImageDialog";
|
import ImageDialog from "./ImageDialog";
|
||||||
import { ToastContainer, toast } from "react-toastify";
|
import { ToastContainer, toast } from "react-toastify";
|
||||||
import DummyDuplicatesPreview from "./DummyDuplicatesPreview";
|
import DummyDuplicatesPreview from "./DummyDuplicatesPreview";
|
||||||
|
import LoadingContainer from "./LoadingContainer";
|
||||||
|
|
||||||
import AntdesignLayout from "./AntdesignLayout";
|
import AntdesignLayout from "./AntdesignLayout";
|
||||||
|
|
||||||
|
|
@ -27,6 +28,7 @@ const DummyDuplicates = () => {
|
||||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||||
const [currentImagePath, setCurrentImagePath] = useState("");
|
const [currentImagePath, setCurrentImagePath] = useState("");
|
||||||
const [barcode, SetBarcode] = useState(null);
|
const [barcode, SetBarcode] = useState(null);
|
||||||
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
const { type } = useParams();
|
const { type } = useParams();
|
||||||
console.log("Type ======= ", type);
|
console.log("Type ======= ", type);
|
||||||
|
|
@ -37,6 +39,7 @@ const DummyDuplicates = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchDuplicateBarcodes = async () => {
|
const fetchDuplicateBarcodes = async () => {
|
||||||
|
setIsLoading(true);
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${
|
`${
|
||||||
|
|
@ -53,6 +56,7 @@ const DummyDuplicates = () => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const responseData = await response.json();
|
const responseData = await response.json();
|
||||||
|
setIsLoading(false);
|
||||||
console.log("Response Data ==== ", responseData);
|
console.log("Response Data ==== ", responseData);
|
||||||
if (responseData?.status == "success") {
|
if (responseData?.status == "success") {
|
||||||
console.log("The fetch Dumplicate records is success ....");
|
console.log("The fetch Dumplicate records is success ....");
|
||||||
|
|
@ -60,6 +64,7 @@ const DummyDuplicates = () => {
|
||||||
setDuplicateBarcodes(responseData?.duplicate_barcodes);
|
setDuplicateBarcodes(responseData?.duplicate_barcodes);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
setIsLoading(false);
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -90,6 +95,11 @@ const DummyDuplicates = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AntdesignLayout>
|
<AntdesignLayout>
|
||||||
|
{dummyDuplicatesData?.length > 0 && (
|
||||||
|
<Box className="my-3 px-2 w-100 text-left">
|
||||||
|
<h5>Duplicate Barcodes : {dummyDuplicatesData?.length}</h5>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
{dummyDuplicatesData?.length > 0 &&
|
{dummyDuplicatesData?.length > 0 &&
|
||||||
duplicateBarcodes.map((barcode) => (
|
duplicateBarcodes.map((barcode) => (
|
||||||
<Box
|
<Box
|
||||||
|
|
@ -117,6 +127,7 @@ const DummyDuplicates = () => {
|
||||||
>
|
>
|
||||||
<CircularProgress color="inherit" />
|
<CircularProgress color="inherit" />
|
||||||
</Backdrop>
|
</Backdrop>
|
||||||
|
{isLoading && <LoadingContainer />}
|
||||||
</AntdesignLayout>
|
</AntdesignLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ import { Box } from "@mui/material";
|
||||||
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
||||||
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
|
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
|
||||||
import TextInputField from "./TextInputField";
|
import TextInputField from "./TextInputField";
|
||||||
|
import { notification, Space } from "antd";
|
||||||
|
import { toast, ToastContainer } from "react-toastify";
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
|
@ -30,7 +32,7 @@ export default function DummyDuplicatesPreview({
|
||||||
setIsDialogOpen,
|
setIsDialogOpen,
|
||||||
}) {
|
}) {
|
||||||
const [open, setOpen] = React.useState(false);
|
const [open, setOpen] = React.useState(false);
|
||||||
|
const [api, contextHolder] = notification.useNotification();
|
||||||
const [scaleWidthValue, setScaleWidthValue] = React.useState(80);
|
const [scaleWidthValue, setScaleWidthValue] = React.useState(80);
|
||||||
const [rotateValue, setRotateValue] = React.useState(0);
|
const [rotateValue, setRotateValue] = React.useState(0);
|
||||||
const [partAResults, setPartAResults] = React.useState([]);
|
const [partAResults, setPartAResults] = React.useState([]);
|
||||||
|
|
@ -40,8 +42,21 @@ export default function DummyDuplicatesPreview({
|
||||||
const [partCImageIndex, setPartCImageIndex] = React.useState(0);
|
const [partCImageIndex, setPartCImageIndex] = React.useState(0);
|
||||||
const [inputBarcode, setInputBarcode] = useState(null);
|
const [inputBarcode, setInputBarcode] = useState(null);
|
||||||
const [inputSerialNo, setInputSerialNo] = useState(null);
|
const [inputSerialNo, setInputSerialNo] = useState(null);
|
||||||
const [inputSubjectCode,setInputSubjectCode] = useState(null)
|
const [inputSubjectCode, setInputSubjectCode] = useState(null);
|
||||||
const [inputRegisterNumber,setInputRegisterNumber] = useState(null)
|
const [inputRegisterNumber, setInputRegisterNumber] = useState(null);
|
||||||
|
const [partAImageS3Path, setPartAImageS3Path] = useState(null);
|
||||||
|
const [partCImageS3Path, setPartCImageS3Path] = useState(null);
|
||||||
|
const [loadingText, setLoadingText] = useState(null);
|
||||||
|
|
||||||
|
const openNotification = (pauseOnHover) => () => {
|
||||||
|
api.open({
|
||||||
|
message: "Notification Title",
|
||||||
|
description: "Record Updated Successfully ....",
|
||||||
|
showProgress: true,
|
||||||
|
pauseOnHover,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const handleClickOpen = () => {
|
const handleClickOpen = () => {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
};
|
};
|
||||||
|
|
@ -49,17 +64,27 @@ export default function DummyDuplicatesPreview({
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
setIsDialogOpen(false);
|
setIsDialogOpen(false);
|
||||||
|
setTimeout(() => {
|
||||||
|
document.body.style.overflow = "auto";
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
handleClickOpen();
|
handleClickOpen();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (partAResults.length > 0 && partAImageIndex <= partAResults.length) {
|
||||||
|
setPartAImageS3Path(partAResults[partAImageIndex]?.s3_path);
|
||||||
|
}
|
||||||
|
}, [partAResults]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("fetchDuplicateBarcodeInfo .........");
|
console.log("fetchDuplicateBarcodeInfo .........");
|
||||||
const fetchDuplicateBarcodeInfo = async () => {
|
const fetchDuplicateBarcodeInfo = async () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
console.log("fetching barcode info .....");
|
console.log("fetching barcode info 12.....");
|
||||||
|
setLoadingText(`Fetching Barcode Info : ${barcode}`);
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${
|
`${
|
||||||
|
|
@ -78,6 +103,7 @@ export default function DummyDuplicatesPreview({
|
||||||
);
|
);
|
||||||
const responseData = await response.json();
|
const responseData = await response.json();
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
setLoadingText(null);
|
||||||
console.log("Barcode info Response Data ==== ", responseData);
|
console.log("Barcode info Response Data ==== ", responseData);
|
||||||
if (responseData?.status == "success") {
|
if (responseData?.status == "success") {
|
||||||
console.log("success");
|
console.log("success");
|
||||||
|
|
@ -87,6 +113,7 @@ export default function DummyDuplicatesPreview({
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
setLoadingText(null);
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -137,6 +164,129 @@ export default function DummyDuplicatesPreview({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (partAResults.length > 0 && partAImageIndex <= partAResults.length) {
|
||||||
|
setLoadingText(null);
|
||||||
|
setIsLoading(true);
|
||||||
|
setInputBarcode(null);
|
||||||
|
setInputRegisterNumber(null);
|
||||||
|
setInputSubjectCode(null);
|
||||||
|
setPartAImageS3Path(null);
|
||||||
|
setTimeout(() => {
|
||||||
|
setInputBarcode(partAResults[partAImageIndex]?.barcode);
|
||||||
|
setInputRegisterNumber(partAResults[partAImageIndex]?.register_number);
|
||||||
|
setInputSubjectCode(partAResults[partAImageIndex]?.subject_code);
|
||||||
|
setPartAImageS3Path(partAResults[partAImageIndex]?.s3_path);
|
||||||
|
setIsLoading(false);
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}, [dummyDuplicatesData, partAImageIndex]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
console.log("part c image index changing ....",partCImageIndex)
|
||||||
|
if(partCResults.length > 0 && partCImageIndex <= partCResults.length){
|
||||||
|
console.log("into if ..")
|
||||||
|
setPartCImageS3Path(null)
|
||||||
|
setTimeout(()=>{
|
||||||
|
setPartCImageS3Path(partCResults[partCImageIndex]?.s3_path)
|
||||||
|
},5000)
|
||||||
|
}
|
||||||
|
},[partCImageIndex])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (partAImageS3Path) {
|
||||||
|
const fetchPartAImageData = async () => {
|
||||||
|
setIsLoading(true);
|
||||||
|
console.log("fetching Image info .....");
|
||||||
|
try {
|
||||||
|
const response = await fetch(
|
||||||
|
`${
|
||||||
|
import.meta.env.VITE_REACT_APP_BACKEND_URL
|
||||||
|
}/fetchPartAS3PathInfo`,
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify({
|
||||||
|
partAImageS3Path,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const responseData = await response.json();
|
||||||
|
setIsLoading(false);
|
||||||
|
if (responseData?.status === "success") {
|
||||||
|
const imageInfo = responseData?.image_info;
|
||||||
|
console.log("Image info ====== ", imageInfo);
|
||||||
|
if (imageInfo && imageInfo.length > 0) {
|
||||||
|
setInputBarcode(imageInfo[0]?.barcode);
|
||||||
|
setInputRegisterNumber(imageInfo[0]?.register_number);
|
||||||
|
setInputSubjectCode(imageInfo[0]?.subject_code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
setIsLoading(false);
|
||||||
|
console.error("Error fetching barcode info:", error);
|
||||||
|
} finally {
|
||||||
|
setIsLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchPartAImageData();
|
||||||
|
}
|
||||||
|
}, [partAImageS3Path]);
|
||||||
|
|
||||||
|
const updateDuplicateRecordData = async () => {
|
||||||
|
const regex = /^\d+(_\d+)?$/;
|
||||||
|
console.log("Regex ===== ", regex);
|
||||||
|
if (!regex.test(inputBarcode)) {
|
||||||
|
alert("Please enter valid Barcode");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
setIsLoading(true);
|
||||||
|
const response = await fetch(
|
||||||
|
`${
|
||||||
|
import.meta.env.VITE_REACT_APP_BACKEND_URL
|
||||||
|
}/updateDuplicateRecordData`,
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify({
|
||||||
|
DuplicatePartAbarcode: barcode,
|
||||||
|
inputBarcode,
|
||||||
|
inputRegisterNumber,
|
||||||
|
inputSerialNo,
|
||||||
|
inputSubjectCode,
|
||||||
|
partAS3Path: partAResults[partAImageIndex]?.s3_path,
|
||||||
|
partCS3Path: partCResults[partCImageIndex]?.s3_path,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const responseData = await response.json();
|
||||||
|
setIsLoading(false);
|
||||||
|
console.log("Response Data ==== ", responseData);
|
||||||
|
if (responseData?.status == "success") {
|
||||||
|
console.log("Updated successfully ....");
|
||||||
|
if (responseData?.duplicate_record) {
|
||||||
|
alert(`Already a record with barcode is present : ${inputBarcode}`);
|
||||||
|
} else {
|
||||||
|
console.log("showing notification ...");
|
||||||
|
toast.success("Record updated Successfully ..");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
setIsLoading(false);
|
||||||
|
throw new Error(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Dialog
|
<Dialog
|
||||||
|
|
@ -149,6 +299,8 @@ export default function DummyDuplicatesPreview({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<AppBar sx={{ position: "relative" }}>
|
<AppBar sx={{ position: "relative" }}>
|
||||||
|
{contextHolder}
|
||||||
|
<ToastContainer />
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<IconButton
|
<IconButton
|
||||||
edge="start"
|
edge="start"
|
||||||
|
|
@ -201,67 +353,77 @@ export default function DummyDuplicatesPreview({
|
||||||
<Box className="d-flex flex-row">
|
<Box className="d-flex flex-row">
|
||||||
<Box className="rounded bg-white d-flex flex-column align-items-center">
|
<Box className="rounded bg-white d-flex flex-column align-items-center">
|
||||||
<Box>
|
<Box>
|
||||||
<Box className="text-center">
|
{partAResults.length > 0 && (
|
||||||
{partAImageIndex + 1 + "/" + partAResults.length}
|
<>
|
||||||
</Box>
|
<Box className="text-center">
|
||||||
<Button
|
{partAImageIndex + 1 + "/" + partAResults.length}
|
||||||
className="bg-primary text-white m-3"
|
</Box>
|
||||||
onClick={() => {
|
<Button
|
||||||
if (partAImageIndex !== 0) {
|
className="bg-primary text-white m-3"
|
||||||
setPartAImageIndex((prev) => prev - 1);
|
onClick={() => {
|
||||||
}
|
if (partAImageIndex !== 0) {
|
||||||
}}
|
setPartAImageIndex((prev) => prev - 1);
|
||||||
>
|
}
|
||||||
<ArrowBackIcon />
|
}}
|
||||||
</Button>
|
>
|
||||||
<Button
|
<ArrowBackIcon />
|
||||||
className="bg-primary text-white m-3"
|
</Button>
|
||||||
onClick={() => {
|
<Button
|
||||||
console.log("partAimage Index === ", partAImageIndex);
|
className="bg-primary text-white m-3"
|
||||||
if (partAImageIndex < partAResults.length - 1) {
|
onClick={() => {
|
||||||
setPartAImageIndex((prev) => prev + 1);
|
console.log("partAimage Index === ", partAImageIndex);
|
||||||
}
|
if (partAImageIndex < partAResults.length - 1) {
|
||||||
}}
|
setPartAImageIndex((prev) => prev + 1);
|
||||||
>
|
}
|
||||||
<ArrowForwardIcon />
|
}}
|
||||||
</Button>
|
>
|
||||||
|
<ArrowForwardIcon />
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
{partAResults.length > 0 && (
|
{partAResults.length > 0 && (
|
||||||
<img
|
<img
|
||||||
src={`https://docs.exampaper.vidh.ai/${partAResults[partAImageIndex]?.s3_path}`}
|
alt="Part-A Image"
|
||||||
|
src={`https://docs.exampaper.vidh.ai/${partAImageS3Path}`}
|
||||||
width={"900px"}
|
width={"900px"}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Box className="rounded bg-white d-flex flex-column align-items-center">
|
<Box className="rounded bg-white d-flex flex-column align-items-center">
|
||||||
<Box>
|
<Box>
|
||||||
<Box className="text-center">
|
{partCResults.length > 0 && (
|
||||||
{partCImageIndex + 1 + "/" + partCResults.length}
|
<>
|
||||||
</Box>
|
<Box className="text-center">
|
||||||
<Button
|
{partCImageIndex + 1 + "/" + partCResults.length}
|
||||||
className="bg-primary text-white m-3"
|
</Box>
|
||||||
onClick={() => {
|
<Button
|
||||||
if (partCImageIndex !== 0) {
|
className="bg-primary text-white m-3"
|
||||||
setPartCImageIndex((prev) => prev - 1);
|
onClick={() => {
|
||||||
}
|
if (partCImageIndex !== 0) {
|
||||||
}}
|
setPartCImageIndex((prev) => prev - 1);
|
||||||
>
|
}
|
||||||
<ArrowBackIcon />
|
}}
|
||||||
</Button>
|
>
|
||||||
<Button
|
<ArrowBackIcon />
|
||||||
className="bg-primary text-white m-3"
|
</Button>
|
||||||
onClick={() => {
|
<Button
|
||||||
console.log("partCimage Index === ", partCImageIndex);
|
className="bg-primary text-white m-3"
|
||||||
if (partCImageIndex < partCResults.length - 1) {
|
onClick={() => {
|
||||||
setPartCImageIndex((prev) => prev + 1);
|
console.log("partCimage Index === ", partCImageIndex);
|
||||||
}
|
if (partCImageIndex < partCResults.length - 1) {
|
||||||
}}
|
setPartCImageIndex((prev) => prev + 1);
|
||||||
>
|
}
|
||||||
<ArrowForwardIcon />
|
}}
|
||||||
</Button>
|
>
|
||||||
|
<ArrowForwardIcon />
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
{partCResults.length > 0 && (
|
{partCResults.length > 0 && (
|
||||||
<img
|
<img
|
||||||
|
alt="Part-C Image"
|
||||||
src={`https://docs.exampaper.vidh.ai/${partCResults[partCImageIndex]?.s3_path}`}
|
src={`https://docs.exampaper.vidh.ai/${partCResults[partCImageIndex]?.s3_path}`}
|
||||||
width={"900px"}
|
width={"900px"}
|
||||||
/>
|
/>
|
||||||
|
|
@ -269,36 +431,39 @@ export default function DummyDuplicatesPreview({
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</div>
|
</div>
|
||||||
<Box className="d-flex justify-content-center align-items-center gap-3 m-3">
|
{partAResults.length > 0 && (
|
||||||
<TextInputField
|
<Box className="d-flex justify-content-center align-items-center gap-3 m-3">
|
||||||
value={inputBarcode}
|
<TextInputField
|
||||||
setValue={setInputBarcode}
|
value={inputBarcode}
|
||||||
placeholder={"Barcode"}
|
setValue={setInputBarcode}
|
||||||
/>
|
placeholder={"Barcode"}
|
||||||
<TextInputField
|
/>
|
||||||
value={inputSerialNo}
|
<TextInputField
|
||||||
setValue={setInputSerialNo}
|
value={inputSerialNo}
|
||||||
placeholder={"Serial No"}
|
setValue={setInputSerialNo}
|
||||||
/>
|
placeholder={"Serial No"}
|
||||||
<TextInputField
|
/>
|
||||||
value={inputSubjectCode}
|
<TextInputField
|
||||||
setValue={setInputSubjectCode}
|
value={inputSubjectCode}
|
||||||
placeholder={"Subject Code"}
|
setValue={setInputSubjectCode}
|
||||||
/>
|
placeholder={"Subject Code"}
|
||||||
<TextInputField
|
/>
|
||||||
value={inputRegisterNumber}
|
<TextInputField
|
||||||
setValue={setInputRegisterNumber}
|
value={inputRegisterNumber}
|
||||||
placeholder={"Register Number"}
|
setValue={setInputRegisterNumber}
|
||||||
/>
|
placeholder={"Register Number"}
|
||||||
<Button
|
/>
|
||||||
className="bg-primary rounded text-white px-5"
|
<Button
|
||||||
style={{ height: "50px" }}
|
className="bg-primary rounded text-white px-5"
|
||||||
>
|
style={{ height: "50px" }}
|
||||||
Update
|
onClick={updateDuplicateRecordData}
|
||||||
</Button>
|
>
|
||||||
</Box>
|
Update
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
</Dialog>
|
</Dialog>
|
||||||
{isLoading && <LoadingContainer />}
|
{isLoading && <LoadingContainer loadingText={loadingText} />}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,12 @@ const LoadingContainer = ({ loadingText }) => {
|
||||||
className="d-flex justify-content-center align-items-center"
|
className="d-flex justify-content-center align-items-center"
|
||||||
style={LoadingContainerStyle}
|
style={LoadingContainerStyle}
|
||||||
>
|
>
|
||||||
<Spinner animation="border" variant="light" role="status">
|
<Box className="d-flex flex-column align-items-center justify-content-center gap-2">
|
||||||
<span className="visually-hidden">Loading...</span>
|
<h6 className="text-white">{loadingText}</h6>
|
||||||
</Spinner>
|
<Spinner animation="border" variant="light" role="status">
|
||||||
|
<span className="visually-hidden">Loading...</span>
|
||||||
|
</Spinner>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue