feat: füge Unterstützung für importierte Spielplan-Teams hinzu und verbessere Teamfilter-Logik
This commit is contained in:
@@ -362,6 +362,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { rowMatchesTeamFilter } from '../../utils/spielplan-filter.js'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
@@ -563,45 +564,7 @@ const isSpielForMannschaft = (row, cmsMannschaft) => {
|
||||
String(row.GastMannschaftId || '').trim() === configuredTeamId
|
||||
}
|
||||
|
||||
const variants = getTeamVariants(cmsMannschaft)
|
||||
if (!variants.length) return false
|
||||
|
||||
const heimMannschaft = (row.HeimMannschaft || '').toLowerCase()
|
||||
const gastMannschaft = (row.GastMannschaft || '').toLowerCase()
|
||||
const heimAltersklasse = (row.HeimMannschaftAltersklasse || '').toLowerCase()
|
||||
const gastAltersklasse = (row.GastMannschaftAltersklasse || '').toLowerCase()
|
||||
const isHarheimerHeim = heimMannschaft.includes('harheimer tc')
|
||||
const isHarheimerGast = gastMannschaft.includes('harheimer tc')
|
||||
|
||||
if (!isHarheimerHeim && !isHarheimerGast) return false
|
||||
|
||||
const mannschaftMatch = variants.some((variant) => {
|
||||
if (isHarheimerHeim && isExactHarheimTeam(heimMannschaft, variant)) return true
|
||||
if (isHarheimerGast && isExactHarheimTeam(gastMannschaft, variant)) return true
|
||||
return false
|
||||
})
|
||||
|
||||
if (!mannschaftMatch) return false
|
||||
|
||||
if (cmsMannschaft.startsWith('Erwachsene')) {
|
||||
const isErwachsenenHeim = isHarheimerHeim &&
|
||||
heimAltersklasse.includes('erwachsene') &&
|
||||
!heimAltersklasse.includes('jugend')
|
||||
const isErwachsenenGast = isHarheimerGast &&
|
||||
gastAltersklasse.includes('erwachsene') &&
|
||||
!gastAltersklasse.includes('jugend')
|
||||
return isErwachsenenHeim || isErwachsenenGast
|
||||
}
|
||||
|
||||
if (cmsMannschaft === 'Jugendmannschaft') {
|
||||
const isJugendHeim = isHarheimerHeim &&
|
||||
(heimAltersklasse.includes('jugend') || heimMannschaft.includes('jugend'))
|
||||
const isJugendGast = isHarheimerGast &&
|
||||
(gastAltersklasse.includes('jugend') || gastMannschaft.includes('jugend'))
|
||||
return isJugendHeim || isJugendGast
|
||||
}
|
||||
|
||||
return true
|
||||
return rowMatchesTeamFilter(row, cmsMannschaft)
|
||||
}
|
||||
|
||||
const parseTerminTimestamp = (row) => {
|
||||
|
||||
Reference in New Issue
Block a user