From 57e25f663b36432d1b7b84b5e13da907245ed4ad Mon Sep 17 00:00:00 2001 From: Anushlinux Date: Thu, 3 Jul 2025 01:21:40 +0530 Subject: [PATCH] Feat: Refactored the whole ui --- apps/admin/app/(main)/jobs/page.tsx | 38 ++++++------- apps/admin/app/(main)/layout.tsx | 84 +++++++++-------------------- apps/admin/app/(main)/page.tsx | 59 ++++++++++---------- 3 files changed, 73 insertions(+), 108 deletions(-) diff --git a/apps/admin/app/(main)/jobs/page.tsx b/apps/admin/app/(main)/jobs/page.tsx index 964c1ff..ecf3b63 100644 --- a/apps/admin/app/(main)/jobs/page.tsx +++ b/apps/admin/app/(main)/jobs/page.tsx @@ -19,18 +19,18 @@ export default async function JobsListPage() { const jobsWithCompany = await getAllJobsWithCompany(); return ( -
-

All Jobs

-
+
+

All Jobs

+
{jobsWithCompany.length === 0 && ( -

No jobs found.

+

No jobs found.

)} {jobsWithCompany.map((job) => ( - + {job.title} - + {job.active ? 'Active' : 'Inactive'} @@ -46,23 +46,23 @@ export default async function JobsListPage() {
{job.company?.email}
-
-
Location: {job.location}
-
Salary: {job.salary}
-
Deadline: {job.applicationDeadline.toLocaleDateString()}
-
Min CGPA: {job.minCGPA}
-
Min SSC: {job.minSSC}
-
Min HSC: {job.minHSC}
-
Allow Dead KT: {job.allowDeadKT ? 'Yes' : 'No'}
-
Allow Live KT: {job.allowLiveKT ? 'Yes' : 'No'}
-
Job Link: {job.link}
-
Description: {job.description}
-
Created: {job.createdAt.toLocaleDateString()} | Updated: {job.updatedAt.toLocaleDateString()}
+
+
Location: {job.location}
+
Salary: {job.salary}
+
Deadline: {job.applicationDeadline.toLocaleDateString()}
+
Min CGPA: {job.minCGPA}
+
Min SSC: {job.minSSC}
+
Min HSC: {job.minHSC}
+
Dead KT: {job.allowDeadKT ? 'Yes' : 'No'}
+
Live KT: {job.allowLiveKT ? 'Yes' : 'No'}
+
Job Link: {job.link}
+
Description: {job.description}
+
Created: {job.createdAt.toLocaleDateString()} | Updated: {job.updatedAt.toLocaleDateString()}
- +
diff --git a/apps/admin/app/(main)/layout.tsx b/apps/admin/app/(main)/layout.tsx index acf3d42..63fc7cb 100644 --- a/apps/admin/app/(main)/layout.tsx +++ b/apps/admin/app/(main)/layout.tsx @@ -1,72 +1,36 @@ -import { - NavigationMenu, - NavigationMenuContent, - NavigationMenuItem, - NavigationMenuLink, - NavigationMenuList, - NavigationMenuTrigger, - navigationMenuTriggerStyle, -} from '@workspace/ui/components/navigation-menu'; import Link from 'next/link'; const navLinks = [ - { href: '/', label: 'Home', icon: '🏠' }, - { href: '/students', label: 'Students', icon: '🎓' }, - { href: '/jobs', label: 'Jobs', icon: '💼' }, + { href: '/', label: 'Dashboard' }, + { href: '/students', label: 'Students' }, + { href: '/jobs', label: 'Jobs' }, ]; export default function MainLayout({ children }: { children: React.ReactNode }) { - // Helper to check active link (client-side only) - const isActive = (href: string) => { - if (typeof window === 'undefined') return false; - if (href === '/') return window.location.pathname === '/'; - return window.location.pathname.startsWith(href); - }; - return ( -
- {/* Sidebar */} - - {/* Main content */} -
-
- - - {navLinks.map((link) => ( - - - {link.label} - - - ))} - - -
-
{children}
-
+ +
{children}
); } diff --git a/apps/admin/app/(main)/page.tsx b/apps/admin/app/(main)/page.tsx index 08b8992..e9ff9d3 100644 --- a/apps/admin/app/(main)/page.tsx +++ b/apps/admin/app/(main)/page.tsx @@ -73,15 +73,15 @@ export default async function DashboardPage() { const data = await getDashboardData(); return ( -
-
+
+
-

Companies Dashboard

-

Manage companies and their job openings.

+

Companies Dashboard

+

Manage companies and their job openings.

- + @@ -96,44 +96,45 @@ export default async function DashboardPage() {