Bug fix ticket listing

Agents are not able to view their tickets since last release due to a call to a model which does not exist.
This commit is contained in:
Manish Verma
2018-09-18 15:01:31 +05:30
committed by Manish Verma
parent dc09774235
commit 8894a5bdb0

View File

@@ -399,7 +399,7 @@ class FilterController extends Controller
{
if (Auth::user()->role == 'agent') {
$id = Auth::user()->id;
$dept = DepartmentAssignAgents::where('agent_id', '=', $id)->pluck('department_id')->toArray();
$dept[] =Auth::user()->primary_dpt;
$table = $table->where(function ($query) use ($dept) {
$query->whereIn('tickets.dept_id', $dept)
->orWhere('assigned_to', '=', Auth::user()->id);