diff --git a/migrations/Version20241121141451.php b/migrations/Version20241121141451.php deleted file mode 100644 index d51cde4..0000000 --- a/migrations/Version20241121141451.php +++ /dev/null @@ -1,38 +0,0 @@ -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'); - } -} diff --git a/migrations/Version20241121141722.php b/migrations/Version20241121141722.php deleted file mode 100644 index 6259ec7..0000000 --- a/migrations/Version20241121141722.php +++ /dev/null @@ -1,40 +0,0 @@ -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'); - } -} diff --git a/migrations/Version20241121141818.php b/migrations/Version20241121141818.php deleted file mode 100644 index 7eb43e8..0000000 --- a/migrations/Version20241121141818.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE SCHEMA public'); - } -} diff --git a/migrations/Version20241121141912.php b/migrations/Version20241121141912.php deleted file mode 100644 index fbc5345..0000000 --- a/migrations/Version20241121141912.php +++ /dev/null @@ -1,32 +0,0 @@ -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'); - } -} diff --git a/migrations/Version20241121142119.php b/migrations/Version20241121142119.php deleted file mode 100644 index 44746a0..0000000 --- a/migrations/Version20241121142119.php +++ /dev/null @@ -1,34 +0,0 @@ -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'); - } -} diff --git a/migrations/Version20241121142432.php b/migrations/Version20241121142432.php deleted file mode 100644 index 8226230..0000000 --- a/migrations/Version20241121142432.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE SCHEMA public'); - } -} diff --git a/migrations/Version20241121145353.php b/migrations/Version20241121145353.php deleted file mode 100644 index 439bd80..0000000 --- a/migrations/Version20241121145353.php +++ /dev/null @@ -1,32 +0,0 @@ -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'); - } -} diff --git a/migrations/Version20241121151633.php b/migrations/Version20241121151633.php deleted file mode 100644 index b9a833a..0000000 --- a/migrations/Version20241121151633.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE SCHEMA public'); - } -} diff --git a/migrations/Version20241121162300.php b/migrations/Version20241121162300.php deleted file mode 100644 index 78a9482..0000000 --- a/migrations/Version20241121162300.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE SCHEMA public'); - } -} diff --git a/migrations/Version20241121164509.php b/migrations/Version20241121164509.php deleted file mode 100644 index e3db761..0000000 --- a/migrations/Version20241121164509.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE SCHEMA public'); - } -} diff --git a/src/Controller/AnnouncementController.php b/src/Controller/AnnouncementController.php index f9f0243..a1da498 100644 --- a/src/Controller/AnnouncementController.php +++ b/src/Controller/AnnouncementController.php @@ -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); diff --git a/templates/profile/index.html.twig b/templates/profile/index.html.twig index 0c4742a..fa907bf 100644 --- a/templates/profile/index.html.twig +++ b/templates/profile/index.html.twig @@ -18,7 +18,31 @@ {% if 'ROLE_ADMIN' in app.user.roles%}
-

Vous etes admin

+

Vous etes admin

+
+
+ Gestion des diplômes + +
+
+
+ Gestion des compétences + +
+
+
+ Gestion des entreprises + +
+
+
+ Gestion des FAQ + +
{% endif %}