- Модуль: voximplant
- Путь к файлу: ~/bitrix/modules/voximplant/lib/integration/report/handler/missedreaction/missedreaction.php
- Класс: BitrixVoximplantIntegrationReportHandlerMissedReactionMissedReaction
- Вызов: MissedReaction::getMultipleData
public function getMultipleData()
{
$calculatedData = $this->getCalculatedData();
if (!$calculatedData['report'])
{
return [];
}
$this->preloadUserInfo(array_column($calculatedData['report'], 'PORTAL_USER_ID'));
$result = [];
foreach ($calculatedData['report'] as $row)
{
$user = $this->getUserInfo($row['PORTAL_USER_ID'], ['avatarWidth' => 60, 'avatarHeight' => 60]);
$result[] = [
'value' => [
'USER_NAME' => $user['name'],
'USER_ICON' => $user['icon'],
'MISSED' => $row['CALL_MISSED'],
'UNANSWERED' => $row['UNANSWERED'],
'AVG_RESPONSE_TIME' => $row['AVG_RESPONSE_TIME'],
'AVG_RESPONSE_TIME_FORMATTED' => $this->formatDurationByMinutes($row['AVG_RESPONSE_TIME']),
'DYNAMICS' => $row['AVG_RESPONSE_TIME_COMPARE'],
'DYNAMICS_FORMATTED' => $this->formatDurationByMinutes(abs($row['AVG_RESPONSE_TIME_COMPARE'])),
],
'url' => [
'MISSED' => $this->createUrl(self::TELEPHONY_DETAIL_URI, [
'PORTAL_USER_ID' => $row['PORTAL_USER_ID'],
]),
'UNANSWERED' => $this->createUrl(self::TELEPHONY_DETAIL_URI, [
'PORTAL_USER_ID' => $row['PORTAL_USER_ID'],
'UNANSWERED' => 'Y'
]),
]
];
}
return $result;
}