updated terminology from "Coach" to "Counselor" across multiple files for consistency and clarity
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-06-15 16:04:44 +02:00
parent 5dd0ee28c0
commit 3d738bb14e
20 changed files with 51 additions and 46 deletions

View File

@ -35,6 +35,13 @@ export function canEdit() {
return canAccessWebsite();
}
/** User-facing label for the coach role (internal key remains `coach`). */
export function formatRoleLabel(role) {
if (role === 'coach') return 'Counselor';
if (!role) return '';
return role.charAt(0).toUpperCase() + role.slice(1);
}
function clearSession() {
invalidateSessionCheck();
localStorage.removeItem('qdb_token');
@ -109,7 +116,7 @@ function updateNav() {
if (isLoggedIn()) {
nav.style.display = '';
const role = getRole();
const roleLabel = role === 'coach' ? 'counselor' : role;
const roleLabel = formatRoleLabel(role);
userInfo.textContent = `${getUser()} (${roleLabel})`;
// Show/hide role-gated nav items