Compare commits
No commits in common. "5934dfcdf54fce3c2d763c73f6ddf50efb117c90" and "e729450c6405da3173f14f08e230dab7b092c72d" have entirely different histories.
5934dfcdf5
...
e729450c64
@ -49,16 +49,10 @@ security:
|
|||||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||||
# switch_user: true
|
# switch_user: true
|
||||||
|
|
||||||
role_hierarchy:
|
|
||||||
ROLE_ADMIN: [ ROLE_ADMIN, ROLE_EMPLOYEE, ROLE_USER ]
|
|
||||||
ROLE_EMPLOYEE: ROLE_EMPLOYEE
|
|
||||||
ROLE_USER: ROLE_USER
|
|
||||||
# Easy way to control access for large sections of your site
|
# Easy way to control access for large sections of your site
|
||||||
# Note: Only the *first* access control that matches will be used
|
# Note: Only the *first* access control that matches will be used
|
||||||
access_control:
|
access_control:
|
||||||
- { path: ^/login, roles: PUBLIC_ACCESS }
|
# - { path: ^/admin, roles: ROLE_ADMIN }
|
||||||
- { path: ^/register, roles: PUBLIC_ACCESS }
|
|
||||||
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }
|
|
||||||
# - { path: ^/profile, roles: ROLE_USER }
|
# - { path: ^/profile, roles: ROLE_USER }
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
|
@ -1,67 +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 Version20241017134137 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('CREATE SEQUENCE announcement_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE company_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE userApp_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE TABLE announcement (id INT NOT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE company (id INT NOT NULL, name VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, tel VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE employee (id INT NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE intern (id INT NOT NULL, cover_letter TEXT NOT NULL, resume VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE userApp (id INT NOT NULL, nickname VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, tel VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, DISCRIMINATOR VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NICKNAME ON userApp (nickname)');
|
|
||||||
$this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
|
|
||||||
$this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\'');
|
|
||||||
$this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\'');
|
|
||||||
$this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\'');
|
|
||||||
$this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$
|
|
||||||
BEGIN
|
|
||||||
PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text);
|
|
||||||
RETURN NEW;
|
|
||||||
END;
|
|
||||||
$$ LANGUAGE plpgsql;');
|
|
||||||
$this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;');
|
|
||||||
$this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();');
|
|
||||||
$this->addSql('ALTER TABLE employee ADD CONSTRAINT FK_5D9F75A1BF396750 FOREIGN KEY (id) REFERENCES userApp (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern ADD CONSTRAINT FK_A5795F36BF396750 FOREIGN KEY (id) REFERENCES userApp (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
}
|
|
||||||
|
|
||||||
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('DROP SEQUENCE announcement_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE company_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE userApp_id_seq CASCADE');
|
|
||||||
$this->addSql('ALTER TABLE employee DROP CONSTRAINT FK_5D9F75A1BF396750');
|
|
||||||
$this->addSql('ALTER TABLE intern DROP CONSTRAINT FK_A5795F36BF396750');
|
|
||||||
$this->addSql('DROP TABLE announcement');
|
|
||||||
$this->addSql('DROP TABLE company');
|
|
||||||
$this->addSql('DROP TABLE employee');
|
|
||||||
$this->addSql('DROP TABLE intern');
|
|
||||||
$this->addSql('DROP TABLE userApp');
|
|
||||||
$this->addSql('DROP TABLE messenger_messages');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,52 +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 Version20241017142722 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('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 announcement ADD company_id INT NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE announcement ADD status_id INT NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE announcement ADD CONSTRAINT FK_4DB9D91C979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE announcement ADD CONSTRAINT FK_4DB9D91C6BF700BD FOREIGN KEY (status_id) REFERENCES status (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('CREATE INDEX IDX_4DB9D91C979B1AD6 ON announcement (company_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_4DB9D91C6BF700BD ON announcement (status_id)');
|
|
||||||
$this->addSql('ALTER TABLE employee ADD company_id INT NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE employee ADD CONSTRAINT FK_5D9F75A1979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('CREATE INDEX IDX_5D9F75A1979B1AD6 ON employee (company_id)');
|
|
||||||
}
|
|
||||||
|
|
||||||
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 announcement DROP CONSTRAINT FK_4DB9D91C6BF700BD');
|
|
||||||
$this->addSql('DROP SEQUENCE status_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP TABLE status');
|
|
||||||
$this->addSql('ALTER TABLE announcement DROP CONSTRAINT FK_4DB9D91C979B1AD6');
|
|
||||||
$this->addSql('DROP INDEX IDX_4DB9D91C979B1AD6');
|
|
||||||
$this->addSql('DROP INDEX IDX_4DB9D91C6BF700BD');
|
|
||||||
$this->addSql('ALTER TABLE announcement DROP company_id');
|
|
||||||
$this->addSql('ALTER TABLE announcement DROP status_id');
|
|
||||||
$this->addSql('ALTER TABLE employee DROP CONSTRAINT FK_5D9F75A1979B1AD6');
|
|
||||||
$this->addSql('DROP INDEX IDX_5D9F75A1979B1AD6');
|
|
||||||
$this->addSql('ALTER TABLE employee DROP company_id');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +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 Version20241017152949 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('CREATE TABLE favorites (intern_id INT NOT NULL, announcement_id INT NOT NULL, PRIMARY KEY(intern_id, announcement_id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_E46960F5525DD4B4 ON favorites (intern_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_E46960F5913AEA17 ON favorites (announcement_id)');
|
|
||||||
$this->addSql('CREATE TABLE applications (intern_id INT NOT NULL, announcement_id INT NOT NULL, PRIMARY KEY(intern_id, announcement_id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_F7C966F0525DD4B4 ON applications (intern_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_F7C966F0913AEA17 ON applications (announcement_id)');
|
|
||||||
$this->addSql('ALTER TABLE favorites ADD CONSTRAINT FK_E46960F5525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE favorites ADD CONSTRAINT FK_E46960F5913AEA17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE applications ADD CONSTRAINT FK_F7C966F0525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE applications ADD CONSTRAINT FK_F7C966F0913AEA17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
}
|
|
||||||
|
|
||||||
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 favorites DROP CONSTRAINT FK_E46960F5525DD4B4');
|
|
||||||
$this->addSql('ALTER TABLE favorites DROP CONSTRAINT FK_E46960F5913AEA17');
|
|
||||||
$this->addSql('ALTER TABLE applications DROP CONSTRAINT FK_F7C966F0525DD4B4');
|
|
||||||
$this->addSql('ALTER TABLE applications DROP CONSTRAINT FK_F7C966F0913AEA17');
|
|
||||||
$this->addSql('DROP TABLE favorites');
|
|
||||||
$this->addSql('DROP TABLE applications');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,110 +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 Version20241114132304 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('CREATE SEQUENCE degree_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE faq_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE intern_application_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE intern_degree_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE intern_favorite_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE intern_skill_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE message_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE SEQUENCE skill_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
|
||||||
$this->addSql('CREATE TABLE degree (id INT NOT NULL, label VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE faq (id INT NOT NULL, question TEXT NOT NULL, answer TEXT DEFAULT NULL, update_date DATE NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE TABLE intern_application (id INT NOT NULL, application_id INT DEFAULT NULL, intern_id INT DEFAULT NULL, application_date DATE NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_4EDBBCC83E030ACD ON intern_application (application_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_4EDBBCC8525DD4B4 ON intern_application (intern_id)');
|
|
||||||
$this->addSql('CREATE TABLE intern_degree (id INT NOT NULL, degree_id INT DEFAULT NULL, intern_id INT DEFAULT NULL, graduation_date DATE NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_E68CCB23B35C5756 ON intern_degree (degree_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_E68CCB23525DD4B4 ON intern_degree (intern_id)');
|
|
||||||
$this->addSql('CREATE TABLE intern_favorite (id INT NOT NULL, announcement_id INT DEFAULT NULL, intern_id INT DEFAULT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_A709862E913AEA17 ON intern_favorite (announcement_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_A709862E525DD4B4 ON intern_favorite (intern_id)');
|
|
||||||
$this->addSql('CREATE TABLE intern_skill (id INT NOT NULL, skill_id INT DEFAULT NULL, intern_id INT DEFAULT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75E1C4DC5585C142 ON intern_skill (skill_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_75E1C4DC525DD4B4 ON intern_skill (intern_id)');
|
|
||||||
$this->addSql('CREATE TABLE message (id INT NOT NULL, sender_id INT DEFAULT NULL, receiver_id INT DEFAULT NULL, content TEXT NOT NULL, sending_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('CREATE INDEX IDX_B6BD307FF624B39D ON message (sender_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_B6BD307FCD53EDB6 ON message (receiver_id)');
|
|
||||||
$this->addSql('CREATE TABLE skill (id INT NOT NULL, label VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
|
||||||
$this->addSql('ALTER TABLE intern_application ADD CONSTRAINT FK_4EDBBCC83E030ACD FOREIGN KEY (application_id) REFERENCES announcement (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_application ADD CONSTRAINT FK_4EDBBCC8525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_degree ADD CONSTRAINT FK_E68CCB23B35C5756 FOREIGN KEY (degree_id) REFERENCES degree (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_degree ADD CONSTRAINT FK_E68CCB23525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_favorite ADD CONSTRAINT FK_A709862E913AEA17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_favorite ADD CONSTRAINT FK_A709862E525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_skill ADD CONSTRAINT FK_75E1C4DC5585C142 FOREIGN KEY (skill_id) REFERENCES skill (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_skill ADD CONSTRAINT FK_75E1C4DC525DD4B4 FOREIGN KEY (intern_id) REFERENCES intern (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE message ADD CONSTRAINT FK_B6BD307FF624B39D FOREIGN KEY (sender_id) REFERENCES userApp (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE message ADD CONSTRAINT FK_B6BD307FCD53EDB6 FOREIGN KEY (receiver_id) REFERENCES userApp (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE favorites DROP CONSTRAINT fk_e46960f5525dd4b4');
|
|
||||||
$this->addSql('ALTER TABLE favorites DROP CONSTRAINT fk_e46960f5913aea17');
|
|
||||||
$this->addSql('ALTER TABLE applications DROP CONSTRAINT fk_f7c966f0525dd4b4');
|
|
||||||
$this->addSql('ALTER TABLE applications DROP CONSTRAINT fk_f7c966f0913aea17');
|
|
||||||
$this->addSql('DROP TABLE favorites');
|
|
||||||
$this->addSql('DROP TABLE applications');
|
|
||||||
$this->addSql('ALTER TABLE announcement ADD creation_date DATE 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('DROP SEQUENCE degree_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE faq_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE intern_application_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE intern_degree_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE intern_favorite_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE intern_skill_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE message_id_seq CASCADE');
|
|
||||||
$this->addSql('DROP SEQUENCE skill_id_seq CASCADE');
|
|
||||||
$this->addSql('CREATE TABLE favorites (intern_id INT NOT NULL, announcement_id INT NOT NULL, PRIMARY KEY(intern_id, announcement_id))');
|
|
||||||
$this->addSql('CREATE INDEX idx_e46960f5913aea17 ON favorites (announcement_id)');
|
|
||||||
$this->addSql('CREATE INDEX idx_e46960f5525dd4b4 ON favorites (intern_id)');
|
|
||||||
$this->addSql('CREATE TABLE applications (intern_id INT NOT NULL, announcement_id INT NOT NULL, PRIMARY KEY(intern_id, announcement_id))');
|
|
||||||
$this->addSql('CREATE INDEX idx_f7c966f0913aea17 ON applications (announcement_id)');
|
|
||||||
$this->addSql('CREATE INDEX idx_f7c966f0525dd4b4 ON applications (intern_id)');
|
|
||||||
$this->addSql('ALTER TABLE favorites ADD CONSTRAINT fk_e46960f5525dd4b4 FOREIGN KEY (intern_id) REFERENCES intern (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE favorites ADD CONSTRAINT fk_e46960f5913aea17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE applications ADD CONSTRAINT fk_f7c966f0525dd4b4 FOREIGN KEY (intern_id) REFERENCES intern (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE applications ADD CONSTRAINT fk_f7c966f0913aea17 FOREIGN KEY (announcement_id) REFERENCES announcement (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('ALTER TABLE intern_application DROP CONSTRAINT FK_4EDBBCC83E030ACD');
|
|
||||||
$this->addSql('ALTER TABLE intern_application DROP CONSTRAINT FK_4EDBBCC8525DD4B4');
|
|
||||||
$this->addSql('ALTER TABLE intern_degree DROP CONSTRAINT FK_E68CCB23B35C5756');
|
|
||||||
$this->addSql('ALTER TABLE intern_degree DROP CONSTRAINT FK_E68CCB23525DD4B4');
|
|
||||||
$this->addSql('ALTER TABLE intern_favorite DROP CONSTRAINT FK_A709862E913AEA17');
|
|
||||||
$this->addSql('ALTER TABLE intern_favorite DROP CONSTRAINT FK_A709862E525DD4B4');
|
|
||||||
$this->addSql('ALTER TABLE intern_skill DROP CONSTRAINT FK_75E1C4DC5585C142');
|
|
||||||
$this->addSql('ALTER TABLE intern_skill DROP CONSTRAINT FK_75E1C4DC525DD4B4');
|
|
||||||
$this->addSql('ALTER TABLE message DROP CONSTRAINT FK_B6BD307FF624B39D');
|
|
||||||
$this->addSql('ALTER TABLE message DROP CONSTRAINT FK_B6BD307FCD53EDB6');
|
|
||||||
$this->addSql('DROP TABLE degree');
|
|
||||||
$this->addSql('DROP TABLE faq');
|
|
||||||
$this->addSql('DROP TABLE intern_application');
|
|
||||||
$this->addSql('DROP TABLE intern_degree');
|
|
||||||
$this->addSql('DROP TABLE intern_favorite');
|
|
||||||
$this->addSql('DROP TABLE intern_skill');
|
|
||||||
$this->addSql('DROP TABLE message');
|
|
||||||
$this->addSql('DROP TABLE skill');
|
|
||||||
$this->addSql('ALTER TABLE announcement DROP creation_date');
|
|
||||||
}
|
|
||||||
}
|
|
@ -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 Version20241121135116 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 roles 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 roles SET NOT NULL');
|
|
||||||
}
|
|
||||||
}
|
|
@ -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 Version20241121140219 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 announcement DROP CONSTRAINT fk_4db9d91c6bf700bd');
|
|
||||||
$this->addSql('DROP INDEX idx_4db9d91c6bf700bd');
|
|
||||||
$this->addSql('ALTER TABLE announcement ADD status VARCHAR(255) NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE announcement DROP status_id');
|
|
||||||
}
|
|
||||||
|
|
||||||
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 announcement ADD status_id INT NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE announcement DROP status');
|
|
||||||
$this->addSql('ALTER TABLE announcement ADD CONSTRAINT fk_4db9d91c6bf700bd FOREIGN KEY (status_id) REFERENCES status (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
$this->addSql('CREATE INDEX idx_4db9d91c6bf700bd ON announcement (status_id)');
|
|
||||||
}
|
|
||||||
}
|
|
@ -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');
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 392 KiB |
@ -3,7 +3,6 @@
|
|||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Entity\Announcement;
|
use App\Entity\Announcement;
|
||||||
use App\Entity\InternApplication;
|
|
||||||
use App\Form\AnnouncementType;
|
use App\Form\AnnouncementType;
|
||||||
use App\Repository\AnnouncementRepository;
|
use App\Repository\AnnouncementRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
@ -11,7 +10,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
||||||
|
|
||||||
#[Route('/announcement', name: 'app_announcement')]
|
#[Route('/announcement', name: 'app_announcement')]
|
||||||
class AnnouncementController extends AbstractController
|
class AnnouncementController extends AbstractController
|
||||||
@ -23,7 +21,6 @@ class AnnouncementController extends AbstractController
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#[Route('/add', name: '_add')]
|
#[Route('/add', name: '_add')]
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function addAnnouncement(Request $request): Response
|
public function addAnnouncement(Request $request): Response
|
||||||
{
|
{
|
||||||
$announcement = new Announcement();
|
$announcement = new Announcement();
|
||||||
@ -58,7 +55,6 @@ class AnnouncementController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/update/{id}', name: '_update')]
|
#[Route('/update/{id}', name: '_update')]
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function update(int $id, Request $request): Response
|
public function update(int $id, Request $request): Response
|
||||||
{
|
{
|
||||||
$announcement = $this->announcementRepository->find($id);
|
$announcement = $this->announcementRepository->find($id);
|
||||||
@ -69,9 +65,6 @@ class AnnouncementController extends AbstractController
|
|||||||
{
|
{
|
||||||
$this->entityManager->persist($announcement);
|
$this->entityManager->persist($announcement);
|
||||||
$this->entityManager->flush();
|
$this->entityManager->flush();
|
||||||
|
|
||||||
$this->addFlash('success', 'Annonce modifiéé avec succès.');
|
|
||||||
return $this->redirectToRoute('app_announcement_list');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('announcement/add.html.twig', [
|
return $this->render('announcement/add.html.twig', [
|
||||||
@ -80,7 +73,6 @@ class AnnouncementController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/delete/{id}', name: '_delete')]
|
#[Route('/delete/{id}', name: '_delete')]
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function delete(int $id): Response
|
public function delete(int $id): Response
|
||||||
{
|
{
|
||||||
$announcement = $this->announcementRepository->find($id);
|
$announcement = $this->announcementRepository->find($id);
|
||||||
@ -89,39 +81,4 @@ class AnnouncementController extends AbstractController
|
|||||||
|
|
||||||
return $this->redirectToRoute('app_announcement_list');
|
return $this->redirectToRoute('app_announcement_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/apply/{id}', name: '_apply')]
|
|
||||||
public function applyToAnnouncement(int $id): Response
|
|
||||||
{
|
|
||||||
|
|
||||||
$announcement = $this->announcementRepository->find($id);
|
|
||||||
|
|
||||||
$user = $this->getUser();
|
|
||||||
|
|
||||||
$existingCandidature = $this->entityManager->getRepository(InternApplication::class)->findOneBy([
|
|
||||||
'intern' => $user,
|
|
||||||
'announcement' => $announcement
|
|
||||||
]);
|
|
||||||
|
|
||||||
if($existingCandidature) {
|
|
||||||
$this->addFlash('error', 'Vous avez déjà postulé à cette annonce.');
|
|
||||||
return $this->redirectToRoute('app_announcement_list');
|
|
||||||
}
|
|
||||||
$application = new InternApplication();
|
|
||||||
$application->setIntern($user);
|
|
||||||
$application->setIntern($announcement);
|
|
||||||
$application->setApplicationDate(new \DateTime());
|
|
||||||
|
|
||||||
$this->entityManager->persist($application);
|
|
||||||
$this->entityManager->flush();
|
|
||||||
|
|
||||||
$this->addFlash('success', 'Votre candidature a été envoyée avec succès.');
|
|
||||||
return $this->redirectToRoute('annonce_list', ['id' => $announcement->getId()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/filterByCompany', name: '_filterByCompany')]
|
|
||||||
public function filterByCompany(int $id): Response
|
|
||||||
{
|
|
||||||
return $this->redirectToRoute('annonce_list', ['id' => $id]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,84 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Company;
|
|
||||||
use App\Form\CompanyType;
|
|
||||||
use App\Repository\CompanyRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
||||||
|
|
||||||
#[Route('/company')]
|
|
||||||
final class CompanyController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_company_index', methods: ['GET'])]
|
|
||||||
public function index(CompanyRepository $companyRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('company/index.html.twig', [
|
|
||||||
'companies' => $companyRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_company_new', methods: ['GET', 'POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$company = new Company();
|
|
||||||
$form = $this->createForm(CompanyType::class, $company);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($company);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_company_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('company/new.html.twig', [
|
|
||||||
'company' => $company,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_company_show', methods: ['GET'])]
|
|
||||||
public function show(Company $company): Response
|
|
||||||
{
|
|
||||||
return $this->render('company/show.html.twig', [
|
|
||||||
'company' => $company,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_company_edit', methods: ['GET', 'POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function edit(Request $request, Company $company, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(CompanyType::class, $company);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_company_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('company/edit.html.twig', [
|
|
||||||
'company' => $company,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_company_delete', methods: ['POST'])]
|
|
||||||
public function delete(Request $request, Company $company, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$company->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($company);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_company_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Degree;
|
|
||||||
use App\Form\DegreeType;
|
|
||||||
use App\Repository\DegreeRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
|
|
||||||
#[Route('/degree')]
|
|
||||||
final class DegreeController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_degree_index', methods: ['GET'])]
|
|
||||||
public function index(DegreeRepository $degreeRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('degree/index.html.twig', [
|
|
||||||
'degrees' => $degreeRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_degree_new', methods: ['GET', 'POST'])]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$degree = new Degree();
|
|
||||||
$form = $this->createForm(DegreeType::class, $degree);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($degree);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_degree_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('degree/new.html.twig', [
|
|
||||||
'degree' => $degree,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_degree_show', methods: ['GET'])]
|
|
||||||
public function show(Degree $degree): Response
|
|
||||||
{
|
|
||||||
return $this->render('degree/show.html.twig', [
|
|
||||||
'degree' => $degree,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_degree_edit', methods: ['GET', 'POST'])]
|
|
||||||
public function edit(Request $request, Degree $degree, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(DegreeType::class, $degree);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_degree_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('degree/edit.html.twig', [
|
|
||||||
'degree' => $degree,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_degree_delete', methods: ['POST'])]
|
|
||||||
public function delete(Request $request, Degree $degree, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$degree->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($degree);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_degree_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Employee;
|
|
||||||
use App\Form\EmployeeType;
|
|
||||||
use App\Repository\EmployeeRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
|
|
||||||
#[Route('/employee')]
|
|
||||||
final class EmployeeController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_employee_index', methods: ['GET'])]
|
|
||||||
public function index(EmployeeRepository $employeeRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('employee/index.html.twig', [
|
|
||||||
'employees' => $employeeRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_employee_new', methods: ['GET', 'POST'])]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$employee = new Employee();
|
|
||||||
$form = $this->createForm(EmployeeType::class, $employee);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($employee);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('employee/new.html.twig', [
|
|
||||||
'employee' => $employee,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_employee_show', methods: ['GET'])]
|
|
||||||
public function show(Employee $employee): Response
|
|
||||||
{
|
|
||||||
return $this->render('employee/show.html.twig', [
|
|
||||||
'employee' => $employee,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_employee_edit', methods: ['GET', 'POST'])]
|
|
||||||
public function edit(Request $request, Employee $employee, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(EmployeeType::class, $employee);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('employee/edit.html.twig', [
|
|
||||||
'employee' => $employee,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_employee_delete', methods: ['POST'])]
|
|
||||||
public function delete(Request $request, Employee $employee, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$employee->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($employee);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_employee_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\FAQ;
|
|
||||||
use App\Form\FAQType;
|
|
||||||
use App\Repository\FAQRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
||||||
|
|
||||||
#[Route('/faq')]
|
|
||||||
final class FAQController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_faq_index', methods: ['GET'])]
|
|
||||||
public function index(FAQRepository $fAQRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('faq/index.html.twig', [
|
|
||||||
'faqs' => $fAQRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_faq_new', methods: ['GET', 'POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$fAQ = new FAQ();
|
|
||||||
$form = $this->createForm(FAQType::class, $fAQ);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($fAQ);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('faq/new.html.twig', [
|
|
||||||
'faq' => $fAQ,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_faq_show', methods: ['GET'])]
|
|
||||||
public function show(FAQ $fAQ): Response
|
|
||||||
{
|
|
||||||
return $this->render('faq/show.html.twig', [
|
|
||||||
'faq' => $fAQ,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_faq_edit', methods: ['GET', 'POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function edit(Request $request, FAQ $fAQ, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(FAQType::class, $fAQ);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('faq/edit.html.twig', [
|
|
||||||
'faq' => $fAQ,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_faq_delete', methods: ['POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function delete(Request $request, FAQ $fAQ, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$fAQ->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($fAQ);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\UserApp;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
|
|
||||||
class IndexController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route('/index', name: 'app_index')]
|
|
||||||
public function index(): Response
|
|
||||||
{
|
|
||||||
return $this->render('index/index.html.twig', [
|
|
||||||
'id' => $this->getUser()->getId(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/test', name: 'app_test')]
|
|
||||||
public function test(): Response
|
|
||||||
{
|
|
||||||
return $this->render('base.html.twig', []);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Intern;
|
|
||||||
use App\Form\InternType;
|
|
||||||
use App\Repository\InternRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
|
|
||||||
#[Route('/intern')]
|
|
||||||
final class InternController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_intern_index', methods: ['GET'])]
|
|
||||||
public function index(InternRepository $internRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('intern/index.html.twig', [
|
|
||||||
'interns' => $internRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_intern_new', methods: ['GET', 'POST'])]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$intern = new Intern();
|
|
||||||
$form = $this->createForm(InternType::class, $intern);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($intern);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('intern/new.html.twig', [
|
|
||||||
'intern' => $intern,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_intern_show', methods: ['GET'])]
|
|
||||||
public function show(Intern $intern): Response
|
|
||||||
{
|
|
||||||
return $this->render('intern/show.html.twig', [
|
|
||||||
'intern' => $intern,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_intern_edit', methods: ['GET', 'POST'])]
|
|
||||||
public function edit(Request $request, Intern $intern, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(InternType::class, $intern);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('intern/edit.html.twig', [
|
|
||||||
'intern' => $intern,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_intern_delete', methods: ['POST'])]
|
|
||||||
public function delete(Request $request, Intern $intern, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$intern->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($intern);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_intern_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Message;
|
|
||||||
use App\Form\MessageType;
|
|
||||||
use App\Repository\MessageRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
|
|
||||||
#[Route('/message')]
|
|
||||||
final class MessageController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_message_index', methods: ['GET'])]
|
|
||||||
public function index(MessageRepository $messageRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('message/index.html.twig', [
|
|
||||||
'messages' => $messageRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_message_new', methods: ['GET', 'POST'])]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$message = new Message();
|
|
||||||
$form = $this->createForm(MessageType::class, $message);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($message);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_message_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('message/new.html.twig', [
|
|
||||||
'message' => $message,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_message_show', methods: ['GET'])]
|
|
||||||
public function show(Message $message): Response
|
|
||||||
{
|
|
||||||
return $this->render('message/show.html.twig', [
|
|
||||||
'message' => $message,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_message_edit', methods: ['GET', 'POST'])]
|
|
||||||
public function edit(Request $request, Message $message, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(MessageType::class, $message);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_message_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('message/edit.html.twig', [
|
|
||||||
'message' => $message,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_message_delete', methods: ['POST'])]
|
|
||||||
public function delete(Request $request, Message $message, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$message->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($message);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_message_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,7 +17,7 @@ use Symfony\Component\Routing\Attribute\Route;
|
|||||||
#[Route('/register', name: 'app_register')]
|
#[Route('/register', name: 'app_register')]
|
||||||
class RegistrationController extends AbstractController
|
class RegistrationController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route('/', name: '_intern')]
|
#[Route('/intern', name: '_intern')]
|
||||||
public function register(Request $request, UserPasswordHasherInterface $userPasswordHasher, Security $security, EntityManagerInterface $entityManager): Response
|
public function register(Request $request, UserPasswordHasherInterface $userPasswordHasher, Security $security, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$user = new Intern();
|
$user = new Intern();
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Skill;
|
|
||||||
use App\Form\SkillType;
|
|
||||||
use App\Repository\SkillRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
||||||
|
|
||||||
#[Route('/skill')]
|
|
||||||
final class SkillController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_skill_index', methods: ['GET'])]
|
|
||||||
public function index(SkillRepository $skillRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('skill/index.html.twig', [
|
|
||||||
'skills' => $skillRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/new', name: 'app_skill_new', methods: ['GET', 'POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$skill = new Skill();
|
|
||||||
$form = $this->createForm(SkillType::class, $skill);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->persist($skill);
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_skill_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('skill/new.html.twig', [
|
|
||||||
'skill' => $skill,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_skill_show', methods: ['GET'])]
|
|
||||||
public function show(Skill $skill): Response
|
|
||||||
{
|
|
||||||
return $this->render('skill/show.html.twig', [
|
|
||||||
'skill' => $skill,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_skill_edit', methods: ['GET', 'POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function edit(Request $request, Skill $skill, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(SkillType::class, $skill);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_skill_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('skill/edit.html.twig', [
|
|
||||||
'skill' => $skill,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_skill_delete', methods: ['POST'])]
|
|
||||||
#[IsGranted('ROLE_ADMIN')]
|
|
||||||
public function delete(Request $request, Skill $skill, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$skill->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($skill);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_skill_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use App\Entity\UserApp;
|
|
||||||
use App\Form\UserAppType;
|
|
||||||
use App\Repository\UserRepository;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
|
||||||
|
|
||||||
#[Route('/user')]
|
|
||||||
final class UserAppController extends AbstractController
|
|
||||||
{
|
|
||||||
#[Route(name: 'app_user_app_index', methods: ['GET'])]
|
|
||||||
public function index(UserRepository $userRepository): Response
|
|
||||||
{
|
|
||||||
return $this->render('user_app/index.html.twig', [
|
|
||||||
'user_apps' => $userRepository->findAll(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// #[Route('/new', name: 'app_user_app_new', methods: ['GET', 'POST'])]
|
|
||||||
// public function new(Request $request, EntityManagerInterface $entityManager): Response
|
|
||||||
// {
|
|
||||||
// $userApp = new UserApp();
|
|
||||||
// $form = $this->createForm(UserAppType::class, $userApp);
|
|
||||||
// $form->handleRequest($request);
|
|
||||||
//
|
|
||||||
// if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
// $entityManager->persist($userApp);
|
|
||||||
// $entityManager->flush();
|
|
||||||
//
|
|
||||||
// return $this->redirectToRoute('app_user_app_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return $this->render('user_app/new.html.twig', [
|
|
||||||
// 'user_app' => $userApp,
|
|
||||||
// 'form' => $form,
|
|
||||||
// ]);
|
|
||||||
// }
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_user_app_show', methods: ['GET'])]
|
|
||||||
public function show(UserApp $userApp): Response
|
|
||||||
{
|
|
||||||
return $this->render('user_app/show.html.twig', [
|
|
||||||
'user_app' => $userApp,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_user_app_edit', methods: ['GET', 'POST'])]
|
|
||||||
public function edit(Request $request, UserApp $userApp, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
$form = $this->createForm(UserAppType::class, $userApp);
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
|
||||||
$entityManager->flush();
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_user_app_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->render('user_app/edit.html.twig', [
|
|
||||||
'user_app' => $userApp,
|
|
||||||
'form' => $form,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_user_app_delete', methods: ['POST'])]
|
|
||||||
public function delete(Request $request, UserApp $userApp, EntityManagerInterface $entityManager): Response
|
|
||||||
{
|
|
||||||
if ($this->isCsrfTokenValid('delete'.$userApp->getId(), $request->getPayload()->getString('_token'))) {
|
|
||||||
$entityManager->remove($userApp);
|
|
||||||
$entityManager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->redirectToRoute('app_user_app_index', [], Response::HTTP_SEE_OTHER);
|
|
||||||
}
|
|
||||||
}
|
|
@ -22,15 +22,12 @@ class Announcement
|
|||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255)]
|
||||||
private ?string $description = null;
|
private ?string $description = null;
|
||||||
|
|
||||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
|
||||||
private ?\DateTimeInterface $creationDate = null;
|
|
||||||
|
|
||||||
#[ORM\ManyToOne(inversedBy: 'announcements')]
|
#[ORM\ManyToOne(inversedBy: 'announcements')]
|
||||||
#[ORM\JoinColumn(nullable: false)]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
private ?Company $company = null;
|
private ?Company $company = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255,nullable: false)]
|
#[ORM\Column(nullable: false)]
|
||||||
private ?string $status = "notVerified";
|
private ?string $status = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ?Collection<int, InternApplication>
|
* @var ?Collection<int, InternApplication>
|
||||||
@ -44,6 +41,9 @@ class Announcement
|
|||||||
#[ORM\OneToMany(targetEntity: InternFavorite::class, mappedBy: 'announcement')]
|
#[ORM\OneToMany(targetEntity: InternFavorite::class, mappedBy: 'announcement')]
|
||||||
private ?Collection $favoritesInterns;
|
private ?Collection $favoritesInterns;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||||
|
private ?\DateTimeInterface $creationDate = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->applicants = new ArrayCollection();
|
$this->applicants = new ArrayCollection();
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Entity;
|
|
||||||
|
|
||||||
use App\Repository\StatusRepository;
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
|
||||||
use Doctrine\Common\Collections\Collection;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: StatusRepository::class)]
|
|
||||||
class Status
|
|
||||||
{
|
|
||||||
#[ORM\Id]
|
|
||||||
#[ORM\GeneratedValue]
|
|
||||||
#[ORM\Column]
|
|
||||||
private ?int $id = null;
|
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
|
||||||
private ?string $label = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Collection<int, Announcement>
|
|
||||||
*/
|
|
||||||
#[ORM\OneToMany(targetEntity: Announcement::class, mappedBy: 'status')]
|
|
||||||
private Collection $announcements;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->announcements = new ArrayCollection();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getId(): ?int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getLabel(): ?string
|
|
||||||
{
|
|
||||||
return $this->label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setLabel(string $label): static
|
|
||||||
{
|
|
||||||
$this->label = $label;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Collection<int, Announcement>
|
|
||||||
*/
|
|
||||||
public function getAnnouncements(): Collection
|
|
||||||
{
|
|
||||||
return $this->announcements;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addAnnouncement(Announcement $announcement): static
|
|
||||||
{
|
|
||||||
if (!$this->announcements->contains($announcement)) {
|
|
||||||
$this->announcements->add($announcement);
|
|
||||||
$announcement->setStatus($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeAnnouncement(Announcement $announcement): static
|
|
||||||
{
|
|
||||||
if ($this->announcements->removeElement($announcement)) {
|
|
||||||
// set the owning side to null (unless already changed)
|
|
||||||
if ($announcement->getStatus() === $this) {
|
|
||||||
$announcement->setStatus(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -22,6 +22,10 @@ class AnnouncementType extends AbstractType
|
|||||||
'class' => Company::class,
|
'class' => Company::class,
|
||||||
'choice_label' => 'id',
|
'choice_label' => 'id',
|
||||||
])
|
])
|
||||||
|
->add('status', EntityType::class, [
|
||||||
|
'class' => Status::class,
|
||||||
|
'choice_label' => 'id',
|
||||||
|
])
|
||||||
->add('submit', SubmitType::class)
|
->add('submit', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\Company;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class CompanyType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('name')
|
|
||||||
->add('address')
|
|
||||||
->add('tel')
|
|
||||||
->add('mail')
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => Company::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\Degree;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class DegreeType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('label')
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => Degree::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\Company;
|
|
||||||
use App\Entity\Employee;
|
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class EmployeeType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('nickname')
|
|
||||||
->add('roles')
|
|
||||||
->add('password')
|
|
||||||
->add('firstName')
|
|
||||||
->add('lastName')
|
|
||||||
->add('tel')
|
|
||||||
->add('address')
|
|
||||||
->add('mail')
|
|
||||||
->add('company', EntityType::class, [
|
|
||||||
'class' => Company::class,
|
|
||||||
'choice_label' => 'id',
|
|
||||||
])
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => Employee::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\FAQ;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class FAQType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('question')
|
|
||||||
->add('answer')
|
|
||||||
->add('updateDate', null, [
|
|
||||||
'widget' => 'single_text',
|
|
||||||
])
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => FAQ::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\Intern;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class InternType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('nickname')
|
|
||||||
->add('roles')
|
|
||||||
->add('password')
|
|
||||||
->add('firstName')
|
|
||||||
->add('lastName')
|
|
||||||
->add('tel')
|
|
||||||
->add('address')
|
|
||||||
->add('mail')
|
|
||||||
->add('coverLetter')
|
|
||||||
->add('resume')
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => Intern::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\Message;
|
|
||||||
use App\Entity\UserApp;
|
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class MessageType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('content')
|
|
||||||
->add('sendingDate', null, [
|
|
||||||
'widget' => 'single_text',
|
|
||||||
])
|
|
||||||
->add('sender', EntityType::class, [
|
|
||||||
'class' => UserApp::class,
|
|
||||||
'choice_label' => 'id',
|
|
||||||
])
|
|
||||||
->add('receiver', EntityType::class, [
|
|
||||||
'class' => UserApp::class,
|
|
||||||
'choice_label' => 'id',
|
|
||||||
])
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => Message::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,7 +3,6 @@
|
|||||||
namespace App\Form;
|
namespace App\Form;
|
||||||
|
|
||||||
use App\Entity\UserApp;
|
use App\Entity\UserApp;
|
||||||
use Doctrine\DBAL\Types\StringType;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\Skill;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class SkillType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('label')
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => Skill::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Form;
|
|
||||||
|
|
||||||
use App\Entity\UserApp;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
||||||
|
|
||||||
class UserAppType extends AbstractType
|
|
||||||
{
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
||||||
{
|
|
||||||
$builder
|
|
||||||
->add('nickname')
|
|
||||||
->add('roles')
|
|
||||||
->add('password')
|
|
||||||
->add('firstName')
|
|
||||||
->add('lastName')
|
|
||||||
->add('tel')
|
|
||||||
->add('address')
|
|
||||||
->add('mail')
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
|
||||||
{
|
|
||||||
$resolver->setDefaults([
|
|
||||||
'data_class' => UserApp::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Repository;
|
|
||||||
|
|
||||||
use App\Entity\Status;
|
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @extends ServiceEntityRepository<Status>
|
|
||||||
*/
|
|
||||||
class StatusRepository extends ServiceEntityRepository
|
|
||||||
{
|
|
||||||
public function __construct(ManagerRegistry $registry)
|
|
||||||
{
|
|
||||||
parent::__construct($registry, Status::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @return Status[] Returns an array of Status objects
|
|
||||||
// */
|
|
||||||
// public function findByExampleField($value): array
|
|
||||||
// {
|
|
||||||
// return $this->createQueryBuilder('v')
|
|
||||||
// ->andWhere('v.exampleField = :val')
|
|
||||||
// ->setParameter('val', $value)
|
|
||||||
// ->orderBy('v.id', 'ASC')
|
|
||||||
// ->setMaxResults(10)
|
|
||||||
// ->getQuery()
|
|
||||||
// ->getResult()
|
|
||||||
// ;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public function findOneBySomeField($value): ?Status
|
|
||||||
// {
|
|
||||||
// return $this->createQueryBuilder('v')
|
|
||||||
// ->andWhere('v.exampleField = :val')
|
|
||||||
// ->setParameter('val', $value)
|
|
||||||
// ->getQuery()
|
|
||||||
// ->getOneOrNullResult()
|
|
||||||
// ;
|
|
||||||
// }
|
|
||||||
}
|
|
@ -1,4 +1,14 @@
|
|||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Hello AnnouncementController!{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{{ form(announcementForm) }}
|
<style>
|
||||||
|
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||||
|
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{{ form(announcementForm) }}
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -13,9 +13,8 @@
|
|||||||
<h2> {{ ann.title }} </h2>
|
<h2> {{ ann.title }} </h2>
|
||||||
<h3> {{ ann.company.name }} </h3>
|
<h3> {{ ann.company.name }} </h3>
|
||||||
<p> {{ ann.description }} </p>
|
<p> {{ ann.description }} </p>
|
||||||
------------------------------
|
|
||||||
|
|
||||||
<p> {{ ann.creationDate|format("d-m-y") }} </p>
|
<p> {{ ann.creationDate }} </p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,50 +1,17 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="UTF-8">
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||||
<title>{% block title %}Hegreshere{% endblock %}</title>
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
||||||
|
{% block stylesheets %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{# Tailwind CSS CDN #}
|
{% block javascripts %}
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||||
|
{% endblock %}
|
||||||
{# FontAwesome & Google Fonts #}
|
</head>
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
|
<body>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"/>
|
{% block body %}{% endblock %}
|
||||||
|
</body>
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: 'Roboto', sans-serif;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body class="bg-gray-100">
|
|
||||||
<header class="bg-gray-900 text-white">
|
|
||||||
<div class="container mx-auto flex justify-between items-center py-4 px-6">
|
|
||||||
<div class="flex items-center">
|
|
||||||
<i class="fas fa-briefcase text-2xl mr-2"></i>
|
|
||||||
<span class="text-xl font-bold">HegreSphere</span>
|
|
||||||
</div>
|
|
||||||
<nav class="space-x-6">
|
|
||||||
<a class="hover:text-teal-400" href="{{ path('app_index') }}">Accueil</a>
|
|
||||||
<a class="hover:text-teal-400" href="{{ path('app_index') }}">Stages</a>
|
|
||||||
<a class="hover:text-teal-400" href="{{ path('app_index') }}">À propos de nous</a>
|
|
||||||
<a class="hover:text-teal-400" href="{{ path('app_index') }}">Nous contacter</a>
|
|
||||||
</nav>
|
|
||||||
{% if app.user %}
|
|
||||||
<div>
|
|
||||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full" href="{{ path('app_user_app_show', { id: app.user.id }) }}">
|
|
||||||
Profil
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{# Block for the specific page content #}
|
|
||||||
<main>
|
|
||||||
{% block body %}
|
|
||||||
{% endblock %}
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_company_delete', {'id': company.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ company.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit Company{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit Company</h1>
|
|
||||||
|
|
||||||
{{ include('company/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_company_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('company/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,41 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Company index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Company index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Address</th>
|
|
||||||
<th>Tel</th>
|
|
||||||
<th>Mail</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for company in companies %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ company.id }}</td>
|
|
||||||
<td>{{ company.name }}</td>
|
|
||||||
<td>{{ company.address }}</td>
|
|
||||||
<td>{{ company.tel }}</td>
|
|
||||||
<td>{{ company.mail }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_company_show', {'id': company.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_company_edit', {'id': company.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="6">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_company_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New Company{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new Company</h1>
|
|
||||||
|
|
||||||
{{ include('company/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_company_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,38 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Company{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Company</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ company.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<td>{{ company.name }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Address</th>
|
|
||||||
<td>{{ company.address }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Tel</th>
|
|
||||||
<td>{{ company.tel }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Mail</th>
|
|
||||||
<td>{{ company.mail }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_company_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_company_edit', {'id': company.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('company/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_degree_delete', {'id': degree.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ degree.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit Degree{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit Degree</h1>
|
|
||||||
|
|
||||||
{{ include('degree/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_degree_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('degree/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,35 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Degree index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Degree index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Label</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for degree in degrees %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ degree.id }}</td>
|
|
||||||
<td>{{ degree.label }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_degree_show', {'id': degree.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_degree_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New Degree{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new Degree</h1>
|
|
||||||
|
|
||||||
{{ include('degree/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_degree_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,26 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Degree{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Degree</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ degree.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Label</th>
|
|
||||||
<td>{{ degree.label }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_degree_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('degree/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_employee_delete', {'id': employee.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ employee.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit Employee{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit Employee</h1>
|
|
||||||
|
|
||||||
{{ include('employee/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_employee_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('employee/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,49 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Employee index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Employee index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Nickname</th>
|
|
||||||
<th>Roles</th>
|
|
||||||
<th>Password</th>
|
|
||||||
<th>FirstName</th>
|
|
||||||
<th>LastName</th>
|
|
||||||
<th>Tel</th>
|
|
||||||
<th>Address</th>
|
|
||||||
<th>Mail</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for employee in employees %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ employee.id }}</td>
|
|
||||||
<td>{{ employee.nickname }}</td>
|
|
||||||
<td>{{ employee.roles ? employee.roles|json_encode : '' }}</td>
|
|
||||||
<td>{{ employee.password }}</td>
|
|
||||||
<td>{{ employee.firstName }}</td>
|
|
||||||
<td>{{ employee.lastName }}</td>
|
|
||||||
<td>{{ employee.tel }}</td>
|
|
||||||
<td>{{ employee.address }}</td>
|
|
||||||
<td>{{ employee.mail }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_employee_show', {'id': employee.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_employee_edit', {'id': employee.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="10">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_employee_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New Employee{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new Employee</h1>
|
|
||||||
|
|
||||||
{{ include('employee/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_employee_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,54 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Employee{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Employee</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ employee.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Nickname</th>
|
|
||||||
<td>{{ employee.nickname }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Roles</th>
|
|
||||||
<td>{{ employee.roles ? employee.roles|json_encode : '' }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Password</th>
|
|
||||||
<td>{{ employee.password }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>FirstName</th>
|
|
||||||
<td>{{ employee.firstName }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LastName</th>
|
|
||||||
<td>{{ employee.lastName }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Tel</th>
|
|
||||||
<td>{{ employee.tel }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Address</th>
|
|
||||||
<td>{{ employee.address }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Mail</th>
|
|
||||||
<td>{{ employee.mail }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_employee_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_employee_edit', {'id': employee.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('employee/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_faq_delete', {'id': faq.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ faq.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit FAQ{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit FAQ</h1>
|
|
||||||
|
|
||||||
{{ include('faq/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_faq_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('faq/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,39 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}FAQ index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>FAQ index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Question</th>
|
|
||||||
<th>Answer</th>
|
|
||||||
<th>UpdateDate</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for faq in faqs %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ faq.id }}</td>
|
|
||||||
<td>{{ faq.question }}</td>
|
|
||||||
<td>{{ faq.answer }}</td>
|
|
||||||
<td>{{ faq.updateDate ? faq.updateDate|date('Y-m-d') : '' }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_faq_show', {'id': faq.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_faq_edit', {'id': faq.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="5">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_faq_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New FAQ{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new FAQ</h1>
|
|
||||||
|
|
||||||
{{ include('faq/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_faq_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,34 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}FAQ{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>FAQ</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ faq.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Question</th>
|
|
||||||
<td>{{ faq.question }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Answer</th>
|
|
||||||
<td>{{ faq.answer }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>UpdateDate</th>
|
|
||||||
<td>{{ faq.updateDate ? faq.updateDate|date('Y-m-d') : '' }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_faq_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_faq_edit', {'id': faq.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('faq/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,76 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Accueil - Job Portal{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<section class="bg-cover bg-center py-20" style="background-image: url('{{ asset('images/fond_site.png') }}');">
|
|
||||||
<div class="container mx-auto text-center text-white">
|
|
||||||
<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">
|
|
||||||
<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>
|
|
||||||
<label>
|
|
||||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Indiquez un endroit" type="text"/>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<input class="border border-gray-300 rounded py-2 px-4 w-full md:w-auto" placeholder="Sélectionnez une catégorie" type="text"/>
|
|
||||||
</label>
|
|
||||||
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-6 rounded">Trouvez un stage</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-center space-x-8 mt-8">
|
|
||||||
<div class="text-center">
|
|
||||||
<i class="fas fa-briefcase text-2xl"></i>
|
|
||||||
<p class="mt-2">+850 Stages</p>
|
|
||||||
</div>
|
|
||||||
<div class="text-center">
|
|
||||||
<i class="fas fa-users text-2xl"></i>
|
|
||||||
<p class="mt-2">1500 Candidats</p>
|
|
||||||
</div>
|
|
||||||
<div class="text-center">
|
|
||||||
<i class="fas fa-building text-2xl"></i>
|
|
||||||
<p class="mt-2">+500 Entreprises</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="container mx-auto py-12">
|
|
||||||
<div class="flex justify-between items-center mb-6">
|
|
||||||
<h2 class="text-2xl font-bold">Propositions de stages </h2>
|
|
||||||
<a class="text-teal-500 hover:underline" href="{{ path('app_announcement_list') }}">Voir tout</a>
|
|
||||||
</div>
|
|
||||||
<div class="space-y-6">
|
|
||||||
{# Loop over recent offers (replace with dynamic data)
|
|
||||||
{% for offer in recent_offers %}
|
|
||||||
<div class="bg-white p-6 rounded-lg shadow flex justify-between items-center">
|
|
||||||
<div class="flex items-center space-x-4">
|
|
||||||
<div class="text-gray-500 text-sm">{{ offer.time_ago }}</div>
|
|
||||||
<div>
|
|
||||||
<h3 class="text-lg font-bold">{{ offer.title }}</h3>
|
|
||||||
<p class="text-gray-600">{{ offer.company }}</p>
|
|
||||||
<div class="flex items-center space-x-2 text-gray-500 text-sm mt-2">
|
|
||||||
<span class="flex items-center">
|
|
||||||
<i class="fas fa-briefcase mr-1"></i> {{ offer.category }}
|
|
||||||
</span>
|
|
||||||
<span class="flex items-center">
|
|
||||||
<i class="fas fa-clock mr-1"></i> {{ offer.type }}
|
|
||||||
</span>
|
|
||||||
<span class="flex items-center">
|
|
||||||
<i class="fas fa-dollar-sign mr-1"></i> {{ offer.salary }}
|
|
||||||
</span>
|
|
||||||
<span class="flex items-center">
|
|
||||||
<i class="fas fa-map-marker-alt mr-1"></i> {{ offer.location }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded">Détails de l'offre</button>
|
|
||||||
</div>
|
|
||||||
{% endfor %}#}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_intern_delete', {'id': intern.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ intern.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit Intern{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit Intern</h1>
|
|
||||||
|
|
||||||
{{ include('intern/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_intern_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('intern/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,53 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Intern index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Intern index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Nickname</th>
|
|
||||||
<th>Roles</th>
|
|
||||||
<th>Password</th>
|
|
||||||
<th>FirstName</th>
|
|
||||||
<th>LastName</th>
|
|
||||||
<th>Tel</th>
|
|
||||||
<th>Address</th>
|
|
||||||
<th>Mail</th>
|
|
||||||
<th>CoverLetter</th>
|
|
||||||
<th>Resume</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for intern in interns %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ intern.id }}</td>
|
|
||||||
<td>{{ intern.nickname }}</td>
|
|
||||||
<td>{{ intern.roles ? intern.roles|json_encode : '' }}</td>
|
|
||||||
<td>{{ intern.password }}</td>
|
|
||||||
<td>{{ intern.firstName }}</td>
|
|
||||||
<td>{{ intern.lastName }}</td>
|
|
||||||
<td>{{ intern.tel }}</td>
|
|
||||||
<td>{{ intern.address }}</td>
|
|
||||||
<td>{{ intern.mail }}</td>
|
|
||||||
<td>{{ intern.coverLetter }}</td>
|
|
||||||
<td>{{ intern.resume }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_intern_show', {'id': intern.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_intern_edit', {'id': intern.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="12">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_intern_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New Intern{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new Intern</h1>
|
|
||||||
|
|
||||||
{{ include('intern/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_intern_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,62 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Intern{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Intern</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ intern.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Nickname</th>
|
|
||||||
<td>{{ intern.nickname }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Roles</th>
|
|
||||||
<td>{{ intern.roles ? intern.roles|json_encode : '' }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Password</th>
|
|
||||||
<td>{{ intern.password }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>FirstName</th>
|
|
||||||
<td>{{ intern.firstName }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LastName</th>
|
|
||||||
<td>{{ intern.lastName }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Tel</th>
|
|
||||||
<td>{{ intern.tel }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Address</th>
|
|
||||||
<td>{{ intern.address }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Mail</th>
|
|
||||||
<td>{{ intern.mail }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>CoverLetter</th>
|
|
||||||
<td>{{ intern.coverLetter }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Resume</th>
|
|
||||||
<td>{{ intern.resume }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_intern_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_intern_edit', {'id': intern.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('intern/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_message_delete', {'id': message.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ message.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit Message{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit Message</h1>
|
|
||||||
|
|
||||||
{{ include('message/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_message_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('message/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,37 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Message index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Message index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Content</th>
|
|
||||||
<th>SendingDate</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for message in messages %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ message.id }}</td>
|
|
||||||
<td>{{ message.content }}</td>
|
|
||||||
<td>{{ message.sendingDate ? message.sendingDate|date('Y-m-d H:i:s') : '' }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_message_show', {'id': message.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_message_edit', {'id': message.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_message_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New Message{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new Message</h1>
|
|
||||||
|
|
||||||
{{ include('message/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_message_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,30 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Message{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Message</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ message.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Content</th>
|
|
||||||
<td>{{ message.content }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>SendingDate</th>
|
|
||||||
<td>{{ message.sendingDate ? message.sendingDate|date('Y-m-d H:i:s') : '' }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_message_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_message_edit', {'id': message.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('message/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -3,52 +3,20 @@
|
|||||||
{% block title %}Inscription{% endblock %}
|
{% block title %}Inscription{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="bg-gray-100 flex items-center justify-center min-h-screen">
|
<h1>Inscription</h1>
|
||||||
<div class="bg-white p-8 rounded-lg shadow-md w-full max-w-md">
|
|
||||||
<h2 class="text-2xl font-bold text-center mb-2">Inscription</h2>
|
|
||||||
<p class="text-center text-gray-600 mb-6">
|
|
||||||
Déjà inscrit ? <a href="{{ path('app_login') }}" class="text-teal-600 hover:underline">Connectez-vous ici</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{{ form_start(registrationForm, { 'attr': { 'class': 'space-y-4' } }) }}
|
{{ form_errors(registrationForm) }}
|
||||||
|
|
||||||
<div class="mb-4">
|
{{ form_start(registrationForm) }}
|
||||||
{{ form_label(registrationForm.nickname, 'Pseudo', {'label_attr': {'class': 'block text-gray-700 mb-2'}}) }}
|
{{ form_row(registrationForm.nickname) }}
|
||||||
{{ form_widget(registrationForm.nickname, {'attr': {'class': 'w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }}
|
{{ form_row(registrationForm.firstname) }}
|
||||||
{{ form_errors(registrationForm.nickname) }}
|
{{ form_row(registrationForm.lastname) }}
|
||||||
</div>
|
{{ form_row(registrationForm.mail) }}
|
||||||
|
{{ form_row(registrationForm.plainPassword, {
|
||||||
|
label: 'Password'
|
||||||
|
}) }}
|
||||||
|
{# {{ form_row(registrationForm.agreeTerms) }}#}
|
||||||
|
|
||||||
<div class="mb-4">
|
<button type="submit" class="btn">S'inscrire</button>
|
||||||
{{ form_label(registrationForm.firstname, 'Prénom', {'label_attr': {'class': 'block text-gray-700 mb-2'}}) }}
|
{{ form_end(registrationForm) }}
|
||||||
{{ form_widget(registrationForm.firstname, {'attr': {'class': 'w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }}
|
{% endblock %}
|
||||||
{{ form_errors(registrationForm.firstname) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-4">
|
|
||||||
{{ form_label(registrationForm.lastname, 'Nom', {'label_attr': {'class': 'block text-gray-700 mb-2'}}) }}
|
|
||||||
{{ form_widget(registrationForm.lastname, {'attr': {'class': 'w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }}
|
|
||||||
{{ form_errors(registrationForm.lastname) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-4">
|
|
||||||
{{ form_label(registrationForm.mail, 'Adresse email', {'label_attr': {'class': 'block text-gray-700 mb-2'}}) }}
|
|
||||||
{{ form_widget(registrationForm.mail, {'attr': {'class': 'w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }}
|
|
||||||
{{ form_errors(registrationForm.mail) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-4">
|
|
||||||
{{ form_label(registrationForm.plainPassword, 'Mot de passe', {'label_attr': {'class': 'block text-gray-700 mb-2'}}) }}
|
|
||||||
{{ form_widget(registrationForm.plainPassword, {'attr': {'class': 'w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }}
|
|
||||||
{{ form_errors(registrationForm.plainPassword) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<button type="submit" class="bg-teal-600 text-white px-6 py-2 rounded-lg w-full hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-teal-500">
|
|
||||||
S'inscrire
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ form_end(registrationForm) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
@ -3,59 +3,39 @@
|
|||||||
{% block title %}Connexion{% endblock %}
|
{% block title %}Connexion{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="bg-gray-100 flex items-center justify-center min-h-screen">
|
<form method="post">
|
||||||
<div class="bg-white p-8 rounded-lg shadow-md w-full max-w-md">
|
{% if error %}
|
||||||
<h2 class="text-2xl font-bold text-center mb-2">Connexion</h2>
|
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||||
<p class="text-center text-gray-600 mb-6">
|
{% endif %}
|
||||||
Pas encore inscrit ? Inscrivez vous !! <br>
|
|
||||||
<a href="{{ path('app_register_intern') }}" class="text-teal-600 hover:underline">En tant que stagiaire</a>
|
|
||||||
<br>
|
|
||||||
<a href="{{ path('app_register_employee') }}" class="text-teal-600 hover:underline">En tant qu'entreprise</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<form method="post">
|
{% if app.user %}
|
||||||
{# Affiche une erreur si la connexion échoue #}
|
<div class="mb-3">
|
||||||
{% if error %}
|
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
|
||||||
<div class="bg-red-100 text-red-800 px-4 py-2 rounded mb-4">
|
</div>
|
||||||
{{ error.messageKey|trans(error.messageData, 'security') }}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Affiche un message si l'utilisateur est déjà connecté #}
|
<h1 class="h3 mb-3 font-weight-normal">Connexion à votre compte</h1>
|
||||||
{% if app.user %}
|
<label for="username">Nom d'utilisateur</label>
|
||||||
<div class="bg-blue-100 text-blue-800 px-4 py-2 rounded mb-4">
|
<input type="text" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="username" required autofocus>
|
||||||
Vous êtes connecté en tant que {{ app.user.userIdentifier }}.
|
<label for="password">Mot de passe</label>
|
||||||
<a href="{{ path('app_logout') }}" class="text-teal-600 hover:underline">Déconnexion</a>
|
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" required>
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Champ pour le nom d'utilisateur #}
|
<input type="hidden" name="_csrf_token"
|
||||||
<div class="mb-4">
|
value="{{ csrf_token('authenticate') }}"
|
||||||
<label for="username" class="block text-gray-700 mb-2">Nom d'utilisateur</label>
|
>
|
||||||
<input type="text" name="_username" id="username"
|
|
||||||
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500"
|
|
||||||
value="{{ last_username }}" autocomplete="username" required autofocus>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{# Champ pour le mot de passe #}
|
{#
|
||||||
<div class="mb-6">
|
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
||||||
<label for="password" class="block text-gray-700 mb-2">Mot de passe</label>
|
See https://symfony.com/doc/current/security/remember_me.html
|
||||||
<input type="password" name="_password" id="password"
|
|
||||||
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-teal-500"
|
|
||||||
autocomplete="current-password" required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{# Jeton CSRF pour protéger le formulaire #}
|
<div class="checkbox mb-3">
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
<input type="checkbox" name="_remember_me" id="_remember_me">
|
||||||
|
<label for="_remember_me">Remember me</label>
|
||||||
|
</div>
|
||||||
|
#}
|
||||||
|
|
||||||
{# Bouton de soumission #}
|
<button class="btn btn-lg btn-primary" type="submit">
|
||||||
<div class="text-center">
|
Connexion
|
||||||
<button type="submit"
|
</button>
|
||||||
class="bg-teal-600 text-white px-6 py-2 rounded-lg w-full hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-teal-500">
|
</form>
|
||||||
Connexion
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_skill_delete', {'id': skill.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ skill.id) }}">
|
|
||||||
<button class="btn">Delete</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit Skill{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit Skill</h1>
|
|
||||||
|
|
||||||
{{ include('skill/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_skill_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('skill/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,35 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Skill index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Skill index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Label</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for skill in skills %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ skill.id }}</td>
|
|
||||||
<td>{{ skill.label }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_skill_show', {'id': skill.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_skill_edit', {'id': skill.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_skill_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New Skill{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new Skill</h1>
|
|
||||||
|
|
||||||
{{ include('skill/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_skill_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,26 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Skill{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Skill</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<td>{{ skill.id }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Label</th>
|
|
||||||
<td>{{ skill.label }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_skill_index') }}">back to list</a>
|
|
||||||
|
|
||||||
<a href="{{ path('app_skill_edit', {'id': skill.id}) }}">edit</a>
|
|
||||||
|
|
||||||
{{ include('skill/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||||||
<form method="post" action="{{ path('app_user_app_delete', {'id': user_app.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ user_app.id) }}">
|
|
||||||
<button class="bg-red-600 hover:bg-teal-600 text-white py-2 px-4 rounded-full">Supprimer</button>
|
|
||||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||||||
{{ form_start(form) }}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
|
||||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Edit UserApp{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Edit UserApp</h1>
|
|
||||||
|
|
||||||
{{ include('user_app/_form.html.twig', {'button_label': 'Update'}) }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_user_app_index') }}">back to list</a>
|
|
||||||
|
|
||||||
{{ include('user_app/_delete_form.html.twig') }}
|
|
||||||
{% endblock %}
|
|
@ -1,49 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}UserApp index{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>UserApp index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Nickname</th>
|
|
||||||
<th>Roles</th>
|
|
||||||
<th>Password</th>
|
|
||||||
<th>FirstName</th>
|
|
||||||
<th>LastName</th>
|
|
||||||
<th>Tel</th>
|
|
||||||
<th>Address</th>
|
|
||||||
<th>Mail</th>
|
|
||||||
<th>actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for user_app in user_apps %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ user_app.id }}</td>
|
|
||||||
<td>{{ user_app.nickname }}</td>
|
|
||||||
<td>{{ user_app.roles ? user_app.roles|json_encode : '' }}</td>
|
|
||||||
<td>{{ user_app.password }}</td>
|
|
||||||
<td>{{ user_app.firstName }}</td>
|
|
||||||
<td>{{ user_app.lastName }}</td>
|
|
||||||
<td>{{ user_app.tel }}</td>
|
|
||||||
<td>{{ user_app.address }}</td>
|
|
||||||
<td>{{ user_app.mail }}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{{ path('app_user_app_show', {'id': user_app.id}) }}">show</a>
|
|
||||||
<a href="{{ path('app_user_app_edit', {'id': user_app.id}) }}">edit</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="10">no records found</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a href="{{ path('app_user_app_new') }}">Create new</a>
|
|
||||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}New UserApp{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<h1>Create new UserApp</h1>
|
|
||||||
|
|
||||||
{{ include('user_app/_form.html.twig') }}
|
|
||||||
|
|
||||||
<a href="{{ path('app_user_app_index') }}">back to list</a>
|
|
||||||
{% endblock %}
|
|
@ -1,42 +0,0 @@
|
|||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}UserApp{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<div class="gap-y-5">
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Nom d'utilisateur : </p>
|
|
||||||
<p>{{ user_app.nickname }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Rôles : </p>
|
|
||||||
<p>{{ user_app.roles ? user_app.roles|json_encode : '' }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Prénom : </p>
|
|
||||||
<p>{{ user_app.firstName }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Nom : </p>
|
|
||||||
<p>{{ user_app.lastName }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Téléphone : </p>
|
|
||||||
<p>{{ user_app.tel }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Addresse : </p>
|
|
||||||
<p>{{ user_app.address }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-x-5">
|
|
||||||
<p class="font-bold">Mail : </p>
|
|
||||||
<p>{{ user_app.mail }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="{{ path('app_user_app_edit', {'id': user_app.id}) }}">Modifier</a>
|
|
||||||
|
|
||||||
{{ include('user_app/_delete_form.html.twig') }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
|
@ -1,161 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Tests\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Employee;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|
||||||
|
|
||||||
final class EmployeeControllerTest extends WebTestCase
|
|
||||||
{
|
|
||||||
private KernelBrowser $client;
|
|
||||||
private EntityManagerInterface $manager;
|
|
||||||
private EntityRepository $repository;
|
|
||||||
private string $path = '/employee/';
|
|
||||||
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
$this->client = static::createClient();
|
|
||||||
$this->manager = static::getContainer()->get('doctrine')->getManager();
|
|
||||||
$this->repository = $this->manager->getRepository(Employee::class);
|
|
||||||
|
|
||||||
foreach ($this->repository->findAll() as $object) {
|
|
||||||
$this->manager->remove($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->manager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testIndex(): void
|
|
||||||
{
|
|
||||||
$this->client->followRedirects();
|
|
||||||
$crawler = $this->client->request('GET', $this->path);
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('Employee index');
|
|
||||||
|
|
||||||
// Use the $crawler to perform additional assertions e.g.
|
|
||||||
// self::assertSame('Some text on the page', $crawler->filter('.p')->first());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNew(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
|
|
||||||
$this->client->submitForm('Save', [
|
|
||||||
'employee[nickname]' => 'Testing',
|
|
||||||
'employee[roles]' => 'Testing',
|
|
||||||
'employee[password]' => 'Testing',
|
|
||||||
'employee[firstName]' => 'Testing',
|
|
||||||
'employee[lastName]' => 'Testing',
|
|
||||||
'employee[tel]' => 'Testing',
|
|
||||||
'employee[address]' => 'Testing',
|
|
||||||
'employee[mail]' => 'Testing',
|
|
||||||
'employee[company]' => 'Testing',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects($this->path);
|
|
||||||
|
|
||||||
self::assertSame(1, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testShow(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Employee();
|
|
||||||
$fixture->setNickname('My Title');
|
|
||||||
$fixture->setRoles('My Title');
|
|
||||||
$fixture->setPassword('My Title');
|
|
||||||
$fixture->setFirstName('My Title');
|
|
||||||
$fixture->setLastName('My Title');
|
|
||||||
$fixture->setTel('My Title');
|
|
||||||
$fixture->setAddress('My Title');
|
|
||||||
$fixture->setMail('My Title');
|
|
||||||
$fixture->setCompany('My Title');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('Employee');
|
|
||||||
|
|
||||||
// Use assertions to check that the properties are properly displayed.
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testEdit(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Employee();
|
|
||||||
$fixture->setNickname('Value');
|
|
||||||
$fixture->setRoles('Value');
|
|
||||||
$fixture->setPassword('Value');
|
|
||||||
$fixture->setFirstName('Value');
|
|
||||||
$fixture->setLastName('Value');
|
|
||||||
$fixture->setTel('Value');
|
|
||||||
$fixture->setAddress('Value');
|
|
||||||
$fixture->setMail('Value');
|
|
||||||
$fixture->setCompany('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
$this->client->submitForm('Update', [
|
|
||||||
'employee[nickname]' => 'Something New',
|
|
||||||
'employee[roles]' => 'Something New',
|
|
||||||
'employee[password]' => 'Something New',
|
|
||||||
'employee[firstName]' => 'Something New',
|
|
||||||
'employee[lastName]' => 'Something New',
|
|
||||||
'employee[tel]' => 'Something New',
|
|
||||||
'employee[address]' => 'Something New',
|
|
||||||
'employee[mail]' => 'Something New',
|
|
||||||
'employee[company]' => 'Something New',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/employee/');
|
|
||||||
|
|
||||||
$fixture = $this->repository->findAll();
|
|
||||||
|
|
||||||
self::assertSame('Something New', $fixture[0]->getNickname());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getRoles());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getPassword());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getFirstName());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getLastName());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getTel());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getAddress());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getMail());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getCompany());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRemove(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Employee();
|
|
||||||
$fixture->setNickname('Value');
|
|
||||||
$fixture->setRoles('Value');
|
|
||||||
$fixture->setPassword('Value');
|
|
||||||
$fixture->setFirstName('Value');
|
|
||||||
$fixture->setLastName('Value');
|
|
||||||
$fixture->setTel('Value');
|
|
||||||
$fixture->setAddress('Value');
|
|
||||||
$fixture->setMail('Value');
|
|
||||||
$fixture->setCompany('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
$this->client->submitForm('Delete');
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/employee/');
|
|
||||||
self::assertSame(0, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Tests\Controller;
|
|
||||||
|
|
||||||
use App\Entity\FAQ;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|
||||||
|
|
||||||
final class FAQControllerTest extends WebTestCase
|
|
||||||
{
|
|
||||||
private KernelBrowser $client;
|
|
||||||
private EntityManagerInterface $manager;
|
|
||||||
private EntityRepository $repository;
|
|
||||||
private string $path = '/faq/';
|
|
||||||
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
$this->client = static::createClient();
|
|
||||||
$this->manager = static::getContainer()->get('doctrine')->getManager();
|
|
||||||
$this->repository = $this->manager->getRepository(FAQ::class);
|
|
||||||
|
|
||||||
foreach ($this->repository->findAll() as $object) {
|
|
||||||
$this->manager->remove($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->manager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testIndex(): void
|
|
||||||
{
|
|
||||||
$this->client->followRedirects();
|
|
||||||
$crawler = $this->client->request('GET', $this->path);
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('FAQ index');
|
|
||||||
|
|
||||||
// Use the $crawler to perform additional assertions e.g.
|
|
||||||
// self::assertSame('Some text on the page', $crawler->filter('.p')->first());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNew(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
|
|
||||||
$this->client->submitForm('Save', [
|
|
||||||
'faq[question]' => 'Testing',
|
|
||||||
'faq[answer]' => 'Testing',
|
|
||||||
'faq[updateDate]' => 'Testing',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects($this->path);
|
|
||||||
|
|
||||||
self::assertSame(1, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testShow(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new FAQ();
|
|
||||||
$fixture->setQuestion('My Title');
|
|
||||||
$fixture->setAnswer('My Title');
|
|
||||||
$fixture->setUpdateDate('My Title');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('FAQ');
|
|
||||||
|
|
||||||
// Use assertions to check that the properties are properly displayed.
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testEdit(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new FAQ();
|
|
||||||
$fixture->setQuestion('Value');
|
|
||||||
$fixture->setAnswer('Value');
|
|
||||||
$fixture->setUpdateDate('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
$this->client->submitForm('Update', [
|
|
||||||
'faq[question]' => 'Something New',
|
|
||||||
'faq[answer]' => 'Something New',
|
|
||||||
'faq[updateDate]' => 'Something New',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/faq/');
|
|
||||||
|
|
||||||
$fixture = $this->repository->findAll();
|
|
||||||
|
|
||||||
self::assertSame('Something New', $fixture[0]->getQuestion());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getAnswer());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getUpdateDate());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRemove(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new FAQ();
|
|
||||||
$fixture->setQuestion('Value');
|
|
||||||
$fixture->setAnswer('Value');
|
|
||||||
$fixture->setUpdateDate('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
$this->client->submitForm('Delete');
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/faq/');
|
|
||||||
self::assertSame(0, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,167 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Tests\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Intern;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|
||||||
|
|
||||||
final class InternControllerTest extends WebTestCase
|
|
||||||
{
|
|
||||||
private KernelBrowser $client;
|
|
||||||
private EntityManagerInterface $manager;
|
|
||||||
private EntityRepository $repository;
|
|
||||||
private string $path = '/intern/';
|
|
||||||
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
$this->client = static::createClient();
|
|
||||||
$this->manager = static::getContainer()->get('doctrine')->getManager();
|
|
||||||
$this->repository = $this->manager->getRepository(Intern::class);
|
|
||||||
|
|
||||||
foreach ($this->repository->findAll() as $object) {
|
|
||||||
$this->manager->remove($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->manager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testIndex(): void
|
|
||||||
{
|
|
||||||
$this->client->followRedirects();
|
|
||||||
$crawler = $this->client->request('GET', $this->path);
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('Intern index');
|
|
||||||
|
|
||||||
// Use the $crawler to perform additional assertions e.g.
|
|
||||||
// self::assertSame('Some text on the page', $crawler->filter('.p')->first());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNew(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
|
|
||||||
$this->client->submitForm('Save', [
|
|
||||||
'intern[nickname]' => 'Testing',
|
|
||||||
'intern[roles]' => 'Testing',
|
|
||||||
'intern[password]' => 'Testing',
|
|
||||||
'intern[firstName]' => 'Testing',
|
|
||||||
'intern[lastName]' => 'Testing',
|
|
||||||
'intern[tel]' => 'Testing',
|
|
||||||
'intern[address]' => 'Testing',
|
|
||||||
'intern[mail]' => 'Testing',
|
|
||||||
'intern[coverLetter]' => 'Testing',
|
|
||||||
'intern[resume]' => 'Testing',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects($this->path);
|
|
||||||
|
|
||||||
self::assertSame(1, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testShow(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Intern();
|
|
||||||
$fixture->setNickname('My Title');
|
|
||||||
$fixture->setRoles('My Title');
|
|
||||||
$fixture->setPassword('My Title');
|
|
||||||
$fixture->setFirstName('My Title');
|
|
||||||
$fixture->setLastName('My Title');
|
|
||||||
$fixture->setTel('My Title');
|
|
||||||
$fixture->setAddress('My Title');
|
|
||||||
$fixture->setMail('My Title');
|
|
||||||
$fixture->setCoverLetter('My Title');
|
|
||||||
$fixture->setResume('My Title');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('Intern');
|
|
||||||
|
|
||||||
// Use assertions to check that the properties are properly displayed.
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testEdit(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Intern();
|
|
||||||
$fixture->setNickname('Value');
|
|
||||||
$fixture->setRoles('Value');
|
|
||||||
$fixture->setPassword('Value');
|
|
||||||
$fixture->setFirstName('Value');
|
|
||||||
$fixture->setLastName('Value');
|
|
||||||
$fixture->setTel('Value');
|
|
||||||
$fixture->setAddress('Value');
|
|
||||||
$fixture->setMail('Value');
|
|
||||||
$fixture->setCoverLetter('Value');
|
|
||||||
$fixture->setResume('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
$this->client->submitForm('Update', [
|
|
||||||
'intern[nickname]' => 'Something New',
|
|
||||||
'intern[roles]' => 'Something New',
|
|
||||||
'intern[password]' => 'Something New',
|
|
||||||
'intern[firstName]' => 'Something New',
|
|
||||||
'intern[lastName]' => 'Something New',
|
|
||||||
'intern[tel]' => 'Something New',
|
|
||||||
'intern[address]' => 'Something New',
|
|
||||||
'intern[mail]' => 'Something New',
|
|
||||||
'intern[coverLetter]' => 'Something New',
|
|
||||||
'intern[resume]' => 'Something New',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/intern/');
|
|
||||||
|
|
||||||
$fixture = $this->repository->findAll();
|
|
||||||
|
|
||||||
self::assertSame('Something New', $fixture[0]->getNickname());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getRoles());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getPassword());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getFirstName());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getLastName());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getTel());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getAddress());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getMail());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getCoverLetter());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getResume());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRemove(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Intern();
|
|
||||||
$fixture->setNickname('Value');
|
|
||||||
$fixture->setRoles('Value');
|
|
||||||
$fixture->setPassword('Value');
|
|
||||||
$fixture->setFirstName('Value');
|
|
||||||
$fixture->setLastName('Value');
|
|
||||||
$fixture->setTel('Value');
|
|
||||||
$fixture->setAddress('Value');
|
|
||||||
$fixture->setMail('Value');
|
|
||||||
$fixture->setCoverLetter('Value');
|
|
||||||
$fixture->setResume('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
$this->client->submitForm('Delete');
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/intern/');
|
|
||||||
self::assertSame(0, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,131 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Tests\Controller;
|
|
||||||
|
|
||||||
use App\Entity\Message;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|
||||||
|
|
||||||
final class MessageControllerTest extends WebTestCase
|
|
||||||
{
|
|
||||||
private KernelBrowser $client;
|
|
||||||
private EntityManagerInterface $manager;
|
|
||||||
private EntityRepository $repository;
|
|
||||||
private string $path = '/message/';
|
|
||||||
|
|
||||||
protected function setUp(): void
|
|
||||||
{
|
|
||||||
$this->client = static::createClient();
|
|
||||||
$this->manager = static::getContainer()->get('doctrine')->getManager();
|
|
||||||
$this->repository = $this->manager->getRepository(Message::class);
|
|
||||||
|
|
||||||
foreach ($this->repository->findAll() as $object) {
|
|
||||||
$this->manager->remove($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->manager->flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testIndex(): void
|
|
||||||
{
|
|
||||||
$this->client->followRedirects();
|
|
||||||
$crawler = $this->client->request('GET', $this->path);
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('Message index');
|
|
||||||
|
|
||||||
// Use the $crawler to perform additional assertions e.g.
|
|
||||||
// self::assertSame('Some text on the page', $crawler->filter('.p')->first());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNew(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
|
|
||||||
$this->client->submitForm('Save', [
|
|
||||||
'message[content]' => 'Testing',
|
|
||||||
'message[sendingDate]' => 'Testing',
|
|
||||||
'message[sender]' => 'Testing',
|
|
||||||
'message[receiver]' => 'Testing',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects($this->path);
|
|
||||||
|
|
||||||
self::assertSame(1, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testShow(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Message();
|
|
||||||
$fixture->setContent('My Title');
|
|
||||||
$fixture->setSendingDate('My Title');
|
|
||||||
$fixture->setSender('My Title');
|
|
||||||
$fixture->setReceiver('My Title');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
|
||||||
self::assertPageTitleContains('Message');
|
|
||||||
|
|
||||||
// Use assertions to check that the properties are properly displayed.
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testEdit(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Message();
|
|
||||||
$fixture->setContent('Value');
|
|
||||||
$fixture->setSendingDate('Value');
|
|
||||||
$fixture->setSender('Value');
|
|
||||||
$fixture->setReceiver('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
|
|
||||||
|
|
||||||
$this->client->submitForm('Update', [
|
|
||||||
'message[content]' => 'Something New',
|
|
||||||
'message[sendingDate]' => 'Something New',
|
|
||||||
'message[sender]' => 'Something New',
|
|
||||||
'message[receiver]' => 'Something New',
|
|
||||||
]);
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/message/');
|
|
||||||
|
|
||||||
$fixture = $this->repository->findAll();
|
|
||||||
|
|
||||||
self::assertSame('Something New', $fixture[0]->getContent());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getSendingDate());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getSender());
|
|
||||||
self::assertSame('Something New', $fixture[0]->getReceiver());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRemove(): void
|
|
||||||
{
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Message();
|
|
||||||
$fixture->setContent('Value');
|
|
||||||
$fixture->setSendingDate('Value');
|
|
||||||
$fixture->setSender('Value');
|
|
||||||
$fixture->setReceiver('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
|
||||||
$this->manager->flush();
|
|
||||||
|
|
||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
|
||||||
$this->client->submitForm('Delete');
|
|
||||||
|
|
||||||
self::assertResponseRedirects('/message/');
|
|
||||||
self::assertSame(0, $this->repository->count([]));
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user