Fix: Tier-Modal zeigt alle 6 Optionen, aktiver Tier markiert statt herausgefiltert (SW by-v735)

This commit is contained in:
rene 2026-05-06 18:42:15 +02:00
parent 71f29dcce0
commit 98ac7fcb79
5 changed files with 9 additions and 8 deletions

View file

@ -931,16 +931,17 @@ window.Page_admin = (() => {
Aktuelle Stufe: <strong>${currentTier}</strong>
</p>
<div style="display:flex;flex-direction:column;gap:var(--space-2)">
${tiers.filter(t => t !== currentTier).map(t => `
<button class="btn btn-secondary adm-tier-choice" data-tier="${t}" form="">
${tierLabels[t]}
${tiers.map(t => `
<button class="btn ${t === currentTier ? 'btn-primary' : 'btn-secondary'} adm-tier-choice"
data-tier="${t}" form="" ${t === currentTier ? 'disabled' : ''}>
${tierLabels[t]}${t === currentTier ? ' ✓' : ''}
</button>
`).join('')}
</div>
`,
});
document.querySelectorAll('.adm-tier-choice').forEach(btn => {
document.querySelectorAll('.adm-tier-choice:not([disabled])').forEach(btn => {
btn.addEventListener('click', async () => {
UI.modal.close();
try {