This commit is contained in:
Maxiser 2024-11-28 17:54:21 +01:00
commit 2ba98f2415
43 changed files with 581 additions and 177 deletions

View File

@ -3,6 +3,7 @@
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="App\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="App\Tests\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />

57
.idea/dataSources.xml Normal file
View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<<<<<<< HEAD
<data-source source="LOCAL" name="HegreEtConfort@172.20.96.1" uuid="7dfccb0e-433e-4f42-b6ce-6362f7e2187a">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://172.20.96.1:5432/HegreEtConfort</jdbc-url>
=======
<<<<<<< HEAD
<<<<<<< HEAD
<data-source source="LOCAL" name="chauffageproj@172.20.96.1" uuid="633df7e7-7b9a-4298-8a3c-3075313a1153">
=======
<<<<<<< HEAD
<data-source source="LOCAL" name="@172.20.96.1" uuid="76621fd2-6622-4f8e-a632-d7b7602e0afe">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://172.20.96.1:5432/</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="hegreconfort@127.0.0.1" uuid="a0219ca4-02a7-456a-bf02-9b3234ed346b">
<driver-ref>mariadb</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mariadb://127.0.0.1:3306/hegreconfort</jdbc-url>
=======
<data-source source="LOCAL" name="chauffageproj@172.20.96.1" uuid="6554e332-842b-41d7-a021-08782c7b72bb">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://172.20.96.1:5432/chauffageproj</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="chauffageproj@172.20.96.1 [2]" uuid="a446f2ca-1dfc-459a-97f5-eda71fd74aa2">
>>>>>>> 6532d4d88b86c321a212cdc0ca43b2e4770db117
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://172.20.96.1:5432/chauffageproj</jdbc-url>
>>>>>>> ee236ff74aaac1882a825817d5ce8f692d3bdd0f
=======
<data-source source="LOCAL" name="HegreConfort@localhost" uuid="755cf5bd-875b-416d-8bc2-76a5b9ba2d4d">
<driver-ref>mariadb</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mariadb://localhost:3306/HegreConfort</jdbc-url>
<jdbc-additional-properties>
<property name="database.introspection.mysql.dbe5060" value="true" />
</jdbc-additional-properties>
>>>>>>> cc65343635c8771e56e2a3304b42ec32f4f91b97
>>>>>>> d7375d330251cab10a2296bbb292fcdb7cd6e847
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

View File

@ -4,12 +4,16 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<<<<<<< HEAD
<list default="true" id="cf8b8ad0-a5ca-449a-93b5-e4441856adec" name="Changes" comment="" />
=======
<list default="true" id="cf8b8ad0-a5ca-449a-93b5-e4441856adec" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/packages/security.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/config/packages/security.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/User.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Repository/UserRepository.php" beforeDir="false" />
</list>
>>>>>>> 6532d4d88b86c321a212cdc0ca43b2e4770db117
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -242,7 +246,12 @@
<workItem from="1729175702600" duration="1829000" />
<workItem from="1731589591731" duration="13398000" />
<workItem from="1732193975936" duration="8317000" />
<<<<<<< HEAD
<workItem from="1732797917791" duration="5571000" />
<workItem from="1732804930233" duration="4645000" />
=======
>>>>>>> ee236ff74aaac1882a825817d5ce8f692d3bdd0f
>>>>>>> 6532d4d88b86c321a212cdc0ca43b2e4770db117
</task>
<servers />
</component>

View File

@ -5,6 +5,6 @@ import './bootstrap.js';
* This file will be included onto the page via the importmap() Twig function,
* which should already be in your base.html.twig.
*/
import './styles/app.css';
import './styles/css/app.css';
console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉');

View File

View File

