Repository navigation
Add manager report call and student name confirmation - #117
Merged
Merged
Conversation
…endance IVR - Teacher attendance phone flow now reads back the student's name and asks for confirmation (1 = correct, 2 = wrong) before recording an absence. - Add a manager phone number setting (gated by seminarAttendanceYemot) so a manager can call in and hear which teachers reported attendance today and which did not. - Add a "today's teacher phone calls" report page for a live, readable view of phone-in attendance activity throughout the day.
…l migrations - Manager report call now selects DISTINCT teacherReferenceId instead of fetching every AttReport row (one per student) just to check who reported. - Generated the TeacherPhoneCallToday view migration from a real MySQL diff (typeorm:generate) instead of hand-writing it, and re-created the text-seed migration with typeorm:create so both carry accurate timestamps. Verified apply -> generate (no diff) -> revert -> re-apply against a live database.
- Drop the CURDATE() restriction baked into the view so it can serve any date range; regenerated the migration against a real MySQL diff. - Add From/To date filters (callTime:$gte/$lte) to the client list, defaulting to today so the default view is unchanged, but any other date or range can now be selected.
- Base the view on att_reports instead of yemot_call: it now shows which teachers reported attendance on a given date, regardless of channel (phone or otherwise), grouped by teacher + report date. - Add an admin-only user column and admin user filter, matching the convention used elsewhere (adminUserFilter + isAdmin-gated ReferenceField). - Rename resource/view/files from teacher_phone_call_today to teacher_reported_today to match the new scope; regenerated the migration against a real MySQL diff and verified apply/generate/revert/re-apply.
- View now has one row per teacher+lesson+date (left join to lessons), plus each teacher's earliest report time that day via a window function, instead of one pre-aggregated row per teacher+date. - Replace the Datagrid with a custom card list: one card per teacher, grouping its lesson rows client-side into chips, with the admin-only user reference, date, and hour shown in the card header. - Regenerated the migration against a real MySQL diff and verified the apply/generate/revert/re-apply loop, including a multi-lesson-per-teacher case against real att_reports data.
- Teacher-reported-today cards now lay out in a responsive CSS grid (auto-fill, 320px min) instead of a single column, so multiple cards share a row on wider screens. - Extract repeated systemAsks/userResponds sequences in yemot-handler.service.test.ts (TZ prompt, transport prompt, departure confirmation, klass prompt, absent-student add/reject/finish) into small named helper functions, reused across the transport and seminar test groups instead of repeating the same steps in every test.
- View now selects grouped att_reports columns directly (teacherReferenceId, lessonReferenceId) with no joins to teachers/lessons at all, matching how every other entity in this app resolves those references on the client. - Card header resolves the teacher name via ReferenceField+TextField; lesson chips resolve via ReferenceField+ChipField per lesson row. React-admin batches these into one getMany per reference type, so this isn't N+1 despite the extra requests. - Regenerated the migration against a real MySQL diff and verified the apply/generate/revert/re-apply loop plus real query output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the Yemot phone integration to support manager report calls and adds student name confirmation during seminar attendance reporting.
Key Changes
Manager Report Call Feature:
processManagerReportCall()to handle calls from a designated manager phone numberisManagerCall()which checks if the incoming phone matchesuser.additionalData.managerPhoneTeacherReportedTodayview entity to query reported teachers efficientlyMANAGER.NO_SCHEDULE_TODAYandMANAGER.REPORT_STATUS_TODAYStudent Name Confirmation:
SEMINAR.CONFIRM_STUDENT_NAMEandSEMINAR.STUDENT_NAME_REJECTEDUI & Settings:
ManagerPhoneSettingsInputcomponent for users to configure their manager phone numberteacher-reported-todayentity with card-based view showing reported teachers grouped by dateTest Improvements:
respondToTz,rejectTz,respondToTransport, etc.) to reduce test boilerplateDatabase:
teacher_reported_todayviewhttps://claude.ai/code/session_01JWhMYTU8nWdtFgRpCWmWJe