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');
|
||||
|
||||
Reference in New Issue
Block a user