Compare commits

...

2 Commits

Author SHA1 Message Date
9f93ed8d7e pre git flow init 2024-09-26 16:50:50 +02:00
BESBOT Axel
b303052d98 added AffectationController IncidentController RepresentationController 2024-09-26 16:38:17 +02:00
13 changed files with 348 additions and 15 deletions

View File

@ -1,3 +1,10 @@
body { body {
background-color: skyblue; background-color: #31393C;
}
.wrapper {
color: #D0DDD7;
margin: 1em auto;
max-width: 800px;
width: 95%;
font: 18px/1.5 sans-serif;
} }

View File

@ -0,0 +1,18 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class AffectationController extends AbstractController
{
#[Route('/affectation', name: 'app_affectation')]
public function index(): Response
{
return $this->render('affectation/index.html.twig', [
'controller_name' => 'AffectationController',
]);
}
}

View File

@ -6,13 +6,13 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
#[Route('/dashboard', name: 'IndexController')] #[Route('/dashboard', name: 'DashboardController')]
class IndexController extends AbstractController class DashboardController extends AbstractController
{ {
#[Route('', name: '_index')] #[Route('', name: '_index')]
public function index(): Response public function index(): Response
{ {
return $this->render('index/index.html.twig'); return $this->render('dashboard/dashboard.html.twig');
} }
} }

View File

@ -0,0 +1,18 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class IncidentController extends AbstractController
{
#[Route('/incident', name: 'app_incident')]
public function index(): Response
{
return $this->render('incident/index.html.twig', [
'controller_name' => 'IncidentController',
]);
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class RepresentationController extends AbstractController
{
#[Route('/representation', name: 'app_representation')]
public function index(): Response
{
return $this->render('representation/index.html.twig', [
'controller_name' => 'RepresentationController',
]);
}
}

View File

@ -1 +1,44 @@
<?php <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class Category
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $label = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
}
?>

View File

@ -2,10 +2,10 @@
namespace App\Entity; namespace App\Entity;
use App\Repository\EmployeeRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EmployeeRepository::class)]
class Employee class Employee
{ {
#[ORM\Id] #[ORM\Id]

View File

@ -1 +1,42 @@
<?php <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class Incident
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $description = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setLabel(string $description): static
{
$this->description = $description;
return $this;
}
}
?>

View File

@ -1 +1,44 @@
<?php <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class IncidentType
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $label = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
}
?>

View File

@ -1 +1,47 @@
<?php <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class Mission
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $label = null;
#[ORM\ManyToOne(targetEntity: Requirements::class, inversedBy: 'missions')]
private ?Requirements $requirements = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
}
?>

View File

@ -5,17 +5,16 @@ namespace App\Entity;
use App\Repository\RequirementsRepository; use App\Repository\RequirementsRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\OneToMany(targetEntity: Mission::class, mappedBy: 'requirements')]
#[ORM\OneToMany(targetEntity: Skill::class, mappedBy: 'requirements')]
class Requirements class Requirements
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\OneToMany(targetEntity: Mission::class, mappedBy: 'requirements')]
#[ORM\Column] #[ORM\JoinColumn(nullable: false)]
private ?int $id = null; private ?Mission $mission = null;
public function getId(): ?int #[ORM\Id]
{ #[ORM\OneToMany(targetEntity: Skill::class, mappedBy: 'requirements')]
return $this->id; #[ORM\JoinColumn(nullable: false)]
} private ?Skill $skill = null;
} }

View File

@ -1 +1,56 @@
<?php <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class Ride
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $label = null;
#[ORM\Column]
private ?int $count = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
public function getCount(): ?int
{
return $this->count;
}
public function setCount(int $count): static
{
$this->count = $count;
return $this;
}
}

View File

@ -1 +1,46 @@
<?php <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class Skill
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $label = null;
#[ORM\ManyToOne(targetEntity: Requirements::class, inversedBy: 'skills')]
private ?Requirements $requirements = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): static
{
$this->id = $id;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
}