Skip to content

Teacher reported today: class cards with a row per lesson and summary tiles - #205

Merged
buzz-code merged 3 commits into
mainfrom
claude/teacher-reported-today-class-cards
Oct 7, 2026
Merged

buzz-code merged 3 commits into
mainfrom
claude/teacher-reported-today-class-cards

Conversation

@buzz-code

@buzz-code buzz-code commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Redesigns the "מורות שדיווחו" card view. This PR is frontend only; the server view from #204 already returns one row per lesson.

Before: one card per lesson with the class as a column header. Each card showed a red "חסרו N" label, a red badge with the same number covering the hour, and the date on every card even for a single-day filter. Fixed 220px class columns left large gaps.

After:

  • Summary tiles at the top: lessons reported, classes, teachers, total missing. If the server total is above the 1000 loaded rows, a note above the tiles says so and asks to narrow the dates.
  • One card per class. The header shows the class name plus "N שיעורים · חסרו X". Lessons with no class are grouped per user, so the admin view never mixes two users in one card.
  • One row per lesson, sorted by hour, with time, subject, teacher and missing count.
  • One missing count per lesson, colored by severity: none shows as a grey –, 1–4 orange, 5+ red (HIGH_MISSING_THRESHOLD).
  • Date only when needed: it appears in each row only when the date filter spans more than one day.
  • Layout without gaps: cards flow in CSS columns (column-width: 340px), so tall and short classes pack without holes. On a phone the cards stack in one column.
  • Admins can now open the report. The resource was gated by seminarAttendanceYemot only, so admins could not reach it or its admin-only user filter. It's now gated like the other report resources: the permission or admin. The owning user is shown per class card.
  • Roadmap: added an entry in roadmapFeatures.js.

Behavior change: teacher and lesson names are now plain text (link={false}) instead of links to their records. The class name in the card header stays a link.

Testing

  • Ran locally (MySQL 8 + NestJS + Vite) with seeded reports. I checked these screens:
    • desktop with one day
    • desktop with a two-day range (date shown in rows)
    • phone width (390px)
    • admin login: the report opens, the user filter is shown, and no-class lessons from two users appear as two cards
  • The user filter returns the right rows (user 1 → 12 lessons, user 2 → 0).
  • Client jest: 214/214. vite build OK.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Po2GocBhFneXD2k9z1f6Ld

… tiles

- One card per class, one row per lesson (time, subject, teacher, missing),
  sorted by report hour. Cards flow in CSS columns, so no gaps.
- Single missing-girls count per lesson, colored by severity
  (none / 1-4 / 5+); no badge covering the hour.
- Date shown only when the filter spans more than one day.
- Summary tiles: lessons reported, classes, teachers, total missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Po2GocBhFneXD2k9z1f6Ld
Copilot AI balanced review requested due to automatic review settings October 7, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Grouping, date visibility, and summary calculations produce incorrect results in supported cases.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Redesigns teacher reporting view around class cards and lesson rows.

Changes:

  • Adds summary tiles and severity-based missing counts.
  • Groups lessons by class with responsive column layout.
  • Adds completed roadmap entry.
File Description
client/​src/​entities/​teacher-reported-today.jsx Implements redesigned reporting view.
client/​src/​roadmapFeatures.js Records completed redesign.
Files not reviewed (1)
  • client/src/roadmapFeatures.js: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

claude added 2 commits October 7, 2026 07:41
The resource was gated by seminarAttendanceYemot only, so admins could not
open it (and its admin-only user filter was unreachable). Gate it like the
other report resources: permission or admin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Po2GocBhFneXD2k9z1f6Ld
…rtial-load note

- Lessons without a class are grouped per user (admin view).
- Date column follows the filter range, not the returned rows.
- Note when the server total exceeds the loaded rows (1000 cap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Po2GocBhFneXD2k9z1f6Ld
@buzz-code
buzz-code merged commit 310b528 into main Oct 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants