-
Notifications
You must be signed in to change notification settings - Fork 0
Individual apprentice attendance view (AP-25) #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlexVOiceover
merged 24 commits into
main
from
feature/ap-25-individual-apprentice-attendance-view
Jan 6, 2026
Merged
Individual apprentice attendance view (AP-25) #17
AlexVOiceover
merged 24 commits into
main
from
feature/ap-25-individual-apprentice-attendance-view
Jan 6, 2026
Conversation
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
…lection - Add cohort selection UI on initial page load (no data fetch until selected) - Support multiple cohort selection with visual feedback - Add "Show All Apprentices" option with warning modal for slow fetch - Add loading spinner overlay during data fetch - Create ApprenticeAttendanceCard component for displaying metrics - Add detail page for individual apprentice attendance history - Add getApprenticeAttendanceHistory function with tests - Sort cohort tiles alphabetically - Add AttendanceHistoryEntry type
Events are now included in apprentice history if: 1. Event is for apprentice's cohort (marked Missed if no attendance) 2. Apprentice has attendance record (regardless of cohort) 3. All events if apprentice has no cohort
…irtable formula Airtable filterByFormula with linked fields matches display values, not record IDs. Changed to fetch all attendance and filter in JS to correctly match apprentice by record ID.
The hasUserCheckedIn function was using Airtable filterByFormula with linked record field IDs, which doesn't work correctly. Changed to fetch all attendance and filter in JavaScript to properly match by record ID. This fixes the bug where users could check in multiple times to the same event.
Events on the checkin page are now sorted with the most recent events at the top for better UX.
- Added blue gradient header with welcome message - Display logged-in user's name and email - Improved visual hierarchy for the checkin page - Fixed lint error in attendance filter
Display current attendance as X/Y badge on each event card, showing how many have checked in out of expected attendees.
For public events without cohorts, display "X checked in" instead of hiding the attendance badge entirely.
- Grey out and disable check-in button for events not on today - Add tooltip explaining "Check-in opens on the day of the event" - Check-in is only available on the same day as the event
- Show all events with matching code for today and tomorrow - Display events in a list similar to authenticated user view - Tomorrow's events shown but disabled (can't check in yet) - Guest selects event before entering details - Added getEventsByCode function to fetch multiple events
- Add purple gradient header for guest mode to differentiate from authenticated - Make event cards full width to match authenticated view - Center forms, success messages, and instructions - Center link buttons and login prompt
- Add 'Not Coming' to ATTENDANCE_STATUSES type and stats interface - Add getUserAttendanceForEvent() and markNotComing() functions - Create /api/checkin/not-coming endpoint (apprentices only) - Update /api/checkin to handle Not Coming → Check In transition - Add red 'Not Coming' button on checkin page with proper disabled states - Show orange badge and styled card when marked as not coming - Update stats components to display 'Not Coming' count - Add orange color styling for 'Not Coming' in admin views
…selection - Group cohorts by prefix (FAC29, FAC30, etc.) with newer cohorts on top - Place all MLX cohorts in a single group at the bottom - Add clickable group headers for bulk selection/deselection - Show visual indicators for group selection states (none, partial, all) - Maintain individual cohort selection functionality - Fix Svelte state reference warning
- Fix Svelte 5 reactivity issue with events not updating in UI after check-in
- Make events reactive using $state instead of direct data.events mutation
- Add double-click prevention for both check-in and not-coming buttons
- Refactor button styles to use consistent shared CSS classes
- Improve loading states with clearer text ("Marking not coming...")
- Add debugging console logs for check-in success tracking
- Ensure one-way check-in flow (no "Not Coming" after check-in)
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.
Overview
Implements comprehensive individual apprentice attendance tracking with advanced cohort filtering, bulk selection, and interactive UI enhancements. This delivers the complete AP-25 feature for monitoring apprentice attendance patterns and early intervention.
Changes
Core Attendance Features
/admin/attendance/apprenticesroute with server-side data loadingApprenticeAttendanceCardcomponent for individual metrics display/admin/attendance/apprentices/[id]) with full historyEnhanced Cohort Management
"Not Coming" Status System
/api/checkin/not-comingwith proper validationCheck-in Flow Improvements
Testing & Data Quality
TL;DR
/admin/attendance/apprenticesRESEND_FROM_EMAILto your.env.localif missingGallery
Cohort Selection with Smart Grouping
Check-in Status Progression