Compare commits

...

9 Commits

Author SHA1 Message Date
8f18e44be6 index de l'appli 2024-11-21 17:52:50 +01:00
bef89483ef vues twig 2024-11-21 17:04:56 +01:00
2c63ca35e1 controllers 2024-11-21 16:18:44 +01:00
a65eb73b81 ajout FAQ + premiers controller / vues / formulaire pour annonce 2024-11-11 16:00:51 +01:00
2818279438 ajout diplome et message + gestion des relations 2024-11-10 15:41:01 +01:00
29e2d43381 ya des entite tkt 2024-10-17 17:56:46 +02:00
ALLAVENA--VALETTE Romain
a83a627a56 update user 2024-10-10 14:47:52 +02:00
ALLAVENA--VALETTE Romain
8cb42922aa gitignore 2024-10-03 17:24:47 +02:00
ALLAVENA--VALETTE Romain
3df2feb33c reset et creation User 2024-10-03 17:23:33 +02:00
106 changed files with 4540 additions and 6 deletions

4
.gitignore vendored
View File

@ -14,12 +14,10 @@
.phpunit.result.cache
###< phpunit/phpunit ###
###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
###> symfony/asset-mapper ###
/public/assets/
/assets/vendor/
###< symfony/asset-mapper ###
.idea

View File

