Files
Live_RC/tests
larssand 1c4a06b69e Record completed training sessions, credit them, and add session-count goals
A driver completing the practice timer, "Jämna varv", or "Stegträning"
now gets a permanent history entry instead of the outcome only existing
as a one-off notification - visible on both their mobile profile and
the admin Training page, so progress over past sessions is actually
reviewable. Each completion earns a prominent emoji-badged credit.

The completion is verified server-side against the driver's real
recorded laps before being saved, reusing the same progress builders
live tracking already uses - the client can only ask for a completion
to be checked and recorded, never supply the outcome itself, so a
driver can't fabricate a completed session (and the reward tied to it)
any more than they could fabricate a lap time.

Both per-driver and club-wide goals can now target "complete N
sessions of one exercise kind" as an alternative to "N laps", sharing
the existing reward/claim mechanism and forms.

Fixes a real bug found while building this: a pre-existing two-argument
wrapper around getTrainingGoalProgress in app.js silently dropped the
new third argument, so every sessions-metric goal displayed 0 progress
regardless of how many sessions were actually completed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 20:43:47 +02:00
..
2026-08-28 13:47:25 +02:00
2026-09-09 08:08:56 +02:00
2026-09-09 08:08:56 +02:00
2026-09-09 07:52:07 +02:00
2026-09-08 18:26:30 +02:00
2026-09-09 07:52:07 +02:00
2026-09-08 18:26:30 +02:00
2026-09-09 08:08:56 +02:00
2026-08-30 16:14:45 +02:00
2026-09-08 13:21:29 +02:00
2026-09-05 09:59:55 +02:00
2026-09-04 15:58:24 +02:00
2026-09-08 17:26:55 +02:00