add new role functionality

This commit is contained in:
Saufi
2026-05-11 12:29:11 +08:00
parent a300eced76
commit eaf0ba7a4d
7 changed files with 176 additions and 4 deletions

View File

@@ -1,12 +1,29 @@
<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('Roles') }}
</h2>
<div class="flex items-center justify-between">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('Roles') }}
</h2>
<a href="{{ route('roles.create') }}">
<x-primary-button>{{ __('New Role') }}</x-primary-button>
</a>
</div>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@if (session('status') === 'role-created')
<div
x-data="{ show: true }"
x-show="show"
x-transition
x-init="setTimeout(() => show = false, 3000)"
class="mb-4 p-4 bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 text-sm rounded-lg"
>
{{ __('Role created successfully.') }}
</div>
@endif
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
<div
class="p-6"