Skip to content

feat: approve absences by student and date range - #231

Merged
buzz-code merged 3 commits into
mainfrom
claude/project-thread-h4azbd
Oct 20, 2026
Merged

buzz-code merged 3 commits into
mainfrom
claude/project-thread-h4azbd

Conversation

@buzz-code

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

Copy link
Copy Markdown
Owner

Requested by הדסה · project thread

Fixes buzz-code/ops#5

Before: approving a student's full-day absence meant entering a known absence for each lesson. The approved absences upload screen worked only by class + date.

After: the known absences list has an "אישור ימים מלאים" dialog (student, from/to date, optional class, reason). The approved absences upload screen has a "לפי תלמידה" tab that takes an Excel file with student ID, class (optional), date and to-date (optional), shows a preview, and approves. Both create one approved known absence per reported absence (per lesson) of the student in that range.

Lesson + date pairs that already have an approved known absence are skipped, so re-uploading the same file does not create duplicates.

How: new previewByStudentDates / approveByStudentDates actions on known_absence (service in known-absence.config.ts), logic in server/src/utils/approveAbsencesByStudentDates.util.ts. Student ID is matched raw and padded to 9 digits, since Excel drops leading zeros. The class filter applies to the att_report's klass.

Tests: new util spec; server entity-module and client jest suites pass; tsc and vite build pass.


Generated by Claude Code

Adds a shared known_absence action that finds a student's absences in a
date range (optional klass) and creates approved known absences per
lesson, skipping lesson+date pairs already approved. Exposed via a
'by student' tab on the approved absences upload screen (Excel: tz,
klass, date, to-date) and an 'approve full days' dialog on the known
absences list.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D9Di6MyvoQ27N7fco8rxhw
@buzz-code buzz-code self-assigned this Oct 19, 2026
@buzz-code
buzz-code marked this pull request as ready for review October 19, 2026 05:43
Found while testing against a real database:
- The approved absences upload's settings form never reached state
  (react-admin Form onChange receives the DOM event), so reason,
  sender and comment were always saved empty, in both tabs.
- Text dates like 10/03/2026 were parsed as US month-first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D9Di6MyvoQ27N7fco8rxhw
Resolve roadmap conflict: replace the in-progress entry for this feature
with the done entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D9Di6MyvoQ27N7fco8rxhw
@buzz-code
buzz-code merged commit c865621 into main Oct 20, 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.

2 participants