Add fields for upsert person

This commit is contained in:
Boris Waaub
2026-04-10 10:06:24 +00:00
committed by Julien Fastré
parent ac1ae2a3c6
commit aa54e82c6c
34 changed files with 720 additions and 568 deletions

View File

@@ -55,7 +55,7 @@ class AddressRender implements ChillEntityRenderInterface
$lines = [];
if (null !== $addr->getPostcode()) {
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
if ('FR' === $addr->getPostcode()->getCountry()?->getCountryCode()) {
$lines[] = $this->renderIntraBuildingLine($addr);
$lines[] = $this->renderBuildingLine($addr);
$lines[] = $this->renderStreetLine($addr);
@@ -102,7 +102,7 @@ class AddressRender implements ChillEntityRenderInterface
$res = trim($street.', '.$streetNumber, ', ');
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
if ('FR' === $addr->getPostcode()?->getCountry()?->getCountryCode()) {
$res = trim($streetNumber.', '.$street, ', ');
}
@@ -144,7 +144,7 @@ class AddressRender implements ChillEntityRenderInterface
$res = null;
}
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
if ('FR' === $addr->getPostcode()?->getCountry()?->getCountryCode()) {
$res = $addr->getBuildingName();
}
@@ -159,7 +159,7 @@ class AddressRender implements ChillEntityRenderInterface
'{label}' => $addr->getPostcode()->getName(),
]);
if ('FR' === $addr->getPostcode()->getCountry()->getCountryCode()) {
if ('FR' === $addr->getPostcode()->getCountry()?->getCountryCode()) {
if ('' !== $addr->getDistribution()) {
$res = $res.' '.$addr->getDistribution();
}
@@ -171,6 +171,10 @@ class AddressRender implements ChillEntityRenderInterface
private function renderCountryLine(Address $addr): ?string
{
if (null === $addr->getPostcode()?->getCountry()) {
return null;
}
return $this->translatableStringHelper->localize(
$addr->getPostcode()->getCountry()->getName()
);