From 72795be0406b30bdfa7aa834ebe1c94384316f2c Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 25 May 2021 17:54:21 +0200 Subject: [PATCH] post new address - WIP --- src/Bundle/ChillMainBundle/Entity/Address.php | 17 ++++++++++ .../Resources/public/vuejs/Address/App.vue | 20 +++++++++-- .../public/vuejs/Address/store/index.js | 34 ++++++++++--------- .../Resources/public/vuejs/_api/AddAddress.js | 33 +++++++++++++++--- 4 files changed, 80 insertions(+), 24 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Entity/Address.php b/src/Bundle/ChillMainBundle/Entity/Address.php index 36eda09c2..faa34ccbc 100644 --- a/src/Bundle/ChillMainBundle/Entity/Address.php +++ b/src/Bundle/ChillMainBundle/Entity/Address.php @@ -4,6 +4,7 @@ namespace Chill\MainBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Serializer\Annotation\Groups; use Chill\MainBundle\Doctrine\Model\Point; use Chill\ThirdPartyBundle\Entity\ThirdParty; @@ -22,6 +23,7 @@ class Address * @ORM\Id * @ORM\Column(name="id", type="integer") * @ORM\GeneratedValue(strategy="AUTO") + * @groups({"write"}) */ private $id; @@ -29,6 +31,7 @@ class Address * @var string * * @ORM\Column(type="string", length=255) + * @groups({"write"}) */ private $street = ''; @@ -36,6 +39,7 @@ class Address * @var string * * @ORM\Column(type="string", length=255) + * @groups({"write"}) */ private $streetNumber = ''; @@ -43,6 +47,7 @@ class Address * @var PostalCode * * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode") + * @groups({"write"}) */ private $postcode; @@ -50,6 +55,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=16, nullable=true) + * @groups({"write"}) */ private $floor; @@ -57,6 +63,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=16, nullable=true) + * @groups({"write"}) */ private $corridor; @@ -64,6 +71,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=16, nullable=true) + * @groups({"write"}) */ private $steps; @@ -71,6 +79,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=255, nullable=true) + * @groups({"write"}) */ private $buildingName; @@ -78,6 +87,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=16, nullable=true) + * @groups({"write"}) */ private $flat; @@ -85,6 +95,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=255, nullable=true) + * @groups({"write"}) */ private $distribution; @@ -92,6 +103,7 @@ class Address * @var string|null * * @ORM\Column(type="string", length=255, nullable=true) + * @groups({"write"}) */ private $extra; @@ -102,6 +114,7 @@ class Address * @var \DateTime * * @ORM\Column(type="date") + * @groups({"write"}) */ private $validFrom; @@ -112,11 +125,13 @@ class Address * @var \DateTime|null * * @ORM\Column(type="date", nullable=true) + * @groups({"write"}) */ private $validTo; /** * True if the address is a "no address", aka homeless person, ... + * @groups({"write"}) * * @var bool */ @@ -128,6 +143,7 @@ class Address * @var Point|null * * @ORM\Column(type="point", nullable=true) + * @groups({"write"}) */ private $point; @@ -138,6 +154,7 @@ class Address * * @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty") * @ORM\JoinColumn(nullable=true) + * @groups({"write"}) */ private $linkedToThirdParty; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue index 461b0038e..2d146ed3b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue @@ -1,5 +1,5 @@