Link between address and reference, and api endpoint to find household

by address reference

* add a one-to-many link between address and address reference;
* update AddAddress.vue to add information on picked address reference;
* add an HouseholdACLAwareRepository, with a method to find household by
current address reference
* add an endpoint to retrieve household by address reference
* + tests
This commit is contained in:
2021-09-29 23:55:54 +02:00
parent 6430de94a7
commit 05b2b2f9b8
12 changed files with 365 additions and 21 deletions

View File

@@ -3,6 +3,7 @@
namespace Chill\MainBundle\Serializer\Normalizer;
use Chill\MainBundle\Entity\Address;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
@@ -33,6 +34,9 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface
$data['extra'] = $address->getExtra();
$data['validFrom'] = $address->getValidFrom();
$data['validTo'] = $address->getValidTo();
$data['addressReference'] = $this->normalizer->normalize($address->getAddressReference(), $format, [
AbstractNormalizer::GROUPS => ['read']
]);
return $data;
}