Skip to content

Add per-date lesson count override for in-lesson reports - #128

Merged
buzz-code merged 2 commits into
mainfrom
claude/user-request-attendance-report-jjj6xx
Jul 24, 2026
Merged

buzz-code merged 2 commits into
mainfrom
claude/user-request-attendance-report-jjj6xx

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Enable teachers with perDateLessonCount permission to override lesson count per report date instead of using single global value.

Changes:

  • Add perDateLessonCount permission to appPermissions and create useIsPerDateLessonCount() hook
  • Add NumberInput field in report date headers to set lessonDetails[index].howManyLessons when permission granted
  • Update lesson count logic to use per-date override if available, fallback to global howManyLessons
  • Make table sticky headers work with horizontal scroll (sticky first column, max-height container)
  • Uncomment lesson name column in sessions summary report

Implementation details:

  • Per-date lesson count stored in lessonDetails[index].howManyLessons
  • Field only shown when not in grade mode and user has permission
  • Validation: min 0, max 1,000,000
  • Helper text explains fallback behavior
  • Sticky positioning applied to first column (student name) and date header row for better UX with scrolling

https://claude.ai/code/session_01B1NERKv7WYgToYwbg7WGYX

claude added 2 commits July 24, 2026 08:51
- Per-date "howManyLessons" override in attendance form, gated behind
  new perDateLessonCount permission; falls back to shared value.
- Fix attendance table sticky header/first column not actually sticking
  (TableContainer had no bounded height, so position:sticky never
  engaged) by bounding maxHeight and pinning the student-name column.
- Restore lesson name column in sessions summary report (data was
  already fetched, just commented out in the render).
left:0 only pins the column to the physical left edge, which is wrong
in RTL layouts where the name column sits on the right. insetInlineStart
resolves to the correct physical side per the active theme direction.
@buzz-code
buzz-code merged commit e9b79fc into main Jul 24, 2026
3 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.

2 participants