taklimat ulangan+profil

This commit is contained in:
Saufi
2026-07-04 14:45:16 +08:00
parent e803f55b80
commit 0c134b9038
24 changed files with 2375 additions and 34 deletions

View File

@@ -13,8 +13,20 @@
Kehadiran Taklimat SPR 2026
</a>
@auth
@php
$labelPeranan = match (auth()->user()->role) {
'admin' => 'Admin',
'pengurus' => 'Pengurus DUN',
'kaunter' => 'Kaunter',
default => auth()->user()->role,
};
@endphp
<div class="pengguna">
<span>{{ auth()->user()->name }} ({{ auth()->user()->role === 'admin' ? 'Admin' : 'Pengurus DUN' }})</span>
@if (auth()->user()->isAdmin() || auth()->user()->isPengurus())
<a href="{{ route('pengguna.index') }}">Pengguna</a>
@endif
<a href="{{ route('profil.edit') }}">Profil</a>
<span>{{ auth()->user()->name }} ({{ $labelPeranan }})</span>
<form method="POST" action="{{ route('logout') }}" style="margin:0">
@csrf
<button type="submit" class="btn btn-kecil btn-merah">Log Keluar</button>