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

@ -53,8 +53,8 @@ function renderAssignments() {
if (!coaches.length) {
container.innerHTML = `
<div class="card empty-state">
<h3>No coaches found</h3>
<p>Create coaches first before assigning clients.</p>
<h3>No counselors found</h3>
<p>Create counselors first before assigning clients.</p>
</div>`;
return;
}
@ -65,16 +65,16 @@ function renderAssignments() {
<div class="assign-page">
<div class="assign-layout">
<aside class="card assign-coaches" aria-label="Coaches">
<aside class="card assign-coaches" aria-label="Counselors">
<div class="assign-panel-header">
<h3>Coaches <span class="data-toolbar-hint">(${coaches.length})</span></h3>
<h3>Counselors <span class="data-toolbar-hint">(${coaches.length})</span></h3>
<div class="filter-bar">
<input type="search" id="coachSearch" class="filter-search"
placeholder="Search coach or supervisor…" value="${esc(filterCoachSearch)}">
placeholder="Search counselor or supervisor…" value="${esc(filterCoachSearch)}">
</div>
</div>
<div class="assign-panel-body">
<ul class="coach-list" id="coachList" role="listbox" aria-label="Filter by coach"></ul>
<ul class="coach-list" id="coachList" role="listbox" aria-label="Filter by counselor"></ul>
</div>
<div class="assign-panel-footer assign-panel-footer--align" aria-hidden="true"></div>
</aside>
@ -89,8 +89,8 @@ function renderAssignments() {
</div>
</div>
<div class="assign-clients-filters filter-bar">
<select id="filterByCoach" aria-label="Filter by coach">
<option value="">All coaches (${clients.length})</option>
<select id="filterByCoach" aria-label="Filter by counselor">
<option value="">All counselors (${clients.length})</option>
<option value="__unassigned__">Unassigned (${unassignedCount})</option>
${coaches.map(c => {
const n = (clientsByCoach[c.coachID] || []).length;
@ -98,7 +98,7 @@ function renderAssignments() {
}).join('')}
</select>
<input type="search" id="clientSearch" class="filter-search"
placeholder="Search client or coach…">
placeholder="Search client or counselor…">
</div>
</div>
<div class="assign-table-panel">
@ -110,7 +110,7 @@ function renderAssignments() {
<input type="checkbox" id="selectAllCb" title="Toggle all visible rows" aria-label="Select all visible">
</th>
<th>Client Code</th>
<th>Current Coach</th>
<th>Current Counselor</th>
</tr>
</thead>
<tbody id="clientTableBody"></tbody>
@ -127,8 +127,8 @@ function renderAssignments() {
<section class="card assign-action-card" id="assignActionCard" style="display:none" aria-label="Assign selection">
<h4>Assign selected clients to</h4>
<div class="assign-action-row">
<select id="targetCoachSelect" aria-label="Target coach">
<option value="">— select coach —</option>
<select id="targetCoachSelect" aria-label="Target counselor">
<option value="">— select counselor —</option>
${coaches.map(c =>
`<option value="${c.coachID}">${esc(c.username)}${c.supervisorUsername ? ` (${esc(c.supervisorUsername)})` : ''}</option>`
).join('')}
@ -290,7 +290,7 @@ function renderCoachList() {
const q = filterCoachSearch.trim();
if (!filtered.length) {
list.innerHTML = `<li class="coach-list-empty">${q ? 'No coaches match' : 'No coaches'}</li>`;
list.innerHTML = `<li class="coach-list-empty">${q ? 'No counselors match' : 'No counselors'}</li>`;
return;
}
@ -496,7 +496,7 @@ async function doAssign() {
const coachID = document.getElementById('targetCoachSelect').value;
if (!selected.length) { showToast('Select at least one client', 'error'); return; }
if (!coachID) { showToast('Select a target coach', 'error'); return; }
if (!coachID) { showToast('Select a target counselor', 'error'); return; }
const coachName = coaches.find(c => c.coachID === coachID)?.username || coachID;
if (!confirm(`Assign ${selected.length} client(s) to ${coachName}?`)) return;