fix(planka): drag & drop toute colonne + filtre listes par boardId
Deploy HouseHub / deploy (push) Successful in 2s

- Drop target = toute la colonne .pk-cards (plus la zone invisible de 4px)
- Filtre les listes et cartes strictement par boardId pour éliminer les listes fantômes
- Indicateur visuel 'Déposer ici' sur colonnes vides
- CSS: colonne highlight en bleu pointillé au survol drag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
perco
2026-05-19 17:21:31 +02:00
co-authored by Claude Sonnet 4.6
parent 3516225e56
commit 285273108c
3 changed files with 41 additions and 10 deletions
+16 -5
View File
@@ -68,13 +68,24 @@ if ($action === 'board') {
$id = $_GET['id'] ?? null; if (!$id) tErr('ID manquant');
$resp = planka_api('GET', '/api/boards/' . $id, null, $token);
$inc = $resp['included'] ?? [];
// Filter lists that actually belong to this board (prevents ghost lists from other boards)
$lists = array_values(array_filter($inc['lists'] ?? [], fn($l) =>
isset($l['boardId']) ? $l['boardId'] === $id : true
));
// Filter cards that belong to a list in this board
$listIds = array_column($lists, 'id');
$cards = array_values(array_filter($inc['cards'] ?? [], fn($c) =>
in_array($c['listId'] ?? '', $listIds)
));
tOk([
'lists' => $inc['lists'] ?? [],
'cards' => $inc['cards'] ?? [],
'labels' => $inc['labels'] ?? [],
'members' => $inc['users'] ?? [],
'lists' => $lists,
'cards' => $cards,
'labels' => $inc['labels'] ?? [],
'members' => $inc['users'] ?? [],
'cardLabels' => $inc['cardLabels'] ?? [],
'tasks' => $inc['tasks'] ?? [],
'tasks' => $inc['tasks'] ?? [],
]);
}