refactor page to use services

This commit is contained in:
2025-12-18 15:58:09 +01:00
parent f54fa5de5b
commit fc386db06a
45 changed files with 2254 additions and 1292 deletions

View File

@@ -0,0 +1,18 @@
import type { LeagueScoringPresetDTO } from '../types/LeagueScoringPresetDTO';
/**
* View Model for league scoring presets
* Transform from DTO to ViewModel with UI fields
*/
export class LeagueScoringPresetsViewModel {
presets: LeagueScoringPresetDTO[];
totalCount: number;
constructor(dto: {
presets: LeagueScoringPresetDTO[];
totalCount?: number;
}) {
this.presets = dto.presets;
this.totalCount = dto.totalCount ?? dto.presets.length;
}
}