Skip to content

Commit

Permalink
Department statistic direclty in pending/active chat list
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Dec 7, 2021
1 parent 5606e82 commit 99d4647
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 9 deletions.
5 changes: 4 additions & 1 deletion lhc_web/design/defaulttheme/js/angular.lhc.js
Expand Up @@ -1440,7 +1440,10 @@ lhcAppControllers.controller('LiveHelperChatCtrl',['$scope','$http','$location',
});
};

this.openModal = function(url) {
this.openModal = function(url, event) {
if (event) {
event.stopPropagation();
}
lhc.revealModal({'url':WWW_DIR_JAVASCRIPT+url,hidecallback: function() { $scope.loadChatList(); }});
}

Expand Down
2 changes: 1 addition & 1 deletion lhc_web/design/defaulttheme/js/angular.lhc.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Expand Up @@ -46,7 +46,11 @@
<div class="abbr-list" title="{{chat.n_off_full}} | {{chat.plain_user_name}}">{{chat.n_office}}</div>
</td>
<td>
<div class="abbr-list" title="{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}">{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}</div>
<div class="abbr-list" title="{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}">
<?php if ($currentUser->hasAccessTo('lhstatistic','statisticdep')) : ?><a class="text-primary" ng-click="lhc.openModal('statistic/departmentstats/'+chat.dep_id,$event)"><i class="material-icons">donut_large</i><?php endif; ?>
{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}
<?php if ($currentUser->hasAccessTo('lhstatistic','statisticdep')) : ?></a><?php endif; ?>
</div>
</td>
</tr>
</table>
Expand Up @@ -22,7 +22,11 @@
<div class="abbr-list" title="{{chat.wait_time_pending}}">{{chat.wait_time_pending}}</div>
</td>
<td>
<div class="abbr-list" title="{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}">{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}</div>
<div class="abbr-list" title="{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}">
<?php if ($currentUser->hasAccessTo('lhstatistic','statisticdep')) : ?><a class="text-primary" ng-click="lhc.openModal('statistic/departmentstats/'+chat.dep_id,$event)"><i class="material-icons">donut_large</i><?php endif; ?>
{{chat.department_name}}{{chat.product_name ? ' | '+chat.product_name : ''}}
<?php if ($currentUser->hasAccessTo('lhstatistic','statisticdep')) : ?></a><?php endif; ?>
</div>
</td>
</tr>
</table>
2 changes: 1 addition & 1 deletion lhc_web/lib/core/lhchat/lhchat.php
Expand Up @@ -2127,7 +2127,7 @@ public static function array_flatten($array = null) {
}

public static function cleanForDashboard($chatLists) {
$attrsClean = array('online_user_id','uagent','user_status','last_user_msg_time','last_op_msg_time','lsync','dep_id','gbot_id');
$attrsClean = array('online_user_id','uagent','user_status','last_user_msg_time','last_op_msg_time','lsync','gbot_id');
foreach ($chatLists as & $chatList) {
foreach ($chatList as & $chat) {
foreach ($attrsClean as $attrClean) {
Expand Down

0 comments on commit 99d4647

Please sign in to comment.