fix(attendance): stop the roster moving under the coach's finger
Taking attendance re-sorted the list by status on every render, so the
moment a coach marked someone the row jumped somewhere else and everyone
below it shifted. Coaches lost their place, could not tell who was already
handled, and recorded the same player several times.
The roster is now ordered by name with the record id as a tie-break —
never by anything the coach can change from this screen — so the list
holds still. Marking a player takes them out of the working list entirely
and into a collapsed "تم تسجيلهم" section, grouped by status with counts,
where the decision can be reviewed or changed. A confirmation toast names
the player and the status that was saved, and a progress card shows how
many are left.
Also here:
- markAs/markPresent/saveRecordNote now resolve the record within this
session instead of by bare id, and reject statuses outside the four the
screen offers
- service calls are wrapped in try/catch, so a blocked medical certificate
shows an Arabic message instead of an error page
- the polymorphic subject relation is eager-loaded with morphWith (was an
N+1 on every player row)
- one responsive card list replaces the duplicated mobile/desktop markup;
targets are ≥36px, the progress bar carries progressbar semantics and
the toast is an aria-live region
Co-Authored-By:
Claude Opus 5 (1M context) <noreply@anthropic.com>
Showing
This diff is collapsed.
Please register or sign in to comment