applied reviews changes

pull/84/head
Maël DAIM 1 year ago
parent 1efec8c0d9
commit 00efd0f43d

@ -1,11 +1,11 @@
#mainDiv {
#main-div {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
}
header {
#main-div header {
display: flex;
justify-content: center;
background-color: #525252;
@ -25,11 +25,7 @@ header h1 a {
border: 2px white solid;
}
#main_color {
border: solid;
}
#teamInfo {
#team-info {
display: flex;
flex-direction: column;
align-items: center;
@ -39,13 +35,13 @@ header h1 a {
border-radius: 10px;
}
#firstPart {
#first-part {
display: flex;
flex-direction: column;
align-items: center;
}
#teamName {
#team-name {
font-size: 2.8em;
}
@ -67,7 +63,7 @@ header h1 a {
color: white;
}
#actualColors {
#actual-colors {
display: flex;
flex-direction: row;
justify-content: space-around;
@ -97,21 +93,21 @@ header h1 a {
margin-bottom: 10px;
}
#headMembers {
#head-members {
width: 33%;
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
#addMember {
#add-member {
height: 30px;
aspect-ratio: 1/1;
border-radius: 100%;
align-self: center;
}
#Members {
#members {
display: flex;
flex-direction: column;
background-color: #bcbcbc;
@ -121,7 +117,7 @@ header h1 a {
border-radius: 10px;
}
.Member {
.member {
width: 60%;
background-color: white;
display: flex;
@ -133,7 +129,7 @@ header h1 a {
margin-bottom: 5px;
}
#profilePicture {
#profile-picture {
height: 40px;
width: 40px;
}

@ -12,7 +12,7 @@ export default function TeamPanel({
currentUserId: number
}) {
return (
<div id="mainDiv">
<div id="main-div">
<header>
<h1>
<a href={BASE + "/"}>IQBall</a>
@ -34,9 +34,9 @@ export default function TeamPanel({
function TeamDisplay({ team }: { team: TeamInfo }) {
return (
<div id="teamInfo">
<div id="firstPart">
<h1 id="teamName">{team.name}</h1>
<div id="team-info">
<div id="first-part">
<h1 id="team-name">{team.name}</h1>
<img id="logo" src={team.picture} alt="Logo d'équipe" />
</div>
<div id="colors">
@ -44,7 +44,7 @@ function TeamDisplay({ team }: { team: TeamInfo }) {
<p>Couleur principale</p>
<p>Couleur secondaire</p>
</div>
<div id="actualColors">
<div id="actual-colors">
<ColorDisplay color={team.mainColor} />
<ColorDisplay color={team.secondColor} />
</div>
@ -100,12 +100,12 @@ function MembersDisplay({
/>
))
return (
<div id="Members">
<div id="headMembers">
<div id="members">
<div id="head-members">
<h2>Membres :</h2>
{isCoach && (
<button
id="addMember"
id="add-member"
onClick={() =>
(window.location.href = `${BASE}/team/${idTeam}/addMember`)
}>
@ -130,9 +130,9 @@ function MemberDisplay({
currentUserId: number
}) {
return (
<div className="Member">
<div className="member">
<img
id="profilePicture"
id="profile-picture"
src={member.user.profilePicture}
alt="Photo de profile"
/>

@ -121,7 +121,7 @@ function runMatch($match, MutableSessionHandle $session): HttpResponse {
], HttpCodes::NOT_FOUND);
}
return App::runAction('/login', $match['target'], $match['params'], $session);
return App::runAction($basePath . '/login', $match['target'], $match['params'], $session);
}
//this is a global variable

@ -127,7 +127,7 @@ class TeamController {
return ViewHttpResponse::twig('error.html.twig', [
'failures' => [ValidationFail::unauthorized("Vous n'avez pas accès à cette équipe.")],
], HttpCodes::FORBIDDEN);
} else {
}
$role = $this->model->isCoach($id, $session->getAccount()->getUser()->getEmail());
return ViewHttpResponse::react(
@ -141,7 +141,6 @@ class TeamController {
'currentUserId' => $session->getAccount()->getUser()->getId()]
);
}
}
/**
* @param int $idTeam

Loading…
Cancel
Save