#bug-fix-patch-11

# Showing correct ticket count and correct message in ticket listing
pages
# removed "my tickets" tab form top bar as it's already in sidebar
This commit is contained in:
Manish Verma
2016-12-27 16:19:08 +05:30
parent 8fefca286f
commit 5ea755fb55
14 changed files with 42 additions and 74 deletions

View File

@@ -48,23 +48,14 @@ class="active"
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->get());
} else {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->where('dept_id', '=', $dept->id)->get());
$todaytickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->where('dept_id', '=', $dept->id)->count();
}
?>
<!-- //no need -->
<?php
$date_time_format = UTC::getDateTimeFormat();
if (Auth::user()->role == 'agent') {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.open') !!} </h3> <small id="title_refresh">{!! $todaytickets !!} {!! Lang::get('lang.tickets') !!}</small>
<h3 class="box-title">{!! Lang::get('lang.duetoday') !!} </h3> <small id="title_refresh">{!! $todaytickets !!} {!! Lang::get('lang.tickets') !!}</small>
<div class="box-tools pull-right">
<div class="has-feedback">
</div>