|
|
|
@ -4,39 +4,40 @@ import {Team,TeamInfo,Color,User,Member} from "../model/Team/Team"
|
|
|
|
|
|
|
|
|
|
export default function TeamPanel({isCoach, team}: {isCoach: boolean, team: Team }){
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div id="mainDiv">
|
|
|
|
|
<header>
|
|
|
|
|
<h1><a href="{{ path('/') }}">IQBall</a></h1>
|
|
|
|
|
</header>
|
|
|
|
|
<TeamDisplay team={team.info}/>
|
|
|
|
|
|
|
|
|
|
{isCoach && <CoachOptions id={team.info.id}/>}
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Membres :</h2>
|
|
|
|
|
<MembersDisplay members={team.members}/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<MembersDisplay members={team.members}/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TeamDisplay({ team}: {team : TeamInfo}) {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div id="teamInfo">
|
|
|
|
|
<div>
|
|
|
|
|
<h1>{team.name}</h1>
|
|
|
|
|
<img src={team.picture} alt="Logo d'équipe" />
|
|
|
|
|
<img id="logo" src={team.picture} alt="Logo d'équipe" />
|
|
|
|
|
</div>
|
|
|
|
|
<div id="colors">
|
|
|
|
|
<p>Couleur principale</p>
|
|
|
|
|
<ColorDisplay color={team.mainColor.hex}/>
|
|
|
|
|
<ColorDisplay color={team.mainColor}/>
|
|
|
|
|
<p>Couleur secondaire</p>
|
|
|
|
|
<ColorDisplay color={team.secondColor.hex}/>
|
|
|
|
|
<ColorDisplay color={team.secondColor}/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ColorDisplay({color}: {color : string}){
|
|
|
|
|
function ColorDisplay({color}: {color : Color}){
|
|
|
|
|
return(
|
|
|
|
|
<div className="square" style={{backgroundColor: color}}/>
|
|
|
|
|
<div className="square" style={{backgroundColor: color.hex}}/>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -53,7 +54,8 @@ function MembersDisplay({members}:{members : Member[]}){
|
|
|
|
|
<MemberDisplay member={member}/>
|
|
|
|
|
);
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div id="Members">
|
|
|
|
|
<h2>Membres :</h2>
|
|
|
|
|
{listMember}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
@ -61,8 +63,8 @@ function MembersDisplay({members}:{members : Member[]}){
|
|
|
|
|
|
|
|
|
|
function MemberDisplay({member}: {member : Member}){
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<img src={member.user.profilePicture} alt="Photo de profile"/>
|
|
|
|
|
<div className="Member">
|
|
|
|
|
<img id="profilePicture" src={member.user.profilePicture} alt="Photo de profile"/>
|
|
|
|
|
<p>{member.user.name}</p>
|
|
|
|
|
<p>{member.role}</p>
|
|
|
|
|
<p>{member.user.email}</p>
|
|
|
|
|