-
-
-
- | Name |
- Email |
- Role |
- Status |
- Actions |
-
-
-
+
+
+
+ Name
+ Email
+ Role
+ Status
+ Actions
+
+
+
{isLoading ? (
Array.from({ length: 3 }).map((_, i) => (
-
- |
- |
- |
- |
- |
-
+
+
+
+
+
+
+
+
+
))
) : (
users.map((user) => {
const deleteBlockReason = getDeleteBlockReason(user);
return (
-
- | {user.name} |
- {user.email} |
- {user.type || "faculty"} |
-
+
+ {user.name}
+ {user.email}
+ {user.type || "faculty"}
+
Active
- |
-
+
+
- |
-
+
+
);
})
)}
-
-
+
+
{!isLoading && users.length === 0 && (
diff --git a/src/pages/admin/approvals/index.tsx b/src/pages/admin/approvals/index.tsx
index 149404c..8edb59d 100644
--- a/src/pages/admin/approvals/index.tsx
+++ b/src/pages/admin/approvals/index.tsx
@@ -5,6 +5,14 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { SidebarProvider } from "@/components/ui/sidebar";
import { Badge } from "@/components/ui/badge";
import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
import getFromDatabase from "@/tools/database/getFromDatabase";
import updateDatabase from "@/tools/database/updateDatabase";
import getFileFromFolder from "@/tools/buckets/getFileFromFolder";
@@ -101,42 +109,43 @@ export default function AdminApprovalsPage() {
Faculty Submissions
-
-
-
- | Faculty Name |
- Document Type |
- File Name |
- Date Submitted |
- Status |
- Actions |
-
-
-
+
+
+
+ Faculty Name
+ Document Type
+ File Name
+ Date Submitted
+ Status
+ Actions
+
+
+
{isLoading ? (
Array.from({ length: 5 }).map((_, i) => (
-
- |
- |
- |
- |
- |
- |
-
+
+
+
+
+
+
+
+
+
+
))
) : (
submissions.map((submission) => (
-
- | {submission.facultyName} |
- {submission.document_type} |
- {submission.file_name} |
-
+ {submission.facultyName}
+ {submission.document_type}
+ {submission.file_name}
+
{new Date(submission.submitted_at).toLocaleDateString()}
- |
-
+
+
{submission.status}
- |
-
+
+
{submission.status === "Pending" && (
<>
- |
-
+
+
))
)}
-
-
+
+
{!isLoading && submissions.length === 0 && (
No submissions found.
diff --git a/src/pages/admin/audit-logs/index.tsx b/src/pages/admin/audit-logs/index.tsx
index fc258d4..523fad7 100644
--- a/src/pages/admin/audit-logs/index.tsx
+++ b/src/pages/admin/audit-logs/index.tsx
@@ -12,6 +12,14 @@ import {
SelectValue,
} from "@/components/ui/select";
import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
import getFromDatabase from "@/tools/database/getFromDatabase";
interface AuditLog {
@@ -133,39 +141,39 @@ export default function AdminAuditLogsPage() {
-
-
-
- | Timestamp |
- User |
- Action |
- Details |
-
-
-
+
+
+
+ Timestamp
+ User
+ Action
+ Details
+
+
+
{isLoading ? (
Array.from({ length: 5 }).map((_, i) => (
-
- |
- |
- |
- |
-
+
+
+
+
+
+
))
) : (
filteredLogs.map((log) => (
-
- |
+
+
{new Date(log.timestamp).toLocaleString()}
- |
- {log.user_email} |
- {log.action} |
- {log.details} |
-
+
+ {log.user_email}
+ {log.action}
+ {log.details}
+
))
)}
-
-
+
+
{!isLoading && filteredLogs.length === 0 && (
diff --git a/src/pages/admin/dashboard/index.tsx b/src/pages/admin/dashboard/index.tsx
index 222acc6..943114f 100644
--- a/src/pages/admin/dashboard/index.tsx
+++ b/src/pages/admin/dashboard/index.tsx
@@ -205,7 +205,7 @@ export default function AdminDashboard() {
Active Sessions (24h)
- Recent seeded login activity
+ Recent seeded login activity
{isLoading ? : activeSessions}
@@ -218,7 +218,7 @@ export default function AdminDashboard() {
Pending Approvals
- Credentials waiting for review
+ Credentials waiting for review
{isLoading ? : pendingApprovals}
@@ -276,7 +276,11 @@ export default function AdminDashboard() {
))}
-
+