Compare commits
28 Commits
ef25e03cce
...
7ba2db3d92
Author | SHA1 | Date | |
---|---|---|---|
7ba2db3d92 | |||
234ff39db1 | |||
3af4232ec8 | |||
9f485f9637 | |||
84397a1028 | |||
d091513600 | |||
19c4dd08e1 | |||
5834b02fdc | |||
e222786096 | |||
925cbaf3ee | |||
172c1f7980 | |||
4e066f9b81 | |||
24903c0b5e | |||
dd4e9bcbca | |||
1ea636a7cb | |||
0502a3586f | |||
0f6093cb94 | |||
fdb13252ea | |||
07ce4819ed | |||
e64e435dc9 | |||
c8bf1d3995 | |||
39cbe354c5 | |||
9d4d998309 | |||
1ae8d9d18b | |||
30ce97e13b | |||
d8324fe288 | |||
5870f70725 | |||
![]() |
c7dbadace5 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -22,4 +22,6 @@
|
||||
###< symfony/asset-mapper ###
|
||||
.idea
|
||||
|
||||
composer.lock
|
||||
|
||||
/migrations/
|
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -1,4 +1,3 @@
|
||||
|
||||
services:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database:
|
||||
@ -16,3 +15,4 @@ services:
|
||||
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||
###< symfony/mailer ###
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
services:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database:
|
||||
@ -23,3 +22,4 @@ volumes:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database_data:
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
|
@ -100,7 +100,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.*"
|
||||
|
@ -20,32 +20,38 @@ final class AnnouncementController extends AbstractController
|
||||
$user = $this->getUser();
|
||||
$announcements = [];
|
||||
|
||||
// Récupérer les paramètres de recherche
|
||||
$companyName = $request->query->get('company_name');
|
||||
$location = $request->query->get('location');
|
||||
$category = $request->query->get('category');
|
||||
|
||||
if (in_array('ROLE_ADMIN', $user->getRoles())) {
|
||||
$showNonValidated = $request->query->get('show_non_validated');
|
||||
|
||||
if ($showNonValidated) {
|
||||
$announcements = $announcementRepository->findBy(['status' => 'notVerified']);
|
||||
}
|
||||
if (!$showNonValidated){
|
||||
} else {
|
||||
$announcements = $announcementRepository->findAll();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (in_array('ROLE_EMPLOYEE', $user->getRoles())) {
|
||||
$company = $user->getCompany();
|
||||
|
||||
if ($company)
|
||||
{
|
||||
if ($company) {
|
||||
$announcements = $announcementRepository->findBy(['company' => $company]);
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array('ROLE_INTERN', $user->getRoles()))
|
||||
{
|
||||
if (in_array('ROLE_INTERN', $user->getRoles())) {
|
||||
$announcements = $announcementRepository->findBy(['status' => 'Verified']);
|
||||
}
|
||||
|
||||
// Filtrer les annonces en fonction des critères de recherche
|
||||
if ($companyName || $location || $category) {
|
||||
$announcements = $announcementRepository->searchAnnouncements($companyName, $location, $category);
|
||||
}
|
||||
|
||||
return $this->render('announcement/index.html.twig', [
|
||||
'announcements' => $announcements,
|
||||
'showNonValidated' => $request->query->get('show_non_validated', false),
|
||||
|
57
src/Entity/Annonce.php
Normal file
57
src/Entity/Annonce.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\AnnonceRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: AnnonceRepository::class)]
|
||||
class Annonce
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Titre = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Description = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTitre(): ?string
|
||||
{
|
||||
return $this->Titre;
|
||||
}
|
||||
|
||||
public function setTitre(string $Titre): static
|
||||
{
|
||||
$this->Titre = $Titre;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDescription(): ?string
|
||||
{
|
||||
return $this->Description;
|
||||
}
|
||||
|
||||
public function setDescription(string $Description): static
|
||||
{
|
||||
$this->Description = $Description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
42
src/Entity/Competence.php
Normal file
42
src/Entity/Competence.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\CompetenceRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: CompetenceRepository::class)]
|
||||
class Competence
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Libelle = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLibelle(): ?string
|
||||
{
|
||||
return $this->Libelle;
|
||||
}
|
||||
|
||||
public function setLibelle(string $Libelle): static
|
||||
{
|
||||
$this->Libelle = $Libelle;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
65
src/Entity/Demandeur.php
Normal file
65
src/Entity/Demandeur.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\DemandeurRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: DemandeurRepository::class)]
|
||||
class Demandeur
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $LM = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $CV = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Mail = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getLM(): ?string
|
||||
{
|
||||
return $this->LM;
|
||||
}
|
||||
|
||||
public function setLM(string $LM): static
|
||||
{
|
||||
$this->LM = $LM;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCV(): ?string
|
||||
{
|
||||
return $this->CV;
|
||||
}
|
||||
|
||||
public function setCV(string $CV): static
|
||||
{
|
||||
$this->CV = $CV;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMail(): ?string
|
||||
{
|
||||
return $this->Mail;
|
||||
}
|
||||
|
||||
public function setMail(string $Mail): static
|
||||
{
|
||||
$this->Mail = $Mail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
42
src/Entity/Diplome.php
Normal file
42
src/Entity/Diplome.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\DiplomeRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: DiplomeRepository::class)]
|
||||
class Diplome
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Libelle = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLibelle(): ?string
|
||||
{
|
||||
return $this->Libelle;
|
||||
}
|
||||
|
||||
public function setLibelle(string $Libelle): static
|
||||
{
|
||||
$this->Libelle = $Libelle;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
35
src/Entity/Employe.php
Normal file
35
src/Entity/Employe.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\EmployeRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: EmployeRepository::class)]
|
||||
class Employe
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Mail = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getMail(): ?string
|
||||
{
|
||||
return $this->Mail;
|
||||
}
|
||||
|
||||
public function setMail(string $Mail): static
|
||||
{
|
||||
$this->Mail = $Mail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
87
src/Entity/Entreprise.php
Normal file
87
src/Entity/Entreprise.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\EntrepriseRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: EntrepriseRepository::class)]
|
||||
class Entreprise
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Nom = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Adresse = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Tel = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Mail = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNom(): ?string
|
||||
{
|
||||
return $this->Nom;
|
||||
}
|
||||
|
||||
public function setNom(string $Nom): static
|
||||
{
|
||||
$this->Nom = $Nom;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAdresse(): ?string
|
||||
{
|
||||
return $this->Adresse;
|
||||
}
|
||||
|
||||
public function setAdresse(string $Adresse): static
|
||||
{
|
||||
$this->Adresse = $Adresse;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTel(): ?string
|
||||
{
|
||||
return $this->Tel;
|
||||
}
|
||||
|
||||
public function setTel(string $Tel): static
|
||||
{
|
||||
$this->Tel = $Tel;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMail(): ?string
|
||||
{
|
||||
return $this->Mail;
|
||||
}
|
||||
|
||||
public function setMail(string $Mail): static
|
||||
{
|
||||
$this->Mail = $Mail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
27
src/Entity/Favoris.php
Normal file
27
src/Entity/Favoris.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\FavorisRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FavorisRepository::class)]
|
||||
class Favoris
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
36
src/Entity/Formulaire.php
Normal file
36
src/Entity/Formulaire.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\FormulaireRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FormulaireRepository::class)]
|
||||
class Formulaire
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $Date = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->Date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTimeInterface $Date): static
|
||||
{
|
||||
$this->Date = $Date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
36
src/Entity/Liste.php
Normal file
36
src/Entity/Liste.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\ListeRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ListeRepository::class)]
|
||||
class Liste
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $Date = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->Date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTimeInterface $Date): static
|
||||
{
|
||||
$this->Date = $Date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
135
src/Entity/Utilisateur.php
Normal file
135
src/Entity/Utilisateur.php
Normal file
@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\UtilisateurRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
#[ORM\Entity(repositoryClass: UtilisateurRepository::class)]
|
||||
class Utilisateur
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Nom = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Prenom = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Tel = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Adresse = null;
|
||||
|
||||
|
||||
|
||||
|
||||
// Ajout de la relation OneToMany
|
||||
#[ORM\OneToMany(targetEntity: Message::class, mappedBy: 'utilisateur')]
|
||||
|
||||
|
||||
|
||||
|
||||
private Collection $messages;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->messages = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNom(): ?string
|
||||
{
|
||||
return $this->Nom;
|
||||
}
|
||||
|
||||
public function setNom(string $Nom): static
|
||||
{
|
||||
$this->Nom = $Nom;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPrenom(): ?string
|
||||
{
|
||||
return $this->Prenom;
|
||||
}
|
||||
|
||||
public function setPrenom(string $Prenom): static
|
||||
{
|
||||
$this->Prenom = $Prenom;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTel(): ?string
|
||||
{
|
||||
return $this->Tel;
|
||||
}
|
||||
|
||||
public function setTel(string $Tel): static
|
||||
{
|
||||
$this->Tel = $Tel;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAdresse(): ?string
|
||||
{
|
||||
return $this->Adresse;
|
||||
}
|
||||
|
||||
public function setAdresse(string $Adresse): static
|
||||
{
|
||||
$this->Adresse = $Adresse;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// Getter et setter pour la relation avec Message
|
||||
/**
|
||||
* @return Collection<int, Message>
|
||||
*/
|
||||
public function getMessages(): Collection
|
||||
{
|
||||
return $this->messages;
|
||||
}
|
||||
|
||||
public function addMessage(Message $message): static
|
||||
{
|
||||
if (!$this->messages->contains($message)) {
|
||||
$this->messages[] = $message;
|
||||
$message->setUtilisateur($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeMessage(Message $message): static
|
||||
{
|
||||
if ($this->messages->removeElement($message)) {
|
||||
if ($message->getUtilisateur() === $this) {
|
||||
$message->setUtilisateur(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
42
src/Entity/Verifie.php
Normal file
42
src/Entity/Verifie.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\VerifieRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: VerifieRepository::class)]
|
||||
class Verifie
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $Libelle = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLibelle(): ?string
|
||||
{
|
||||
return $this->Libelle;
|
||||
}
|
||||
|
||||
public function setLibelle(string $Libelle): static
|
||||
{
|
||||
$this->Libelle = $Libelle;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
43
src/Repository/AnnonceRepository.php
Normal file
43
src/Repository/AnnonceRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Annonce;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Annonce>
|
||||
*/
|
||||
class AnnonceRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Annonce::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Annonce[] Returns an array of Annonce objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('a')
|
||||
// ->andWhere('a.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('a.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Annonce
|
||||
// {
|
||||
// return $this->createQueryBuilder('a')
|
||||
// ->andWhere('a.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
@ -16,6 +16,28 @@ class AnnouncementRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, Announcement::class);
|
||||
}
|
||||
|
||||
public function searchAnnouncements(?string $companyName, ?string $location, ?string $category): array
|
||||
{
|
||||
$queryBuilder = $this->createQueryBuilder('a')->InnerJoin('a.company', 'c');
|
||||
|
||||
if ($companyName) {
|
||||
$queryBuilder->andWhere('c.name LIKE :companyName')
|
||||
->setParameter('companyName', '%' . $companyName . '%');
|
||||
}
|
||||
|
||||
if ($location) {
|
||||
$queryBuilder->andWhere('c.address LIKE :location')
|
||||
->setParameter('location', '%' . $location . '%');
|
||||
}
|
||||
|
||||
if ($category) {
|
||||
$queryBuilder->andWhere('a.title LIKE :category OR a.description LIKE :category')
|
||||
->setParameter('category', '%' . $category . '%');
|
||||
}
|
||||
|
||||
return $queryBuilder->getQuery()->getResult();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Announcement[] Returns an array of Announcement objects
|
||||
// */
|
||||
|
43
src/Repository/CompetenceRepository.php
Normal file
43
src/Repository/CompetenceRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Competence;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Competence>
|
||||
*/
|
||||
class CompetenceRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Competence::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Competence[] Returns an array of Competence objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('c')
|
||||
// ->andWhere('c.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('c.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Competence
|
||||
// {
|
||||
// return $this->createQueryBuilder('c')
|
||||
// ->andWhere('c.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/DemandeurRepository.php
Normal file
43
src/Repository/DemandeurRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Demandeur;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Demandeur>
|
||||
*/
|
||||
class DemandeurRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Demandeur::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Demandeur[] Returns an array of Demandeur objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('d')
|
||||
// ->andWhere('d.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('d.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Demandeur
|
||||
// {
|
||||
// return $this->createQueryBuilder('d')
|
||||
// ->andWhere('d.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/DiplomeRepository.php
Normal file
43
src/Repository/DiplomeRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Diplome;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Diplome>
|
||||
*/
|
||||
class DiplomeRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Diplome::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Diplome[] Returns an array of Diplome objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('d')
|
||||
// ->andWhere('d.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('d.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Diplome
|
||||
// {
|
||||
// return $this->createQueryBuilder('d')
|
||||
// ->andWhere('d.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/EmployeRepository.php
Normal file
43
src/Repository/EmployeRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Employe;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Employe>
|
||||
*/
|
||||
class EmployeRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Employe::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Employe[] Returns an array of Employe objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('e')
|
||||
// ->andWhere('e.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('e.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Employe
|
||||
// {
|
||||
// return $this->createQueryBuilder('e')
|
||||
// ->andWhere('e.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/EntrepriseRepository.php
Normal file
43
src/Repository/EntrepriseRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Entreprise;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Entreprise>
|
||||
*/
|
||||
class EntrepriseRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Entreprise::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Entreprise[] Returns an array of Entreprise objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('e')
|
||||
// ->andWhere('e.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('e.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Entreprise
|
||||
// {
|
||||
// return $this->createQueryBuilder('e')
|
||||
// ->andWhere('e.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/FavorisRepository.php
Normal file
43
src/Repository/FavorisRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Favoris;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Favoris>
|
||||
*/
|
||||
class FavorisRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Favoris::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Favoris[] Returns an array of Favoris objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('f')
|
||||
// ->andWhere('f.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('f.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Favoris
|
||||
// {
|
||||
// return $this->createQueryBuilder('f')
|
||||
// ->andWhere('f.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/FormulaireRepository.php
Normal file
43
src/Repository/FormulaireRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Formulaire;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Formulaire>
|
||||
*/
|
||||
class FormulaireRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Formulaire::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Formulaire[] Returns an array of Formulaire objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('f')
|
||||
// ->andWhere('f.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('f.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Formulaire
|
||||
// {
|
||||
// return $this->createQueryBuilder('f')
|
||||
// ->andWhere('f.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/ListeRepository.php
Normal file
43
src/Repository/ListeRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Liste;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Liste>
|
||||
*/
|
||||
class ListeRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Liste::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Liste[] Returns an array of Liste objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('l')
|
||||
// ->andWhere('l.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('l.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Liste
|
||||
// {
|
||||
// return $this->createQueryBuilder('l')
|
||||
// ->andWhere('l.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/UtilisateurRepository.php
Normal file
43
src/Repository/UtilisateurRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Utilisateur;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Utilisateur>
|
||||
*/
|
||||
class UtilisateurRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Utilisateur::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Utilisateur[] Returns an array of Utilisateur objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('u')
|
||||
// ->andWhere('u.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('u.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Utilisateur
|
||||
// {
|
||||
// return $this->createQueryBuilder('u')
|
||||
// ->andWhere('u.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
43
src/Repository/VerifieRepository.php
Normal file
43
src/Repository/VerifieRepository.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Verifie;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Verifie>
|
||||
*/
|
||||
class VerifieRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Verifie::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Verifie[] Returns an array of Verifie objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('v')
|
||||
// ->andWhere('v.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('v.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Verifie
|
||||
// {
|
||||
// return $this->createQueryBuilder('v')
|
||||
// ->andWhere('v.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
@ -36,6 +36,21 @@
|
||||
|
||||
<!-- Liste des annonces -->
|
||||
<div class="max-w-4xl mx-auto">
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 inline-block text-center my-10">
|
||||
<form method="get" class="flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4 text-black">
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Rechercher par entreprise" type="text" name="company_name" value="{{ app.request.query.get('company_name') }}"/>
|
||||
</label>
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Rechercher par lieu" type="text" name="location" value="{{ app.request.query.get('location') }}"/>
|
||||
</label>
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Autre recherche" type="text" name="category" value="{{ app.request.query.get('category') }}"/>
|
||||
</label>
|
||||
<button type="submit" class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-6 rounded">Rechercher</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% for announcement in announcements %}
|
||||
<div class="bg-white p-6 rounded-lg shadow mb-4 relative">
|
||||
<!-- Statut en haut à droite -->
|
||||
|
22
templates/broadcast/FAQ.stream.html.twig
Normal file
22
templates/broadcast/FAQ.stream.html.twig
Normal file
@ -0,0 +1,22 @@
|
||||
{# Learn how to use Turbo Streams: https://github.com/symfony/ux-turbo#broadcast-doctrine-entities-update #}
|
||||
{% block create %}
|
||||
<turbo-stream action="append" target="f_a_qs">
|
||||
<template>
|
||||
<div id="{{ 'f_a_q_' ~ id }}">
|
||||
#{{ id }} created
|
||||
</div>
|
||||
</template>
|
||||
</turbo-stream>
|
||||
{% endblock %}
|
||||
|
||||
{% block update %}
|
||||
<turbo-stream action="update" target="f_a_q_{{ id }}">
|
||||
<template>
|
||||
#{{ id }} updated
|
||||
</template>
|
||||
</turbo-stream>
|
||||
{% endblock %}
|
||||
|
||||
{% block remove %}
|
||||
<turbo-stream action="remove" target="f_a_q_{{ id }}"></turbo-stream>
|
||||
{% endblock %}
|
@ -11,21 +11,6 @@
|
||||
<div class="container mx-auto text-center text-white">
|
||||
<h1 class="text-4xl md:text-5xl font-bold mb-4">Trouvez votre stage de rêve !</h1>
|
||||
<p class="text-lg mb-8">Connectez les talents aux opportunités : votre clé vers le succès professionnel</p>
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 inline-block">
|
||||
<div class="flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4 text-black">
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Nom de l'entreprise" type="text"/>
|
||||
</label>
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Indiquez un endroit" type="text"/>
|
||||
</label>
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Sélectionnez une catégorie" type="text"/>
|
||||
</label>
|
||||
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-6 rounded">Trouvez un stage</button>
|
||||
</div>
|
||||
<p class="text-black"> la recherche n'est pas encore implémenté </p>
|
||||
</div>
|
||||
<div class="flex justify-center space-x-8 mt-8">
|
||||
<div class="text-center">
|
||||
<i class="fas fa-briefcase text-2xl"></i>
|
||||
|
Loading…
x
Reference in New Issue
Block a user