Remove debug console logs from MannschaftenUebersicht, TermineVorschau, spielplaene, and filterData components to clean up code and improve performance.

This commit is contained in:
Torsten Schulz (local)
2025-12-19 10:06:01 +01:00
parent cbe02a6caf
commit 5a85c3d31a
5 changed files with 2 additions and 41 deletions

View File

@@ -91,23 +91,18 @@ const mannschaften = ref([])
const loadMannschaften = async () => {
try {
console.log('Lade Mannschaften...')
const response = await fetch('/data/mannschaften.csv')
console.log('Response:', response)
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)
}
const csv = await response.text()
console.log('CSV Text:', csv)
// Vereinfachter CSV-Parser
const lines = csv.split('\n').filter(line => line.trim() !== '')
console.log('CSV Lines:', lines)
if (lines.length < 2) {
console.log('Keine Datenzeilen gefunden')
return
}
@@ -132,7 +127,6 @@ const loadMannschaften = async () => {
values.push(current.trim())
if (values.length < 10) {
console.log(`Zeile ${index + 2} hat zu wenige Werte:`, values)
return null
}
@@ -149,14 +143,8 @@ const loadMannschaften = async () => {
letzte_aktualisierung: values[9] ? values[9].trim() : ''
}
console.log(`Mannschaft ${index + 1}:`, mannschaft)
console.log(`Parsed values count: ${values.length}`)
console.log(`Letzte Aktualisierung raw: "${values[9]}"`)
console.log(`Letzte Aktualisierung trimmed: "${values[9] ? values[9].trim() : 'undefined'}")`)
return mannschaft
}).filter(mannschaft => mannschaft !== null)
console.log('Alle geparsten Mannschaften:', mannschaften.value)
} catch (error) {
console.error('Fehler beim Laden der Mannschaften:', error)
}

View File

@@ -49,7 +49,6 @@ const termine = ref([])
const naechsteTermine = computed(() => {
const heute = new Date()
console.log('Heute ist:', heute.toISOString().split('T')[0])
const kommende = termine.value
.filter(t => {
@@ -61,9 +60,7 @@ const naechsteTermine = computed(() => {
} else {
terminDatum = new Date(t.datum)
}
const istKommend = terminDatum >= heute
console.log(`Termin ${t.titel} (${t.datum}): ${istKommend ? 'KOMMEND' : 'VERSTRICHEN'}`)
return istKommend
return terminDatum >= heute
})
.sort((a, b) => {
const da = new Date(`${a.datum}${a.uhrzeit ? 'T' + a.uhrzeit + ':00' : ''}`)
@@ -71,7 +68,6 @@ const naechsteTermine = computed(() => {
return da - db
})
console.log('Kommende Termine:', kommende)
return kommende
})