Verbessere die Logik zur Ermittlung des liturgischen Tages: Normalisiere das Datum und vergleiche nur das Datum ohne Zeitstempel. Füge Konsolenausgaben hinzu, um die Ergebnisse der Suche nach liturgischen Tagen zu protokollieren.
This commit is contained in:
@@ -271,11 +271,22 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normalisiere das Datum (HTML input gibt YYYY-MM-DD zurück)
|
||||||
|
const selectedDate = this.worshipData.date;
|
||||||
|
|
||||||
// Finde liturgischen Tag für das gewählte Datum
|
// Finde liturgischen Tag für das gewählte Datum
|
||||||
const liturgicalDay = this.liturgicalDays.find(day => day.date === this.worshipData.date);
|
const liturgicalDay = this.liturgicalDays.find(day => {
|
||||||
|
// Vergleiche nur das Datum (ignoriere mögliche Zeitstempel)
|
||||||
|
const dayDate = typeof day.date === 'string' ? day.date : day.date.split('T')[0];
|
||||||
|
return dayDate === selectedDate;
|
||||||
|
});
|
||||||
|
|
||||||
if (liturgicalDay) {
|
if (liturgicalDay) {
|
||||||
this.selectedDayName = { name: liturgicalDay.dayName };
|
this.selectedDayName = { name: liturgicalDay.dayName };
|
||||||
this.worshipData.dayName = liturgicalDay.dayName;
|
this.worshipData.dayName = liturgicalDay.dayName;
|
||||||
|
console.log('Liturgischer Tag gefunden:', liturgicalDay.dayName);
|
||||||
|
} else {
|
||||||
|
console.log('Kein liturgischer Tag gefunden für:', selectedDate);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async saveWorship() {
|
async saveWorship() {
|
||||||
|
|||||||
Reference in New Issue
Block a user