Refactor team name formatting and update version to 1.8.6
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 2m27s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-08-26 10:22:08 +02:00
parent 7aadb5e215
commit 2103e9c1e8
10 changed files with 87 additions and 54 deletions

View File

@@ -1,11 +1,8 @@
import { listSpielplanSeasons, readSpielplanData, validateSeasonSlug } from '../../utils/spielplan-data.js'
import { formatTeamDisplayName } from '../../../utils/team-display.js'
function teamLabel(teamName, teamAgeGroup) {
const name = String(teamName || '').trim()
const age = String(teamAgeGroup || '').trim()
if (!name) return ''
const isYouth = age.toLowerCase().includes('jugend') || name.toLowerCase().includes('jugend')
return isYouth ? `(J) ${name}` : name
return formatTeamDisplayName(teamName, teamAgeGroup)
}
function extractHarheimerTeams(rows) {
@@ -58,4 +55,4 @@ export default defineEventHandler(async (event) => {
seasons,
teams: extractHarheimerTeams(dataResult.data)
}
})
})