@ -43,7 +43,8 @@
"symfony/web-link": "7.1.*",
"symfony/yaml": "7.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
"twig/twig": "^2.12|^3.0",
"ext-http": "*"
},
"config": {
"allow-plugins": {

View File

@ -4,14 +4,18 @@ security:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
providers:
users_in_memory: { memory: null }
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User
property: nickname
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
lazy: true
provider: users_in_memory
provider: app_user_provider
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall

View File

@ -0,0 +1,67 @@
<?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 Version20241017134137 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 announcement_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE company_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE userApp_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE announcement (id INT NOT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE company (id INT NOT NULL, name VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, tel VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE employee (id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE intern (id INT NOT NULL, cover_letter TEXT NOT NULL, resume VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE userApp (id INT NOT NULL, nickname VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, tel VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, DISCRIMINATOR VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NICKNAME ON userApp (nickname)');
$this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
$this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;');
$this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;');
$this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();');
$this->addSql('ALTER TABLE employee ADD CONSTRAINT FK_5D9F75A1BF396750 FOREIGN KEY (id) REFERENCES userApp (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE intern ADD CONSTRAINT FK_A5795F36BF396750 FOREIGN KEY (id) REFERENCES userApp (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE announcement_id_seq CASCADE');
$this->addSql('DROP SEQUENCE company_id_seq CASCADE');
$this->addSql('DROP SEQUENCE userApp_id_seq CASCADE');
$this->addSql('ALTER TABLE employee DROP CONSTRAINT FK_5D9F75A1BF396750');
$this->addSql('ALTER TABLE intern DROP CONSTRAINT FK_A5795F36BF396750');
$this->addSql('DROP TABLE announcement');
$this->addSql('DROP TABLE company');
$this->addSql('DROP TABLE employee');
$this->addSql('DROP TABLE intern');
$this->addSql('DROP TABLE userApp');
$this->addSql('DROP TABLE messenger_messages');
}
}

View File

@ -0,0 +1,52 @@
<?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 Version20241017142722 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 status_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE status (id INT NOT NULL, label VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('ALTER TABLE announcement ADD company_id INT NOT NULL');
$this->addSql('ALTER TABLE announcement ADD status_id INT NOT NULL');
$this->addSql('ALTER TABLE announcement ADD CONSTRAINT FK_4DB9D91C979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE announcement ADD CONSTRAINT FK_4DB9D91C6BF700BD FOREIGN KEY (status_id) REFERENCES status (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_4DB9D91C979B1AD6 ON announcement (company_id)');
$this->addSql('CREATE INDEX IDX_4DB9D91C6BF700BD ON announcement (status_id)');
$this->addSql('ALTER TABLE employee ADD company_id INT NOT NULL');
$this->addSql('ALTER TABLE employee ADD CONSTRAINT FK_5D9F75A1979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_5D9F75A1979B1AD6 ON employee (company_id)');
}
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('ALTER TABLE announcement DROP CONSTRAINT FK_4DB9D91C6BF700BD');
$this->addSql('DROP SEQUENCE status_id_seq CASCADE');
$this->addSql('DROP TABLE status');
$this->addSql('ALTER TABLE announcement DROP CONSTRAINT FK_4DB9D91C979B1AD6');
$this->addSql('DROP INDEX IDX_4DB9D91C979B1AD6');
$this->addSql('DROP INDEX IDX_4DB9D91C6BF700BD');
$this->addSql('ALTER TABLE announcement DROP company_id');
$this->addSql('ALTER TABLE announcement DROP status_id');
$this->addSql('ALTER TABLE employee DROP CONSTRAINT FK_5D9F75A1979B1AD6');
$this->addSql('DROP INDEX IDX_5D9F75A1979B1AD6');
$this->addSql('ALTER TABLE employee DROP company_id');
}
}

View File

@ -0,0 +1,46 @@
<?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 Version20241017152949 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 TABLE favorites (intern_id INT NOT NULL, announcement_id INT NOT NULL, PRIMARY KEY(intern_id, announcement_id))');
$this->addSql('CREATE INDEX IDX_E46960F5525DD4B4 ON favorites (intern_id)');
$this->addSql('CREATE INDEX IDX_E46960F5913AEA17 ON favorites (announcement_id)');
$this->addSql('CREATE TABLE applications (intern_id INT NOT NULL, announcement_id INT NOT NULL, PRIMARY KEY(intern_id, announcement_id))');
$this->addSql('CREATE INDEX IDX_F7C966F0525DD4B4 ON applications (intern_id)');
$this->addSql('CREATE INDEX IDX_F7C966F0913AEA17 ON applications (announcement_id)');
$this->addSql('ALTER TABLE favorites ADD CONSTRAINT FK_E46960F5525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE favorites ADD CONSTRAINT FK_E46960F5913AEA17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE applications ADD CONSTRAINT FK_F7C966F0525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE applications ADD CONSTRAINT FK_F7C966F0913AEA17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE favorites DROP CONSTRAINT FK_E46960F5525DD4B4');
$this->addSql('ALTER TABLE favorites DROP CONSTRAINT FK_E46960F5913AEA17');
$this->addSql('ALTER TABLE applications DROP CONSTRAINT FK_F7C966F0525DD4B4');
$this->addSql('ALTER TABLE applications DROP CONSTRAINT FK_F7C966F0913AEA17');
$this->addSql('DROP TABLE favorites');
$this->addSql('DROP TABLE applications');
}
}

View File

@ -0,0 +1,123 @@
<?php
namespace App\Controller;
use App\Entity\Announcement;
use App\Entity\InternApplication;
use App\Form\AnnouncementType;
use App\Repository\AnnouncementRepository;
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;
#[Route('/announcement', name: 'app_announcement')]
class AnnouncementController extends AbstractController
{
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly AnnouncementRepository $announcementRepository
)
{
}
#[Route('/add', name: '_add')]
public function addAnnouncement(Request $request): Response
{
$announcement = new Announcement();
$form = $this->createForm(AnnouncementType::class, $announcement);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
//met la date de création de l'annonce au moment où le formulaire est envoyé
$announcement->setCreationDate(new \DateTime());
$this->entityManager->persist($announcement);
$this->entityManager->flush();
$this->addFlash('success', 'Annonce créée avec succès.');
return $this->redirectToRoute('app_announcement_list');
}
return $this->render('announcement/add.html.twig', [
'announcementForm' => $form,
]);
}
#[Route('/list', name: '_list')]
public function list(): Response
{
$announcements = $this->announcementRepository->findAll();
return $this->render('announcement/list.html.twig', [
'announcements' => $announcements,
]);
}
#[Route('/update/{id}', name: '_update')]
public function update(int $id, Request $request): Response
{
$announcement = $this->announcementRepository->find($id);
$form = $this->createForm(AnnouncementType::class, $announcement);
$form->handleRequest($request);
if($form->isSubmitted() && $form->isValid())
{
$this->entityManager->persist($announcement);
$this->entityManager->flush();
$this->addFlash('success', 'Annonce modifiéé avec succès.');
return $this->redirectToRoute('app_announcement_list');
}
return $this->render('announcement/add.html.twig', [
'formAdd' => $form,
]);
}
#[Route('/delete/{id}', name: '_delete')]
public function delete(int $id): Response
{
$announcement = $this->announcementRepository->find($id);
$this->entityManager->remove($announcement);
$this->entityManager->flush();
return $this->redirectToRoute('app_announcement_list');
}
#[Route('/apply/{id}', name: '_apply')]
public function applyToAnnouncement(int $id): Response
{
$announcement = $this->announcementRepository->find($id);
$user = $this->getUser();
$existingCandidature = $this->entityManager->getRepository(InternApplication::class)->findOneBy([
'intern' => $user,
'announcement' => $announcement
]);
if($existingCandidature) {
$this->addFlash('error', 'Vous avez déjà postulé à cette annonce.');
return $this->redirectToRoute('app_announcement_list');
}
$application = new InternApplication();
$application->setIntern($user);
$application->setIntern($announcement);
$application->setApplicationDate(new \DateTime());
$this->entityManager->persist($application);
$this->entityManager->flush();
$this->addFlash('success', 'Votre candidature a été envoyée avec succès.');
return $this->redirectToRoute('annonce_list', ['id' => $announcement->getId()]);
}
#[Route('/filterByCompany', name: '_filterByCompany')]
public function filterByCompany(int $id): Response
{
return $this->redirectToRoute('annonce_list', ['id' => $id]);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Company;
use App\Form\CompanyType;
use App\Repository\CompanyRepository;
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;
#[Route('/company')]
final class CompanyController extends AbstractController
{
#[Route(name: 'app_company_index', methods: ['GET'])]
public function index(CompanyRepository $companyRepository): Response
{
return $this->render('company/index.html.twig', [
'companies' => $companyRepository->findAll(),
]);
}
#[Route('/new', name: 'app_company_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$company = new Company();
$form = $this->createForm(CompanyType::class, $company);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($company);
$entityManager->flush();
return $this->redirectToRoute('app_company_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('company/new.html.twig', [
'company' => $company,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_company_show', methods: ['GET'])]
public function show(Company $company): Response
{
return $this->render('company/show.html.twig', [
'company' => $company,
]);
}
#[Route('/{id}/edit', name: 'app_company_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Company $company, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(CompanyType::class, $company);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_company_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('company/edit.html.twig', [
'company' => $company,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_company_delete', methods: ['POST'])]
public function delete(Request $request, Company $company, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$company->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($company);
$entityManager->flush();
}
return $this->redirectToRoute('app_company_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Degree;
use App\Form\DegreeType;
use App\Repository\DegreeRepository;
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;
#[Route('/degree')]
final class DegreeController extends AbstractController
{
#[Route(name: 'app_degree_index', methods: ['GET'])]
public function index(DegreeRepository $degreeRepository): Response
{
return $this->render('degree/index.html.twig', [
'degrees' => $degreeRepository->findAll(),
]);
}
#[Route('/new', name: 'app_degree_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$degree = new Degree();
$form = $this->createForm(DegreeType::class, $degree);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($degree);
$entityManager->flush();
return $this->redirectToRoute('app_degree_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('degree/new.html.twig', [
'degree' => $degree,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_degree_show', methods: ['GET'])]
public function show(Degree $degree): Response
{
return $this->render('degree/show.html.twig', [
'degree' => $degree,
]);
}
#[Route('/{id}/edit', name: 'app_degree_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Degree $degree, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(DegreeType::class, $degree);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_degree_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('degree/edit.html.twig', [
'degree' => $degree,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_degree_delete', methods: ['POST'])]
public function delete(Request $request, Degree $degree, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$degree->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($degree);
$entityManager->flush();
}
return $this->redirectToRoute('app_degree_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Employee;
use App\Form\EmployeeType;
use App\Repository\EmployeeRepository;
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;
#[Route('/employee')]
final class EmployeeController extends AbstractController
{
#[Route(name: 'app_employee_index', methods: ['GET'])]
public function index(EmployeeRepository $employeeRepository): Response
{
return $this->render('employee/index.html.twig', [
'employees' => $employeeRepository->findAll(),
]);
}
#[Route('/new', name: 'app_employee_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$employee = new Employee();
$form = $this->createForm(EmployeeType::class, $employee);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($employee);
$entityManager->flush();
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('employee/new.html.twig', [
'employee' => $employee,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_employee_show', methods: ['GET'])]
public function show(Employee $employee): Response
{
return $this->render('employee/show.html.twig', [
'employee' => $employee,
]);
}
#[Route('/{id}/edit', name: 'app_employee_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Employee $employee, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(EmployeeType::class, $employee);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('employee/edit.html.twig', [
'employee' => $employee,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_employee_delete', methods: ['POST'])]
public function delete(Request $request, Employee $employee, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$employee->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($employee);
$entityManager->flush();
}
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\FAQ;
use App\Form\FAQType;
use App\Repository\FAQRepository;
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;
#[Route('/faq')]
final class FAQController extends AbstractController
{
#[Route(name: 'app_faq_index', methods: ['GET'])]
public function index(FAQRepository $fAQRepository): Response
{
return $this->render('faq/index.html.twig', [
'faqs' => $fAQRepository->findAll(),
]);
}
#[Route('/new', name: 'app_faq_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$fAQ = new FAQ();
$form = $this->createForm(FAQType::class, $fAQ);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($fAQ);
$entityManager->flush();
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('faq/new.html.twig', [
'faq' => $fAQ,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_faq_show', methods: ['GET'])]
public function show(FAQ $fAQ): Response
{
return $this->render('faq/show.html.twig', [
'faq' => $fAQ,
]);
}
#[Route('/{id}/edit', name: 'app_faq_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, FAQ $fAQ, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(FAQType::class, $fAQ);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('faq/edit.html.twig', [
'faq' => $fAQ,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_faq_delete', methods: ['POST'])]
public function delete(Request $request, FAQ $fAQ, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$fAQ->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($fAQ);
$entityManager->flush();
}
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
}
}

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

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Intern;
use App\Form\InternType;
use App\Repository\InternRepository;
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;
#[Route('/intern')]
final class InternController extends AbstractController
{
#[Route(name: 'app_intern_index', methods: ['GET'])]
public function index(InternRepository $internRepository): Response
{
return $this->render('intern/index.html.twig', [
'interns' => $internRepository->findAll(),
]);
}
#[Route('/new', name: 'app_intern_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$intern = new Intern();
$form = $this->createForm(InternType::class, $intern);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($intern);
$entityManager->flush();
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('intern/new.html.twig', [
'intern' => $intern,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_intern_show', methods: ['GET'])]
public function show(Intern $intern): Response
{
return $this->render('intern/show.html.twig', [
'intern' => $intern,
]);
}
#[Route('/{id}/edit', name: 'app_intern_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Intern $intern, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(InternType::class, $intern);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('intern/edit.html.twig', [
'intern' => $intern,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_intern_delete', methods: ['POST'])]
public function delete(Request $request, Intern $intern, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$intern->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($intern);
$entityManager->flush();
}
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Message;
use App\Form\MessageType;
use App\Repository\MessageRepository;
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;
#[Route('/message')]
final class MessageController extends AbstractController
{
#[Route(name: 'app_message_index', methods: ['GET'])]
public function index(MessageRepository $messageRepository): Response
{
return $this->render('message/index.html.twig', [
'messages' => $messageRepository->findAll(),
]);
}
#[Route('/new', name: 'app_message_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$message = new Message();
$form = $this->createForm(MessageType::class, $message);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($message);
$entityManager->flush();
return $this->redirectToRoute('app_message_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('message/new.html.twig', [
'message' => $message,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_message_show', methods: ['GET'])]
public function show(Message $message): Response
{
return $this->render('message/show.html.twig', [
'message' => $message,
]);
}
#[Route('/{id}/edit', name: 'app_message_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Message $message, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(MessageType::class, $message);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_message_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('message/edit.html.twig', [
'message' => $message,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_message_delete', methods: ['POST'])]
public function delete(Request $request, Message $message, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$message->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($message);
$entityManager->flush();
}
return $this->redirectToRoute('app_message_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
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;
#[Route('/skill')]
final class SkillController extends AbstractController
{
#[Route(name: 'app_skill_index', methods: ['GET'])]
public function index(SkillRepository $skillRepository): Response
{
return $this->render('skill/index.html.twig', [
'skills' => $skillRepository->findAll(),
]);
}
#[Route('/new', name: 'app_skill_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$skill = new Skill();
$form = $this->createForm(SkillType::class, $skill);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($skill);
$entityManager->flush();
return $this->redirectToRoute('app_skill_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('skill/new.html.twig', [
'skill' => $skill,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_skill_show', methods: ['GET'])]
public function show(Skill $skill): Response
{
return $this->render('skill/show.html.twig', [
'skill' => $skill,
]);
}
#[Route('/{id}/edit', name: 'app_skill_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Skill $skill, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(SkillType::class, $skill);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_skill_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('skill/edit.html.twig', [
'skill' => $skill,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_skill_delete', methods: ['POST'])]
public function delete(Request $request, Skill $skill, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$skill->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($skill);
$entityManager->flush();
}
return $this->redirectToRoute('app_skill_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\UserApp;
use App\Form\UserAppType;
use App\Repository\UserRepository;
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;
#[Route('/user/app')]
final class UserAppController extends AbstractController
{
#[Route(name: 'app_user_app_index', methods: ['GET'])]
public function index(UserRepository $userRepository): Response
{
return $this->render('user_app/index.html.twig', [
'user_apps' => $userRepository->findAll(),
]);
}
#[Route('/new', name: 'app_user_app_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$userApp = new UserApp();
$form = $this->createForm(UserAppType::class, $userApp);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($userApp);
$entityManager->flush();
return $this->redirectToRoute('app_user_app_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('user_app/new.html.twig', [
'user_app' => $userApp,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_user_app_show', methods: ['GET'])]
public function show(UserApp $userApp): Response
{
return $this->render('user_app/show.html.twig', [
'user_app' => $userApp,
]);
}
#[Route('/{id}/edit', name: 'app_user_app_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, UserApp $userApp, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(UserAppType::class, $userApp);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_user_app_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('user_app/edit.html.twig', [
'user_app' => $userApp,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_user_app_delete', methods: ['POST'])]
public function delete(Request $request, UserApp $userApp, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$userApp->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($userApp);
$entityManager->flush();
}
return $this->redirectToRoute('app_user_app_index', [], Response::HTTP_SEE_OTHER);
}
}

177
src/Entity/Announcement.php Normal file
View File

@ -0,0 +1,177 @@
<?php
namespace App\Entity;
use App\Repository\AnnouncementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AnnouncementRepository::class)]
class Announcement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $title = null;
#[ORM\Column(length: 255)]
private ?string $description = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $creationDate = null;
#[ORM\ManyToOne(inversedBy: 'announcements')]
#[ORM\JoinColumn(nullable: false)]
private ?Company $company = null;
#[ORM\Column(length: 255,nullable: false)]
private ?string $status = "notVerified";
/**
* @var ?Collection<int, InternApplication>
*/
#[ORM\OneToMany(targetEntity: InternApplication::class, mappedBy: 'application')]
private ?Collection $applicants;
/**
* @var ?Collection<int, InternFavorite>
*/
#[ORM\OneToMany(targetEntity: InternFavorite::class, mappedBy: 'announcement')]
private ?Collection $favoritesInterns;
public function __construct()
{
$this->applicants = new ArrayCollection();
$this->favoritesInterns = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): static
{
$this->title = $title;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): static
{
$this->description = $description;
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): static
{
$this->company = $company;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?Status $status): static
{
$this->status = $status;
return $this;
}
/**
* @return Collection<int, InternApplication>
*/
public function getApplicants(): Collection
{
return $this->applicants;
}
public function addApplicants(InternApplication $applicants): static
{
if (!$this->applicants->contains($applicants)) {
$this->applicants->add($applicants);
$applicants->setApplication($this);
}
return $this;
}
public function removeApplicants(InternApplication $applicants): static
{
if ($this->applicants->removeElement($applicants)) {
// set the owning side to null (unless already changed)
if ($applicants->getApplication() === $this) {
$applicants->setApplication(null);
}
}
return $this;
}
/**
* @return Collection<int, InternFavorite>
*/
public function getFavoritesInterns(): Collection
{
return $this->favoritesInterns;
}
public function addFavoritesIntern(InternFavorite $favoritesIntern): static
{
if (!$this->favoritesInterns->contains($favoritesIntern)) {
$this->favoritesInterns->add($favoritesIntern);
$favoritesIntern->setAnnouncement($this);
}
return $this;
}
public function removeFavoritesIntern(InternFavorite $favoritesIntern): static
{
if ($this->favoritesInterns->removeElement($favoritesIntern)) {
// set the owning side to null (unless already changed)
if ($favoritesIntern->getAnnouncement() === $this) {
$favoritesIntern->setAnnouncement(null);
}
}
return $this;
}
public function getCreationDate(): ?\DateTimeInterface
{
return $this->creationDate;
}
public function setCreationDate(\DateTimeInterface $creationDate): static
{
$this->creationDate = $creationDate;
return $this;
}
}

161
src/Entity/Company.php Normal file
View File

@ -0,0 +1,161 @@
<?php
namespace App\Entity;
use App\Repository\CompanyRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CompanyRepository::class)]
class Company
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 255)]
private ?string $address = null;
#[ORM\Column(length: 255)]
private ?string $tel = null;
#[ORM\Column(length: 255)]
private ?string $mail = null;
/**
* @var Collection<int, Employee>
*/
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'company')]
private Collection $employees;
/**
* @var Collection<int, Announcement>
*/
#[ORM\OneToMany(targetEntity: Announcement::class, mappedBy: 'company')]
private Collection $announcements;
public function __construct()
{
$this->employees = new ArrayCollection();
$this->announcements = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): static
{
$this->address = $address;
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;
}
/**
* @return Collection<int, Employee>
*/
public function getEmployees(): Collection
{
return $this->employees;
}
public function addEmployee(Employee $employee): static
{
if (!$this->employees->contains($employee)) {
$this->employees->add($employee);
$employee->setCompany($this);
}
return $this;
}
public function removeEmployee(Employee $employee): static
{
if ($this->employees->removeElement($employee)) {
// set the owning side to null (unless already changed)
if ($employee->getCompany() === $this) {
$employee->setCompany(null);
}
}
return $this;
}
/**
* @return Collection<int, Announcement>
*/
public function getAnnouncements(): Collection
{
return $this->announcements;
}
public function addAnnouncement(Announcement $announcement): static
{
if (!$this->announcements->contains($announcement)) {
$this->announcements->add($announcement);
$announcement->setCompany($this);
}
return $this;
}
public function removeAnnouncement(Announcement $announcement): static
{
if ($this->announcements->removeElement($announcement)) {
// set the owning side to null (unless already changed)
if ($announcement->getCompany() === $this) {
$announcement->setCompany(null);
}
}
return $this;
}
}

78
src/Entity/Degree.php Normal file
View File

@ -0,0 +1,78 @@
<?php
namespace App\Entity;
use App\Repository\DegreeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DegreeRepository::class)]
class Degree
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $label = null;
/**
* @var Collection<int, InternDegree>
*/
#[ORM\OneToMany(targetEntity: InternDegree::class, mappedBy: 'degree')]
private Collection $interns;
public function __construct()
{
$this->interns = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
/**
* @return Collection<int, InternDegree>
*/
public function getInterns(): Collection
{
return $this->interns;
}
public function addIntern(InternDegree $intern): static
{
if (!$this->interns->contains($intern)) {
$this->interns->add($intern);
$intern->setDegree($this);
}
return $this;
}
public function removeIntern(InternDegree $intern): static
{
if ($this->interns->removeElement($intern)) {
// set the owning side to null (unless already changed)
if ($intern->getDegree() === $this) {
$intern->setDegree(null);
}
}
return $this;
}
}

26
src/Entity/Employee.php Normal file
View File

@ -0,0 +1,26 @@
<?php
namespace App\Entity;
use App\Repository\EmployeeRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EmployeeRepository::class)]
class Employee extends UserApp
{
#[ORM\ManyToOne(inversedBy: 'employees')]
#[ORM\JoinColumn(nullable: false)]
private ?Company $company = null;
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): static
{
$this->company = $company;
return $this;
}
}

66
src/Entity/FAQ.php Normal file
View File

@ -0,0 +1,66 @@
<?php
namespace App\Entity;
use App\Repository\FAQRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: FAQRepository::class)]
class FAQ
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $question = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $answer = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $updateDate = null;
public function getId(): ?int
{
return $this->id;
}
public function getQuestion(): ?string
{
return $this->question;
}
public function setQuestion(string $question): static
{
$this->question = $question;
return $this;
}
public function getAnswer(): ?string
{
return $this->answer;
}
public function setAnswer(?string $answer): static
{
$this->answer = $answer;
return $this;
}
public function getUpdateDate(): ?\DateTimeInterface
{
return $this->updateDate;
}
public function setUpdateDate(\DateTimeInterface $updateDate): static
{
$this->updateDate = $updateDate;
return $this;
}
}

196
src/Entity/Intern.php Normal file
View File

@ -0,0 +1,196 @@
<?php
namespace App\Entity;
use App\Repository\InternRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InternRepository::class)]
class Intern extends UserApp
{
#[ORM\Column(type: Types::TEXT)]
private ?string $coverLetter = null;
#[ORM\Column(length: 255)]
private ?string $resume = null;
/**
* @var Collection<int, InternDegree>
*/
#[ORM\OneToMany(targetEntity: InternDegree::class, mappedBy: 'intern')]
private Collection $degrees;
/**
* @var Collection<int, InternSkill>
*/
#[ORM\OneToMany(targetEntity: InternSkill::class, mappedBy: 'intern')]
private Collection $skills;
/**
* @var Collection<int, InternApplication>
*/
#[ORM\OneToMany(targetEntity: InternApplication::class, mappedBy: 'intern')]
private Collection $applications;
/**
* @var Collection<int, InternFavorite>
*/
#[ORM\OneToMany(targetEntity: InternFavorite::class, mappedBy: 'intern')]
private Collection $favorites;
public function __construct()
{
$this->degrees = new ArrayCollection();
$this->skills = new ArrayCollection();
$this->applications = new ArrayCollection();
$this->favorites = new ArrayCollection();
}
public function getCoverLetter(): ?string
{
return $this->coverLetter;
}
public function setCoverLetter(string $coverLetter): static
{
$this->coverLetter = $coverLetter;
return $this;
}
public function getResume(): ?string
{
return $this->resume;
}
public function setResume(string $resume): static
{
$this->resume = $resume;
return $this;
}
/**
* @return Collection<int, InternDegree>
*/
public function getDegrees(): Collection
{
return $this->degrees;
}
public function addDegree(InternDegree $degree): static
{
if (!$this->degrees->contains($degree)) {
$this->degrees->add($degree);
$degree->setIntern($this);
}
return $this;
}
public function removeDegree(InternDegree $degree): static
{
if ($this->degrees->removeElement($degree)) {
// set the owning side to null (unless already changed)
if ($degree->getIntern() === $this) {
$degree->setIntern(null);
}
}
return $this;
}
/**
* @return Collection<int, InternSkill>
*/
public function getSkills(): Collection
{
return $this->skills;
}
public function addSkill(InternSkill $skill): static
{
if (!$this->skills->contains($skill)) {
$this->skills->add($skill);
$skill->setIntern($this);
}
return $this;
}
public function removeSkill(InternSkill $skill): static
{
if ($this->skills->removeElement($skill)) {
// set the owning side to null (unless already changed)
if ($skill->getIntern() === $this) {
$skill->setIntern(null);
}
}
return $this;
}
/**
* @return Collection<int, InternApplication>
*/
public function getApplications(): Collection
{
return $this->applications;
}
public function addApplication(InternApplication $application): static
{
if (!$this->applications->contains($application)) {
$this->applications->add($application);
$application->setIntern($this);
}
return $this;
}
public function removeApplication(InternApplication $application): static
{
if ($this->applications->removeElement($application)) {
// set the owning side to null (unless already changed)
if ($application->getIntern() === $this) {
$application->setIntern(null);
}
}
return $this;
}
/**
* @return Collection<int, InternFavorite>
*/
public function getFavorites(): Collection
{
return $this->favorites;
}
public function addFavorite(InternFavorite $favorite): static
{
if (!$this->favorites->contains($favorite)) {
$this->favorites->add($favorite);
$favorite->setIntern($this);
}
return $this;
}
public function removeFavorite(InternFavorite $favorite): static
{
if ($this->favorites->removeElement($favorite)) {
// set the owning side to null (unless already changed)
if ($favorite->getIntern() === $this) {
$favorite->setIntern(null);
}
}
return $this;
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Entity;
use App\Repository\InternApplicationRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InternApplicationRepository::class)]
class InternApplication
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'applicants')]
private ?Announcement $application = null;
#[ORM\ManyToOne(inversedBy: 'applications')]
private ?Intern $intern = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $applicationDate = null;
public function getId(): ?int
{
return $this->id;
}
public function getApplication(): ?Announcement
{
return $this->application;
}
public function setApplication(?Announcement $application): static
{
$this->application = $application;
return $this;
}
public function getIntern(): ?Intern
{
return $this->intern;
}
public function setIntern(?Intern $intern): static
{
$this->intern = $intern;
return $this;
}
public function getApplicationDate(): ?\DateTimeInterface
{
return $this->applicationDate;
}
public function setApplicationDate(\DateTimeInterface $applicationDate): static
{
$this->applicationDate = $applicationDate;
return $this;
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Entity;
use App\Repository\InternDegreeRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InternDegreeRepository::class)]
class InternDegree
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'interns')]
private ?Degree $degree = null;
#[ORM\ManyToOne(inversedBy: 'degrees')]
private ?Intern $intern = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $graduationDate = null;
public function getId(): ?int
{
return $this->id;
}
public function getDegree(): ?Degree
{
return $this->degree;
}
public function setDegree(?Degree $degree): static
{
$this->degree = $degree;
return $this;
}
public function getIntern(): ?Intern
{
return $this->intern;
}
public function setIntern(?Intern $intern): static
{
$this->intern = $intern;
return $this;
}
public function getGraduationDate(): ?\DateTimeInterface
{
return $this->graduationDate;
}
public function setGraduationDate(\DateTimeInterface $graduationDate): static
{
$this->graduationDate = $graduationDate;
return $this;
}
}

