add resume and show

This commit is contained in:
barillote 2025-04-08 11:41:15 +02:00 committed by BARILLOT Esteban
parent a348dcd055
commit cd7790521d
2 changed files with 24 additions and 3 deletions

View File

@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241121142432 extends AbstractMigration
final class Version20250408091726 extends AbstractMigration
{
public function getDescription(): string
{
@ -20,12 +20,25 @@ final class Version20241121142432 extends AbstractMigration
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
ALTER TABLE intern ADD resume_name TEXT DEFAULT NULL
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE intern ALTER resume TYPE TEXT
SQL);
}
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(<<<'SQL'
CREATE SCHEMA public
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE intern DROP resume_name
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE intern ALTER resume TYPE VARCHAR(255)
SQL);
}
}

View File

@ -27,6 +27,14 @@
href="{{ path('app_intern_resume',{id: app.user.id}) }}"> Ajouter / Modifier le CV
</a>
<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