updaetd to roles and permissions

This commit is contained in:
Mark Gregory
2026-08-26 10:19:58 +01:00
parent 21d7b6eba9
commit af6ebe5730
4 changed files with 118 additions and 8 deletions
@@ -55,7 +55,40 @@
</tbody>
</table>
</div>
<div class="p-4">{{ $users->links() }}</div>
<div class="flex flex-col gap-3 border-t border-zinc-800 px-6 py-4 sm:flex-row sm:items-center sm:justify-between">
<div class="text-sm text-zinc-500">
Showing
<span class="font-semibold text-zinc-300">{{ $users->firstItem() ?? 0 }}</span>
–
<span class="font-semibold text-zinc-300">{{ $users->lastItem() ?? 0 }}</span>
of
<span class="font-semibold text-zinc-300">{{ $users->total() }}</span>
</div>
<div class="flex items-center gap-2">
@if ($users->onFirstPage())
<span class="rounded-lg border border-zinc-800 px-3 py-2 text-sm text-zinc-600">Previous</span>
@else
<a href="{{ $users->previousPageUrl() }}" class="rounded-lg border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-medium text-zinc-200 hover:border-blue-500 hover:text-white">
Previous
</a>
@endif
<span class="rounded-lg bg-blue-600/15 px-3 py-2 text-sm font-semibold text-blue-300">
Page {{ $users->currentPage() }} of {{ max(1, $users->lastPage()) }}
</span>
@if ($users->hasMorePages())
<a href="{{ $users->nextPageUrl() }}" class="rounded-lg border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-medium text-zinc-200 hover:border-blue-500 hover:text-white">
Next
</a>
@else
<span class="rounded-lg border border-zinc-800 px-3 py-2 text-sm text-zinc-600">Next</span>
@endif
</div>
</div>
</section>
</div>
</x-layouts::app>
@@ -58,6 +58,40 @@
@endforelse
</tbody>
</table></div>
<div class="flex flex-col gap-3 border-t border-zinc-800 px-6 py-4 sm:flex-row sm:items-center sm:justify-between">
<div class="text-sm text-zinc-500">
Showing
<span class="font-semibold text-zinc-300">{{ $roles->firstItem() ?? 0 }}</span>
–
<span class="font-semibold text-zinc-300">{{ $roles->lastItem() ?? 0 }}</span>
of
<span class="font-semibold text-zinc-300">{{ $roles->total() }}</span>
</div>
<div class="flex items-center gap-2">
@if ($roles->onFirstPage())
<span class="rounded-lg border border-zinc-800 px-3 py-2 text-sm text-zinc-600">Previous</span>
@else
<a href="{{ $roles->previousPageUrl() }}" class="rounded-lg border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-medium text-zinc-200 hover:border-blue-500 hover:text-white">
Previous
</a>
@endif
<span class="rounded-lg bg-blue-600/15 px-3 py-2 text-sm font-semibold text-blue-300">
Page {{ $roles->currentPage() }} of {{ max(1, $roles->lastPage()) }}
</span>
@if ($roles->hasMorePages())
<a href="{{ $roles->nextPageUrl() }}" class="rounded-lg border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-medium text-zinc-200 hover:border-blue-500 hover:text-white">
Next
</a>
@else
<span class="rounded-lg border border-zinc-800 px-3 py-2 text-sm text-zinc-600">Next</span>
@endif
</div>
</div>
</section>
<section class="hd-panel overflow-hidden">
@@ -94,6 +128,40 @@
@endforelse
</tbody>
</table></div>
<div class="flex flex-col gap-3 border-t border-zinc-800 px-6 py-4 sm:flex-row sm:items-center sm:justify-between">
<div class="text-sm text-zinc-500">
Showing
<span class="font-semibold text-zinc-300">{{ $permissions->firstItem() ?? 0 }}</span>
–
<span class="font-semibold text-zinc-300">{{ $permissions->lastItem() ?? 0 }}</span>
of
<span class="font-semibold text-zinc-300">{{ $permissions->total() }}</span>
</div>
<div class="flex items-center gap-2">
@if ($permissions->onFirstPage())
<span class="rounded-lg border border-zinc-800 px-3 py-2 text-sm text-zinc-600">Previous</span>
@else
<a href="{{ $permissions->previousPageUrl() }}" class="rounded-lg border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-medium text-zinc-200 hover:border-blue-500 hover:text-white">
Previous
</a>
@endif
<span class="rounded-lg bg-blue-600/15 px-3 py-2 text-sm font-semibold text-blue-300">
Page {{ $permissions->currentPage() }} of {{ max(1, $permissions->lastPage()) }}
</span>
@if ($permissions->hasMorePages())
<a href="{{ $permissions->nextPageUrl() }}" class="rounded-lg border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-medium text-zinc-200 hover:border-blue-500 hover:text-white">
Next
</a>
@else
<span class="rounded-lg border border-zinc-800 px-3 py-2 text-sm text-zinc-600">Next</span>
@endif
</div>
</div>
</section>
</div>
</x-layouts::app>