revert: remove team filter from build(), show all member stats regardless of event team
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -257,16 +257,7 @@ function build(rows, ids){
|
|||||||
for(const rec of rows){
|
for(const rec of rows){
|
||||||
const u = rec.user||{};
|
const u = rec.user||{};
|
||||||
const uid = rec.userId||u.id;
|
const uid = rec.userId||u.id;
|
||||||
if(!uid || !ids.has(uid)) continue;
|
if(uid && ids.has(uid)){ kept.push(rec); matched.add(uid); }
|
||||||
|
|
||||||
// If the placing record carries team info, only keep entries where the
|
|
||||||
// player was registered under Gateway Gamers for that result.
|
|
||||||
const recTeamId = rec.teamId || (rec.team && rec.team.id);
|
|
||||||
const recTeamName = rec.teamName || (rec.team && rec.team.name)||"";
|
|
||||||
if(recTeamId && recTeamId !== CONFIG.teamId) continue;
|
|
||||||
if(!recTeamId && recTeamName && !recTeamName.toLowerCase().includes("gateway gamers")) continue;
|
|
||||||
|
|
||||||
kept.push(rec); matched.add(uid);
|
|
||||||
}
|
}
|
||||||
kept.sort((a,b)=> Number(b.ITCPoints||0)-Number(a.ITCPoints||0));
|
kept.sort((a,b)=> Number(b.ITCPoints||0)-Number(a.ITCPoints||0));
|
||||||
return {kept, matchedCount:matched.size};
|
return {kept, matchedCount:matched.size};
|
||||||
|
|||||||
Reference in New Issue
Block a user