No-shows on the desktop member page, coach event screens, "+" popup polish

- management member_detail.html's Attendance card now shows the same
  No-shows count as the mobile player sheet, and the card's content (sparkline
  + tiles) fills the card's height/width instead of sitting in the top-left
  corner -- same flex-1/justify-center + stretched-tiles fix used there.
- Coach mode's Attendance and Line-up screens (opening an event) now
  highlight the Schedule tab instead of Today -- that's the calendar-icon
  tab, and where a coach reaches either from CoachScheduleView's own rows.
- The tab bar's "+" button: rotates 45° into an "×" while its popup is open
  (icon reused via CSS transform, no icon swap needed), the popup sits a
  little higher above the button (mb-3 -> mb-5), and a dark backdrop now
  covers the content behind it so the popup stands out.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-23 14:16:05 +02:00
parent 4af598500b
commit fbaf5a8799
8 changed files with 71 additions and 11 deletions

View File

@@ -187,7 +187,7 @@ class CoachAttendanceView(CoachScopeMixin, LoginRequiredMixin, TemplateView):
template_name = "mobile/coach/attendance.html"
screen_title = _("Attendance")
active_tab = "coach_today"
active_tab = "coach_schedule"
#: ?filter= values this screen understands -- anything else (including no
#: param) means "Responded" (IN_STATUSES: present/selected/maybe), the
@@ -606,7 +606,7 @@ class CoachLineupView(CoachScopeMixin, LoginRequiredMixin, TemplateView):
template_name = "mobile/coach/lineup.html"
screen_title = _("Line-up")
active_tab = "coach_today"
active_tab = "coach_schedule"
def get_event(self):
if self.active_team is None:

View File

@@ -128,10 +128,11 @@
{% if can_manage_active_team %}
<div class="coach-tab-bar-add" x-data="{ open: false }">
<button class="coach-tab-bar-add-button" type="button" @click="open = !open" aria-label="{% trans "Add" %}">
<div class="fixed inset-0 z-10 bg-black/60" x-show="open" x-cloak @click="open = false"></div>
<button class="coach-tab-bar-add-button relative z-20 transition-transform duration-200" :class="open ? 'rotate-45' : ''" type="button" @click="open = !open" aria-label="{% trans "Add" %}">
{% lucide "plus" size=24 %}
</button>
<div class="absolute inset-x-3 bottom-full z-20 mb-3 flex flex-col gap-1 rounded-xl border border-line bg-white p-2 shadow-lg" x-show="open" x-cloak @click.outside="open = false">
<div class="absolute inset-x-3 bottom-full z-20 mb-5 flex flex-col gap-1 rounded-xl border border-line bg-white p-2 shadow-lg" x-show="open" x-cloak @click.outside="open = false">
<a class="flex items-center gap-3 rounded-lg p-3 text-sm font-semibold text-ink" href="{% url "mobile:coach_create_event" %}">
{% lucide "calendar-plus" size=18 class="text-club" %} {% trans "New event" %}
</a>

View File

@@ -3179,6 +3179,13 @@ class CoachAttendanceViewTests(TestCase):
self.assertContains(response, "Anna Player")
self.assertContains(response, "9")
def test_the_schedule_tab_is_highlighted(self):
self.client.force_login(self.user)
response = self._get()
self.assertEqual(response.context["active_tab"], "coach_schedule")
def test_shows_a_maybe_reason_alongside_an_absent_one(self):
self.attendance.status = Attendance.AttendanceStatus.MAYBE
self.attendance.note = "Might be a few minutes late"
@@ -3726,6 +3733,13 @@ class CoachLineupViewTests(TestCase):
self.assertEqual(response.status_code, 302)
def test_the_schedule_tab_is_highlighted(self):
self.client.force_login(self.user)
response = self.client.get(reverse("mobile:coach_lineup", kwargs={"event_id": self.event.pk}), HTTP_HOST="ajax-united.rosterchief.app")
self.assertEqual(response.context["active_tab"], "coach_schedule")
def test_get_creates_a_lineup_lazily(self):
self.client.force_login(self.user)