Skip to content

Commit

Permalink
Merge pull request #403 from ungdev/dev
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
Suboyyy authored Oct 9, 2024
2 parents c18b189 + ac37959 commit ac9d2e7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 54 deletions.
7 changes: 6 additions & 1 deletion src/app/(dashboard)/admin/users/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,12 @@ const Users = () => {
e.preventDefault();
applySearch();
}}>
<Input value={search} onChange={setSearch} label="Giga recherche" placeholder="Nom, pseudo, email, équipe" />
<Input
value={search}
onChange={setSearch}
label="Giga recherche"
placeholder="Nom, pseudo, email, équipe, id, discordId"
/>
<Button primary type="submit">
Rechercher
</Button>
Expand Down
100 changes: 47 additions & 53 deletions src/app/tournaments/[id]/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,59 +103,53 @@ export function TournamentInformation({ tournamentId, animate = true }: { tourna
: tournament.casters?.map((caster) => caster.name).join(', ')}
</BoxContainer>
</div>
{loginAllowed &&
status.login &&
(status.admin || (status.team && (team?.lockedAt || team?.positionInQueue))) && (
<>
<Title level={3} type={1} align="center" className={styles.enrolledTeams}>
{tournament.playersPerTeam === 1 ? 'Joueurs inscrits' : 'Équipes inscrites'} :{' '}
{tournament.lockedTeamsCount} / {tournament.maxPlayers / tournament.playersPerTeam}
</Title>
<FillingBar
fullness={
animate ? (tournament.lockedTeamsCount * tournament.playersPerTeam) / tournament.maxPlayers : 0
}
className={styles.fillingBar}
/>
<Table
className={styles.table}
columns={
tournament.playersPerTeam > 1
? [
{ key: 'name', title: "Nom de l'équipe" },
// Commented for security reasons
//
// { key: 'players', title: 'Joueurs' },
]
: [{ key: 'players', title: 'Joueurs' }]
}
dataSource={tournament.teams
.filter((team) => team.lockedAt)
.map((team) =>
tournament.playersPerTeam > 1
? {
name: team.name,
// Commented for security reasons
//
players: team.players.map((player) => (
<>
{player.username}
<br />
</>
)),
}
: {
players: team.players.map((player) => (
<>
{player.username}
<br />
</>
)),
},
)}
/>
</>
)}
<>
<Title level={3} type={1} align="center" className={styles.enrolledTeams}>
{tournament.playersPerTeam === 1 ? 'Joueurs inscrits' : 'Équipes inscrites'} : {tournament.lockedTeamsCount}{' '}
/ {tournament.maxPlayers / tournament.playersPerTeam}
</Title>
<FillingBar
fullness={animate ? (tournament.lockedTeamsCount * tournament.playersPerTeam) / tournament.maxPlayers : 0}
className={styles.fillingBar}
/>
<Table
className={styles.table}
columns={
tournament.playersPerTeam > 1
? [
{ key: 'name', title: "Nom de l'équipe" },
// Commented for security reasons
//
// { key: 'players', title: 'Joueurs' },
]
: [{ key: 'players', title: 'Joueurs' }]
}
dataSource={tournament.teams
.filter((team) => team.lockedAt)
.map((team) =>
tournament.playersPerTeam > 1
? {
name: team.name,
// Commented for security reasons
//
players: team.players.map((player) => (
<>
{player.username}
<br />
</>
)),
}
: {
players: team.players.map((player) => (
<>
{player.username}
<br />
</>
)),
},
)}
/>
</>
</div>
</TournamentSwitcherAnimation>
);
Expand Down

0 comments on commit ac9d2e7

Please sign in to comment.