fix Location POST endpoint and saveNewLocation event method in vue_activity Location

This commit is contained in:
2021-10-15 11:22:33 +02:00
parent e6845326d7
commit d0dd99db9a
5 changed files with 68 additions and 16 deletions

View File

@@ -31,26 +31,26 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\ManyToOne(targetEntity=LocationType::class)
* @ORM\JoinColumn(nullable=false)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
*/
private ?LocationType $locationType = null;
/**
* @ORM\OneToOne(targetEntity=Address::class, cascade={"persist", "remove"})
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
*/
private ?Address $address = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
*/
private ?string $name = null;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
* @Assert\Regex(pattern="/^([\+{1}])([0-9\s*]{4,20})$/")
* @PhonenumberConstraint(type="any")
*/
@@ -58,7 +58,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
* @Assert\Regex(pattern="/^([\+{1}])([0-9\s*]{4,20})$/")
* @PhonenumberConstraint(type="any")
*/
@@ -66,7 +66,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
*/
private ?string $email = null;