Fix get-new-tickets empty list error
This commit is contained in:
parent
60036873b0
commit
761c3e4792
|
@ -42,13 +42,18 @@ class GetNewTicketsStaffController extends Controller {
|
|||
];
|
||||
}
|
||||
public function handler() {
|
||||
$page = Controller::request('page');
|
||||
|
||||
if (Ticket::isTableEmpty()) {
|
||||
Response::respondSuccess([]);
|
||||
Response::respondSuccess([
|
||||
'tickets' => [],
|
||||
'page' => $page,
|
||||
'pages' => 0
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$user = Controller::getLoggedUser();
|
||||
$page = Controller::request('page');
|
||||
|
||||
$query = ' (';
|
||||
foreach ($user->sharedDepartmentList as $department) {
|
||||
|
|
Loading…
Reference in New Issue