Compare commits

..

1 Commits

Author SHA1 Message Date
44cbdc3485 suppression du controller login 2024-10-17 16:48:12 +02:00
21 changed files with 102 additions and 478 deletions

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<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">
<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>
</component>
</project>

View File

@ -5,6 +5,7 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<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/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -14,14 +15,12 @@
</component> </component>
<component name="ComposerSettings" synchronizationState="SYNCHRONIZE"> <component name="ComposerSettings" synchronizationState="SYNCHRONIZE">
<pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath> <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
<execution> <execution />
<executable path="composer" />
</execution>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="/bin/php"> <component name="PhpWorkspaceProjectConfiguration" interpreter_name="C:\xampp\php\php.exe">
<include_path> <include_path>
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" /> <path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" /> <path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" />
@ -164,25 +163,19 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;, "git-widget-placeholder": "develop",
&quot;git-widget-placeholder&quot;: &quot;develop&quot;, "last_opened_file_path": "C:/Users/serma/Desktop/HegreEtConfort",
&quot;last_opened_file_path&quot;: &quot;/home/ragueneaul@stsio.lan/Documents/DecoMaison_Lucas_Ragueneau&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "nodejs_package_manager_path": "npm",
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, "vue.rearranger.settings.migration": "true"
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
},
&quot;keyToStringList&quot;: {
&quot;DatabaseDriversLRU&quot;: [
&quot;postgresql&quot;
]
} }
}</component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="E:\BTS\PhpStorm\HegreEtConfort\src\Entity" /> <recent name="E:\BTS\PhpStorm\HegreEtConfort\src\Entity" />
@ -197,8 +190,8 @@
<component name="SharedIndexes"> <component name="SharedIndexes">
<attachedChunks> <attachedChunks>
<set> <set>
<option value="bundled-js-predefined-d6986cc7102b-e768b9ed790e-JavaScript-PS-243.21565.202" /> <option value="bundled-js-predefined-d6986cc7102b-5c90d61e3bab-JavaScript-PS-242.23339.16" />
<option value="bundled-php-predefined-a98d8de5180a-5fbe0c30323e-com.jetbrains.php.sharedIndexes-PS-243.21565.202" /> <option value="bundled-php-predefined-a98d8de5180a-90914f2295cb-com.jetbrains.php.sharedIndexes-PS-242.23339.16" />
</set> </set>
</attachedChunks> </attachedChunks>
</component> </component>
@ -213,9 +206,6 @@
<workItem from="1728656379062" duration="1875000" /> <workItem from="1728656379062" duration="1875000" />
<workItem from="1728671983731" duration="846000" /> <workItem from="1728671983731" duration="846000" />
<workItem from="1729167245881" duration="2915000" /> <workItem from="1729167245881" duration="2915000" />
<workItem from="1729175702600" duration="1829000" />
<workItem from="1731589591731" duration="13398000" />
<workItem from="1732193975936" duration="8317000" />
</task> </task>
<servers /> <servers />
</component> </component>

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

@ -2,49 +2,17 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\Fault;
use App\Form\FaultType;
use App\Repository\FaultRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Attribute\Route;
class FaultController extends AbstractController class FaultController extends AbstractController
{ {
public function __construct( #[Route('/fault', name: 'app_fault')]
private readonly EntityManagerInterface $entityManager, public function index(): Response
private readonly FaultRepository $faultRepository
)
{ {
} return $this->render('fault/index.html.twig', [
#[Route('/fault/add', name: 'fault_add')] 'controller_name' => 'FaultController',
public function add(Request $request): Response
{
$fault = new Fault();
$form = $this->createForm(FaultType::class, $fault);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($fault);
$this->entityManager->flush();
return $this->redirectToRoute("app_fault_list");
}
return $this->render('fault/add.html.twig', [
'form' => $form,
]); ]);
} }
}
#[Route('/fault/list', name: 'fault_list')]
public function list(): Response
{
$fault = $this->faultRepository->findAll();
return $this->render('fault/list.html.twig', [
'fault' => $fault,
]);
}
}

View File

@ -2,50 +2,17 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\Intervention;
use App\Form\InterventionType;
use App\Repository\InterventionRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
class InterventionController extends AbstractController class InterventionController extends AbstractController
{ {
public function __construct( #[Route('/intervention', name: 'app_intervention')]
private readonly EntityManagerInterface $entityManager, public function index(): Response
private readonly InterventionRepository $interventionRepository
)
{ {
} return $this->render('intervention/index.html.twig', [
#[\Symfony\Component\Routing\Annotation\Route('/intervention/add', name: 'fault_add')] 'controller_name' => 'InterventionController',
public function add(Request $request): Response
{
$fault = new Intervention();
$form = $this->createForm(InterventionType::class, $fault);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($fault);
$this->entityManager->flush();
return $this->redirectToRoute("app_fault_list");
}
return $this->render('fault/add.html.twig', [
'form' => $form,
]); ]);
} }
}
#[Route('/fault/list', name: 'fault_list')]
public function list(): Response
{
$fault = $this->faultRepository->findAll();
return $this->render('fault/list.html.twig', [
'fault' => $fault,
]);
}
}

View File

@ -11,7 +11,7 @@ class SkillController extends AbstractController
#[Route('/skill', name: 'app_skill')] #[Route('/skill', name: 'app_skill')]
public function index(): Response public function index(): Response
{ {
return $this->render('skill/add.html.twig', [ return $this->render('skill/index.html.twig', [
'controller_name' => 'SkillController', 'controller_name' => 'SkillController',
]); ]);
} }

