fix candidatures vue employe

This commit is contained in:
Allavena Romain 2025-04-08 08:45:23 +02:00
parent 1722e0e6b5
commit 8c78abc668
3 changed files with 21 additions and 18 deletions

27
composer.lock generated
View File

@ -379,26 +379,29 @@
},
{
"name": "doctrine/deprecations",
"version": "1.1.4",
"version": "1.1.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
"reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9"
"reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9",
"reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9",
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38",
"reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"conflict": {
"phpunit/phpunit": "<=7.5 || >=13"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^12",
"phpstan/phpstan": "1.4.10 || 2.0.3",
"doctrine/coding-standard": "^9 || ^12 || ^13",
"phpstan/phpstan": "1.4.10 || 2.1.11",
"phpstan/phpstan-phpunit": "^1.0 || ^2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12",
"psr/log": "^1 || ^2 || ^3"
},
"suggest": {
@ -418,9 +421,9 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
"source": "https://github.com/doctrine/deprecations/tree/1.1.4"
"source": "https://github.com/doctrine/deprecations/tree/1.1.5"
},
"time": "2024-12-07T21:18:45+00:00"
"time": "2025-04-07T20:06:18+00:00"
},
{
"name": "doctrine/doctrine-bundle",
@ -9903,7 +9906,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": [],
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
@ -9911,6 +9914,6 @@
"ext-ctype": "*",
"ext-iconv": "*"
},
"platform-dev": {},
"plugin-api-version": "2.6.0"
"platform-dev": [],
"plugin-api-version": "2.3.0"
}

View File

@ -33,7 +33,7 @@ final class EmployeeController extends AbstractController
]);
}
#[Route('/{id}', name: 'app_employee_show', methods: ['GET'])]
#[Route('/{id}', name: 'app_employee_show', requirements: ['id' => '\d+'], methods: ['GET'])]
public function show(Employee $employee): Response
{
return $this->render('employee/show.html.twig', [
@ -41,7 +41,7 @@ final class EmployeeController extends AbstractController
]);
}
#[Route('/{id}/edit', name: 'app_employee_edit', methods: ['GET', 'POST'])]
#[Route('/{id}/edit', name: 'app_employee_edit', requirements: ['id' => '\d+'], methods: ['GET', 'POST'])]
public function edit(Request $request, Employee $employee): Response
{
$form = $this->createForm(EmployeeType::class, $employee);
@ -59,7 +59,7 @@ final class EmployeeController extends AbstractController
]);
}
#[Route('/{id}', name: 'app_employee_delete', methods: ['POST'])]
#[Route('/{id}', name: 'app_employee_delete', requirements: ['id' => '\d+'], methods: ['POST'])]
public function delete(Request $request, Employee $employee): Response
{
if ($this->isCsrfTokenValid('delete'.$employee->getId(), $request->getPayload()->getString('_token'))) {
@ -70,7 +70,7 @@ final class EmployeeController extends AbstractController
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
}
#[Route('/seeApplications', name: 'app_employee_applications')]
#[Route('/seeApplications', name: 'app_employee_seeApplications')]
public function seeApplications(): Response
{
$employee = $this->getUser();
@ -85,7 +85,7 @@ final class EmployeeController extends AbstractController
->findBy(['company' => $company]);
$applications = $this->internApplicationRepository
->findBy(['announcement' => $announcements]);
->findBy(['application' => $announcements]);
return $this->render('employee/applications.html.twig', [
'applications' => $applications,

View File

@ -8,7 +8,7 @@
<p class="text-gray-600">Téléphone : {{ app.user.tel }}</p>
<p class="text-gray-600">Email : {{ app.user.mail }}</p>
<a href="{{ path('app_employee_applications') }}"
<a href="{{ path('app_employee_seeApplications') }}"
class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded">
Voir les candidatures reçues
</a>