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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user