Updated UI strings and references from "coach" to "counselor"
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-06-12 13:41:42 +02:00
parent 63a560e803
commit 5b5cc52133
18 changed files with 92 additions and 90 deletions

View File

@ -16,7 +16,7 @@ let filterSearch = '';
export async function coachesPage() {
const app = document.getElementById('app');
app.innerHTML = `
${pageHeaderHTML('Coach activity')}
${pageHeaderHTML('Counselor activity')}
<div id="coachesContent"><div class="spinner"></div></div>
`;
@ -192,25 +192,25 @@ function renderCoaches() {
const el = document.getElementById('coachesContent');
if (!coachesList.length) {
el.innerHTML = `<div class="card empty-state"><h3>No coaches</h3></div>`;
el.innerHTML = `<div class="card empty-state"><h3>No counselors</h3></div>`;
return;
}
el.innerHTML = `
<div class="card">
<p class="data-toolbar-hint" style="margin:0 0 12px">
Track uploads and client load per coach. Expand a row to browse uploads by client.
Track uploads and client load per counselor. Expand a row to browse uploads by client.
</p>
<div class="filter-bar">
<input type="search" id="coachListSearch" class="filter-search"
placeholder="Search coach or supervisor…" value="${esc(filterSearch)}">
placeholder="Search counselor or supervisor…" value="${esc(filterSearch)}">
<span class="data-toolbar-hint" id="coachListCount"></span>
</div>
<div class="table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>Coach</th><th>Supervisor</th><th>Clients</th>
<th>Counselor</th><th>Supervisor</th><th>Clients</th>
<th>Total uploads</th><th>7d</th><th>30d</th><th>Last upload</th>
</tr>
</thead>
@ -308,12 +308,12 @@ function renderCoachTableBody() {
body.innerHTML = `
<tr>
<td colspan="7" style="text-align:center;color:var(--text-secondary);padding:24px">
No coaches match
No counselors match
</td>
</tr>`;
if (countEl) {
countEl.textContent = filterSearch.trim()
? `0 of ${coachesList.length} coaches`
? `0 of ${coachesList.length} counselors`
: '';
}
return;
@ -324,8 +324,8 @@ function renderCoachTableBody() {
if (countEl) {
const q = filterSearch.trim();
countEl.textContent = q
? `${filtered.length} of ${coachesList.length} coaches`
: `${coachesList.length} coach${coachesList.length === 1 ? '' : 'es'}`;
? `${filtered.length} of ${coachesList.length} counselors`
: `${coachesList.length} counselor${coachesList.length === 1 ? '' : 's'}`;
}
body.querySelectorAll('.coach-expand-btn').forEach(btn => {