updated terminology from "Coach" to "Counselor" across multiple files for consistency and clarity
Some checks failed
PHPUnit / test (push) Has been cancelled
Some checks failed
PHPUnit / test (push) Has been cancelled
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user