add resume and show
This commit is contained in:
parent
afa65543c9
commit
d17e802f4e
31
migrations/Version20250408091726.php
Normal file
31
migrations/Version20250408091726.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
BIN
public/cv/26_08-04-2025_11117657.pdf
Normal file
BIN
public/cv/26_08-04-2025_11117657.pdf
Normal file
Binary file not shown.
BIN
public/cv/26_08-04-2025_78723504.pdf
Normal file
BIN
public/cv/26_08-04-2025_78723504.pdf
Normal file
Binary file not shown.
@ -109,6 +109,10 @@ final class InternController extends AbstractController
|
||||
$newFilename
|
||||
);
|
||||
|
||||
if($intern->getResume() !== null){
|
||||
unlink($cvDirectory.'/'.$intern->getResume());
|
||||
}
|
||||
|
||||
// Mise à jour de l'entité avec le nom du fichier
|
||||
$intern->setResume($newFilename);
|
||||
$intern->setResumeName($cvFile->getClientOriginalName()); // Conserver le nom original du fichier
|
||||
@ -116,7 +120,7 @@ final class InternController extends AbstractController
|
||||
|
||||
$entityManager->flush();
|
||||
|
||||
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
|
||||
return $this->redirectToRoute('app_profile', [], Response::HTTP_SEE_OTHER);
|
||||
}
|
||||
|
||||
return $this->render('intern/resume.html.twig', [
|
||||
|
@ -80,7 +80,7 @@ class Intern extends UserApp
|
||||
|
||||
public function getResumeName(): ?string
|
||||
{
|
||||
return $this->resume;
|
||||
return $this->resumeName;
|
||||
}
|
||||
|
||||
public function setResumeName(string $resumeName): static
|
||||
|
@ -8,6 +8,14 @@
|
||||
<p class="text-gray-600">Téléphone : {{ app.user.tel }}</p>
|
||||
<p class="text-gray-600">Email : {{ app.user.mail }}</p>
|
||||
|
||||
<hr class="my-10"/>
|
||||
|
||||
{% if app.user.resume != "" %}
|
||||
<iframe class="w-full" src={{ 'cv/' ~ app.user.resume }}></iframe>
|
||||
{% if app.user.resumeName != "" %}
|
||||
<p class="text-gray-600 italic">Nom du fichier : {{ app.user.resumeName }}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_intern_resume',{id: app.user.id}) }}"> Ajouter / Modifier le CV
|
||||
|
Loading…
x
Reference in New Issue
Block a user