Skip to content

Make lesson optional on attendance report edit form - #165

Merged
buzz-code merged 1 commit into
mainfrom
claude/teachers-attendance-timezone-fge29w
Sep 1, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/teachers-attendance-timezone-fge29w

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Summary

Editing an attendance report row demanded a lesson name even when none exists for that row.

Root cause

lessonReferenceId had validate={required()} on the client edit form (client/src/entities/att-report.jsx), but the server entity already allows it empty (only one of lessonId/lessonReferenceId is conditionally required, not both).

Change

Dropped the client-side required() validation on lessonReferenceId.

Testing

  • cd client && yarn build — clean

🤖 Generated with Claude Code


Generated by Claude Code

lessonReferenceId was required() on the client edit form even though the
server already allows it empty — attendance rows without a lesson name
couldn't be edited. Drop the client-side requirement.
Copilot AI lite review requested due to automatic review settings September 1, 2026 09:37

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.

🟢 Approval recommended

Small client-only validation change aligns form behavior with server model and fixes blocked edits for rows with no lesson.

Pull request overview

Make lessonReferenceId optional on attendance report edit/create form, aligning client validation with server entity allowing rows with no lesson.

Changes:

  • Remove required() validation from lessonReferenceId CommonReferenceInput in att report form
File summaries
File Description
client/src/entities/att-report.jsx Drop client-side required validation for lessonReferenceId input
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@buzz-code
buzz-code merged commit 4426da3 into main Sep 1, 2026
5 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