diff --git a/src/Entity/Teamer.php b/src/Entity/Teamer.php index 24d1eee..a36172b 100644 --- a/src/Entity/Teamer.php +++ b/src/Entity/Teamer.php @@ -106,7 +106,7 @@ class Teamer implements TimestampableEntityInterface #[ORM\ManyToMany(targetEntity: JobProfile::class, orphanRemoval: true)] private Collection $jobProfiles; - #[ORM\ManyToMany(targetEntity: Assignment::class, inversedBy: 'teamers', orphanRemoval: true)] + #[ORM\ManyToMany(targetEntity: Assignment::class, inversedBy: 'teamers')] private Collection $bookmarks; #[ORM\OneToMany(mappedBy: 'teamer', targetEntity: Application::class, cascade: ['remove'])] diff --git a/templates/teamer/assignment/index.html.twig b/templates/teamer/assignment/index.html.twig index b44a588..e122324 100644 --- a/templates/teamer/assignment/index.html.twig +++ b/templates/teamer/assignment/index.html.twig @@ -43,11 +43,9 @@ Hier bewerben! {% endif %} - {% if not isBookmarked %} - - auf die Merkliste setzen - - {% endif %} + + {% if not isBookmarked %}auf die Merkliste setzen{% else %}von der Merkliste löschen{% endif %} + zurück