Sortable tests, deduplicate event hydration, disable php:S1448

- Add sortable.js tests (12 tests): drag/drop, reorder, early returns, edge cases
- Use target.before()/after() instead of list.insertBefore() in sortable.js
- Extract hydrateEventFromRequest() to eliminate duplicated code in createEvent/editEvent
- Disable SonarQube rule php:S1448 (too many methods per class)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-21 10:12:17 +01:00
parent 5ae948b94f
commit f2bce4f191
4 changed files with 242 additions and 26 deletions

View File

@@ -29,9 +29,9 @@ export function initSortable() {
const rect = target.getBoundingClientRect()
const mid = rect.top + rect.height / 2
if (e.clientY < mid) {
list.insertBefore(dragEl, target)
target.before(dragEl)
} else {
list.insertBefore(dragEl, target.nextSibling)
target.after(dragEl)
}
}
})