feat: Add VAC/ban status column to match scoreboard
Add per-player VAC and game ban status display in match details scoreboard. ## Changes - **Types & Schema**: Add vac and game_ban optional boolean fields to MatchPlayer - **Transformer**: Extract vac and game_ban from legacy player.vac and player.game_ban - **UI**: Add "Status" column to details table showing VAC/BAN badges - **Mocks**: Update mock player data with ban status fields ## Implementation Details The backend API provides per-player ban status in match details via the player object (player.vac and player.game_ban). These were previously not being extracted by the transformer. The new Status column displays: - Red "VAC" badge if player has VAC ban - Red "BAN" badge if player has game ban - Both badges if player has both bans - "-" if player has no bans Users can identify banned players at a glance in the scoreboard, improving transparency and match context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -131,6 +131,28 @@
|
||||
if (numValue > 0) return `<span class="badge badge-warning badge-sm">${numValue}</span>`;
|
||||
return '<span class="text-base-content/40">-</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'vac' as keyof (typeof playersWithStats)[0],
|
||||
label: 'Status',
|
||||
sortable: true,
|
||||
align: 'center' as const,
|
||||
render: (
|
||||
_value: string | number | boolean | undefined,
|
||||
row: (typeof playersWithStats)[0]
|
||||
) => {
|
||||
const badges = [];
|
||||
if (row.vac) {
|
||||
badges.push('<span class="badge badge-error badge-sm" title="VAC Banned">VAC</span>');
|
||||
}
|
||||
if (row.game_ban) {
|
||||
badges.push('<span class="badge badge-error badge-sm" title="Game Banned">BAN</span>');
|
||||
}
|
||||
if (badges.length > 0) {
|
||||
return `<div class="flex gap-1 justify-center">${badges.join('')}</div>`;
|
||||
}
|
||||
return '<span class="text-base-content/40">-</span>';
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user