Füge Unterstützung für Spielplan-Team-ID in mehreren Komponenten hinzu und aktualisiere CSV-Export
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 7m2s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 2m15s

This commit is contained in:
Torsten Schulz (local)
2026-07-17 08:29:34 +02:00
parent 0ab71166aa
commit f060c9771f
6 changed files with 37 additions and 10 deletions

View File

@@ -473,6 +473,7 @@ const loadMannschaften = async () => {
spieler: values[7].trim(),
weitere_informationen_link: values[8].trim(),
letzte_aktualisierung: values[9].trim(),
spielplan_mannschaft_id: values[10] ? values[10].trim() : '',
slug: values[0].trim().toLowerCase().replace(/\s+/g, '-')
}
}).filter(mannschaft => mannschaft !== null)
@@ -557,6 +558,12 @@ const isExactHarheimTeam = (teamName, variant) => {
}
const isSpielForMannschaft = (row, cmsMannschaft) => {
const configuredTeamId = String(mannschaft.value?.spielplan_mannschaft_id || '').trim()
if (configuredTeamId) {
return String(row.HeimMannschaftId || '').trim() === configuredTeamId ||
String(row.GastMannschaftId || '').trim() === configuredTeamId
}
const variants = getTeamVariants(cmsMannschaft)
if (!variants.length) return false