Compare commits
11 Commits
3c117d8e4c
...
ef25e03cce
Author | SHA1 | Date | |
---|---|---|---|
ef25e03cce | |||
028f3bdaa5 | |||
bd50807d9f | |||
1d5798a265 | |||
741887b7f7 | |||
c2882f645d | |||
d80e67c96a | |||
5aa2c3a4b5 | |||
1eb8418cff | |||
6deb9b30cd | |||
3902207427 |
2
.env
2
.env
@ -26,7 +26,7 @@ APP_SECRET=f024eb6ed2c61908ec7842f29b9a6334
|
||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
||||
DATABASE_URL="postgresql://allavenavr:Btssio2024@172.20.96.1:5432/hegresphere?serverVersion=16&charset=utf8"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> symfony/messenger ###
|
||||
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121141451 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('DROP SEQUENCE status_id_seq CASCADE');
|
||||
$this->addSql('DROP TABLE status');
|
||||
$this->addSql('ALTER TABLE userapp ADD is_verified BOOLEAN NOT NULL');
|
||||
$this->addSql('ALTER TABLE userapp ALTER roles SET NOT NULL');
|
||||
}
|
||||
|
||||
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('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 userApp DROP is_verified');
|
||||
$this->addSql('ALTER TABLE userApp ALTER roles DROP NOT NULL');
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121141722 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('ALTER TABLE userapp ALTER first_name DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE userapp ALTER last_name DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE userapp ALTER tel DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE userapp ALTER address DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE userapp ALTER mail DROP NOT NULL');
|
||||
}
|
||||
|
||||
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 userApp ALTER first_name SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE userApp ALTER last_name SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE userApp ALTER tel SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE userApp ALTER address SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE userApp ALTER mail SET NOT NULL');
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121141818 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121141912 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('ALTER TABLE userapp ALTER is_verified DROP NOT NULL');
|
||||
}
|
||||
|
||||
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 userApp ALTER is_verified SET NOT NULL');
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121142119 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('ALTER TABLE intern ALTER cover_letter DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE intern ALTER resume DROP NOT NULL');
|
||||
}
|
||||
|
||||
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 intern ALTER cover_letter SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE intern ALTER resume SET NOT NULL');
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121142432 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121145353 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('ALTER TABLE employee ALTER company_id DROP NOT NULL');
|
||||
}
|
||||
|
||||
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 employee ALTER company_id SET NOT NULL');
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121151633 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121162300 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121164509 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
}
|
||||
}
|
@ -56,6 +56,18 @@ final class AnnouncementController extends AbstractController
|
||||
#[Route('/new', name: 'app_announcement_new', methods: ['GET', 'POST'])]
|
||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
/*$user = $this->getUser();
|
||||
|
||||
if (in_array('ROLE_EMPLOYEE', $user->getRoles())) {
|
||||
$company = $user->getCompany();
|
||||
|
||||
if (!$company)
|
||||
{
|
||||
echo "Compétez votre profile avant de créer une annonce";
|
||||
$this->redirectToRoute('app_user_edit',['id' => $user->getId(),]);
|
||||
}
|
||||
}*/
|
||||
|
||||
$announcement = new Announcement();
|
||||
$form = $this->createForm(AnnouncementType::class, $announcement);
|
||||
$form->handleRequest($request);
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\Degree;
|
||||
use App\Entity\InternDegree;
|
||||
use App\Form\DegreeType;
|
||||
use App\Repository\DegreeRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\Degree;
|
||||
use App\Entity\Intern;
|
||||
use App\Entity\InternDegree;
|
||||
use App\Form\InternType;
|
||||
use App\Repository\InternRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@ -58,4 +60,52 @@ final class InternController extends AbstractController
|
||||
|
||||
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
|
||||
}
|
||||
|
||||
#[Route('/degrees/add', name:'app_intern_add_degrees', methods:['POST'])]
|
||||
public function addDegrees(Request $request, EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$intern = $this->getUser();
|
||||
|
||||
if (!$intern instanceof Intern) {
|
||||
throw $this->createAccessDeniedException("Seuls les stagiaires peuvent sélectionner des diplômes.");
|
||||
}
|
||||
|
||||
$selectedDegreeIds = $request->request->all('selected_degrees');
|
||||
|
||||
if ($selectedDegreeIds == []) {
|
||||
$this->addFlash('error', "Aucune sélection valide n'a été effectuée.");
|
||||
return $this->redirectToRoute('app_degree_index');
|
||||
}
|
||||
|
||||
$degreeRepository = $entityManager->getRepository(Degree::class);
|
||||
$internDegreeRepository = $entityManager->getRepository(InternDegree::class);
|
||||
|
||||
foreach ($selectedDegreeIds as $degreeId) {
|
||||
$degree = $degreeRepository->find($degreeId);
|
||||
|
||||
if (!$degree) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$existingInternDegree = $internDegreeRepository->findOneBy([
|
||||
'intern' => $intern,
|
||||
'degree' => $degree
|
||||
]);
|
||||
|
||||
if (!$existingInternDegree) {
|
||||
$internDegree = new InternDegree();
|
||||
$internDegree->setIntern($intern);
|
||||
$internDegree->setDegree($degree);
|
||||
$internDegree->setGraduationDate(new \DateTime());
|
||||
|
||||
$entityManager->persist($internDegree);
|
||||
}
|
||||
}
|
||||
|
||||
$entityManager->flush();
|
||||
|
||||
$this->addFlash('success', 'Les diplômes ont été ajoutés avec succès.');
|
||||
|
||||
return $this->redirectToRoute('app_profile');
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ final class MessageController extends AbstractController
|
||||
public function index(MessageRepository $messageRepository): Response
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$messages = $messageRepository->findByUser($user);
|
||||
$messages = $messageRepository->findLatestMessagesByUser($user);
|
||||
|
||||
return $this->render('message/index.html.twig', [
|
||||
'messages' => $messages,
|
||||
|
@ -15,10 +15,8 @@ class ProfileController extends AbstractController
|
||||
#[Route('/profile', name: 'app_profile')]
|
||||
public function profile(): Response
|
||||
{
|
||||
// Charger l'utilisateur connecté
|
||||
$user = $this->getUser();
|
||||
|
||||
// Vérifiez les rôles si nécessaire
|
||||
if (!$user) {
|
||||
throw $this->createAccessDeniedException('Vous devez être connecté pour accéder à cette page.');
|
||||
}
|
||||
@ -45,4 +43,12 @@ class ProfileController extends AbstractController
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('profile/pickDegree', name: 'app_profile_pickDegree', methods: ['GET'])]
|
||||
public function pickDegree(UserApp $userApp): Response
|
||||
{
|
||||
return $this->render('degree/index.html.twig', [
|
||||
'user_app' => $userApp,
|
||||
]);
|
||||
}
|
||||
}
|
@ -37,4 +37,30 @@ class MessageRepository extends ServiceEntityRepository
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
public function findLatestMessagesByUser(UserApp $user): array
|
||||
{
|
||||
$query = $this->createQueryBuilder('m')
|
||||
->where('m.sender = :user OR m.receiver = :user')
|
||||
->setParameter('user', $user)
|
||||
->orderBy('m.sendingDate', 'DESC')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
|
||||
$lastMessages = [];
|
||||
foreach ($query as $message) {
|
||||
// Identifier l'autre utilisateur dans la conversation
|
||||
$otherUser = $message->getSender() === $user ? $message->getReceiver() : $message->getSender();
|
||||
$key = $otherUser->getId();
|
||||
|
||||
// Conserver uniquement le dernier message avec cet utilisateur
|
||||
if (!isset($lastMessages[$key])) {
|
||||
$lastMessages[$key] = $message;
|
||||
}
|
||||
}
|
||||
|
||||
return $lastMessages;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,52 +6,71 @@
|
||||
<div class="container mx-auto p-6">
|
||||
<h1 class="text-3xl font-bold mb-4">Liste des Diplômes</h1>
|
||||
|
||||
<!-- Tableau des diplômes -->
|
||||
<div class="overflow-x-auto bg-white shadow-lg rounded-lg">
|
||||
<table class="min-w-full table-auto">
|
||||
<thead>
|
||||
<tr class="bg-gray-800 text-white">
|
||||
<th class="px-4 py-2 text-left">ID</th>
|
||||
<th class="px-4 py-2 text-left">Label</th>
|
||||
<th class="px-4 py-2 text-left">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for degree in degrees %}
|
||||
<tr class="border-b">
|
||||
<td class="px-4 py-2">{{ degree.id }}</td>
|
||||
<td class="px-4 py-2">{{ degree.label }}</td>
|
||||
<td class="px-4 py-2">
|
||||
<!-- Voir le diplôme -->
|
||||
<a href="{{ path('app_degree_show', {'id': degree.id}) }}" class="text-teal-500 hover:text-teal-700 mr-3">
|
||||
<i class="fas fa-eye"></i> Voir
|
||||
</a>
|
||||
{% if 'ROLE_INTERN' in app.user.roles %}
|
||||
<form method="post" action="{{ path('app_intern_add_degrees') }}">
|
||||
{% endif %}
|
||||
|
||||
<!-- Modifier le diplôme -->
|
||||
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}" class="text-yellow-500 hover:text-yellow-700 mr-3">
|
||||
<i class="fas fa-edit"></i> Modifier
|
||||
</a>
|
||||
|
||||
<!-- Formulaire pour supprimer le diplôme -->
|
||||
<form method="post" action="{{ path('app_degree_delete', {'id': degree.id}) }}" style="display:inline;">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ degree.id) }}">
|
||||
<button type="submit" class="text-red-500 hover:text-red-700">
|
||||
<i class="fas fa-trash-alt"></i> Supprimer
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
<!-- Tableau des diplômes -->
|
||||
<div class="overflow-x-auto bg-white shadow-lg rounded-lg">
|
||||
<table class="min-w-full table-auto">
|
||||
<thead>
|
||||
<tr class="bg-gray-800 text-white">
|
||||
<th class="px-4 py-2 text-left">ID</th>
|
||||
<th class="px-4 py-2 text-left">Label</th>
|
||||
<th class="px-4 py-2 text-left">Actions</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for degree in degrees %}
|
||||
<tr class="border-b">
|
||||
<td class="px-4 py-2">{{ degree.id }}</td>
|
||||
<td class="px-4 py-2">{{ degree.label }}</td>
|
||||
<td class="px-4 py-2">
|
||||
{% if 'ROLE_INTERN' in app.user.roles %}
|
||||
<label>
|
||||
<input type="checkbox" name="selected_degrees[]" value="{{ degree.id }}" class="mr-2">
|
||||
Sélectionner
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% if 'ROLE_ADMIN' in app.user.roles %}
|
||||
<!-- Modifier le diplôme -->
|
||||
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}" class="text-yellow-500 hover:text-yellow-700 mr-3">
|
||||
<i class="fas fa-edit"></i> Modifier
|
||||
</a>
|
||||
|
||||
<!-- Formulaire pour supprimer le diplôme -->
|
||||
<form method="post" action="{{ path('app_degree_delete', {'id': degree.id}) }}" style="display:inline;">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ degree.id) }}">
|
||||
<button type="submit" class="text-red-500 hover:text-red-700">
|
||||
<i class="fas fa-trash-alt"></i> Supprimer
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if 'ROLE_INTERN' in app.user.roles %}
|
||||
<div class="mt-4">
|
||||
<button type="submit" class="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded-full">
|
||||
<i class="fas fa-check-circle"></i> Valider la sélection
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if 'ROLE_ADMIN' in app.user.roles %}
|
||||
<!-- Lien pour ajouter un nouveau diplôme -->
|
||||
<div class="mt-4">
|
||||
<a href="{{ path('app_degree_new') }}" class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full">
|
||||
<i class="fas fa-plus-circle"></i> Ajouter un nouveau diplôme
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -45,5 +45,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_employee_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% extends 'base.html.twig' %} <a href="{{ path('app_employee_new') }}">Create new</a>
|
||||
|
||||
|
||||
{% block title %}New Employee{% endblock %}
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
{% block title %}Accueil - Job Portal{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="L" />
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin="L"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="anonymous" />
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin="anonymous"></script>
|
||||
<script src="https://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
{# <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBugXaHb_TDr1YhckLB2FrWJpPfnh9SN5g&libraries=geometry">#}
|
||||
<section class="bg-cover bg-center py-20" style="background-image: url('{{ asset('images/fond_site.png') }}');">
|
||||
@ -12,7 +12,7 @@
|
||||
<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">
|
||||
<div class="flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4 text-black">
|
||||
<label>
|
||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Nom de l'entreprise" type="text"/>
|
||||
</label>
|
||||
|
@ -48,6 +48,4 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_intern_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
|
@ -17,20 +17,25 @@
|
||||
<!-- Liste des messages reçus -->
|
||||
<div class="max-w-4xl mx-auto">
|
||||
{% for message in messages %}
|
||||
{% if message.receiver == app.user or message.sender == app.user %}
|
||||
<div class="bg-white p-6 rounded-lg shadow mb-4">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold">De : {{ message.sender.nickname }}</h2>
|
||||
<p class="text-gray-600">{{ message.sendingDate|date('d/m/Y H:i') }}</p>
|
||||
</div>
|
||||
<a href="{{ path('app_message_conversation', { id: message.id }) }}" class="bg-teal-500 text-white px-4 py-2 rounded hover:bg-teal-600">
|
||||
Voir la Conversation
|
||||
</a>
|
||||
<div class="bg-white p-6 rounded-lg shadow mb-4">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold">
|
||||
De :
|
||||
{% if message.sender == app.user %}
|
||||
{{ message.receiver.nickname }}
|
||||
{% else %}
|
||||
{{ message.sender.nickname }}
|
||||
{% endif %}
|
||||
</h2>
|
||||
<p class="text-gray-600">{{ message.sendingDate|date('d/m/Y H:i') }}</p>
|
||||
</div>
|
||||
<p class="mt-4 text-gray-700">{{ message.content }}</p>
|
||||
<a href="{{ path('app_message_conversation', { id: message.id }) }}" class="bg-teal-500 text-white px-4 py-2 rounded hover:bg-teal-600">
|
||||
Voir la Conversation
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<p class="mt-4 text-gray-700">{{ message.content }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-center text-gray-500">Vous n'avez reçu aucun message.</p>
|
||||
{% endfor %}
|
||||
|
@ -1,7 +1,16 @@
|
||||
<div class="bg-white p-6 rounded-lg shadow-md">
|
||||
<h2 class="text-xl font-semibold mb-4">Bonjour {{ app.user.firstName }} {{ app.user.lastName }}</h2>
|
||||
<p class="text-gray-700">Vous êtes employé(e) chez {{ app.user.company }}.</p>
|
||||
<h2 class="text-xl font-semibold mb-4">Bonjour {{ app.user.nickname }}</h2>
|
||||
<h3 class="text-lg font-semibold mt-6">Vous etes employé chez {{ app.user.company.name }}</h3>
|
||||
<br>
|
||||
<p class="text-gray-600">Nom : {{ app.user.firstName }}</p>
|
||||
<p class="text-gray-600">Prénom : {{ app.user.lastName }}</p>
|
||||
<p class="text-gray-600">Adresse : {{ app.user.address }}</p>
|
||||
<p class="text-gray-600">Téléphone : {{ app.user.tel }}</p>
|
||||
<p class="text-gray-600">Email : {{ app.user.mail }}</p>
|
||||
|
||||
<div class="flex justify-end mt-6">
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_profile_edit',{id: app.user.id}) }}"> Modifier
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -18,7 +18,31 @@
|
||||
|
||||
{% if 'ROLE_ADMIN' in app.user.roles%}
|
||||
<div>
|
||||
<h1 class="text-9xl font-bold ml-kdn "> Vous etes admin</h1>
|
||||
<h1 class="text-4xl font-bold ml-kdn "> Vous etes admin</h1>
|
||||
<br>
|
||||
<div>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_degree_index') }}"> Gestion des diplômes
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_skill_index') }}"> Gestion des compétences
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_company_index') }}"> Gestion des entreprises
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_faq_index') }}"> Gestion des FAQ
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -11,8 +11,8 @@
|
||||
<h3 class="text-lg font-semibold mt-6">Vos diplômes :</h3>
|
||||
<ul class="list-disc list-inside text-gray-800">
|
||||
{% if app.user.degrees|length > 0 %}
|
||||
{% for deg in app.user.degrees %}
|
||||
<li>{{ deg.label }}</li>
|
||||
{% for internDegree in app.user.degrees %}
|
||||
<li>{{ internDegree.degree.label }}</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<br>
|
||||
@ -21,7 +21,7 @@
|
||||
</ul>
|
||||
<br>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_user_edit',{id: app.user.id}) }}"> Selectionner vos diplômes
|
||||
href="{{ path('app_degree_index',{id: app.user.id}) }}"> Selectionner vos diplômes
|
||||
</a>
|
||||
|
||||
<h3 class="text-lg font-semibold mt-6">Vos compétences :</h3>
|
||||
|
Loading…
x
Reference in New Issue
Block a user