Skip to content

Commit

Permalink
fix bug personel cabang
Browse files Browse the repository at this point in the history
  • Loading branch information
punkestu committed Nov 24, 2024
1 parent 59a3688 commit 7cca20c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/PersonelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function search_by_nik(Request $request)
public function cabang(Request $request, $id)
{
$page = request()->get('page', 0);
$tab = request()->get('tab', 'ATC');
$limit = 100;
$jabatan = PersonelJabatanCategory::all()->groupBy('category');
$jabatan = $jabatan->map(function ($jabatan) {
Expand Down
5 changes: 3 additions & 2 deletions resources/views/personel/cabang.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
</table>
</div>
<div class="flex justify-between px-4 py-2">
<a @if ($page > 0) href="?page={{ $page - 1 }}" @endif>Back</a>
<a href="?page={{ $page + 1 }}">Next</a>
<a
@if ($page > 0) href="?tab={{ $tab }}&page={{ $page - 1 }}" @endif>Back</a>
<a href="?tab={{ $tab }}&page={{ $page + 1 }}">Next</a>
</div>
</div>
</section>
Expand Down

0 comments on commit 7cca20c

Please sign in to comment.