website refactor

This commit is contained in:
2026-01-16 18:21:06 +01:00
parent 2f53727702
commit 095885544b
146 changed files with 970 additions and 524 deletions

View File

@@ -1,6 +1,4 @@
import { RatingEvent } from '../entities/RatingEvent';
import { DrivingReasonCode } from '../value-objects/DrivingReasonCode';
import { RatingDelta } from '../value-objects/RatingDelta';
/**
* Input DTO for driving rating calculation from race facts
@@ -71,7 +69,7 @@ export class DrivingRatingCalculator {
const fieldStrength = facts.results.length > 0
? (facts.results
.filter(r => r.status === 'finished')
.reduce((sum, r) => sum + (r.sof || this.estimateDriverRating(r.userId)), 0) /
.reduce((sum, r) => sum + (r.sof || this.estimateDriverRating()), 0) /
Math.max(1, facts.results.filter(r => r.status === 'finished').length))
: 0;
@@ -297,7 +295,7 @@ export class DrivingRatingCalculator {
* Estimate driver rating for SoF calculation
* This is a placeholder - in real implementation, would query user rating snapshot
*/
private static estimateDriverRating(userId: string): number {
private static estimateDriverRating(): number {
// Default rating for new drivers
return 50;
}