Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ff155e5
Create onboarding form configuration for admin
lavanyagarg112 Jul 8, 2025
2c1ff57
Add onboarding form for emplpoyee
lavanyagarg112 Jul 9, 2025
092c057
Handle options for onboarding form
lavanyagarg112 Jul 9, 2025
62cc7f8
Merge pull request #37 from lavanyagarg112/lavanya/onboarding-assessment
lavanyagarg112 Jul 9, 2025
5c8f67f
Add basic roadmap
lavanyagarg112 Jul 9, 2025
9a606a0
Add roadmap with direct url to the module
lavanyagarg112 Jul 9, 2025
c032abd
Update prompt name
lavanyagarg112 Jul 9, 2025
2b9a079
Merge pull request #38 from lavanyagarg112/lavanya/roadmap
lavanyagarg112 Jul 9, 2025
aff758c
Add basic settings
lavanyagarg112 Jul 9, 2025
d75419a
Update admin view to have member settings and move organisation setti…
lavanyagarg112 Jul 9, 2025
32943a5
Merge pull request #39 from lavanyagarg112/lavanya/membersettings
lavanyagarg112 Jul 9, 2025
ebfd90b
bsic roadmap
lavanyagarg112 Jul 9, 2025
0945511
Clean up code
lavanyagarg112 Jul 9, 2025
5264b9f
Merge pull request #40 from lavanyagarg112/lavanya/tags-refactor
lavanyagarg112 Jul 9, 2025
2328bdc
add frontend interface for history
lavanyagarg112 Jul 10, 2025
4500eb8
Add history for admins as well
lavanyagarg112 Jul 10, 2025
f463343
Update history timeline ui
lavanyagarg112 Jul 10, 2025
bc113e4
Fix endpoint
lavanyagarg112 Jul 10, 2025
acd41d2
Update history timeline ui
lavanyagarg112 Jul 10, 2025
7b73fe9
Add title and description for history page
lavanyagarg112 Jul 10, 2025
f64b2fd
Merge pull request #41 from lavanyagarg112/lavanya/history
lavanyagarg112 Jul 10, 2025
2379f4e
Create admin dashboard
lavanyagarg112 Jul 10, 2025
5ebfa20
Clean code
lavanyagarg112 Jul 10, 2025
ce8b89a
Basic user dashboard
lavanyagarg112 Jul 10, 2025
1169174
Add better user dashboard
lavanyagarg112 Jul 10, 2025
e2aa9f2
Update user dashboard ui
lavanyagarg112 Jul 10, 2025
20cd637
Merge pull request #42 from lavanyagarg112/lavanya/dashboard
lavanyagarg112 Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/courses/[courseId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function CourseLayout({

const response = {
id: courseId,
name: "Sample Course", // Replace with actual API call to fetch course details
name: "Sample Course",
};
return (
<div className="max-w-4xl mx-auto bg-white p-6 rounded shadow">
Expand Down
1 change: 0 additions & 1 deletion app/courses/[courseId]/modules/[moduleId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// app/courses/[courseId]/modules/[moduleId]/page.tsx
import ModuleDetail from "@/components/organisation/courses/ModuleDetail";
import { getAuthUser } from "@/lib/auth";

Expand Down
1 change: 0 additions & 1 deletion app/courses/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// app/courses/layout.tsx
import { ReactNode } from "react";

export default function CoursesLayout({ children }: { children: ReactNode }) {
Expand Down
1 change: 0 additions & 1 deletion app/courses/new/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// app/courses/new/page.tsx
import { redirect } from "next/navigation";
import { getAuthUser } from "@/lib/auth";
import CourseForm from "@/components/organisation/courses/CourseForm";
Expand Down
19 changes: 14 additions & 5 deletions app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
import { getAuthUser } from "@/lib/auth";
import UserDashboard from "@/components/dashboard/UserDashboard";
import AdminDashboard from "@/components/dashboard/AdminDashboard";

export default async function DashboardPage() {
const user = await getAuthUser();
if (!user || !user.hasCompletedOnboarding) {
return null;
}

const isAdmin = user?.organisation?.role === "admin";
if (isAdmin) {
return (
<div className="p-8">
<h1 className="text-3xl font-bold mb-4 text-purple-600">Dashboard</h1>
<AdminDashboard />
</div>
);
}
return (
<div>
<h1>Welcome, {user.firstname || user.email}</h1>
<p>Organisation: {user.organisation?.organisationname}</p>
<p>Role: {user.organisation.role}</p>
<p>Dashboard is currently in progress.</p>
<div className="p-8">
<h1 className="text-3xl font-bold mb-4 text-purple-600">Dashboard</h1>
<UserDashboard />
</div>
);
}
18 changes: 16 additions & 2 deletions app/history/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
"use client";

import { useAuth } from "@/context/AuthContext";
import HistoryComponent from "@/components/history/HistoryComponent";
export default function HistoryPage() {
const { user } = useAuth();

if (!user || !user.hasCompletedOnboarding) {
return null;
}
return (
<div>
<h1>History</h1>
<p>History page content goes here.</p>
<h1 className="text-3xl font-bold mb-6 text-purple-600">
Activity History
</h1>
<p className="mb-4 text-gray-600">
View your recent activity and changes made in the system.
</p>
<HistoryComponent />
</div>
);
}
Loading