add generate new tournament button

This commit is contained in:
Aleksandr Zaitsev 2024-03-11 15:41:05 +02:00
parent c8fdc370d5
commit f02e3d9319
2 changed files with 4 additions and 11 deletions

View File

@ -2,16 +2,10 @@
namespace App\Controller;
use App\Entity\Division;
use App\Entity\Player;
use App\Entity\Tournament;
use App\Repository\DivisionRepository;
use App\Repository\PlayerRepository;
use App\Repository\TournamentRepository;
use App\Service\PlayOffGameService;
use App\Service\QualifyingGameService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
@ -19,11 +13,9 @@ class TournamentController extends AbstractController
{
public function __construct(
private TournamentRepository $tournamentRepository,
private DivisionRepository $divisionRepository,
private PlayerRepository $playerRepository,
private QualifyingGameService $qualifyingGameService,
private PlayOffGameService $playOffGameService,
private readonly TournamentRepository $tournamentRepository,
private readonly QualifyingGameService $qualifyingGameService,
private readonly PlayOffGameService $playOffGameService,
) {}
#[Route(path: '/tournament/{tournamentId}', name: 'tournament_get', methods: ['GET'])]

View File

@ -1,6 +1,7 @@
{% extends "base.html.twig" %}
{% block body %}
<div class="container">
<div class="text-center mt-5"><a href="/" class="button">Generate new Tournament</a> </div>
<div class="text-center mt-5">
<h1>Tournament {{ tournament.getTitle() }}</h1>
</div>