View File

@ -0,0 +1,50 @@
<?php
namespace App\Entity;
use App\Repository\InternFavoriteRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InternFavoriteRepository::class)]
class InternFavorite
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'favoritesInterns')]
private ?Announcement $announcement = null;
#[ORM\ManyToOne(inversedBy: 'favorites')]
private ?Intern $intern = null;
public function getId(): ?int
{
return $this->id;
}
public function getAnnouncement(): ?Announcement
{
return $this->announcement;
}
public function setAnnouncement(?Announcement $announcement): static
{
$this->announcement = $announcement;
return $this;
}
public function getIntern(): ?Intern
{
return $this->intern;
}
public function setIntern(?Intern $intern): static
{
$this->intern = $intern;
return $this;
}
}

View File

@ -0,0 +1,50 @@
<?php
namespace App\Entity;
use App\Repository\InternSkillRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InternSkillRepository::class)]
class InternSkill
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'interns')]
private ?Skill $skill = null;
#[ORM\ManyToOne(inversedBy: 'skills')]
private ?Intern $intern = null;
public function getId(): ?int
{
return $this->id;
}
public function getSkill(): ?Skill
{
return $this->skill;
}
public function setSkill(?Skill $skill): static
{
$this->skill = $skill;
return $this;
}
public function getIntern(): ?Intern
{
return $this->intern;
}
public function setIntern(?Intern $intern): static
{
$this->intern = $intern;
return $this;
}
}