View File

@ -2,69 +2,17 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\Stock;
use App\Form\StockType;
use App\Repository\StockRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Attribute\Route;
class StockController extends AbstractController class StockController extends AbstractController
{ {
public function __construct( #[Route('/stock', name: 'app_stock')]
private readonly EntityManagerInterface $entityManager, public function index(): Response
private readonly StockRepository $stockRepository
)
{ {
} return $this->render('stock/index.html.twig', [
'controller_name' => 'StockController',
#[Route('/stock/add', name: 'stock_add')]
public function add(Request $request): Response
{
$stock = new Stock();
$form = $this->createForm(StockType::class, $stock);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($stock);
$this->entityManager->flush();
}
return $this->render('stock/add.html.twig', [
'form' => $form,
]); ]);
} }
}
#[Route('/stock/list', name: 'stock_list')]
public function list(): Response
{
$stocks = $this->stockRepository->findAll();
return $this->render('stock/list.html.twig', [
'stocks' => $stocks,
]);
}
#[Route('/stock/update/{id}', name: 'stock_update')]
public function update(int $id, Request $request): Response
{
$stock = $this->stockRepository->find($id);
$form = $this->createForm(StockType::class, $stock);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($stock);
$this->entityManager->flush();
}
return $this->render('stock/add.html.twig', [
'form' => $form,
]);
}
}

View File

@ -2,77 +2,17 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\User;
use App\Form\UserType;
use App\Repository\UserRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Attribute\Route;
class UserController extends AbstractController class UserController extends AbstractController
{ {
public function __construct( #[Route('/user', name: 'app_user')]
private readonly EntityManagerInterface $entityManager, public function index(): Response
private readonly UserRepository $userRepository
)
{ {
} return $this->render('user/index.html.twig', [
'controller_name' => 'UserController',
#[Route('/user/add', name: 'user_add')]
public function add(Request $request): Response
{
$user = new User();
$form = $this->createForm(UserType::class, $user);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($user);
$this->entityManager->flush();
}
return $this->render('user/add.html.twig', [
'form' => $form,
]); ]);
} }
#[Route('/user/list', name: 'user_list')]
public function list(): Response
{
$users = $this->userRepository->findAll();
return $this->render('user/list.html.twig', [
'users' => $users,
]);
}
#[Route('/user/update/{id}', name: 'user_update')]
public function update(int $id, Request $request): Response
{
$user = $this->userRepository->find($id);
$form = $this->createForm(UserType::class, $user);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($user);
$this->entityManager->flush();
}
return $this->render('user/add.html.twig', [
'form' => $form,
]);
}
#[Route('/user/delete/{id}', name: '_delete')]
public function delete(int $id): Response
{
$user = $this->userRepository->find($id);
$this->entityManager->remove($user);
$this->entityManager->flush();
return $this->redirectToRoute('app_user_list');
}
} }

View File

@ -11,7 +11,7 @@ class VehicleController extends AbstractController
#[Route('/vehicle', name: 'app_vehicle')] #[Route('/vehicle', name: 'app_vehicle')]
public function index(): Response public function index(): Response
{ {
return $this->render('vehicle/add.html.twig', [ return $this->render('vehicle/index.html.twig', [
'controller_name' => 'VehicleController', 'controller_name' => 'VehicleController',
]); ]);
} }

View File

@ -1,28 +0,0 @@
<?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 FaultType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Wording', TextType::class)
->add('save', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}

View File

@ -1,33 +0,0 @@
<?php
namespace App\Form;
use App\Entity\Stock;
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\TextType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class StockType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Wording', TextType::class)
->add('Description', TextType::class)
->add('Quantity', IntegerType::class)
->add('save', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Stock::class,
]);
}
}

View File

@ -1,35 +0,0 @@
<?php
namespace App\Form;
use App\Entity\User;
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\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class UserType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('FirstName', TextType::class)
->add('LastName', TextType::class)
->add('BirthDate', DateType::class)
->add('Email', EmailType::class)
->add('Phone', TextType::class)
->add('Type', TextType::class)
->add('Save', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => User::class,
]);
}
}

View File

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

View File

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Hello FaultController!{% 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/FaultController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/fault/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -1,9 +0,0 @@
{% extends 'base.html.twig' %}
{% block title %}Hello UserController!{% endblock %}
{% block body %}
{% for user in users %}
{{ fault.Wording }}
{% endfor %}
{% endblock %}

View File

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

View File

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Hello StockController!{% 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/StockController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/stock/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -1,11 +0,0 @@
{% extends 'base.html.twig' %}
{% block title %}Hello StockController!{% endblock %}
{% block body %}
{% for stock in stocks %}
{{ stock.Wording }}
{{ stock.Description }}
{{ stock.Quantity }}
{% endfor %}
{% endblock %}

View File

@ -1,10 +0,0 @@
{# 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

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Hello UserController!{% 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/UserController.php</code></li>
<li>Your template at <code>E:/BTS/PhpStorm/HegreEtConfort/templates/user/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends 'base.html.twig' %}
{% block title %}Hello UserController!{% endblock %}
{% block body %}
{% for user in users %}
{{ user.FirstName }}
{{ user.LastName }}
{{ user.BirthDate|date("Y-m-d") }}
{{ user.Email }}
{{ user.Phone }}
{{ user.Type }}
{% endfor %}
{% endblock %}