fix(planka): drag & drop toute colonne + filtre listes par boardId
Deploy HouseHub / deploy (push) Successful in 2s
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:
co-authored by
Claude Sonnet 4.6
parent
3516225e56
commit
285273108c
+16
-5
@@ -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'] ?? [],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -444,3 +444,22 @@
|
||||
.pk-page { height: auto; overflow: visible; }
|
||||
.pk-board-area { overflow-x: auto; height: auto; padding-bottom: 4rem; }
|
||||
}
|
||||
|
||||
/* ── Drag & Drop amélioré ──────────────────────────────────────────────────── */
|
||||
.pk-cards.drag-over {
|
||||
background: rgba(59,130,246,.07);
|
||||
outline: 2px dashed var(--primary, #4361ee);
|
||||
outline-offset: -2px;
|
||||
border-radius: 8px;
|
||||
min-height: 80px;
|
||||
}
|
||||
.pk-card.is-dragging { opacity: .4; }
|
||||
.pk-drop-hint {
|
||||
text-align: center;
|
||||
color: var(--text-muted, #9ca3af);
|
||||
font-size: .78rem;
|
||||
padding: .75rem;
|
||||
border: 2px dashed var(--border-light, #e5e7eb);
|
||||
border-radius: 8px;
|
||||
margin-bottom: .35rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user