diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index 4ed654c85..995cf450d 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -22,6 +22,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\DiscriminatorMap; +use Symfony\Component\Serializer\Annotation\SerializedName; /** * Class Activity @@ -30,7 +31,7 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap; * @ORM\Entity(repositoryClass="Chill\ActivityBundle\Repository\ActivityRepository") * @ORM\Table(name="activity") * @ORM\HasLifecycleCallbacks() - * @DiscriminatorMap(typeProperty="type", mapping={ + * @DiscriminatorMap(typeProperty="_type", mapping={ * "activity"=Activity::class * }) */ @@ -102,6 +103,8 @@ class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPer /** * @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityType") + * @Groups({"read"}) + * @SerializedName("activityType") */ private ActivityType $type; diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php index c8ae6ca07..835af284e 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php @@ -21,6 +21,7 @@ namespace Chill\ActivityBundle\Entity; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Serializer\Annotation\Groups; /** * Class ActivityType @@ -45,11 +46,13 @@ class ActivityType /** * @ORM\Column(type="json") + * @Groups({"read"}) */ private array $name = []; /** * @ORM\Column(type="boolean") + * @Groups({"read"}) */ private bool $active = true; @@ -100,6 +103,7 @@ class ActivityType /** * @ORM\Column(type="smallint", nullable=false, options={"default"=1}) + * @Groups({"read"}) */ private int $personsVisible = self::FIELD_OPTIONAL; @@ -110,6 +114,7 @@ class ActivityType /** * @ORM\Column(type="smallint", nullable=false, options={"default"=1}) + * @Groups({"read"}) */ private int $thirdPartiesVisible = self::FIELD_INVISIBLE; @@ -190,6 +195,7 @@ class ActivityType /** * @ORM\Column(type="smallint", nullable=false, options={"default"=1}) + * @Groups({"read"}) */ private int $usersVisible = self::FIELD_OPTIONAL; diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue index 42c6ee79e..9eaeef697 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue @@ -1,5 +1,5 @@