fix(planka): drag&drop via dataTransfer + create_list + synchro position
Deploy HouseHub / deploy (push) Successful in 2s
Deploy HouseHub / deploy (push) Successful in 2s
- Drag & drop: utilise e.dataTransfer (pas de variable globale fragile)
- dropCard prend cardId en paramètre, envoie position requis par Planka
- Nouveau bouton 'Ajouter une liste' en fin de board
- Endpoint create_list dans api.php (POST /api/boards/{id}/lists)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7d62aa02be
commit
0db14560a5
@@ -96,6 +96,18 @@ if ($action === 'set_active_board') {
|
||||
tOk(['updated' => true]);
|
||||
}
|
||||
|
||||
if ($action === 'create_list') {
|
||||
$board_id = $_GET['board_id'] ?? null; if (!$board_id) tErr('board_id manquant');
|
||||
$name = trim($_GET['name'] ?? ''); if (!$name) tErr('name manquant');
|
||||
$position = (int) ($_GET['position'] ?? 65535);
|
||||
$resp = planka_api('POST', '/api/boards/' . $board_id . '/lists', [
|
||||
'name' => $name,
|
||||
'position' => $position,
|
||||
], $token);
|
||||
if (empty($resp['item'])) tErr($resp['message'] ?? 'Planka n\'a pas créé la liste', 502);
|
||||
tOk($resp['item']);
|
||||
}
|
||||
|
||||
if ($action === 'create_card') {
|
||||
$list_id = $_GET['list_id'] ?? null; if (!$list_id) tErr('list_id manquant');
|
||||
$board_id = $_GET['board_id'] ?? null; if (!$board_id) tErr('board_id manquant');
|
||||
|
||||
@@ -463,3 +463,28 @@
|
||||
border-radius: 8px;
|
||||
margin-bottom: .35rem;
|
||||
}
|
||||
|
||||
.pk-list-new {
|
||||
background: transparent;
|
||||
border: 2px dashed var(--border-light, #e5e7eb);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding: .75rem .5rem;
|
||||
}
|
||||
.pk-add-list-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--text-muted, #9ca3af);
|
||||
font-size: .9rem;
|
||||
font-weight: 600;
|
||||
padding: .4rem .75rem;
|
||||
border-radius: 8px;
|
||||
transition: background .15s, color .15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pk-add-list-btn:hover {
|
||||
background: var(--bg-panel, #f3f4f6);
|
||||
color: var(--primary, #4361ee);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user