feat(tournament): add debug logging for member eligibility checks in TournamentTab

- Introduced debug logging to track member eligibility filtering in the TournamentTab component, providing insights into birth year comparisons and class item constraints for a subset of members.
- This enhancement aids in troubleshooting and ensures clarity in the filtering logic for tournament participants.
This commit is contained in:
Torsten Schulz (local)
2026-01-30 23:28:28 +01:00
parent b1e184c4c2
commit c3366313d6

View File

@@ -1678,6 +1678,20 @@ export default {
if (parts.length >= 3) birthYear = parseInt(parts[2], 10);
}
if (birthYear == null || !Number.isFinite(birthYear)) return true;
// Debug: Zeige Filterung für erste paar Mitglieder
if (Math.random() < 0.1) {
console.log('[memberEligibleForClass]', {
member: `${member.firstName} ${member.lastName}`,
birthYear,
classItem: classItem.name,
minBirthYear: classItem.minBirthYear,
maxBirthYear: classItem.maxBirthYear,
tooOld: classItem.minBirthYear != null && birthYear < classItem.minBirthYear,
tooYoung: classItem.maxBirthYear != null && birthYear > classItem.maxBirthYear
});
}
if (classItem.minBirthYear != null && birthYear < classItem.minBirthYear) return false;
if (classItem.maxBirthYear != null && birthYear > classItem.maxBirthYear) return false;
return true;