mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
add homeless to person addresses
This commit is contained in:
@@ -60,7 +60,7 @@ class ListPerson implements ListInterface, ExportElementValidatedInterface
|
||||
'mobilenumber', 'contactInfo', 'countryOfBirth', 'nationality',
|
||||
'address_street_address_1', 'address_street_address_2',
|
||||
'address_valid_from', 'address_postcode_label', 'address_postcode_code',
|
||||
'address_country_name', 'address_country_code'
|
||||
'address_country_name', 'address_country_code', 'address_isnoaddress'
|
||||
);
|
||||
|
||||
private $slugs = [];
|
||||
@@ -257,6 +257,16 @@ class ListPerson implements ListInterface, ExportElementValidatedInterface
|
||||
|
||||
return $this->translatableStringHelper->localize(json_decode($value, true));
|
||||
};
|
||||
case 'address_isnoaddress':
|
||||
return function($value) use ($key) {
|
||||
if ($value === '_header') { return 'address.address_homeless'; }
|
||||
|
||||
if ($value) {
|
||||
return 'X';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
default:
|
||||
// for fields which are associated with person
|
||||
if (in_array($key, $this->fields)) {
|
||||
@@ -429,6 +439,7 @@ class ListPerson implements ListInterface, ExportElementValidatedInterface
|
||||
case 'address_postcode_code':
|
||||
case 'address_country_name':
|
||||
case 'address_country_code':
|
||||
case 'address_isnoaddress':
|
||||
|
||||
$qb->addSelect(sprintf(
|
||||
'GET_PERSON_ADDRESS_%s(person.id, :address_date) AS %s',
|
||||
|
Reference in New Issue
Block a user