Completing team's actions, adding css and implementing account within the teams
continuous-integration/drone/push Build is failing Details

pull/84/head
Maël DAIM 1 year ago
parent 3de131d112
commit dde6eaa8d4

@ -46,5 +46,5 @@ CREATE TABLE Member
id_user integer, id_user integer,
role text CHECK (role IN ('Coach', 'Player')), role text CHECK (role IN ('Coach', 'Player')),
FOREIGN KEY (id_team) REFERENCES Team (id), FOREIGN KEY (id_team) REFERENCES Team (id),
FOREIGN KEY (id_user) REFERENCES User (id) FOREIGN KEY (id_user) REFERENCES Account (id)
); );

@ -4,6 +4,7 @@ namespace IQBall\App\Controller;
use IQBall\App\Session\SessionHandle; use IQBall\App\Session\SessionHandle;
use IQBall\App\ViewHttpResponse; use IQBall\App\ViewHttpResponse;
use IQBall\Core\Data\Account;
use IQBall\Core\Http\HttpRequest; use IQBall\Core\Http\HttpRequest;
use IQBall\Core\Http\HttpResponse; use IQBall\Core\Http\HttpResponse;
use IQBall\Core\Model\TeamModel; use IQBall\Core\Model\TeamModel;
@ -107,6 +108,16 @@ class TeamController {
return ViewHttpResponse::twig('display_teams.html.twig', ['teams' => $teams]); return ViewHttpResponse::twig('display_teams.html.twig', ['teams' => $teams]);
} }
public function deleteTeamByid(array $request,SessionHandle $session):HttpResponse{
$a = $session->getAccount();
if(isCoach($a->getEmail(),intval($request['idTeam']))){
}
return ;
}
/** /**
* @param int $id * @param int $id
* @param SessionHandle $session * @param SessionHandle $session

@ -81,5 +81,5 @@ class TeamGateway {
)[0]['id'] ?? null; )[0]['id'] ?? null;
} }
public function isCoach(string $email,int $idTeam):
} }

@ -79,4 +79,7 @@ class TeamModel {
return $teamId; return $teamId;
} }
public function isCoach($email,$idTeam): bool{
}
} }

Loading…
Cancel
Save