feat(TournamentStats): add internal tournament statistics endpoint and localization updates
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 37s

- Implemented a new endpoint `getInternalTournamentStats` in the tournament controller to retrieve statistics for internal tournaments based on club ID and selected months.
- Enhanced the tournament service to compute player statistics, including absolute and average rankings.
- Updated tournament routes to include the new statistics endpoint.
- Added localization strings for internal tournament statistics in multiple languages, improving user accessibility and experience.
- Integrated the new statistics component into the TournamentsView for better user interaction.
This commit is contained in:
Torsten Schulz (local)
2026-04-08 10:40:33 +02:00
parent 50fa07d0b7
commit 4a53801a54
21 changed files with 749 additions and 0 deletions

View File

@@ -59,6 +59,20 @@ export const getTournaments = async (req, res) => {
}
};
/** Ranglisten interne Einzel-Turniere (Gruppen- + K.-o.-Punkte) */
export const getInternalTournamentStats = async (req, res) => {
const { authcode: token } = req.headers;
const { clubId } = req.params;
const months = req.query.months;
try {
const data = await tournamentService.getInternalTournamentPlayerStats(token, clubId, months);
res.status(200).json(data);
} catch (error) {
console.error(error);
res.status(500).json({ error: error.message });
}
};
// 2. Neues Turnier anlegen
export const addTournament = async (req, res) => {
const { authcode: token } = req.headers;