Skip to content

feat: sort teacher report status by lesson counts, filter by unreported; sticky pagination - #249

Merged
buzz-code merged 2 commits into
mainfrom
claude/dreamy-meitner-85nt3u
Oct 29, 2026
Merged

buzz-code merged 2 commits into
mainfrom
claude/dreamy-meitner-85nt3u

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Fixes buzz-code/ops#33
Fixes buzz-code/ops#34
Fixes buzz-code/ops#32

Summary

  • Views teacher_report_status and teacher_grade_report_status: add reportedLessonsCount, notReportedLessonsCount (COUNT(DISTINCT CASE …) on isReported) and hasNotReportedLessons (notReportedLessonsCount > 0).
  • Migration 1793215235847-AddLessonCountsToTeacherReportStatus: generated against MySQL. The schema name goes through dbName, following the existing view migrations.
  • Sort fix: the "reported" / "not reported" lesson columns sorted by reportedLessonNames / notReportedLessonNames (comma-joined names). A teacher with none gets NULL, which MySQL sorts first ascending, so sorting by "not reported" listed fully-reported teachers first. The columns now sort by the counts, descending on the first click (sortByOrder="DESC").
  • Filter: a NullableBooleanInput on hasNotReportedLessons ("יש שיעורים שלא דווחו") in both lists, plus its translation.
  • client/shared → e972801 (nra-client main, the merge of feat(list): keep pagination row sticky at the bottom on desktop nra-client#74): a sticky pagination row on desktop. This also picks up nra-client#72/Automated Phone Calls HLD #73, which have no consumer rows.
  • Roadmap entries.

Verification

  • Migration:
    • typeorm:run, then typeorm:generate --dr reports "No changes in database schema were found".
    • migration:revert followed by a re-run succeeds.
  • Real server against MySQL, with seeded lessons and October reports: counts per teacher 3/2/1/0.
    • Old sort notReportedLessonNames,ASC returned the fully-reported teacher first (bug reproduced).
    • New sort notReportedLessonsCount,DESC returns 3, 2, 1, 0.
    • hasNotReportedLessons set to true returns the 3 teachers with unreported lessons; false returns the fully-reported one.
  • UI via Playwright, logged in against that server: the sort, the filter options, the filtered result and the sticky pagination all behave as expected.
  • After merging main: client jest 262/262, server jest 1250/1250, tsc --noEmit clean.

Generated by Claude Code

…ed; sticky pagination

Fixes buzz-code/ops#33, buzz-code/ops#34. Part of buzz-code/ops#32.

- teacher_report_status / teacher_grade_report_status views: add
  reportedLessonsCount, notReportedLessonsCount and hasNotReportedLessons
  (migration generated against MySQL, zero diff after run, revert checked).
- The reported / not reported lesson columns sorted by the comma-joined
  lesson names, where a teacher with none is NULL and sorts first ASC, so
  sorting by "not reported" listed fully-reported teachers first. They now
  sort by the counts, DESC on first click.
- NullableBooleanInput filter on hasNotReportedLessons in both lists.
- client/shared -> nra-client branch: sticky pagination row on desktop.
- Roadmap entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxGDngmD8yeYDDm3rcXX4n
Pin client/shared to nra-client main (e972801, merge of nra-client#74)
and keep roadmap entries from both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxGDngmD8yeYDDm3rcXX4n
@buzz-code
buzz-code merged commit d5877c5 into main Oct 29, 2026
1 check 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.

2 participants