Simplify the line-up to yes/no picks, and stop truncating notifications

Coach mode's line-up screen no longer has lines/slots -- just a yes/no
toggle per available roster player, grouped by their roster position, both
in coach mode and on the published member-side view. Replaces LineupUnit/
LineupSlot with a single LineupSelection model.

Notifications now show their full body text (no more truncatechars) and the
unread colour bar spans the full row height via self-stretch, matching the
calendar row's own marker, so it still reads correctly once a body wraps to
several lines.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-22 16:29:21 +02:00
parent 2b6a4d21bb
commit 135580d83e
13 changed files with 300 additions and 285 deletions

View File

@@ -2,7 +2,7 @@ from django import forms
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from .models import Attendance, Competition, Event, EventReferee, EventSeries, Lineup, LineupSlot, LineupUnit, Location, Opponent
from .models import Attendance, Competition, Event, EventReferee, EventSeries, Lineup, LineupSelection, Location, Opponent
@admin.register(Opponent)
@@ -118,18 +118,11 @@ class LineupAdmin(admin.ModelAdmin):
raw_id_fields = ["event", "team", "created_by"]
@admin.register(LineupUnit)
class LineupUnitAdmin(admin.ModelAdmin):
list_display = ["lineup", "label", "ordering"]
search_fields = ["lineup__event__title", "label"]
raw_id_fields = ["lineup"]
@admin.register(LineupSlot)
class LineupSlotAdmin(admin.ModelAdmin):
list_display = ["unit", "ordering", "member"]
search_fields = ["unit__label", "member__first_name", "member__last_name"]
raw_id_fields = ["unit", "member"]
@admin.register(LineupSelection)
class LineupSelectionAdmin(admin.ModelAdmin):
list_display = ["lineup", "member"]
search_fields = ["lineup__event__title", "member__first_name", "member__last_name"]
raw_id_fields = ["lineup", "member"]
@admin.register(EventReferee)