update v 1.0.7.5
This commit is contained in:
@@ -191,6 +191,7 @@ class ApiController extends Controller
|
||||
*/
|
||||
public function ticketReply()
|
||||
{
|
||||
//dd($this->request->all());
|
||||
try {
|
||||
$v = \Validator::make($this->request->all(), [
|
||||
'ticket_ID' => 'required|exists:tickets,id',
|
||||
@@ -302,9 +303,9 @@ class ApiController extends Controller
|
||||
// return response()->json(compact('result'));
|
||||
|
||||
$result = $this->user->join('tickets', function ($join) {
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
->where('isanswered', '=', 0)->where('status', '=', 1)->whereNull('assigned_to');
|
||||
})
|
||||
})
|
||||
->join('department', 'department.id', '=', 'tickets.dept_id')
|
||||
->join('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||
->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
|
||||
@@ -347,9 +348,9 @@ class ApiController extends Controller
|
||||
// $result = $this->model->where('assigned_to', '=', null)->where('status', '1')->orderBy('id', 'DESC')->get();
|
||||
// return response()->json(compact('result'));
|
||||
$unassigned = $this->user->join('tickets', function ($join) {
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
->whereNull('assigned_to')->where('status', '=', 1);
|
||||
})
|
||||
})
|
||||
->join('department', 'department.id', '=', 'tickets.dept_id')
|
||||
->join('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||
->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
|
||||
@@ -392,9 +393,9 @@ class ApiController extends Controller
|
||||
// return response()->json(compact('result'));
|
||||
|
||||
$result = $this->user->join('tickets', function ($join) {
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
->where('isanswered', '=', 0)->where('status', '>', 1)->where('status', '<', 4);
|
||||
})
|
||||
})
|
||||
->join('department', 'department.id', '=', 'tickets.dept_id')
|
||||
->join('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||
->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
|
||||
@@ -1019,9 +1020,9 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$trash = $this->user->join('tickets', function ($join) {
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
->where('status', '=', 5);
|
||||
})
|
||||
})
|
||||
->join('department', 'department.id', '=', 'tickets.dept_id')
|
||||
->join('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||
->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
|
||||
@@ -1070,9 +1071,9 @@ class ApiController extends Controller
|
||||
return response()->json(compact('error'));
|
||||
}
|
||||
$result = $this->user->join('tickets', function ($join) use ($id) {
|
||||
$join->on('users.id', '=', 'tickets.assigned_to')
|
||||
$join->on('users.id', '=', 'tickets.assigned_to')
|
||||
->where('user_id', '=', $id);
|
||||
})
|
||||
})
|
||||
->join('department', 'department.id', '=', 'tickets.dept_id')
|
||||
->join('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||
->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
|
||||
@@ -1121,9 +1122,9 @@ class ApiController extends Controller
|
||||
return response()->json(compact('error'));
|
||||
}
|
||||
$result = $this->user->join('tickets', function ($join) use ($id) {
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
$join->on('users.id', '=', 'tickets.user_id')
|
||||
->where('user_id', '=', $id);
|
||||
})
|
||||
})
|
||||
->join('department', 'department.id', '=', 'tickets.dept_id')
|
||||
->join('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||
->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
|
||||
|
Reference in New Issue
Block a user