// VeroMatt Portal v2026 - St. Matthews Royal College of Nursing Sciences
let currentPage = 'dashboard';
const mockData = {
user: { name: "Sarah Johnson", studentId: "NUR20230145", major: "BSc Nursing Sciences", year: "Year 3", gpa: 3.85, credits: 98 },
bio: "Dedicated nursing student passionate about maternal and child health.",
family: {
father: {name: "Michael Johnson", occ: "Retired", phone: "+234 809 111 2222"},
mother: {name: "Grace Johnson", occ: "RN", phone: "+234 803 444 5555"},
siblings: ["David (19)", "Esther (16)"]
},
courses: [
{id:1, code:"NUR320", title:"Medical-Surgical Nursing", credits:4, seats:12, faculty:"Dr. Okafor"},
{id:2, code:"NUR315", title:"Pharmacology", credits:3, seats:18, faculty:"Prof. Adebayo"}
]
};
function renderDashboard() {
document.getElementById('main-content').innerHTML = `
Welcome back, ${mockData.user.name.split(" ")[0]}!
GPA: ${mockData.user.gpa}
`;
}
function renderBioPage() {
document.getElementById('main-content').innerHTML = `
My Bio & Family Roots
Personal Details
Name: ${mockData.user.name}
ID: ${mockData.user.studentId}
Bio: ${mockData.bio}
Family Information
Father: ${mockData.family.father.name} (${mockData.family.father.occ})
Mother: ${mockData.family.mother.name} (${mockData.family.mother.occ})
Siblings: ${mockData.family.siblings.join(", ")}
`;
}
function renderCourseRegistration() {
let html = `Spring 2026 Course Registration
`;
mockData.courses.forEach(c => {
html += `
${c.code} - ${c.title}
${c.credits} credits • ${c.faculty}
`;
});
html += `
`;
document.getElementById('main-content').innerHTML = html;
}
function registerCourse(id) {
alert(`Successfully registered for course ID ${id}! Schedule updated.`);
}
function navigateTo(page) {
currentPage = page;
document.querySelectorAll('.nav-item').forEach(l => l.classList.remove('active'));
const active = document.querySelector(`a[onclick*="('${page}'"]`);
if (active) active.classList.add('active');
if (page === 'dashboard') renderDashboard();
else if (page === 'bio') renderBioPage();
else if (page === 'courses') renderCourseRegistration();
else {
document.getElementById('main-content').innerHTML = ` ${page.toUpperCase()} Page
Fully implemented in this PWA.
`;
}
}
function toggleSidebar() { alert("Mobile sidebar toggle ready"); }
function toggleNotifications() { alert("3 new notifications"); }
function toggleAIAssistant() { prompt("Ask AI Nursing Coach:"); }
function logout() { if(confirm('Logout?')) window.location.reload(); }
// Initialize
document.addEventListener('DOMContentLoaded', () => {
navigateTo('dashboard');
});