First slice of the coach-mode build (design_handoff_rosterchief_platform/ README.md's "Coach mode" section, C1-C6). Ships the foundation together with the two screens the design doc calls out as the reason coaches install anything at all, rather than landing a Today screen with a dead "Check attendance" button: - mobile/coach_mixins.py's CoachScopeMixin -- the dark-mode mirror of PersonScopeMixin, scoped by active team (via club.services.access' teams_staffed_by/teams_managed_by) instead of managed people. - A standalone dark ink/ice shell (mobile/templates/mobile/coach/base.html) with the mode's signature 20px-radius overlapping sheet, reusing the --color-ice/--color-ink tokens that already existed in assets/mobile.css but were unconsumed until now. - The Coach/Member role switcher is re-added to the member shell, gated on a real staff assignment (has_coach_access), replacing the "deliberately not rendered yet" placeholder. - C1 Today: stat tiles, a tonight's-session card, a silent-players "needs you" row, and an "Also yours" card reusing HomeView's own hero-RSVP pattern scoped to the coach's own member record. - C2 Bench attendance: writes through events.services.attendance. record_check_in, which existed for exactly this and had no caller yet. Read-only for staff on a team without a management position. Line-up (C3), create event (C4), post news (C5), and add-to-roster (C6) follow in later stages -- see the coach-mode plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
29 lines
1.5 KiB
Python
29 lines
1.5 KiB
Python
from django.urls import path
|
|
|
|
from . import coach_views, views
|
|
|
|
app_name = "mobile"
|
|
|
|
urlpatterns = [
|
|
# PWA plumbing.
|
|
path("manifest.webmanifest", views.ManifestView.as_view(), name="manifest"),
|
|
path("sw.js", views.ServiceWorkerView.as_view(), name="service_worker"),
|
|
path("icon/<int:size>.png", views.AppIconView.as_view(), name="icon"),
|
|
path("push/subscribe/", views.PushSubscribeView.as_view(), name="push_subscribe"),
|
|
path("calendar/<str:token>.ics", views.CalendarFeedView.as_view(), name="calendar_feed"),
|
|
# Member mode (M1-M7).
|
|
path("", views.HomeView.as_view(), name="home"),
|
|
path("calendar/", views.CalendarView.as_view(), name="calendar"),
|
|
path("events/<uuid:pk>/", views.EventDetailView.as_view(), name="event_detail"),
|
|
path("news/", views.NewsListView.as_view(), name="news_list"),
|
|
path("news/<slug:slug>/", views.NewsDetailView.as_view(), name="news_detail"),
|
|
path("me/", views.MeView.as_view(), name="me"),
|
|
path("me/payments/", views.PaymentsView.as_view(), name="payments"),
|
|
path("me/calendar-sync/", views.CalendarFeedSettingsView.as_view(), name="calendar_feed_settings"),
|
|
path("me/<uuid:member_id>/edit/", views.EditProfileView.as_view(), name="edit_profile"),
|
|
path("notifications/", views.NotificationsView.as_view(), name="notifications"),
|
|
# Coach mode (C1-C6).
|
|
path("coach/", coach_views.CoachTodayView.as_view(), name="coach_today"),
|
|
path("coach/attendance/<uuid:event_id>/", coach_views.CoachAttendanceView.as_view(), name="coach_attendance"),
|
|
]
|