81
src/Entity/Message.php Normal file
View File

@ -0,0 +1,81 @@
<?php
namespace App\Entity;
use App\Repository\MessageRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MessageRepository::class)]
class Message
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne]
private ?UserApp $sender = null;
#[ORM\ManyToOne]
private ?UserApp $receiver = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $content = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $sendingDate = null;
public function getId(): ?int
{
return $this->id;
}
public function getSender(): ?UserApp
{
return $this->sender;
}
public function setSender(?UserApp $sender): static
{
$this->sender = $sender;
return $this;
}
public function getReceiver(): ?UserApp
{
return $this->receiver;
}
public function setReceiver(?UserApp $receiver): static
{
$this->receiver = $receiver;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(string $content): static
{
$this->content = $content;
return $this;
}
public function getSendingDate(): ?\DateTimeInterface
{
return $this->sendingDate;
}
public function setSendingDate(\DateTimeInterface $sendingDate): static
{
$this->sendingDate = $sendingDate;
return $this;
}
}

78
src/Entity/Skill.php Normal file
View File

@ -0,0 +1,78 @@
<?php
namespace App\Entity;
use App\Repository\SkillRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: SkillRepository::class)]
class Skill
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $label = null;
/**
* @var Collection<int, InternSkill>
*/
#[ORM\OneToMany(targetEntity: InternSkill::class, mappedBy: 'skill')]
private Collection $interns;
public function __construct()
{
$this->interns = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
/**
* @return Collection<int, InternSkill>
*/
public function getInterns(): Collection
{
return $this->interns;
}
public function addIntern(InternSkill $intern): static
{
if (!$this->interns->contains($intern)) {
$this->interns->add($intern);
$intern->setSkill($this);
}
return $this;
}
public function removeIntern(InternSkill $intern): static
{
if ($this->interns->removeElement($intern)) {
// set the owning side to null (unless already changed)
if ($intern->getSkill() === $this) {
$intern->setSkill(null);
}
}
return $this;
}
}

