taklimat ulangan+profil
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user