status-select.php
- Pfad:
src/View/tasks/partials/status-select.php - Namespace: -
- Zeilen: 25 | Größe: 762 Bytes
- Geändert: 2025-12-27 12:12:42 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Code
<?php
declare(strict_types=1);
// @responsibility: HTMX-Partial für inline Task-Status-Dropdown
$statuses = [
'pending' => 'Offen',
'in_progress' => 'In Arbeit',
'completed' => 'Fertig',
'failed' => 'Fehlgeschlagen',
'cancelled' => 'Abgebrochen',
];
?>
<select name="status" class="badge-select badge-select--<?= $task['status'] ?>"
hx-put="/api/v1/tasks/<?= $task['id'] ?>/status"
hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
hx-target="closest td"
hx-swap="innerHTML"
hx-disabled-elt="this">
<?php foreach ($statuses as $value => $label): ?>
<option value="<?= $value ?>" <?= $task['status'] === $value ? 'selected' : '' ?>><?= $label ?></option>
<?php endforeach; ?>
</select>