diff --git a/src/components/CapstoneAdviser/AdviserDashboard.jsx b/src/components/CapstoneAdviser/AdviserDashboard.jsx
index cbc23f7..8638223 100644
--- a/src/components/CapstoneAdviser/AdviserDashboard.jsx
+++ b/src/components/CapstoneAdviser/AdviserDashboard.jsx
@@ -3,6 +3,7 @@ import { useNavigate, useLocation, useParams } from "react-router-dom";
import Sidebar from "../Sidebar";
import { useAuthGuard } from "../../components/hooks/useAuthGuard";
import AdviserTeamSummary from "./AdviserTeamsSummary";
+import AdviserTermsOfService from "./AdviserTermsOfService";
import AdviserTask from "./AdviserTask/AdviserTask";
import AdviserOralDef from "./AdviserTask/AdviserOralDef";
import AdviserFinalDef from "./AdviserTask/AdviserFinalDef";
@@ -361,6 +362,8 @@ const AdviserDashboard = ({ activePageFromHeader }) => {
switch (activePage) {
case "TeamsSummary":
return ;
+ case "TermsOfService":
+ return ;
case "Tasks":
return ;
case "Oral Defense":
diff --git a/src/components/CapstoneAdviser/AdviserTermsOfService.jsx b/src/components/CapstoneAdviser/AdviserTermsOfService.jsx
new file mode 100644
index 0000000..c948888
--- /dev/null
+++ b/src/components/CapstoneAdviser/AdviserTermsOfService.jsx
@@ -0,0 +1,149 @@
+// src/pages/Adviser/TermsOfService.jsx
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import Swal from "sweetalert2";
+import { supabase } from "../../supabaseClient";
+import Header from "../Header";
+import Footer from "../Footer";
+
+const AdviserTermsOfService = () => {
+ const [choice, setChoice] = useState("");
+ const navigate = useNavigate();
+
+ // check if logged in
+ useEffect(() => {
+ const storedUser = localStorage.getItem("customUser");
+ if (!storedUser) {
+ navigate("/Signin");
+ }
+ }, [navigate]);
+
+ const handleSave = async () => {
+ const storedUser = localStorage.getItem("customUser");
+ if (!storedUser) {
+ navigate("/Signin");
+ return;
+ }
+
+ const user = JSON.parse(storedUser);
+
+ if (choice === "accept") {
+ Swal.fire({
+ icon: "success",
+ title: "Terms Accepted",
+ text: "Thank you for accepting the terms of service.",
+ timer: 1500,
+ showConfirmButton: false,
+ });
+
+ // OPTIONAL: Update Supabase record (if you track agreement)
+ await supabase
+ .from("user_credentials")
+ .update({ terms_accepted: true })
+ .eq("id", user.id);
+
+ navigate("/Adviser/Dashboard");
+ }
+ else if (choice === "decline") {
+ Swal.fire({
+ icon: "warning",
+ title: "Terms Declined",
+ text: "You must accept the Terms of Service to continue.",
+ timer: 1500,
+ showConfirmButton: false,
+ });
+
+ // log out
+ localStorage.removeItem("customUser");
+ localStorage.removeItem("user_id");
+ navigate("/Signin", { replace: true });
+ }
+ else {
+ Swal.fire({
+ icon: "info",
+ title: "No Selection",
+ text: "Please select Accept or Decline before saving.",
+ });
+ }
+ };
+
+ return (
+
+
+
+
+
+
+ Terms of Service
+
+
+
+ {/* ✳️ Your terms content here */}
+
+ Welcome to the TaskSphere IT platform. By using this system, you
+ agree to comply with the institutional guidelines for managing,
+ evaluating, and monitoring IT Capstone projects.
+
+
+ Advisers are expected to uphold academic integrity, maintain
+ confidentiality of student works, and ensure fair evaluation
+ across all teams.
+
+
+ Any misuse of this system, unauthorized sharing of data, or
+ violation of confidentiality policies may result in account
+ suspension or disciplinary action.
+
+
+ Continued use of the platform signifies your acceptance of these
+ terms and all future updates communicated through official
+ channels.
+
+
+ Please read carefully and select whether you accept or decline the
+ Terms of Service below.
+