78
src/Entity/Status.php Normal file
View File

@ -0,0 +1,78 @@
<?php
namespace App\Entity;
use App\Repository\StatusRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: StatusRepository::class)]
class Status
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $label = null;
/**
* @var Collection<int, Announcement>
*/
#[ORM\OneToMany(targetEntity: Announcement::class, mappedBy: 'status')]
private Collection $announcements;
public function __construct()
{
$this->announcements = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
/**
* @return Collection<int, Announcement>
*/
public function getAnnouncements(): Collection
{
return $this->announcements;
}
public function addAnnouncement(Announcement $announcement): static
{
if (!$this->announcements->contains($announcement)) {
$this->announcements->add($announcement);
$announcement->setStatus($this);
}
return $this;
}
public function removeAnnouncement(Announcement $announcement): static
{
if ($this->announcements->removeElement($announcement)) {
// set the owning side to null (unless already changed)
if ($announcement->getStatus() === $this) {
$announcement->setStatus(null);
}
}
return $this;
}
}

189
src/Entity/UserApp.php Normal file
View File

@ -0,0 +1,189 @@
<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\Table(name: 'userApp')]
#[ORM\InheritanceType('JOINED')]
#[ORM\DiscriminatorColumn(name: 'DISCRIMINATOR', type: 'string')]
#[ORM\DiscriminatorMap(['employee' => Employee::class, 'intern' => Intern::class])]
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_NICKNAME', fields: ['nickname'])]
class UserApp implements UserInterface, PasswordAuthenticatedUserInterface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 180)]
private ?string $nickname = null;
/**
* @var list<string> The user roles
*/
#[ORM\Column(nullable: true)]
private ?array $roles = null;
/**
* @var string The hashed password
*/
#[ORM\Column]
private ?string $password = null;
#[ORM\Column(length: 255)]
private ?string $firstName = null;
#[ORM\Column(length: 255)]
private ?string $lastName = null;
#[ORM\Column(length: 255)]
private ?string $tel = null;
#[ORM\Column(length: 255)]
private ?string $address = null;
#[ORM\Column(length: 255)]
private ?string $mail = null;
public function getId(): ?int
{
return $this->id;
}
public function getNickname(): ?string
{
return $this->nickname;
}
public function setNickname(string $nickname): static
{
$this->nickname = $nickname;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): string
{
return (string) $this->nickname;
}
/**
* @see UserInterface
*
* @return list<string>
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
/**
* @param list<string> $roles
*/
public function setRoles(array $roles): static
{
$this->roles = $roles;
return $this;
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(string $password): static
{
$this->password = $password;
return $this;
}
/**
* @see UserInterface
*/
public function eraseCredentials(): void
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): static
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): static
{
$this->lastName = $lastName;
return $this;
}
public function getTel(): ?string
{
return $this->tel;
}
public function setTel(string $tel): static
{
$this->tel = $tel;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): static
{
$this->address = $address;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(string $mail): static
{
$this->mail = $mail;
return $this;
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace App\Form;
use App\Entity\Announcement;
use App\Entity\Company;
use App\Entity\Status;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class AnnouncementType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title')
->add('description')
->add('company', EntityType::class, [
'class' => Company::class,
'choice_label' => 'id',
])
->add('submit', SubmitType::class)
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Announcement::class,
]);
}
}

28
src/Form/CompanyType.php Normal file
View File

@ -0,0 +1,28 @@
<?php
namespace App\Form;
use App\Entity\Company;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CompanyType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name')
->add('address')
->add('tel')
->add('mail')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Company::class,
]);
}
}

25
src/Form/DegreeType.php Normal file
View File

@ -0,0 +1,25 @@
<?php
namespace App\Form;
use App\Entity\Degree;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class DegreeType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Degree::class,
]);
}
}

38
src/Form/EmployeeType.php Normal file
View File

@ -0,0 +1,38 @@
<?php
namespace App\Form;
use App\Entity\Company;
use App\Entity\Employee;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class EmployeeType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('nickname')
->add('roles')
->add('password')
->add('firstName')
->add('lastName')
->add('tel')
->add('address')
->add('mail')
->add('company', EntityType::class, [
'class' => Company::class,
'choice_label' => 'id',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Employee::class,
]);
}
}

29
src/Form/FAQType.php Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Form;
use App\Entity\FAQ;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class FAQType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('question')
->add('answer')
->add('updateDate', null, [
'widget' => 'single_text',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => FAQ::class,
]);
}
}

34
src/Form/InternType.php Normal file
View File

@ -0,0 +1,34 @@
<?php
namespace App\Form;
use App\Entity\Intern;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class InternType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('nickname')
->add('roles')
->add('password')
->add('firstName')
->add('lastName')
->add('tel')
->add('address')
->add('mail')
->add('coverLetter')
->add('resume')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Intern::class,
]);
}
}

38
src/Form/MessageType.php Normal file
View File

@ -0,0 +1,38 @@
<?php
namespace App\Form;
use App\Entity\Message;
use App\Entity\UserApp;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class MessageType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('content')
->add('sendingDate', null, [
'widget' => 'single_text',
])
->add('sender', EntityType::class, [
'class' => UserApp::class,
'choice_label' => 'id',
])
->add('receiver', EntityType::class, [
'class' => UserApp::class,
'choice_label' => 'id',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Message::class,
]);
}
}

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

@ -0,0 +1,25 @@
<?php
namespace App\Form;
use App\Entity\Skill;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class SkillType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Skill::class,
]);
}
}

