-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from CartONG/feature/fiche-projet
Feature/fiche projet
- Loading branch information
Showing
61 changed files
with
1,655 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html | ||
# See the official DoctrineExtensions documentation for more details: https://github.com/doctrine-extensions/DoctrineExtensions/tree/main/doc | ||
stof_doctrine_extensions: | ||
default_locale: en_US | ||
orm: | ||
default: | ||
tree: true | ||
blameable: true | ||
sluggable: true | ||
timestampable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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 Version20241016124248 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 project ADD created_by INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE project ADD updated_by INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE project ADD deliverables TEXT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE project ADD calendar TEXT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE project ADD slug VARCHAR(128) DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EEDE12AB56 FOREIGN KEY (created_by) REFERENCES "user" (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EE16FE72E1 FOREIGN KEY (updated_by) REFERENCES "user" (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('CREATE UNIQUE INDEX UNIQ_2FB3D0EE989D9B62 ON project (slug)'); | ||
$this->addSql('CREATE INDEX IDX_2FB3D0EEDE12AB56 ON project (created_by)'); | ||
$this->addSql('CREATE INDEX IDX_2FB3D0EE16FE72E1 ON project (updated_by)'); | ||
} | ||
|
||
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 project DROP CONSTRAINT FK_2FB3D0EEDE12AB56'); | ||
$this->addSql('ALTER TABLE project DROP CONSTRAINT FK_2FB3D0EE16FE72E1'); | ||
$this->addSql('DROP INDEX UNIQ_2FB3D0EE989D9B62'); | ||
$this->addSql('DROP INDEX IDX_2FB3D0EEDE12AB56'); | ||
$this->addSql('DROP INDEX IDX_2FB3D0EE16FE72E1'); | ||
$this->addSql('ALTER TABLE project DROP created_by'); | ||
$this->addSql('ALTER TABLE project DROP updated_by'); | ||
$this->addSql('ALTER TABLE project DROP deliverables'); | ||
$this->addSql('ALTER TABLE project DROP calendar'); | ||
$this->addSql('ALTER TABLE project DROP slug'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
namespace App\Controller\Project; | ||
|
||
use App\Entity\Project; | ||
use App\Repository\ProjectRepository; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpKernel\Attribute\AsController; | ||
|
||
#[AsController] | ||
class SimilarProjectsAction extends AbstractController | ||
{ | ||
public function __construct( | ||
private ProjectRepository $projectRepository, | ||
) {} | ||
|
||
public function __invoke(Project $project): array | ||
{ | ||
$similarProjects = $this->projectRepository->findTwoSimilarProjectsByThematics($project); | ||
return $similarProjects; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.