feat: feedback visuel immédiat après drag-and-drop + correction résolution IDs labels
CI / test (push) Failing after 8s
CI / lint (push) Failing after 4s

- /api/move retourne maintenant les labels mis à jour
- Le frontend met à jour les labels de la carte sans recharger la page
- Flash vert sur la carte pour confirmer le succès du déplacement
- Correction: résolution noms→IDs des labels via l'API Gitea (update_issue_labels attend des ints)
- Mise à jour de data-column sur la carte déplacée
This commit is contained in:
2026-07-08 11:42:05 -04:00
parent c19503cf2f
commit 74fe8aed64
2 changed files with 31 additions and 4 deletions
+19
View File
@@ -237,6 +237,25 @@
method: 'POST', headers: {'X-CSRF-Token': getCSRFToken()}
});
if (!resp.ok) throw new Error('Move failed');
const data = await resp.json();
// Update card's data-column
card.dataset.column = newCol;
// Update labels on the moved card
const labelsDiv = card.querySelector('.card-labels');
if (labelsDiv && data.labels) {
labelsDiv.innerHTML = data.labels.map(l =>
`<span class="card-label" style="background:#${l.color||'666'}33;color:#${l.color||'ccc'}">${escHtml(l.name)}</span>`
).join('');
}
// Flash feedback
card.style.transition = 'box-shadow 0.3s';
card.style.boxShadow = '0 0 0 2px var(--green)';
setTimeout(() => { card.style.boxShadow = ''; }, 800);
// Update column counts
document.querySelectorAll('.board-column').forEach(col => {
const c = col.querySelectorAll('.card').length;
const b = col.querySelector('.column-count');