Skip to content
Snippets Groups Projects
Commit 13143fbf authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge remote branch 'upstream/develop-next' into develop-next

parents bec19d7d f3c41067
No related branches found
No related tags found
No related merge requests found
...@@ -215,7 +215,8 @@ class OverviewReport { ...@@ -215,7 +215,8 @@ class OverviewReport {
$pk = 'dept__id'; $pk = 'dept__id';
$stats = $stats $stats = $stats
->filter(array('dept_id__in' => $thisstaff->getDepts())) ->filter(array('dept_id__in' => $thisstaff->getDepts()))
->values('dept__id', 'dept__name', 'dept__flags'); ->values('dept__id', 'dept__name', 'dept__flags')
->distinct('dept__id');
$times = $times $times = $times
->filter(array('dept_id__in' => $thisstaff->getDepts())) ->filter(array('dept_id__in' => $thisstaff->getDepts()))
->values('dept__id'); ->values('dept__id');
...@@ -227,7 +228,8 @@ class OverviewReport { ...@@ -227,7 +228,8 @@ class OverviewReport {
$topics = Topic::getHelpTopics(false, Topic::DISPLAY_DISABLED); $topics = Topic::getHelpTopics(false, Topic::DISPLAY_DISABLED);
$stats = $stats $stats = $stats
->values('topic_id', 'topic__topic', 'topic__flags') ->values('topic_id', 'topic__topic', 'topic__flags')
->filter(array('dept_id__in' => $thisstaff->getDepts(), 'topic_id__gt' => 0, 'topic_id__in' => array_keys($topics))); ->filter(array('dept_id__in' => $thisstaff->getDepts(), 'topic_id__gt' => 0, 'topic_id__in' => array_keys($topics)))
->distinct('topic_id');
$times = $times $times = $times
->values('topic_id') ->values('topic_id')
->filter(array('topic_id__gt' => 0)); ->filter(array('topic_id__gt' => 0));
...@@ -240,7 +242,8 @@ class OverviewReport { ...@@ -240,7 +242,8 @@ class OverviewReport {
$staff = Staff::getStaffMembers(); $staff = Staff::getStaffMembers();
$stats = $stats $stats = $stats
->values('staff_id', 'staff__firstname', 'staff__lastname') ->values('staff_id', 'staff__firstname', 'staff__lastname')
->filter(array('staff_id__in' => array_keys($staff))); ->filter(array('staff_id__in' => array_keys($staff)))
->distinct('staff_id');
$times = $times->values('staff_id'); $times = $times->values('staff_id');
$depts = $thisstaff->getManagedDepartments(); $depts = $thisstaff->getManagedDepartments();
if ($thisstaff->hasPerm(ReportModel::PERM_AGENTS)) if ($thisstaff->hasPerm(ReportModel::PERM_AGENTS))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment