Skip to content

Commit

Permalink
change username to name_official to match combobox v2
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed May 2, 2017
1 parent a6806fd commit 25fcaed
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function drawChartUser() {
var data = google.visualization.arrayToDataTable([
['<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic','User');?>','<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic','Chats');?>']
<?php foreach ($userChatsStats as $data) : ?>
<?php $obUser = erLhcoreClassModelUser::fetch($data['user_id'],true); echo ',[\''.htmlspecialchars((is_object($obUser) ? $obUser->username : $data['user_id']),ENT_QUOTES).'\','.$data['number_of_chats'].']'?>
<?php $obUser = erLhcoreClassModelUser::fetch($data['user_id'],true); echo ',[\''.htmlspecialchars((is_object($obUser) ? $obUser->name_official : $data['user_id']),ENT_QUOTES).'\','.$data['number_of_chats'].']'?>
<?php endforeach;?>
]);
var options = {
Expand All @@ -164,7 +164,7 @@ function drawChartUserAverage() {
var data = google.visualization.arrayToDataTable([
['<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic','User');?>','<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic','Average in seconds');?>']
<?php foreach ($userChatsAverageStats as $data) : ?>
<?php $obUser = erLhcoreClassModelUser::fetch($data['user_id'],true); echo ',[\''.htmlspecialchars((is_object($obUser) ? $obUser->username : $data['user_id']),ENT_QUOTES).'\','.$data['avg_chat_duration'].']'?>
<?php $obUser = erLhcoreClassModelUser::fetch($data['user_id'],true); echo ',[\''.htmlspecialchars((is_object($obUser) ? $obUser->name_official : $data['user_id']),ENT_QUOTES).'\','.$data['avg_chat_duration'].']'?>
<?php endforeach;?>
]);
var options = {
Expand All @@ -183,7 +183,7 @@ function drawChartUserAVGWaitTime() {
var data = google.visualization.arrayToDataTable([
['<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic','User');?>','<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic','Wait time');?>']
<?php foreach ($userWaitTimeByOperator as $data) : ?>
<?php $obUser = erLhcoreClassModelUser::fetch($data['user_id'],true); echo ',[\''.htmlspecialchars((is_object($obUser) ? $obUser->username : $data['user_id']),ENT_QUOTES).'\','.$data['avg_wait_time'].']'?>
<?php $obUser = erLhcoreClassModelUser::fetch($data['user_id'],true); echo ',[\''.htmlspecialchars((is_object($obUser) ? $obUser->name_official : $data['user_id']),ENT_QUOTES).'\','.$data['avg_wait_time'].']'?>
<?php endforeach;?>
]);
var options = {
Expand Down Expand Up @@ -212,7 +212,7 @@ function drawChartUserMessages() {
} else {
$operatorObj = erLhcoreClassModelUser::fetch($data['user_id'],true);
if (is_object($operatorObj) ) {
$operator = $operatorObj->username;
$operator = $operatorObj->name_official;
} else {
$operator = '['.$data['user_id'].']';
}
Expand Down

0 comments on commit 25fcaed

Please sign in to comment.