changes to translation system
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
tom.hempel
2026-07-09 14:59:56 +02:00
parent 4afab336ee
commit f04388e0ec
24 changed files with 1882 additions and 415 deletions

View File

@ -34,15 +34,19 @@ export async function confirmAndPatchClientArchive(clientCode, archived) {
* @param {string} opts.clientCode Escaped client code for data-code attributes
* @param {boolean} opts.archived
* @param {boolean} [opts.showDelete]
* @param {boolean} [opts.showReset]
* @param {string} [opts.rawCode] Unescaped code for button labels (optional)
*/
export function clientTableActionsHTML({ clientCode, archived, showDelete = false }) {
export function clientTableActionsHTML({ clientCode, archived, showDelete = false, showReset = false }) {
const archiveBtn = archived
? `<button type="button" class="btn btn-sm restore-client-btn" data-code="${clientCode}" title="Restore to active lists">Restore</button>`
: `<button type="button" class="btn btn-sm archive-client-btn" data-code="${clientCode}" title="Mark as finished and hide from lists">Archive</button>`;
const resetBtn = showReset
? `<button type="button" class="btn btn-sm reset-client-btn" data-code="${clientCode}" title="Clear answers, uploads, and scores; keep client code and counselor">Reset</button>`
: '';
const deleteBtn = showDelete
? `<button type="button" class="btn btn-sm btn-danger delete-client-btn" data-code="${clientCode}" title="Permanently delete client and all data">Delete</button>`
: '';
return `<div class="table-row-actions" role="group" aria-label="Client actions">${archiveBtn}${deleteBtn}</div>`;
return `<div class="table-row-actions" role="group" aria-label="Client actions">${archiveBtn}${resetBtn}${deleteBtn}</div>`;
}