Skip to content
Snippets Groups Projects
Verified Commit fb98f23f authored by Damien's avatar Damien
Browse files

FEAT #12635 TIME 0:10 get communication means

parent 406dbafb
No related branches found
No related tags found
No related merge requests found
......@@ -232,7 +232,7 @@ class ContactController
'addressCountry' => $rawContact['address_country'],
'email' => $rawContact['email'],
'phone' => $rawContact['phone'],
'communicationMeans' => !empty($rawContact['communication_means']) ? json_decode($rawContact['communication_means']) : null,
'communicationMeans' => null,
'notes' => $rawContact['notes'],
'creator' => $rawContact['creator'],
'creatorLabel' => UserModel::getLabelledUserById(['id' => $rawContact['creator']]),
......@@ -251,6 +251,10 @@ class ContactController
'abbreviation' => $civilities[$rawContact['civility']]['abbreviation']
];
}
if (!empty($rawContact['communication_means'])) {
$communicationMeans = json_decode($rawContact['communication_means'], true);
$contact['communicationMeans'] = $communicationMeans['url'] ?? $communicationMeans['email'];
}
$filling = ContactController::getFillingRate(['contactId' => $rawContact['id']]);
$contact['fillingRate'] = empty($filling) ? null : $filling;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment