Checkpoint: management app redesign, onboarding/signup workflow, and events calendar backend

Large uncommitted body of work accumulated across sessions on this branch --
committing as a checkpoint so it's tracked and future worktree-isolated agents
see the real codebase instead of a stale ancestor commit. Covers the
management app's dedicated Tailwind theme and templates, the club onboarding
requirement/signup workflow (club/services/onboarding.py, requirement/status
models, sign-up dashboard), fee/status auto-activation decoupling, referee
management, and the new events calendar grid service layer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-19 23:34:43 +02:00
parent bff685966d
commit adf1120358
157 changed files with 20342 additions and 4008 deletions

View File

@@ -7,12 +7,20 @@ individually ``invited_members``, minus any ``excluded_members`` -- or, for a
event's season instead of teams/groups (the two are mutually exclusive, see
EventForm/EventSeriesForm). Attendance rows are reconciled against that set,
but only for events that are still in the future — history is never rewritten.
A member provisionally rostered by management.views.SignupPlaceInTeamView
(on a team, but still PENDING -- their sign-up isn't fully processed yet) is
still subtracted back out here if an open onboarding requirement blocks this
event's kind -- see club.services.onboarding.blocked_member_ids_for_event.
Explicitly ``invited_members`` bypasses that: a named, individual invite is a
deliberate staff decision that should win regardless.
"""
from django.db.models import Count, Q
from django.utils import timezone
from club.models import ClubMembership, Season
from club.services.onboarding import blocked_member_ids_for_event
from events.models import Attendance, Event
from members.models import Member
from teams.models import TeamMembership
@@ -44,7 +52,12 @@ def effective_members(event):
if group_ids:
member_ids.update(Member.objects.filter(group_memberships__group_id__in=group_ids).values_list("id", flat=True))
member_ids.update(event.invited_members.values_list("id", flat=True))
invited_ids = set(event.invited_members.values_list("id", flat=True))
if season is not None:
member_ids.difference_update(blocked_member_ids_for_event(event.club, season, event.kind) - invited_ids)
member_ids.update(invited_ids)
member_ids.difference_update(event.excluded_members.values_list("id", flat=True))
return Member.objects.filter(id__in=member_ids)