From a6ae2657b4ffbc533bfa387d91561788656b227b Mon Sep 17 00:00:00 2001 From: Muhammed Can Date: Wed, 18 Sep 2024 21:55:33 +0300 Subject: [PATCH] Pagination is added. --- .../Controllers/Agent/helpdesk/Filter/FilterController.php | 5 ++++- resources/views/vendor/Chumper/tickets-javascript.blade.php | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Agent/helpdesk/Filter/FilterController.php b/app/Http/Controllers/Agent/helpdesk/Filter/FilterController.php index 849c3cef9d..9679a07123 100644 --- a/app/Http/Controllers/Agent/helpdesk/Filter/FilterController.php +++ b/app/Http/Controllers/Agent/helpdesk/Filter/FilterController.php @@ -1033,7 +1033,10 @@ public function formatUserTickets($segment) $table = $table->where('team_id', '=', $convert_to_array[2]); } - return $table->whereIn('tickets.status', getStatusArray($convert_to_array[3])); + $table->whereIn('tickets.status', getStatusArray($convert_to_array[3])); + + //paginate + return $table->paginate(10); } /** diff --git a/resources/views/vendor/Chumper/tickets-javascript.blade.php b/resources/views/vendor/Chumper/tickets-javascript.blade.php index 27d98a477e..bbb076d9f6 100755 --- a/resources/views/vendor/Chumper/tickets-javascript.blade.php +++ b/resources/views/vendor/Chumper/tickets-javascript.blade.php @@ -84,8 +84,11 @@ function myFunction() } }, "lengthMenu": [[10, 25, 50, 100, 500], [10, 25, 50, 100, 500]], + "serverSide": true, + "processing": true, "ajax": { url: "{{url('get-filtered-tickets')}}", + async: true, data: function (d) { d.options = "{{$inputs}}"; }