Compare commits
No commits in common. "e7a9a3fd5c68d76ef30122b75eafbe7c7e5f6288" and "922834da8a7f79b0483720086ccd6b7d3581f771" have entirely different histories.
e7a9a3fd5c
...
922834da8a
@ -1,76 +0,0 @@
|
|||||||
body {
|
|
||||||
background: linear-gradient(to right, #5CE1E6, #C1FF72, #cb6ce6);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
text-align: center;
|
|
||||||
font-family: "Fredoka", sans-serif;
|
|
||||||
font-optical-sizing: auto;
|
|
||||||
font-style: normal;
|
|
||||||
font-variation-settings: "wdth" 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 60%;
|
|
||||||
height: auto;
|
|
||||||
float: right;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: auto;
|
|
||||||
margin: auto 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
|
||||||
margin-right: 20px;
|
|
||||||
background: rgba(255, 255, 255, 0.15);
|
|
||||||
border-radius: 16px;
|
|
||||||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
|
|
||||||
backdrop-filter: blur(8px);
|
|
||||||
-webkit-backdrop-filter: blur(8px);
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form div {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo{
|
|
||||||
margin-bottom: 65%;
|
|
||||||
margin-right: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-family: "Fredoka", sans-serif;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"],
|
|
||||||
input[type="password"] {
|
|
||||||
width: 90%;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
padding: 10px 20px;
|
|
||||||
background-color: #5CE1E6;
|
|
||||||
color: black;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-color: #CB6CE6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit {
|
|
||||||
margin-left: 15%;
|
|
||||||
}
|
|
@ -1,105 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Doctrine\Migrations\AbstractMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Auto-generated Migration: Please modify to your needs!
|
|
||||||
*/
|
|
||||||
final class Version20241011084601 extends AbstractMigration
|
|
||||||
{
|
|
||||||
public function getDescription(): string
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
|
||||||
$this->addSql('CREATE SEQUENCE category_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE employee_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE incident_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE incident_type_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE mission_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE ride_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE skill_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE TABLE assignment (employee INT NOT NULL, ride INT NOT NULL, start_hour TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, end_hour TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(employee, ride))');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_30C544BA5D9F75A19B3D7CD0 ON assignment (employee, ride)');
|
|
||||||
$this->addSql('CREATE TABLE category (id INT NOT NULL, label VARCHAR(30) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE employee (id INT NOT NULL, missions_id INT DEFAULT NULL, incidents_id INT DEFAULT NULL, email VARCHAR(180) NOT NULL, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, password VARCHAR(255) NOT NULL, roles JSON NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_5D9F75A117C042CF ON employee (missions_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_5D9F75A155955332 ON employee (incidents_id)');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON employee (email)');
|
|
||||||
$this->addSql('CREATE TABLE employee_skill (employee INT NOT NULL, skill INT NOT NULL, PRIMARY KEY(employee, skill))');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_B630E90E5D9F75A15E3DE477 ON employee_skill (employee, skill)');
|
|
||||||
$this->addSql('CREATE TABLE incident (id INT NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE incident_type (id INT NOT NULL, incidents_id INT DEFAULT NULL, label VARCHAR(30) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_66D2209655955332 ON incident_type (incidents_id)');
|
|
||||||
$this->addSql('CREATE TABLE mission (id INT NOT NULL, label VARCHAR(30) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE mission_category (mission INT NOT NULL, category INT NOT NULL, PRIMARY KEY(mission, category))');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_EB018789067F23C64C19C1 ON mission_category (mission, category)');
|
|
||||||
$this->addSql('CREATE TABLE representation (employee INT NOT NULL, ride INT NOT NULL, count INT NOT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(employee, ride))');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_29D5499E5D9F75A19B3D7CD0 ON representation (employee, ride)');
|
|
||||||
$this->addSql('CREATE TABLE requirement (mission INT NOT NULL, skill INT NOT NULL, PRIMARY KEY(mission, skill))');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_DB3F55509067F23C5E3DE477 ON requirement (mission, skill)');
|
|
||||||
$this->addSql('CREATE TABLE ride (id INT NOT NULL, incident_types_id INT DEFAULT NULL, missions_id INT DEFAULT NULL, label VARCHAR(30) NOT NULL, count INT NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_9B3D7CD076775724 ON ride (incident_types_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_9B3D7CD017C042CF ON ride (missions_id)');
|
|
||||||
$this->addSql('CREATE TABLE skill (id INT NOT NULL, label VARCHAR(30) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
|
|
||||||
$this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\'');
|
|
||||||
$this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\'');
|
|
||||||
$this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\'');
|
|
||||||
$this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$
|
|
||||||
BEGIN
|
|
||||||
PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text);
|
|
||||||
RETURN NEW;
|
|
||||||
END;
|
|
||||||
$$ LANGUAGE plpgsql;');
|
|
||||||
$this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;');
|
|
||||||
$this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();');
|
|
||||||
$this->addSql('ALTER TABLE employee ADD CONSTRAINT FK_5D9F75A117C042CF FOREIGN KEY (missions_id) REFERENCES mission (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE employee ADD CONSTRAINT FK_5D9F75A155955332 FOREIGN KEY (incidents_id) REFERENCES incident (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE incident_type ADD CONSTRAINT FK_66D2209655955332 FOREIGN KEY (incidents_id) REFERENCES incident (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE ride ADD CONSTRAINT FK_9B3D7CD076775724 FOREIGN KEY (incident_types_id) REFERENCES incident_type (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE ride ADD CONSTRAINT FK_9B3D7CD017C042CF FOREIGN KEY (missions_id) REFERENCES mission (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
// this down() migration is auto-generated, please modify it to your needs
|
|
||||||
$this->addSql('CREATE SCHEMA public');
|
|
||||||
$this->addSql('DROP SEQUENCE category_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE employee_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE incident_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE incident_type_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE mission_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE ride_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE skill_id_seq CASCADE');
|
|
||||||
$this->addSql('ALTER TABLE employee DROP CONSTRAINT FK_5D9F75A117C042CF');
|
|
||||||
$this->addSql('ALTER TABLE employee DROP CONSTRAINT FK_5D9F75A155955332');
|
|
||||||
$this->addSql('ALTER TABLE incident_type DROP CONSTRAINT FK_66D2209655955332');
|
|
||||||
$this->addSql('ALTER TABLE ride DROP CONSTRAINT FK_9B3D7CD076775724');
|
|
||||||
$this->addSql('ALTER TABLE ride DROP CONSTRAINT FK_9B3D7CD017C042CF');
|
|
||||||
$this->addSql('DROP TABLE assignment');
|
|
||||||
$this->addSql('DROP TABLE category');
|
|
||||||
$this->addSql('DROP TABLE employee');
|
|
||||||
$this->addSql('DROP TABLE employee_skill');
|
|
||||||
$this->addSql('DROP TABLE incident');
|
|
||||||
$this->addSql('DROP TABLE incident_type');
|
|
||||||
$this->addSql('DROP TABLE mission');
|
|
||||||
$this->addSql('DROP TABLE mission_category');
|
|
||||||
$this->addSql('DROP TABLE representation');
|
|
||||||
$this->addSql('DROP TABLE requirement');
|
|
||||||
$this->addSql('DROP TABLE ride');
|
|
||||||
$this->addSql('DROP TABLE skill');
|
|
||||||
$this->addSql('DROP TABLE messenger_messages');
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,8 +11,6 @@ class AffectationController extends AbstractController
|
|||||||
#[Route('/affectation', name: 'app_affectation')]
|
#[Route('/affectation', name: 'app_affectation')]
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
return $this->render('affectation/index.html.twig', [
|
return $this->render('affectation/index.html.twig', [
|
||||||
'controller_name' => 'AffectationController',
|
'controller_name' => 'AffectationController',
|
||||||
]);
|
]);
|
||||||
|
@ -12,6 +12,7 @@ class DashboardController extends AbstractController
|
|||||||
#[Route('', name: '_index')]
|
#[Route('', name: '_index')]
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
return $this->render('dashboard/index.html.twig');
|
|
||||||
|
return $this->render('dashboard/dashboard.html.twig');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,20 +4,17 @@ namespace App\Entity;
|
|||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
#[ORM\Table(name: 'Assignment')]
|
||||||
#[ORM\UniqueConstraint(
|
|
||||||
columns: ['employee', 'ride']
|
|
||||||
)]
|
|
||||||
class Assignment
|
class Assignment
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Employee::class, inversedBy: 'assignments')]
|
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'assignments')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Employee $employee = null;
|
private ?Employee $employee = null;
|
||||||
|
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Ride::class, inversedBy: 'assignments')]
|
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'assignments')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Ride $ride = null;
|
private ?Ride $ride = null;
|
||||||
|
|
||||||
#[ORM\Column]
|
#[ORM\Column]
|
||||||
|
@ -6,7 +6,7 @@ namespace App\Entity;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
|
||||||
class Category
|
class Category
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@ -17,8 +17,8 @@ class Category
|
|||||||
#[ORM\Column(length: 30)]
|
#[ORM\Column(length: 30)]
|
||||||
private ?string $label = null;
|
private ?string $label = null;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: MissionCategory::class, mappedBy: 'category')]
|
#[ORM\ManyToOne(targetEntity: MissionCategory::class, inversedBy: 'category')]
|
||||||
private Collection $missionCategories;
|
private Collection $missionCategory;
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
@ -54,31 +54,18 @@ class Category
|
|||||||
$this->mission = $mission;
|
$this->mission = $mission;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMissionCategorie(): Collection
|
public function getMissionCategory(): Collection
|
||||||
{
|
{
|
||||||
return $this->missionCategories;
|
return $this->missionCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addMissionCategory(MissionCategory $missionCategory): static
|
public function setMissionCategory(Collection $missionCategory): void
|
||||||
{
|
{
|
||||||
if(!$this->missionCategories->contains($missionCategory)) {
|
$this->missionCategory = $missionCategory;
|
||||||
$this->missionCategories->add($missionCategory);
|
|
||||||
$missionCategory->setCategory($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeMissionCategory(MissionCategory $missionCategory): static
|
|
||||||
{
|
|
||||||
if($this->missionCategories->removeElement($missionCategory)) {
|
|
||||||
if($missionCategory->getCategory() === $this) {
|
|
||||||
$missionCategory->setCategory(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
|
||||||
#[ORM\Entity]
|
#[ORM\Entity(repositoryClass: EmployeeRepository::class)]
|
||||||
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL', fields: ['email'])]
|
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL', fields: ['email'])]
|
||||||
class Employee implements UserInterface, PasswordAuthenticatedUserInterface
|
class Employee implements UserInterface, PasswordAuthenticatedUserInterface
|
||||||
{
|
{
|
||||||
@ -33,9 +33,8 @@ class Employee implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
#[ORM\Column]
|
#[ORM\Column]
|
||||||
private array $roles = [];
|
private array $roles = [];
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: EmployeeSkill::class, mappedBy: 'employee')]
|
#[ORM\ManyToOne(targetEntity: EmployeeSkill::class, inversedBy: 'employee')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'employee')]
|
private Collection $employeeskills;
|
||||||
private Collection $employeeSkills;
|
|
||||||
|
|
||||||
#[ORM\ManyToOne(targetEntity: Mission::class, inversedBy: 'employee')]
|
#[ORM\ManyToOne(targetEntity: Mission::class, inversedBy: 'employee')]
|
||||||
private Collection $missions;
|
private Collection $missions;
|
||||||
@ -43,58 +42,40 @@ class Employee implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
#[ORM\ManyToOne(targetEntity: Incident::class, inversedBy: 'employee')]
|
#[ORM\ManyToOne(targetEntity: Incident::class, inversedBy: 'employee')]
|
||||||
private Collection $incidents;
|
private Collection $incidents;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Assignment::class, mappedBy: 'employee')]
|
#[ORM\ManyToOne(targetEntity: Assignment::class, inversedBy: 'employee')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'employee')]
|
|
||||||
private Collection $assignments;
|
private Collection $assignments;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Representation::class, mappedBy: 'employee')]
|
#[ORM\ManyToOne(targetEntity: Representation::class, inversedBy: 'employee')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'employee')]
|
|
||||||
private Collection $representations;
|
private Collection $representations;
|
||||||
|
|
||||||
public function getEmployeeSkills(): Collection
|
public function getEmployeeskills(): Collection
|
||||||
{
|
{
|
||||||
return $this->employeeSkills;
|
return $this->employeeskills;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addEmployeeSkill(EmployeeSkill $employeeSkill): static
|
public function setEmployeeskills(Collection $employeeskills): void
|
||||||
{
|
{
|
||||||
if(!$this->employeeSkills->contains($employeeSkill)) {
|
$this->employeeskills = $employeeskills;
|
||||||
$this->employeeSkills->add($employeeSkill);
|
|
||||||
$employeeSkill->setEmployee($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeEmployeeSkill(EmployeeSkill $employeeSkill): static
|
public function getEmployeemissions(): Collection
|
||||||
{
|
{
|
||||||
if($this->employeeSkills->removeElement($employeeSkill)) {
|
return $this->employeemissions;
|
||||||
if($employeeSkill->getEmployee() === $this) {
|
|
||||||
$employeeSkill->setEmployee(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmployeeMissions(): Collection
|
public function setEmployeemissions(Collection $employeemissions): void
|
||||||
{
|
{
|
||||||
return $this->employeeMissions;
|
$this->employeemissions = $employeemissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setEmployeeMissions(Collection $employeeMissions): void
|
public function getEmployeeincidents(): Collection
|
||||||
{
|
{
|
||||||
$this->employeeMissions = $employeeMissions;
|
return $this->employeeincidents;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmployeeIncidents(): Collection
|
public function setEmployeeincidents(Collection $employeeincidents): void
|
||||||
{
|
{
|
||||||
return $this->employeeIncidents;
|
$this->employeeincidents = $employeeincidents;
|
||||||
}
|
|
||||||
|
|
||||||
public function setEmployeeIncidents(Collection $employeeIncidents): void
|
|
||||||
{
|
|
||||||
$this->employeeIncidents = $employeeIncidents;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAssignments(): Collection
|
public function getAssignments(): Collection
|
||||||
@ -102,25 +83,9 @@ class Employee implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
return $this->assignments;
|
return $this->assignments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addAssigment(Assignment $assignment): static
|
public function setAssignments(Collection $assignments): void
|
||||||
{
|
{
|
||||||
if(!$this->assignments->contains($assignment)) {
|
$this->assignments = $assignments;
|
||||||
$this->assignments->add($assignment);
|
|
||||||
$assignment->setEmployee($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeAssigment(Assignment $assignment): static
|
|
||||||
{
|
|
||||||
if($this->assignments->removeElement($assignment)) {
|
|
||||||
if($assignment->getEmployee() === $this) {
|
|
||||||
$assignment->setEmployee(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRepresentations(): Collection
|
public function getRepresentations(): Collection
|
||||||
@ -128,25 +93,9 @@ class Employee implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
return $this->representations;
|
return $this->representations;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRepresentation(Representation $representation): static
|
public function setRepresentations(Collection $representations): void
|
||||||
{
|
{
|
||||||
if(!$this->representations->contains($representation)) {
|
$this->representations = $representations;
|
||||||
$this->representations->add($representation);
|
|
||||||
$representation->setEmployee($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeRepresentation(Representation $representation): static
|
|
||||||
{
|
|
||||||
if($this->representations->removeElement($representation)) {
|
|
||||||
if($representation->getEmployee() === $this) {
|
|
||||||
$representation->setEmployee(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
@ -4,20 +4,17 @@ namespace App\Entity;
|
|||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
#[ORM\Table(name: 'EmployeeSkill')]
|
||||||
#[ORM\UniqueConstraint(
|
|
||||||
columns: ['employee', 'skill']
|
|
||||||
)]
|
|
||||||
class EmployeeSkill
|
class EmployeeSkill
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Employee::class, inversedBy: 'employeeSkills')]
|
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'EmployeeSkills')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Employee $employee = null;
|
private ?Employee $employee = null;
|
||||||
|
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Skill::class, inversedBy: 'employeeSkills')]
|
#[ORM\OneToMany(targetEntity: Skill::class, mappedBy: 'EmployeeSkills')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Skill $skill = null;
|
private ?Skill $skill = null;
|
||||||
|
|
||||||
public function getSkill(): ?Skill
|
public function getSkill(): ?Skill
|
||||||
|
@ -5,7 +5,6 @@ namespace App\Entity;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
|
||||||
class Incident
|
class Incident
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
@ -6,7 +6,7 @@ namespace App\Entity;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
|
||||||
class IncidentType
|
class IncidentType
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
@ -6,7 +6,7 @@ namespace App\Entity;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
|
||||||
class Mission
|
class Mission
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@ -17,44 +17,26 @@ class Mission
|
|||||||
#[ORM\Column(length: 30)]
|
#[ORM\Column(length: 30)]
|
||||||
private ?string $label = null;
|
private ?string $label = null;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Requirement::class, mappedBy: 'mission')]
|
#[ORM\ManyToOne(targetEntity: Requirement::class, inversedBy: 'mission')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'mission')]
|
|
||||||
private Collection $requirements;
|
private Collection $requirements;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'mission')]
|
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'mission')]
|
||||||
private ?Employee $employee = null;
|
private ?employee $employee = null;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'mission')]
|
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'mission')]
|
||||||
private ?Ride $ride;
|
private ?Ride $ride;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: MissionCategory::class, mappedBy: 'mission')]
|
#[ORM\ManyToOne(targetEntity: MissionCategory::class, inversedBy: 'mission')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'mission')]
|
private Collection $missionCategory;
|
||||||
private Collection $missionCategories;
|
|
||||||
|
|
||||||
public function getRequirements(): Collection
|
public function getRequirements(): Collection
|
||||||
{
|
{
|
||||||
return $this->requirements;
|
return $this->requirements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRequirement(Requirement $requirement): static
|
public function setRequirements(Collection $requirements): void
|
||||||
{
|
{
|
||||||
if(!$this->requirements->contains($requirement)) {
|
$this->requirements = $requirements;
|
||||||
$this->requirements->add($requirement);
|
|
||||||
$requirement->setMission($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeRequirement(Requirement $requirement): static
|
|
||||||
{
|
|
||||||
if($this->requirements->removeElement($requirement)) {
|
|
||||||
if($requirement->getMission() === $this) {
|
|
||||||
$requirement->setMission(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmployeemissions(): Collection
|
public function getEmployeemissions(): Collection
|
||||||
@ -122,31 +104,18 @@ class Mission
|
|||||||
$this->ride = $ride;
|
$this->ride = $ride;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMissionCategorie(): Collection
|
public function getMissionCategory(): Collection
|
||||||
{
|
{
|
||||||
return $this->missionCategories;
|
return $this->missionCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addMissionCategory(MissionCategory $missionCategory): static
|
public function setMissionCategory(Collection $missionCategory): void
|
||||||
{
|
{
|
||||||
if(!$this->missionCategories->contains($missionCategory)) {
|
$this->missionCategory = $missionCategory;
|
||||||
$this->missionCategories->add($missionCategory);
|
|
||||||
$missionCategory->setMission($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeMissionCategory(MissionCategory $missionCategory): static
|
|
||||||
{
|
|
||||||
if($this->missionCategories->removeElement($missionCategory)) {
|
|
||||||
if($missionCategory->getMission() === $this) {
|
|
||||||
$missionCategory->setMission(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,20 +4,17 @@ namespace App\Entity;
|
|||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
#[ORM\Table(name: 'Representation')]
|
||||||
#[ORM\UniqueConstraint(
|
|
||||||
columns: ['employee', 'ride']
|
|
||||||
)]
|
|
||||||
class Representation
|
class Representation
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Employee::class, inversedBy: 'representations')]
|
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'representations')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Employee $employee = null;
|
private ?Employee $employee = null;
|
||||||
|
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Ride::class, inversedBy: 'representations')]
|
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'representations')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Ride $ride = null;
|
private ?Ride $ride = null;
|
||||||
|
|
||||||
#[ORM\Column]
|
#[ORM\Column]
|
||||||
|
@ -5,20 +5,17 @@ namespace App\Entity;
|
|||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
#[ORM\Table(name: 'Requirement')]
|
||||||
#[ORM\UniqueConstraint(
|
|
||||||
columns: ['mission', 'skill']
|
|
||||||
)]
|
|
||||||
class Requirement
|
class Requirement
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Mission::class, inversedBy: 'requirements')]
|
#[ORM\OneToMany(targetEntity: Mission::class, mappedBy: 'requirements')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Mission $mission = null;
|
private ?Mission $mission = null;
|
||||||
|
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\ManyToOne(targetEntity: Skill::class, inversedBy: 'requirements')]
|
#[ORM\OneToMany(targetEntity: Skill::class, mappedBy: 'requirements')]
|
||||||
#[ORM\Column(type: 'integer')]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Skill $skill = null;
|
private ?Skill $skill = null;
|
||||||
|
|
||||||
public function getMission(): ?Mission
|
public function getMission(): ?Mission
|
||||||
@ -40,4 +37,7 @@ class Requirement
|
|||||||
{
|
{
|
||||||
$this->skill = $skill;
|
$this->skill = $skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ namespace App\Entity;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
|
||||||
class Ride
|
class Ride
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@ -19,12 +19,10 @@ class Ride
|
|||||||
#[ORM\Column]
|
#[ORM\Column]
|
||||||
private ?int $count = null;
|
private ?int $count = null;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Assignment::class, mappedBy: 'ride')]
|
#[ORM\ManyToOne(targetEntity: Assignment::class, inversedBy: 'ride')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'ride')]
|
|
||||||
private Collection $assignments;
|
private Collection $assignments;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Representation::class, mappedBy: 'ride')]
|
#[ORM\ManyToOne(targetEntity: Representation::class, inversedBy: 'ride')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'ride')]
|
|
||||||
private Collection $representations;
|
private Collection $representations;
|
||||||
|
|
||||||
#[ORM\ManyToOne(targetEntity: IncidentType::class, inversedBy: 'ride')]
|
#[ORM\ManyToOne(targetEntity: IncidentType::class, inversedBy: 'ride')]
|
||||||
@ -38,25 +36,9 @@ class Ride
|
|||||||
return $this->assignments;
|
return $this->assignments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addAssigment(Assignment $assignment): static
|
public function setAssignments(Collection $assignments): void
|
||||||
{
|
{
|
||||||
if(!$this->assignments->contains($assignment)) {
|
$this->assignments = $assignments;
|
||||||
$this->assignments->add($assignment);
|
|
||||||
$assignment->setRide($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeAssigment(Assignment $assignment): static
|
|
||||||
{
|
|
||||||
if($this->assignments->removeElement($assignment)) {
|
|
||||||
if($assignment->getRide() === $this) {
|
|
||||||
$assignment->setRide(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRepresentations(): Collection
|
public function getRepresentations(): Collection
|
||||||
@ -64,26 +46,12 @@ class Ride
|
|||||||
return $this->representations;
|
return $this->representations;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRepresentation(Representation $representation): static
|
public function setRepresentations(Collection $representations): void
|
||||||
{
|
{
|
||||||
if(!$this->representations->contains($representation)) {
|
$this->representations = $representations;
|
||||||
$this->representations->add($representation);
|
|
||||||
$representation->setRide($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeRepresentation(Representation $representation): static
|
|
||||||
{
|
|
||||||
if($this->representations->removeElement($representation)) {
|
|
||||||
if($representation->getRide() === $this) {
|
|
||||||
$representation->setRide(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ namespace App\Entity;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
#[ORM\Entity]
|
|
||||||
class Skill
|
class Skill
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@ -16,40 +16,33 @@ class Skill
|
|||||||
#[ORM\Column(length: 30)]
|
#[ORM\Column(length: 30)]
|
||||||
private ?string $label = null;
|
private ?string $label = null;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: Requirement::class, mappedBy: 'skill')]
|
#[ORM\ManyToOne(targetEntity: Requirement::class, inversedBy: 'skill')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'skill')]
|
|
||||||
private Collection $requirements;
|
private Collection $requirements;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: EmployeeSkill::class, mappedBy: 'skill')]
|
#[ORM\ManyToOne(targetEntity: EmployeeSkill::class, inversedBy: 'skill')]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'skill')]
|
private Collection $employeeskills;
|
||||||
private Collection $employeeSkills;
|
|
||||||
|
|
||||||
public function getRequirements(): Collection
|
public function getRequirements(): Collection
|
||||||
{
|
{
|
||||||
return $this->requirements;
|
return $this->requirements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRequirement(Requirement $requirement): static
|
public function setRequirements(Collection $requirements): void
|
||||||
{
|
{
|
||||||
if(!$this->requirements->contains($requirement)) {
|
$this->requirements = $requirements;
|
||||||
$this->requirements->add($requirement);
|
|
||||||
$requirement->setSkill($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeRequirement(Requirement $requirement): static
|
public function getEmployeeskills(): Collection
|
||||||
{
|
{
|
||||||
if($this->requirements->removeElement($requirement)) {
|
return $this->employeeskills;
|
||||||
if($requirement->getSkill() === $this) {
|
|
||||||
$requirement->setSkill(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setEmployeeskills(Collection $employeeskills): void
|
||||||
|
{
|
||||||
|
$this->employeeskills = $employeeskills;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
@ -74,30 +67,5 @@ class Skill
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmployeeSkills(): Collection
|
|
||||||
{
|
|
||||||
return $this->employeeSkills;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addEmployeeSkill(EmployeeSkill $employeeSkill): static
|
|
||||||
{
|
|
||||||
if(!$this->employeeSkills->contains($employeeSkill)) {
|
|
||||||
$this->employeeSkills->add($employeeSkill);
|
|
||||||
$employeeSkill->setSkill($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeEmployeeSkill(EmployeeSkill $employeeSkill): static
|
|
||||||
{
|
|
||||||
if($this->employeeSkills->removeElement($employeeSkill)) {
|
|
||||||
if($employeeSkill->getSkill() === $this) {
|
|
||||||
$employeeSkill->setSkill(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,6 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
{% block body %}{% endblock %}
|
||||||
|
|
||||||
</header>
|
|
||||||
{% block body %}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user