Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd5d46c58d | |||
| 64d720143e | |||
| 69d6d5a8f3 | |||
| 3fc4100a72 | |||
| ddb87d6789 | |||
| d0686b67aa |
@@ -8,7 +8,8 @@
|
||||
"start": "node src/app.js",
|
||||
"prisma": "prisma",
|
||||
"migrate": "npx prisma migrate dev",
|
||||
"generate": "npx prisma generate"
|
||||
"generate": "npx prisma generate",
|
||||
"create-user": "node src/utils/createUser.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
+5
-1
@@ -14,11 +14,15 @@ import inquiryRoutes from "./routes/inquiry.routes.js";
|
||||
import academicsResearchRoutes from "./routes/academicsResearch.routes.js";
|
||||
import emailConfigRoutes from "./routes/emailConfig.routes.js";
|
||||
import newsMediaRoutes from "./routes/newsMedia.routes.js";
|
||||
import importRoutes from "./routes/importRoutes.js";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(express.json({ limit: "50mb" }));
|
||||
app.use(express.urlencoded({ limit: "50mb", extended: true }));
|
||||
|
||||
const allowedOrigins = process.env.CORS_ALLOWED_ORIGINS
|
||||
? process.env.CORS_ALLOWED_ORIGINS.split(" ")
|
||||
: ["http://localhost:3001"];
|
||||
@@ -35,7 +39,6 @@ const corsOptions = {
|
||||
allowedHeaders: "*",
|
||||
};
|
||||
|
||||
app.use(express.json());
|
||||
app.use(cors(corsOptions));
|
||||
|
||||
app.use("/api/departments", departmentRoutes);
|
||||
@@ -51,6 +54,7 @@ app.use("/api/inquiry", inquiryRoutes);
|
||||
app.use("/api/academics", academicsResearchRoutes);
|
||||
app.use("/api/email", emailConfigRoutes);
|
||||
app.use("/api/newsMedia", newsMediaRoutes);
|
||||
app.use("/api/import", importRoutes);
|
||||
|
||||
const PORT = process.env.PORT || 3000;
|
||||
app.listen(PORT, () => {
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
export const bulkImportExcelData = async (req, res) => {
|
||||
try {
|
||||
const {
|
||||
departments,
|
||||
doctors,
|
||||
timings,
|
||||
careers,
|
||||
inquiries,
|
||||
academics,
|
||||
appointments,
|
||||
candidates,
|
||||
news,
|
||||
} = req.body;
|
||||
|
||||
console.log("🚀 Starting Robust Data Import...");
|
||||
|
||||
// 1. DEPARTMENTS
|
||||
if (departments) {
|
||||
for (const row of departments) {
|
||||
if (!row.SL_NO) continue;
|
||||
await prisma.department.upsert({
|
||||
where: { departmentId: row.SL_NO.toString() },
|
||||
update: {
|
||||
name: row.Department?.toString(),
|
||||
para1: row.para1?.toString() || null,
|
||||
para2: row.para2?.toString() || null,
|
||||
para3: row.para3?.toString() || null,
|
||||
facilities: row.facilities?.toString() || null,
|
||||
services: row.services?.toString() || null,
|
||||
},
|
||||
create: {
|
||||
departmentId: row.SL_NO.toString(),
|
||||
name: row.Department?.toString(),
|
||||
para1: row.para1?.toString() || null,
|
||||
para2: row.para2?.toString() || null,
|
||||
para3: row.para3?.toString() || null,
|
||||
facilities: row.facilities?.toString() || null,
|
||||
services: row.services?.toString() || null,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 2. DOCTORS
|
||||
if (doctors) {
|
||||
for (const row of doctors) {
|
||||
if (!row.GG_ID) continue;
|
||||
const doctor = await prisma.doctor.upsert({
|
||||
where: { doctorId: row.GG_ID.toString() },
|
||||
update: {
|
||||
name: row.Name?.toString(),
|
||||
designation: row.Designation?.toString() || null,
|
||||
workingStatus: row["Working Status"]?.toString() || null,
|
||||
qualification: row.Qualification?.toString() || null,
|
||||
},
|
||||
create: {
|
||||
doctorId: row.GG_ID.toString(),
|
||||
name: row.Name?.toString(),
|
||||
designation: row.Designation?.toString() || null,
|
||||
workingStatus: row["Working Status"]?.toString() || null,
|
||||
qualification: row.Qualification?.toString() || null,
|
||||
},
|
||||
});
|
||||
|
||||
if (row.Department_ID) {
|
||||
const dept = await prisma.department.findUnique({
|
||||
where: { departmentId: row.Department_ID.toString() },
|
||||
});
|
||||
if (dept) {
|
||||
await prisma.doctorDepartment.upsert({
|
||||
where: {
|
||||
doctorId_departmentId: {
|
||||
doctorId: doctor.id,
|
||||
departmentId: dept.id,
|
||||
},
|
||||
},
|
||||
update: {},
|
||||
create: {
|
||||
doctorId: doctor.id,
|
||||
departmentId: dept.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 3. TIMINGS
|
||||
if (timings) {
|
||||
for (const row of timings) {
|
||||
if (!row.GG_ID) continue;
|
||||
const doctor = await prisma.doctor.findUnique({
|
||||
where: { doctorId: row.GG_ID.toString() },
|
||||
include: { departments: true },
|
||||
});
|
||||
|
||||
if (doctor && doctor.departments.length > 0) {
|
||||
const doctorDeptId = doctor.departments[0].id;
|
||||
const rawAdd = row.Additional?.toString() || "";
|
||||
const rawMon = row.Monday?.toString() || "";
|
||||
const isAppt = (val) => /appointment|basis|on call/i.test(val);
|
||||
|
||||
let finalAdd = rawAdd;
|
||||
if (!finalAdd && isAppt(rawMon)) finalAdd = rawMon;
|
||||
|
||||
await prisma.doctorTiming.upsert({
|
||||
where: { doctorDepartmentId: doctorDeptId },
|
||||
update: {
|
||||
monday: isAppt(rawMon) ? null : row.Monday?.toString() || null,
|
||||
tuesday: row.Tuesday?.toString() || null,
|
||||
wednesday: row.Wednesday?.toString() || null,
|
||||
thursday: row.Thursday?.toString() || null,
|
||||
friday: row.Friday?.toString() || null,
|
||||
saturday: row.Saturday?.toString() || null,
|
||||
sunday: row.Sunday?.toString() || null,
|
||||
additional: finalAdd || null,
|
||||
},
|
||||
create: {
|
||||
doctorDepartmentId: doctorDeptId,
|
||||
monday: isAppt(rawMon) ? null : row.Monday?.toString() || null,
|
||||
tuesday: row.Tuesday?.toString() || null,
|
||||
wednesday: row.Wednesday || null,
|
||||
thursday: row.Thursday || null,
|
||||
friday: row.Friday || null,
|
||||
saturday: row.Saturday || null,
|
||||
sunday: row.Sunday || null,
|
||||
additional: finalAdd || null,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4. CAREERS
|
||||
if (careers) {
|
||||
for (const row of careers) {
|
||||
if (!row.Post) continue;
|
||||
const cId = row.Id ? parseInt(row.Id) : undefined;
|
||||
const data = {
|
||||
post: row.Post?.toString(),
|
||||
designation: row.Designation?.toString() || null,
|
||||
qualification: row.Qualification?.toString() || null,
|
||||
experienceNeed: row.ExperienceNeed?.toString() || null,
|
||||
email: row.HiringEmail?.toString() || null,
|
||||
number: row.Number?.toString() || null,
|
||||
status: row.Status?.toString() || "new",
|
||||
};
|
||||
if (cId) {
|
||||
await prisma.career.upsert({
|
||||
where: { id: cId },
|
||||
update: data,
|
||||
create: { ...data, id: cId },
|
||||
});
|
||||
} else {
|
||||
await prisma.career.create({ data });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 5. INQUIRIES
|
||||
if (inquiries) {
|
||||
for (const row of inquiries) {
|
||||
if (!row.FullName) continue;
|
||||
await prisma.inquiry.create({
|
||||
data: {
|
||||
fullName: row.FullName.toString(),
|
||||
number: row.Number?.toString() || "",
|
||||
emailId: row.EmailId?.toString() || null,
|
||||
subject: row.Subject?.toString() || null,
|
||||
message: row.Message?.toString() || null,
|
||||
createdAt: row.Date ? new Date(row.Date) : new Date(),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 6. ACADEMICS & RESEARCH (FIXED HERE)
|
||||
if (academics) {
|
||||
for (const row of academics) {
|
||||
if (!row.FullName) continue;
|
||||
await prisma.academicsResearch.create({
|
||||
data: {
|
||||
fullName: row.FullName.toString(),
|
||||
number: row.Number?.toString() || "",
|
||||
emailId: row.EmailId?.toString() || null,
|
||||
subject: row.Subject?.toString() || null, // Force String
|
||||
courseName: row["Course Name"]?.toString() || null,
|
||||
message: row.Message?.toString() || null,
|
||||
createdAt: row.Date ? new Date(row.Date) : new Date(),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 7. APPOINTMENTS
|
||||
if (appointments) {
|
||||
for (const row of appointments) {
|
||||
if (!row.FullName) continue;
|
||||
const docId = row.Doctor?.toString();
|
||||
const deptId = row["Department Id"]?.toString();
|
||||
if (docId && deptId) {
|
||||
await prisma.appointment
|
||||
.create({
|
||||
data: {
|
||||
name: row.FullName.toString(),
|
||||
mobileNumber: row.Number?.toString() || "",
|
||||
email: row["Email Id"]?.toString() || null,
|
||||
message: row.Message?.toString() || null,
|
||||
date: row.Date ? new Date(row.Date) : new Date(),
|
||||
doctorId: docId,
|
||||
departmentId: deptId,
|
||||
},
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 8. CANDIDATES
|
||||
if (candidates) {
|
||||
for (const row of candidates) {
|
||||
if (!row.FullName || !row.CareerId) continue;
|
||||
await prisma.candidate
|
||||
.create({
|
||||
data: {
|
||||
fullName: row.FullName.toString(),
|
||||
mobile: row.Number?.toString() || "",
|
||||
email: row.EmailId?.toString() || "",
|
||||
subject: row.Subject?.toString() || "",
|
||||
coverLetter: row["Cover Letter"]?.toString() || "",
|
||||
careerId: parseInt(row.CareerId),
|
||||
createdAt: row.Date ? new Date(row.Date) : new Date(),
|
||||
},
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
// 9. NEWS & MEDIA
|
||||
if (news) {
|
||||
for (const row of news) {
|
||||
if (!row.Headline) continue;
|
||||
await prisma.newsMedia.create({
|
||||
data: {
|
||||
headline: row.Headline.toString(),
|
||||
content: row.Content?.toString() || null,
|
||||
firstPara: row.FirstPara?.toString() || null,
|
||||
secondPara: row.SecondPara?.toString() || null,
|
||||
author: row.Author?.toString() || null,
|
||||
date: row.Date ? new Date(row.Date) : null,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
res
|
||||
.status(200)
|
||||
.json({ success: true, message: "✅ Import completed successfully!" });
|
||||
} catch (error) {
|
||||
console.error("❌ Bulk Import Error:", error);
|
||||
res.status(500).json({ success: false, error: error.message });
|
||||
}
|
||||
};
|
||||
@@ -1,9 +1,8 @@
|
||||
import express from "express";
|
||||
import {register, login} from "../controllers/auth.controller.js";
|
||||
import { login } from "../controllers/auth.controller.js";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.post("/register", register);
|
||||
router.post("/login", login);
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import express from "express";
|
||||
import { bulkImportExcelData } from "../controllers/importController.js";
|
||||
import jwtAuthMiddleware from "../middleware/auth.js";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.post("/bulk", jwtAuthMiddleware, bulkImportExcelData);
|
||||
|
||||
export default router;
|
||||
@@ -0,0 +1,47 @@
|
||||
import prisma from "../prisma/client.js";
|
||||
import { hashPassword } from "./password.js";
|
||||
async function main() {
|
||||
const username = process.argv[2];
|
||||
const password = process.argv[3];
|
||||
const role = process.argv[4] || "admin";
|
||||
|
||||
if (!username || !password) {
|
||||
console.log(
|
||||
"Usage: node scripts/createUser.js <username> <password> [role]",
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const existingUser = await prisma.user.findUnique({
|
||||
where: { username },
|
||||
});
|
||||
|
||||
if (existingUser) {
|
||||
console.log("User already exists");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const hashedPassword = await hashPassword(password);
|
||||
|
||||
const user = await prisma.user.create({
|
||||
data: {
|
||||
username,
|
||||
password: hashedPassword,
|
||||
role,
|
||||
},
|
||||
});
|
||||
|
||||
console.log("User created:", {
|
||||
id: user.id,
|
||||
username: user.username,
|
||||
role: user.role,
|
||||
});
|
||||
}
|
||||
|
||||
main()
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
context: .
|
||||
dockerfile: docker/dev/Dockerfile.frontend
|
||||
ports:
|
||||
- "5173:5173"
|
||||
- "3000:3000"
|
||||
env_file:
|
||||
- ./frontend/.env
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -11,7 +11,9 @@ COPY ./frontend .
|
||||
# Build the app
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 5173
|
||||
RUN npm install -g serve
|
||||
|
||||
# Serve built app (no hot reload)
|
||||
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0"]
|
||||
EXPOSE 3000
|
||||
|
||||
# Serve built app
|
||||
CMD ["serve", "-s", "dist"]
|
||||
@@ -21,4 +21,4 @@ EXPOSE 5000
|
||||
ENTRYPOINT [ "entrypoint.sh" ]
|
||||
|
||||
# This '$@' will be replaced by the CMD
|
||||
CMD ["npm", "run", "dev"]
|
||||
CMD ["npm", "start"]
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>frontend</title>
|
||||
<title>GG Admin Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -21,6 +21,7 @@ import InquiryPage from "./pages/inquiry";
|
||||
import AcademicsPage from "./pages/Academics";
|
||||
import NewsPage from "./pages/newsMedia";
|
||||
import BlogDetail from "./pages/BlogDetails";
|
||||
import ImportData from "./pages/ImportData";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
@@ -46,6 +47,7 @@ export default function App() {
|
||||
<Route path="/inquiry" element={<InquiryPage />} />
|
||||
<Route path="/academics" element={<AcademicsPage />} />
|
||||
<Route path="/news" element={<NewsPage />} />
|
||||
<Route path="/import" element={<ImportData />} />
|
||||
</Route>
|
||||
</Route>
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
import React, { useState, ChangeEvent } from "react";
|
||||
import * as XLSX from "xlsx";
|
||||
import apiClient from "@/api/client";
|
||||
|
||||
interface ImportPayload {
|
||||
departments: any[];
|
||||
doctors: any[];
|
||||
timings: any[];
|
||||
careers: any[];
|
||||
inquiries: any[];
|
||||
academics: any[];
|
||||
appointments: any[];
|
||||
candidates: any[];
|
||||
news: any[];
|
||||
}
|
||||
|
||||
const ImportData: React.FC = () => {
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [status, setStatus] = useState<string>("");
|
||||
|
||||
const handleFileUpload = (e: ChangeEvent<HTMLInputElement>) => {
|
||||
const file = e.target.files?.[0];
|
||||
if (!file) return;
|
||||
|
||||
setLoading(true);
|
||||
setStatus("Reading Excel file...");
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = async (evt: ProgressEvent<FileReader>) => {
|
||||
try {
|
||||
const bstr = evt.target?.result;
|
||||
if (!bstr) throw new Error("Failed to read file content.");
|
||||
|
||||
const wb = XLSX.read(bstr, { type: "binary" });
|
||||
|
||||
const payload: ImportPayload = {
|
||||
departments: XLSX.utils.sheet_to_json(wb.Sheets["Departments"]) || [],
|
||||
doctors: XLSX.utils.sheet_to_json(wb.Sheets["Doctors"]) || [],
|
||||
timings: XLSX.utils.sheet_to_json(wb.Sheets["Doctor Timings"]) || [],
|
||||
careers: XLSX.utils.sheet_to_json(wb.Sheets["Careers"]) || [],
|
||||
inquiries: XLSX.utils.sheet_to_json(wb.Sheets["Inquiry"]) || [],
|
||||
academics:
|
||||
XLSX.utils.sheet_to_json(wb.Sheets["Academics & Research"]) || [],
|
||||
appointments:
|
||||
XLSX.utils.sheet_to_json(wb.Sheets["Appointment"]) || [],
|
||||
candidates: XLSX.utils.sheet_to_json(wb.Sheets["Candidate"]) || [],
|
||||
news: XLSX.utils.sheet_to_json(wb.Sheets["News & Media"]) || [],
|
||||
};
|
||||
|
||||
setStatus("Uploading data to server (this may take a moment)...");
|
||||
|
||||
const response = await apiClient.post("/import/bulk", payload);
|
||||
|
||||
if (response.status === 200) {
|
||||
setStatus("✅ ALL DATA IMPORT COMPLETED SUCCESSFULLY!");
|
||||
} else {
|
||||
setStatus("❌ Server responded with an error.");
|
||||
}
|
||||
} catch (err: any) {
|
||||
console.error("Import Error:", err);
|
||||
const errorMsg = err.response?.data?.error || "Error processing file.";
|
||||
setStatus(`❌ ${errorMsg}`);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
if (e.target) e.target.value = "";
|
||||
}
|
||||
};
|
||||
|
||||
reader.onerror = () => {
|
||||
setStatus("❌ Failed to read the file.");
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
reader.readAsBinaryString(file);
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={containerStyle}>
|
||||
<div style={cardStyle}>
|
||||
<h2 style={{ color: "#333", marginBottom: "10px" }}>
|
||||
Database Bulk Import
|
||||
</h2>
|
||||
<p style={{ color: "#666", marginBottom: "30px" }}>
|
||||
Select the <b>gg_hospital.xlsx</b> file. This will update all tables.
|
||||
</p>
|
||||
|
||||
<div style={{ marginBottom: "20px" }}>
|
||||
<input
|
||||
type="file"
|
||||
accept=".xlsx, .xls"
|
||||
onChange={handleFileUpload}
|
||||
id="excel-upload"
|
||||
style={{ display: "none" }}
|
||||
disabled={loading}
|
||||
/>
|
||||
<label
|
||||
htmlFor="excel-upload"
|
||||
style={{
|
||||
...buttonStyle,
|
||||
backgroundColor: loading ? "#a0aec0" : "#3182ce",
|
||||
cursor: loading ? "not-allowed" : "pointer",
|
||||
}}
|
||||
>
|
||||
{loading ? "⌛ Processing..." : "📂 Choose Excel File"}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{status && (
|
||||
<div
|
||||
style={{
|
||||
marginTop: "25px",
|
||||
padding: "15px",
|
||||
borderRadius: "8px",
|
||||
backgroundColor: status.includes("✅") ? "#f0fff4" : "#fff5f5",
|
||||
color: status.includes("✅") ? "#2f855a" : "#c53030",
|
||||
border: `1px solid ${status.includes("✅") ? "#c6f6d5" : "#fed7d7"}`,
|
||||
fontWeight: "500",
|
||||
whiteSpace: "pre-wrap",
|
||||
}}
|
||||
>
|
||||
{status}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const containerStyle: React.CSSProperties = {
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
minHeight: "80vh",
|
||||
backgroundColor: "#f7fafc",
|
||||
fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",
|
||||
};
|
||||
|
||||
const cardStyle: React.CSSProperties = {
|
||||
backgroundColor: "white",
|
||||
padding: "40px",
|
||||
borderRadius: "12px",
|
||||
boxShadow: "0 4px 6px rgba(0,0,0,0.1)",
|
||||
maxWidth: "500px",
|
||||
width: "100%",
|
||||
textAlign: "center",
|
||||
};
|
||||
|
||||
const buttonStyle: React.CSSProperties = {
|
||||
padding: "12px 24px",
|
||||
color: "white",
|
||||
borderRadius: "6px",
|
||||
fontSize: "16px",
|
||||
fontWeight: "bold",
|
||||
transition: "all 0.2s ease",
|
||||
display: "inline-block",
|
||||
};
|
||||
|
||||
export default ImportData;
|
||||
Reference in New Issue
Block a user