Remove manual course creation; import-only with per-tee stroke indices

Courses can now only be added via Golf Course API import, which
provides the full data model: per-tee slope/rating/gender/SI
(stroke_indices JSON) and front/back split ratings. Manual creation
required admins to enter SI by hand and didn't match the API model.

Changes:
- Remove GET/POST /admin/courses/new routes and new_course.html
- Remove _parse_hole_form helper (no longer needed)
- Edit course: par-only editing; stroke_index preserved from import,
  not exposed or overwritten in the admin form
- courses.html: replace "+ New course" with "+ Import course" button
- course_search.html: remove "+ Manual" shortcut
- edit_course.html: remove SI column from hole grid

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Rolf
2026-03-24 20:03:19 +01:00
parent a4ce8a9d50
commit 06995c5668
5 changed files with 16 additions and 182 deletions
+2 -3
View File
@@ -18,8 +18,7 @@
{% endif %}
<div style="display:flex; gap:0.5rem; justify-content:flex-end; margin-bottom:1rem;">
<a href="/admin/courses/search" class="btn" style="width:auto; padding:0.5rem 1rem; background:var(--surface2); color:var(--text);">Search & Import</a>
<a href="/admin/courses/new" class="btn btn-primary" style="width:auto; padding:0.5rem 1rem;">+ New course</a>
<a href="/admin/courses/search" class="btn btn-primary" style="width:auto; padding:0.5rem 1rem;">+ Import course</a>
</div>
{% if courses %}
@@ -50,7 +49,7 @@
<div class="empty-state">
<div class="empty-icon"></div>
<p>No courses yet.</p>
<a href="/admin/courses/new" class="btn btn-primary" style="margin-top:1rem; max-width:200px;">Add a course</a>
<a href="/admin/courses/search" class="btn btn-primary" style="margin-top:1rem; max-width:200px;">Import a course</a>
</div>
{% endif %}
</div>