Skip to content

Commit f063884

Browse files
committed
feat: add external links admin with drag-and-drop and e2e tests
This introduces a full CRUD interface for managing external link sections and links, including drag-and-drop reordering across sections using dnd-kit. Links can be toggled enabled/disabled and are rendered on the start page grouped by section. The server side adds Alembic migrations for the external_link_sections and external_links tables, along with API routes for sections, links, and bulk reorder operations. The debug endpoint now truncates these tables between e2e test runs to ensure clean state. E2e tests cover section and link creation, editing, deletion, enable/disable toggling with start page verification, and multi-section rendering on the start page.
1 parent 472e092 commit f063884

36 files changed

Lines changed: 2214 additions & 401 deletions

client/package-lock.json

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"format": "biome check src --write"
1414
},
1515
"dependencies": {
16+
"@dnd-kit/core": "^6.3.1",
17+
"@dnd-kit/sortable": "^10.0.0",
18+
"@dnd-kit/utilities": "^3.2.2",
1619
"@hookform/resolvers": "^5.2.2",
1720
"@radix-ui/react-avatar": "^1.1.11",
1821
"@radix-ui/react-checkbox": "^1.3.3",

client/src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ProtectedRoute } from "@/components/layout/ProtectedRoute";
33
import { AuthProvider } from "@/components/providers/AuthProvider";
44
import { AboutPage } from "@/pages/AboutPage";
55
import { ArtemisRequestPage } from "@/pages/ArtemisRequestPage";
6+
import { ExternalLinksAdminPage } from "@/pages/ExternalLinksAdminPage";
67
import { ImprintPage } from "@/pages/ImprintPage";
78
import { PrivacyPage } from "@/pages/PrivacyPage";
89
import { StartPage } from "@/pages/StartPage";
@@ -36,6 +37,14 @@ function App() {
3637
/>
3738
<Route path="/request/tum-guest" element={<TUMGuestRequestPage />} />
3839
<Route path="/request/support" element={<SupportRequestPage />} />
40+
<Route
41+
path="/admin/external-links"
42+
element={
43+
<ProtectedRoute requireAdmin>
44+
<ExternalLinksAdminPage />
45+
</ProtectedRoute>
46+
}
47+
/>
3948
<Route path="/about" element={<AboutPage />} />
4049
<Route path="/privacy" element={<PrivacyPage />} />
4150
<Route path="/imprint" element={<ImprintPage />} />

0 commit comments

Comments
 (0)