32
src/Form/UserAppType.php Normal file
View File

@ -0,0 +1,32 @@
<?php
namespace App\Form;
use App\Entity\UserApp;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class UserAppType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('nickname')
->add('roles')
->add('password')
->add('firstName')
->add('lastName')
->add('tel')
->add('address')
->add('mail')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => UserApp::class,
]);
}
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Announcement;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Announcement>
*/
class AnnouncementRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Announcement::class);
}
// /**
// * @return Announcement[] Returns an array of Announcement 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): ?Announcement
// {
// return $this->createQueryBuilder('a')
// ->andWhere('a.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Company;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Company>
*/
class CompanyRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Company::class);
}
// /**
// * @return Company[] Returns an array of Company 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): ?Company
// {
// return $this->createQueryBuilder('c')
// ->andWhere('c.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Degree;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Degree>
*/
class DegreeRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Degree::class);
}
// /**
// * @return Degree[] Returns an array of Degree 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): ?Degree
// {
// return $this->createQueryBuilder('d')
// ->andWhere('d.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Employee;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Employee>
*/
class EmployeeRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Employee::class);
}
// /**
// * @return Employee[] Returns an array of Employee 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): ?Employee
// {
// return $this->createQueryBuilder('e')
// ->andWhere('e.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\FAQ;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<FAQ>
*/
class FAQRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, FAQ::class);
}
// /**
// * @return FAQ[] Returns an array of FAQ 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): ?FAQ
// {
// return $this->createQueryBuilder('f')
// ->andWhere('f.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\InternApplication;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<InternApplication>
*/
class InternApplicationRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, InternApplication::class);
}
// /**
// * @return InternApplication[] Returns an array of InternApplication objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('i.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?InternApplication
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\InternDegree;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<InternDegree>
*/
class InternDegreeRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, InternDegree::class);
}
// /**
// * @return InternDegree[] Returns an array of InternDegree objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('i.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?InternDegree
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\InternFavorite;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<InternFavorite>
*/
class InternFavoriteRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, InternFavorite::class);
}
// /**
// * @return InternFavorite[] Returns an array of InternFavorite objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('i.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?InternFavorite
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Intern;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Intern>
*/
class InternRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Intern::class);
}
// /**
// * @return Intern[] Returns an array of Intern objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('i.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Intern
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\InternSkill;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<InternSkill>
*/
class InternSkillRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, InternSkill::class);
}
// /**
// * @return InternSkill[] Returns an array of InternSkill objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('i.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?InternSkill
// {
// return $this->createQueryBuilder('i')
// ->andWhere('i.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Message;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Message>
*/
class MessageRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Message::class);
}
// /**
// * @return Message[] Returns an array of Message objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('m')
// ->andWhere('m.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('m.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Message
// {
// return $this->createQueryBuilder('m')
// ->andWhere('m.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Obtaining;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Obtaining>
*/
class ObtainingRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Obtaining::class);
}
// /**
// * @return Obtaining[] Returns an array of Obtaining objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('o')
// ->andWhere('o.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('o.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Obtaining
// {
// return $this->createQueryBuilder('o')
// ->andWhere('o.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Skill;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Skill>
*/
class SkillRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Skill::class);
}
// /**
// * @return Skill[] Returns an array of Skill objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('s')
// ->andWhere('s.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('s.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Skill
// {
// return $this->createQueryBuilder('s')
// ->andWhere('s.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Repository;
use App\Entity\Status;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Status>
*/
class StatusRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Status::class);
}
// /**
// * @return Status[] Returns an array of Status 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): ?Status
// {
// return $this->createQueryBuilder('v')
// ->andWhere('v.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,60 @@
<?php
namespace App\Repository;
use App\Entity\UserApp;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
/**
* @extends ServiceEntityRepository<UserApp>
*/
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, UserApp::class);
}
/**
* Used to upgrade (rehash) the user's password automatically over time.
*/
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
if (!$user instanceof UserApp) {
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $user::class));
}
$user->setPassword($newHashedPassword);
$this->getEntityManager()->persist($user);
$this->getEntityManager()->flush();
}
// /**
// * @return UserApp[] Returns an array of UserApp 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): ?UserApp
// {
// return $this->createQueryBuilder('u')
// ->andWhere('u.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,14 @@
{% extends 'base.html.twig' %}
{% block title %}Hello AnnouncementController!{% 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>
{{ form(announcementForm) }}
{% endblock %}

View File

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Hello AnnouncementController!{% 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>C:/Users/csese/Romain/Phpstorm_projets/ProjetHegreSphere/hegresphere/src/Controller/AnnouncementController.php</code></li>
<li>Your template at <code>C:/Users/csese/Romain/Phpstorm_projets/ProjetHegreSphere/hegresphere/templates/announcement/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Bienvenue sur Hegreshpere{% 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>
<h1> Liste des annonces</h1>
{% for ann in announcements %}
<h2> {{ ann.title }} </h2>
<h3> {{ ann.company.name }} </h3>
<p> {{ ann.description }} </p>
------------------------------
{% endfor %}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_company_delete', {'id': company.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ company.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Company{% endblock %}
{% block body %}
<h1>Edit Company</h1>
{{ include('company/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_company_index') }}">back to list</a>
{{ include('company/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,41 @@
{% extends 'base.html.twig' %}
{% block title %}Company index{% endblock %}
{% block body %}
<h1>Company index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Address</th>
<th>Tel</th>
<th>Mail</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for company in companies %}
<tr>
<td>{{ company.id }}</td>
<td>{{ company.name }}</td>
<td>{{ company.address }}</td>
<td>{{ company.tel }}</td>
<td>{{ company.mail }}</td>
<td>
<a href="{{ path('app_company_show', {'id': company.id}) }}">show</a>
<a href="{{ path('app_company_edit', {'id': company.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="6">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_company_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Company{% endblock %}
{% block body %}
<h1>Create new Company</h1>
{{ include('company/_form.html.twig') }}
<a href="{{ path('app_company_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,38 @@
{% extends 'base.html.twig' %}
{% block title %}Company{% endblock %}
{% block body %}
<h1>Company</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ company.id }}</td>
</tr>
<tr>
<th>Name</th>
<td>{{ company.name }}</td>
</tr>
<tr>
<th>Address</th>
<td>{{ company.address }}</td>
</tr>
<tr>
<th>Tel</th>
<td>{{ company.tel }}</td>
</tr>
<tr>
<th>Mail</th>
<td>{{ company.mail }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_company_index') }}">back to list</a>
<a href="{{ path('app_company_edit', {'id': company.id}) }}">edit</a>
{{ include('company/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_degree_delete', {'id': degree.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ degree.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Degree{% endblock %}
{% block body %}
<h1>Edit Degree</h1>
{{ include('degree/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_degree_index') }}">back to list</a>
{{ include('degree/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}Degree index{% endblock %}
{% block body %}
<h1>Degree index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for degree in degrees %}
<tr>
<td>{{ degree.id }}</td>
<td>{{ degree.label }}</td>
<td>
<a href="{{ path('app_degree_show', {'id': degree.id}) }}">show</a>
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_degree_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Degree{% endblock %}
{% block body %}
<h1>Create new Degree</h1>
{{ include('degree/_form.html.twig') }}
<a href="{{ path('app_degree_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends 'base.html.twig' %}
{% block title %}Degree{% endblock %}
{% block body %}
<h1>Degree</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ degree.id }}</td>
</tr>
<tr>
<th>Label</th>
<td>{{ degree.label }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_degree_index') }}">back to list</a>
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}">edit</a>
{{ include('degree/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_employee_delete', {'id': employee.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ employee.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Employee{% endblock %}
{% block body %}
<h1>Edit Employee</h1>
{{ include('employee/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_employee_index') }}">back to list</a>
{{ include('employee/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,49 @@
{% extends 'base.html.twig' %}
{% block title %}Employee index{% endblock %}
{% block body %}
<h1>Employee index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Nickname</th>
<th>Roles</th>
<th>Password</th>
<th>FirstName</th>
<th>LastName</th>
<th>Tel</th>
<th>Address</th>
<th>Mail</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for employee in employees %}
<tr>
<td>{{ employee.id }}</td>
<td>{{ employee.nickname }}</td>
<td>{{ employee.roles ? employee.roles|json_encode : '' }}</td>
<td>{{ employee.password }}</td>
<td>{{ employee.firstName }}</td>
<td>{{ employee.lastName }}</td>
<td>{{ employee.tel }}</td>
<td>{{ employee.address }}</td>
<td>{{ employee.mail }}</td>
<td>
<a href="{{ path('app_employee_show', {'id': employee.id}) }}">show</a>
<a href="{{ path('app_employee_edit', {'id': employee.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="10">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_employee_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Employee{% endblock %}
{% block body %}
<h1>Create new Employee</h1>
{{ include('employee/_form.html.twig') }}
<a href="{{ path('app_employee_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,54 @@
{% extends 'base.html.twig' %}
{% block title %}Employee{% endblock %}
{% block body %}
<h1>Employee</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ employee.id }}</td>
</tr>
<tr>
<th>Nickname</th>
<td>{{ employee.nickname }}</td>
</tr>
<tr>
<th>Roles</th>
<td>{{ employee.roles ? employee.roles|json_encode : '' }}</td>
</tr>
<tr>
<th>Password</th>
<td>{{ employee.password }}</td>
</tr>
<tr>
<th>FirstName</th>
<td>{{ employee.firstName }}</td>
</tr>
<tr>
<th>LastName</th>
<td>{{ employee.lastName }}</td>
</tr>
<tr>
<th>Tel</th>
<td>{{ employee.tel }}</td>
</tr>
<tr>
<th>Address</th>
<td>{{ employee.address }}</td>
</tr>
<tr>
<th>Mail</th>
<td>{{ employee.mail }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_employee_index') }}">back to list</a>
<a href="{{ path('app_employee_edit', {'id': employee.id}) }}">edit</a>
{{ include('employee/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_faq_delete', {'id': faq.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ faq.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit FAQ{% endblock %}
{% block body %}
<h1>Edit FAQ</h1>
{{ include('faq/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_faq_index') }}">back to list</a>
{{ include('faq/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,39 @@
{% extends 'base.html.twig' %}
{% block title %}FAQ index{% endblock %}
{% block body %}
<h1>FAQ index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Question</th>
<th>Answer</th>
<th>UpdateDate</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for faq in faqs %}
<tr>
<td>{{ faq.id }}</td>
<td>{{ faq.question }}</td>
<td>{{ faq.answer }}</td>
<td>{{ faq.updateDate ? faq.updateDate|date('Y-m-d') : '' }}</td>
<td>
<a href="{{ path('app_faq_show', {'id': faq.id}) }}">show</a>
<a href="{{ path('app_faq_edit', {'id': faq.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_faq_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New FAQ{% endblock %}
{% block body %}
<h1>Create new FAQ</h1>
{{ include('faq/_form.html.twig') }}
<a href="{{ path('app_faq_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,34 @@
{% extends 'base.html.twig' %}
{% block title %}FAQ{% endblock %}
{% block body %}
<h1>FAQ</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ faq.id }}</td>
</tr>
<tr>
<th>Question</th>
<td>{{ faq.question }}</td>
</tr>
<tr>
<th>Answer</th>
<td>{{ faq.answer }}</td>
</tr>
<tr>
<th>UpdateDate</th>
<td>{{ faq.updateDate ? faq.updateDate|date('Y-m-d') : '' }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_faq_index') }}">back to list</a>
<a href="{{ path('app_faq_edit', {'id': faq.id}) }}">edit</a>
{{ include('faq/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,297 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>
Job Portal
</title>
<script src="https://cdn.tailwindcss.com">
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&amp;display=swap" rel="stylesheet"/>
<style>
body {
font-family: 'Roboto', sans-serif;
}
</style>
</head>
<body class="bg-gray-100">
<header class="bg-gray-900 text-white">
<div class="container mx-auto flex justify-between items-center py-4 px-6">
<div class="flex items-center">
<i class="fas fa-briefcase text-2xl mr-2"></i>
<span class="text-xl font-bold">HegreSphere</span>
</div>
<nav class="space-x-6">
<a class="hover:text-teal-400" href="#">Accueil</a>
<a class="hover:text-teal-400" href="#">Stages</a>
<a class="hover:text-teal-400" href="#">À propos de nous</a>
<a class="hover:text-teal-400" href="#">Nous contacter</a>
</nav>
<div>
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full" href="#">
Profil
</a>
</div>
</div>
</header>
<section class="bg-cover bg-center py-20" style="background-image: url('/images/fond_site.png');">
<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">
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Nom de l'entreprise" type="text"/>
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Indiquez un endroit" type="text"/>
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Selectionnez une categorie" type="text"/>
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-6 rounded">
Trouvez un stage
</button>
</div>
</div>
<div class="flex justify-center space-x-8 mt-8">
<div class="text-center">
<i class="fas fa-briefcase text-2xl">
</i>
<p class="mt-2">
+850 Stages
</p>
</div>
<div class="text-center">
<i class="fas fa-users text-2xl">
</i>
<p class="mt-2">
1500 Candidats
</p>
</div>
<div class="text-center">
<i class="fas fa-building text-2xl">
</i>
<p class="mt-2">
+500 Entreprises
</p>
</div>
</div>
</div>
</section>
<section class="container mx-auto py-12">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold">
Propositions de stages récentes
</h2>
<a class="text-teal-500 hover:underline" href="#">
Voir tout
</a>
</div>
<div class="space-y-6">
<div class="bg-white p-6 rounded-lg shadow flex justify-between items-center">
<div class="flex items-center space-x-4">
<div class="text-gray-500 text-sm">
10 min ago
</div>
<div>
<h3 class="text-lg font-bold">
Forward Security Director
</h3>
<p class="text-gray-600">
Bauch, Schuppe and Schulist Co
</p>
<div class="flex items-center space-x-2 text-gray-500 text-sm mt-2">
<span class="flex items-center">
<i class="fas fa-briefcase mr-1">
</i>
Hotels &amp; Tourism
</span>
<span class="flex items-center">
<i class="fas fa-clock mr-1">
</i>
Full time
</span>
<span class="flex items-center">
<i class="fas fa-dollar-sign mr-1">
</i>
$40000-$42000
</span>
<span class="flex items-center">
<i class="fas fa-map-marker-alt mr-1">
</i>
New York, USA
</span>
</div>
</div>
</div>
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded">
Détails de l'offre
</button>
</div>
<div class="bg-white p-6 rounded-lg shadow flex justify-between items-center">
<div class="flex items-center space-x-4">
<div class="text-gray-500 text-sm">
12 min ago
</div>
<div>
<h3 class="text-lg font-bold">
Regional Creative Facilitator
</h3>
<p class="text-gray-600">
Wisozk - Becker Co
</p>
<div class="flex items-center space-x-2 text-gray-500 text-sm mt-2">
<span class="flex items-center">
<i class="fas fa-briefcase mr-1">
</i>
Media
</span>
<span class="flex items-center">
<i class="fas fa-clock mr-1">
</i>
Part time
</span>
<span class="flex items-center">
<i class="fas fa-dollar-sign mr-1">
</i>
$28000-$32000
</span>
<span class="flex items-center">
<i class="fas fa-map-marker-alt mr-1">
</i>
Los Angeles, USA
</span>
</div>
</div>
</div>
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded">
Détails de l'offre
</button>
</div>
<div class="bg-white p-6 rounded-lg shadow flex justify-between items-center">
<div class="flex items-center space-x-4">
<div class="text-gray-500 text-sm">
15 min ago
</div>
<div>
<h3 class="text-lg font-bold">
Internal Integration Planner
</h3>
<p class="text-gray-600">
Metz, Quigley and Feest Inc.
</p>
<div class="flex items-center space-x-2 text-gray-500 text-sm mt-2">
<span class="flex items-center">
<i class="fas fa-briefcase mr-1">
</i>
Construction
</span>
<span class="flex items-center">
<i class="fas fa-clock mr-1">
</i>
Full time
</span>
<span class="flex items-center">
<i class="fas fa-dollar-sign mr-1">
</i>
$48000-$50000
</span>
<span class="flex items-center">
<i class="fas fa-map-marker-alt mr-1">
</i>
Texas, USA
</span>
</div>
</div>
</div>
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded">
Détails de l'offre
</button>
</div>
<div class="bg-white p-6 rounded-lg shadow flex justify-between items-center">
<div class="flex items-center space-x-4">
<div class="text-gray-500 text-sm">
26 min ago
</div>
<div>
<h3 class="text-lg font-bold">
District Intranet Director
</h3>
<p class="text-gray-600">
VonRueden - Weber Co
</p>
<div class="flex items-center space-x-2 text-gray-500 text-sm mt-2">
<span class="flex items-center">
<i class="fas fa-briefcase mr-1">
</i>
Commerce
</span>
<span class="flex items-center">
<i class="fas fa-clock mr-1">
</i>
Full time
</span>
<span class="flex items-center">
<i class="fas fa-dollar-sign mr-1">
</i>
$42000-$46000
</span>
<span class="flex items-center">
<i class="fas fa-map-marker-alt mr-1">
</i>
Florida, USA
</span>
</div>
</div>
</div>
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded">
Détails de l'offre
</button>
</div>
<div class="bg-white p-6 rounded-lg shadow flex justify-between items-center">
<div class="flex items-center space-x-4">
<div class="text-gray-500 text-sm">
26 min ago
</div>
<div>
<h3 class="text-lg font-bold">
Corporate Tactics Facilitator
</h3>
<p class="text-gray-600">
Cormier, Turner and Bailey Inc
</p>
<div class="flex items-center space-x-2 text-gray-500 text-sm mt-2">
<span class="flex items-center">
<i class="fas fa-briefcase mr-1">
</i>
Commerce
</span>
<span class="flex items-center">
<i class="fas fa-clock mr-1">
</i>
Full time
</span>
<span class="flex items-center">
<i class="fas fa-dollar-sign mr-1">
</i>
$38000-$40000
</span>
<span class="flex items-center">
<i class="fas fa-map-marker-alt mr-1">
</i>
Boston, USA
</span>
</div>
</div>
</div>
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded">
Détails de l'offre
</button>
</div>
</div>
</section>
</body>
</html>

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_intern_delete', {'id': intern.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ intern.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Intern{% endblock %}
{% block body %}
<h1>Edit Intern</h1>
{{ include('intern/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_intern_index') }}">back to list</a>
{{ include('intern/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,53 @@
{% extends 'base.html.twig' %}
{% block title %}Intern index{% endblock %}
{% block body %}
<h1>Intern index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Nickname</th>
<th>Roles</th>
<th>Password</th>
<th>FirstName</th>
<th>LastName</th>
<th>Tel</th>
<th>Address</th>
<th>Mail</th>
<th>CoverLetter</th>
<th>Resume</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for intern in interns %}
<tr>
<td>{{ intern.id }}</td>
<td>{{ intern.nickname }}</td>
<td>{{ intern.roles ? intern.roles|json_encode : '' }}</td>
<td>{{ intern.password }}</td>
<td>{{ intern.firstName }}</td>
<td>{{ intern.lastName }}</td>
<td>{{ intern.tel }}</td>
<td>{{ intern.address }}</td>
<td>{{ intern.mail }}</td>
<td>{{ intern.coverLetter }}</td>
<td>{{ intern.resume }}</td>
<td>
<a href="{{ path('app_intern_show', {'id': intern.id}) }}">show</a>
<a href="{{ path('app_intern_edit', {'id': intern.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="12">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_intern_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Intern{% endblock %}
{% block body %}
<h1>Create new Intern</h1>
{{ include('intern/_form.html.twig') }}
<a href="{{ path('app_intern_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,62 @@
{% extends 'base.html.twig' %}
{% block title %}Intern{% endblock %}
{% block body %}
<h1>Intern</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ intern.id }}</td>
</tr>
<tr>
<th>Nickname</th>
<td>{{ intern.nickname }}</td>
</tr>
<tr>
<th>Roles</th>
<td>{{ intern.roles ? intern.roles|json_encode : '' }}</td>
</tr>
<tr>
<th>Password</th>
<td>{{ intern.password }}</td>
</tr>
<tr>
<th>FirstName</th>
<td>{{ intern.firstName }}</td>
</tr>
<tr>
<th>LastName</th>
<td>{{ intern.lastName }}</td>
</tr>
<tr>
<th>Tel</th>
<td>{{ intern.tel }}</td>
</tr>
<tr>
<th>Address</th>
<td>{{ intern.address }}</td>
</tr>
<tr>
<th>Mail</th>
<td>{{ intern.mail }}</td>
</tr>
<tr>
<th>CoverLetter</th>
<td>{{ intern.coverLetter }}</td>
</tr>
<tr>
<th>Resume</th>
<td>{{ intern.resume }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_intern_index') }}">back to list</a>
<a href="{{ path('app_intern_edit', {'id': intern.id}) }}">edit</a>
{{ include('intern/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_message_delete', {'id': message.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ message.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Message{% endblock %}
{% block body %}
<h1>Edit Message</h1>
{{ include('message/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_message_index') }}">back to list</a>
{{ include('message/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,37 @@
{% extends 'base.html.twig' %}
{% block title %}Message index{% endblock %}
{% block body %}
<h1>Message index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Content</th>
<th>SendingDate</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for message in messages %}
<tr>
<td>{{ message.id }}</td>
<td>{{ message.content }}</td>
<td>{{ message.sendingDate ? message.sendingDate|date('Y-m-d H:i:s') : '' }}</td>
<td>
<a href="{{ path('app_message_show', {'id': message.id}) }}">show</a>
<a href="{{ path('app_message_edit', {'id': message.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="4">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_message_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Message{% endblock %}
{% block body %}
<h1>Create new Message</h1>
{{ include('message/_form.html.twig') }}
<a href="{{ path('app_message_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,30 @@
{% extends 'base.html.twig' %}
{% block title %}Message{% endblock %}
{% block body %}
<h1>Message</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ message.id }}</td>
</tr>
<tr>
<th>Content</th>
<td>{{ message.content }}</td>
</tr>
<tr>
<th>SendingDate</th>
<td>{{ message.sendingDate ? message.sendingDate|date('Y-m-d H:i:s') : '' }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_message_index') }}">back to list</a>
<a href="{{ path('app_message_edit', {'id': message.id}) }}">edit</a>
{{ include('message/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_skill_delete', {'id': skill.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ skill.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Skill{% endblock %}
{% block body %}
<h1>Edit Skill</h1>
{{ include('skill/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_skill_index') }}">back to list</a>
{{ include('skill/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}Skill index{% endblock %}
{% block body %}
<h1>Skill index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for skill in skills %}
<tr>
<td>{{ skill.id }}</td>
<td>{{ skill.label }}</td>
<td>
<a href="{{ path('app_skill_show', {'id': skill.id}) }}">show</a>
<a href="{{ path('app_skill_edit', {'id': skill.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_skill_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Skill{% endblock %}
{% block body %}
<h1>Create new Skill</h1>
{{ include('skill/_form.html.twig') }}
<a href="{{ path('app_skill_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends 'base.html.twig' %}
{% block title %}Skill{% endblock %}
{% block body %}
<h1>Skill</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ skill.id }}</td>
</tr>
<tr>
<th>Label</th>
<td>{{ skill.label }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_skill_index') }}">back to list</a>
<a href="{{ path('app_skill_edit', {'id': skill.id}) }}">edit</a>
{{ include('skill/_delete_form.html.twig') }}
{% endblock %}

Some files were not shown because too many files have changed in this diff Show More