@ -0,0 +1,87 @@
body {
background: url("../image/fond.png") center center / cover no-repeat;
}
.logo {
position: absolute;
margin: 0.5% 0 0 43.5%;
height: 25%;
}
.titre {
position: absolute;
color: white;
margin: 15% 0 0 38%;
}
.logoProfile {
position: absolute;
border-radius: 10%;
margin: 20% 0 0 36%;
height: 10%;
}
.logoPassword {
position: absolute;
border-radius: 10%;
margin: 27% 0 0 36%;
height: 10%;
}
.profile {
position: absolute;
border-radius: 2%;
margin: 20% 0 0 42%;
width: 22%;
height: 5%;
}
.password {
position: absolute;
border-radius: 2%;
margin: 27% 0 0 42%;
width: 22%;
height: 5%;
}
.forgot {
position: absolute;
font-style: italic;
margin: 30% 0 0 52%;
font-size: 100%;
color: white;
}
#remember {
position: absolute;
margin: 33% 0 0 38%;
font-size: 100%;
color: white;
}
.remember {
position: absolute;
margin: 32.7% 0 0 39.5%;
font-size: 100%;
color: white;
}
.login {
position: absolute;
margin: 37.5% 0 0 36.6%;
width: 27%;
background-color: #243C40;
color: white;
}
.background {
position: absolute;
box-shadow: 0 0 30px 1px black;
border-radius: 10%;
opacity: 85%;
margin: 7% 0 0 35%;
width: 30%;
height: 75%;
background: #243C40;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -102,7 +102,7 @@
"symfony/browser-kit": "7.1.*",
"symfony/css-selector": "7.1.*",
"symfony/debug-bundle": "7.1.*",
"symfony/maker-bundle": "^1.0",
"symfony/maker-bundle": "^1.61",
"symfony/phpunit-bridge": "^7.1",
"symfony/stopwatch": "7.1.*",
"symfony/web-profiler-bundle": "7.1.*"

18
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "cf8a9d35993fbd4e8f038bfd58abc5a5",
"content-hash": "e99a99b4ca2d6b58821cb711cb543c93",
"packages": [
{
"name": "composer/semver",
@ -428,16 +428,16 @@
},
{
"name": "doctrine/doctrine-bundle",
"version": "2.13.0",
"version": "2.13.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineBundle.git",
"reference": "ca59d84b8e63143ce1aed90cdb333ba329d71563"
"reference": "2740ad8b8739b39ab37d409c972b092f632b025a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/ca59d84b8e63143ce1aed90cdb333ba329d71563",
"reference": "ca59d84b8e63143ce1aed90cdb333ba329d71563",
"url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/2740ad8b8739b39ab37d409c972b092f632b025a",
"reference": "2740ad8b8739b39ab37d409c972b092f632b025a",
"shasum": ""
},
"require": {
@ -451,7 +451,7 @@
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
"symfony/deprecation-contracts": "^2.1 || ^3",
"symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0",
"symfony/doctrine-bridge": "^5.4.46 || ^6.4.3 || ^7.0.3",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
"symfony/polyfill-php80": "^1.15",
"symfony/service-contracts": "^1.1.1 || ^2.0 || ^3"
@ -528,7 +528,7 @@
],
"support": {
"issues": "https://github.com/doctrine/DoctrineBundle/issues",
"source": "https://github.com/doctrine/DoctrineBundle/tree/2.13.0"
"source": "https://github.com/doctrine/DoctrineBundle/tree/2.13.1"
},
"funding": [
{
@ -544,7 +544,7 @@
"type": "tidelift"
}
],
"time": "2024-09-01T09:46:40+00:00"
"time": "2024-11-08T23:27:54+00:00"
},
{
"name": "doctrine/doctrine-migrations-bundle",
@ -9840,5 +9840,5 @@
"ext-iconv": "*"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.3.0"
}

View File

@ -1,70 +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 Version20241121154657 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 fault_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE intervention_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 SEQUENCE stock_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE "user_id_seq" INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE vehicle_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE fault (id INT NOT NULL, wording VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE intervention (id INT NOT NULL, wording VARCHAR(255) NOT NULL, timestamp TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, description VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE skill (id INT NOT NULL, wording VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE stock (id INT NOT NULL, wording VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, quantity VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE "user" (id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, birth_date DATE NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE vehicle (id INT NOT NULL, license_plate VARCHAR(255) NOT NULL, brand VARCHAR(255) 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();');
}
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 fault_id_seq CASCADE');
$this->addSql('DROP SEQUENCE intervention_id_seq CASCADE');
$this->addSql('DROP SEQUENCE skill_id_seq CASCADE');
$this->addSql('DROP SEQUENCE stock_id_seq CASCADE');
$this->addSql('DROP SEQUENCE "user_id_seq" CASCADE');
$this->addSql('DROP SEQUENCE vehicle_id_seq CASCADE');
$this->addSql('DROP TABLE fault');
$this->addSql('DROP TABLE intervention');
$this->addSql('DROP TABLE skill');
$this->addSql('DROP TABLE stock');
$this->addSql('DROP TABLE "user"');
$this->addSql('DROP TABLE vehicle');
$this->addSql('DROP TABLE messenger_messages');
}
}

View File

@ -0,0 +1,31 @@
<?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 Version20241128141518 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
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class AuthenticationController extends AbstractController
{
#[Route(path: '/', name: '_login')]
public function login(AuthenticationUtils $authenticationUtils): Response
{
// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
return $this->render('authentication/index.html.twig', [
'last_username' => $lastUsername,
'error' => $error,
]);
}
#[Route(path: '/logout', name: '_logout')]
public function logout(): void
{
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
}
}

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 CalendrierController extends AbstractController
{
#[Route('/calendrier', name: 'app_calendrier')]
public function index(): Response
{
return $this->render('calendrier/index.html.twig', [
'controller_name' => 'CalendrierController',
]);
}
}

View File

@ -30,7 +30,7 @@ class FaultController extends AbstractController
$this->entityManager->persist($fault);
$this->entityManager->flush();
return $this->redirectToRoute("app_fault_list");
return $this->redirectToRoute("fault_list");
}
return $this->render('fault/add.html.twig', [
@ -41,10 +41,10 @@ class FaultController extends AbstractController
#[Route('/fault/list', name: 'fault_list')]
public function list(): Response
{
$fault = $this->faultRepository->findAll();
$faults = $this->faultRepository->findAll();
return $this->render('fault/list.html.twig', [
'fault' => $fault,
'faults' => $faults,
]);
}
}

View File

@ -19,33 +19,33 @@ class InterventionController extends AbstractController
)
{
}
#[\Symfony\Component\Routing\Annotation\Route('/intervention/add', name: 'fault_add')]
#[Route('/intervention/add', name: 'intervention_add')]
public function add(Request $request): Response
{
$fault = new Intervention();
$form = $this->createForm(InterventionType::class, $fault);
$intervention = new Intervention();
$form = $this->createForm(InterventionType::class, $intervention);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($fault);
$this->entityManager->persist($intervention);
$this->entityManager->flush();
return $this->redirectToRoute("app_fault_list");
return $this->redirectToRoute("intervention_list");
}
return $this->render('fault/add.html.twig', [
return $this->render('intervention/add.html.twig', [
'form' => $form,
]);
}
#[Route('/fault/list', name: 'fault_list')]
#[Route('/intervention/list', name: 'intervention_list')]
public function list(): Response
{
$fault = $this->faultRepository->findAll();
$interventions = $this->interventionRepository->findAll();
return $this->render('fault/list.html.twig', [
'fault' => $fault,
return $this->render('intervention/list.html.twig', [
'interventions' => $interventions,
]);
}
}

View File

@ -2,17 +2,49 @@
namespace App\Controller;
use App\Entity\Skill;
use App\Form\SkillType;
use App\Repository\SkillRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Routing\Annotation\Route;
class SkillController extends AbstractController
{
#[Route('/skill', name: 'app_skill')]
public function index(): Response
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly SkillRepository $skillRepository
)
{
}
#[Route('/skill/add', name: 'skill_add')]
public function add(Request $request): Response
{
$skill = new Skill();
$form = $this->createForm(SkillType::class, $skill);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->persist($skill);
$this->entityManager->flush();
}
return $this->render('skill/add.html.twig', [
'controller_name' => 'SkillController',
'form' => $form,
]);
}
#[Route('/skill/list', name: 'skill_list')]
public function list(): Response
{
$skills = $this->skillRepository->findAll();
return $this->render('skill/list.html.twig', [
'skills' => $skills,
]);
}
}

View File

@ -2,17 +2,50 @@
namespace App\Controller;
use App\Entity\Vehicle;
use App\Form\VehicleType;
use App\Repository\VehicleRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class VehicleController extends AbstractController
{
#[Route('/vehicle', name: 'app_vehicle')]
public function index(): Response
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly VehicleRepository $vehicleRepository
)
{
}
#[\Symfony\Component\Routing\Annotation\Route('/vehicle/add', name: 'vehicle_add')]
public function add(Request $request): Response
{
$vehicle = new Vehicle();
$form = $this->createForm(VehicleType::class, $vehicle);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($vehicle);
$this->entityManager->flush();
return $this->redirectToRoute("vehicle_list");
}
return $this->render('vehicle/add.html.twig', [
'controller_name' => 'VehicleController',
'form' => $form,
]);
}
#[Route('/vehicle/list', name: 'vehicle_list')]
public function list(): Response
{
$vehicles = $this->vehicleRepository->findAll();
return $this->render('vehicle/list.html.twig', [
'vehicles' => $vehicles,
]);
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace App\Form;
use DateTime;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class InterventionType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Wording', TextType::class)
->add('Timestamp', DateType::class)
->add('description', TextAreaType::class)
->add('address', TextType::class)
->add('Status', TextType::class)
->add('save', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}

30
src/Form/SkillType.php Normal file
View File

@ -0,0 +1,30 @@
<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class SkillType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Wording', TextType::class)
->add('description', TextAreaType::class)
->add('Save', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}

View File

@ -7,6 +7,7 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\FormBuilderInterface;
@ -18,7 +19,7 @@ class StockType extends AbstractType
{
$builder
->add('Wording', TextType::class)
->add('Description', TextType::class)
->add('description', TextAreaType::class)
->add('Quantity', IntegerType::class)
->add('save', SubmitType::class)
;

30
src/Form/VehicleType.php Normal file
View File

@ -0,0 +1,30 @@
<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class VehicleType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('LicensePlate', TextType::class)
->add('Brand', IntegerType::class)
->add('Save', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}

View File

@ -0,0 +1,35 @@
{% block title %}Log in!{% endblock %}
{% block body %}
<form method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3">
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="username">Email</label>
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" required autofocus>
<label for="password">Password</label>
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" required>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="checkbox mb-3">
<input type="checkbox" name="_remember_me" id="_remember_me">
<label for="_remember_me">Remember me</label>
</div>
<button class="btn btn-lg btn-primary" type="submit">
Sign in
</button>
</form>
{% endblock %}

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
@ -10,8 +10,8 @@
{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

View File

@ -1,6 +1,6 @@
{% extends 'base.html.twig' %}
{% block title %}Hello InterventionController!{% endblock %}
{% block title %}Hello CalendrierController!{% endblock %}
{% block body %}
<style>
@ -13,8 +13,8 @@
This friendly message is coming from:
<ul>
<li>Your controller at <code>E:/BTS/PhpStorm/HegreEtConfort/src/Controller/InterventionController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/intervention/index.html.twig</code></li>
<li>Your controller at <code>/home/allarda@stsio.lan/Test/HegreEtConfort/src/Controller/CalendrierController.php</code></li>
<li>Your template at <code>/home/allarda@stsio.lan/Test/HegreEtConfort/templates/calendrier/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -3,7 +3,7 @@
{% block title %}Hello UserController!{% endblock %}
{% block body %}
{% for user in users %}
{% for fault in faults %}
{{ fault.Wording }}
{% endfor %}
{% endblock %}

View File

@ -0,0 +1,10 @@
{# templates/user/add.html.twig #}
{% extends 'base.html.twig' %}
{% block title %}Ajouter une intervention {% endblock %}
{% block body %}
<h1>Ajouter une intervention</h1>
{{ form(form) }}
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Hello InterventionController!{% endblock %}
{% block body %}
{% for intervention in interventions %}
{{ intervention.Wording }}
{{ intervention.Timestamp|date('Y-m-d H:i:s') }} {{ intervention.Description }}
{{ intervention.Address }}
{{ intervention.Status }}
{% endfor %}
{% endblock %}

View File

@ -1,20 +1,41 @@
{% extends 'base.html.twig' %}
<!DOCTYPE html>
<html lang="fr, en">
<head>
<meta charset="UTF-8">
<title>Authentification</title>
<link href="{{ asset('styles/css/login.css') }}" rel='stylesheet'>
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
{% block title %}Hello LoginController!{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
{% block stylesheets %}
{% endblock %}
</head>
<body>
<div class="col">
<section>
<div class="background"></div>
This friendly message is coming from:
<ul>
<li>Your controller at <code>E:/BTS/PhpStorm/HegreEtConfort/src/Controller/LoginController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/login/index.html.twig</code></li>
</ul>
<img class="logo" src="{{ asset('styles/image/LogoHegreConfort_SansFond.png') }}" alt="Logo Hegre et Confort">
<h1 class="titre">D'Hegre Et Confort</h1>
<img class="logoProfile" src="{{ asset('styles/image/profile.png') }}" alt="Logo Profil">
<img class="logoPassword" src="{{ asset('styles/image/password.png') }}" alt="Logo Password">
<label>
<input class="profile" type="email" placeholder="Adresse mail">
<input class="password" type="password" placeholder="Mot de passe">
<input type="checkbox" id="remember">
<label class="remember" for="remember">Se souvenir de moi</label>
</label>
<button class="login"> Connexion </button>
<p class="forgot"> Mot de passe oublié ?</p>
</section>
</div>
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,10 @@
{# templates/user/add.html.twig #}
{% extends 'base.html.twig' %}
{% block title %}Ajouter une intervention {% endblock %}
{% block body %}
<h1>Ajouter une compétence</h1>
{{ form(form) }}
{% endblock %}

View File

@ -1,20 +0,0 @@
{% extends 'base.html.twig' %}
{% block title %}Hello SkillController!{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
This friendly message is coming from:
<ul>
<li>Your controller at <code>E:/BTS/PhpStorm/HegreEtConfort/src/Controller/SkillController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/skill/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends 'base.html.twig' %}
{% block title %}Hello InterventionController!{% endblock %}
{% block body %}
{% for skill in skills %}
{{ skill.Wording }}
{{ skill.Description }}
{% endfor %}
{% endblock %}

View File

@ -0,0 +1,10 @@
{# templates/user/add.html.twig #}
{% extends 'base.html.twig' %}
{% block title %}Ajouter un utilisateur{% endblock %}
{% block body %}
<h1>Ajouter un utilisateur</h1>
{{ form(form) }}
{% endblock %}

View File

@ -1,20 +0,0 @@
{% extends 'base.html.twig' %}
{% block title %}Hello VehicleController!{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
This friendly message is coming from:
<ul>
<li>Your controller at <code>E:/BTS/PhpStorm/HegreEtConfort/src/Controller/VehicleController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/vehicle/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends 'base.html.twig' %}
{% block title %}Hello UserController!{% endblock %}
{% block body %}
{% for vehicle in vehicles %}
{{ vehicle.LicensePlate }}
{{ vehicle.Brand }}
{% endfor %}
{% endblock %}

0
tests/add.html.twig Normal file
View File

0
tests/list.html.twig Normal file
View File