Penambahan Akses Laman Dosen dab perbaikan fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{-- Pemilih peran di bilah atas: menampilkan peran aktif; menu hanya berisi daftar peran milik akun (prototipe: peralihan belum aktif). --}}
|
||||
{{-- Pemilih peran di bilah atas: peran aktif dan daftar peran milik akun. Akun DB lama beralih sungguhan (POST peran.ganti); akun demo masih prototipe. --}}
|
||||
@props(['user'])
|
||||
|
||||
@php
|
||||
@@ -31,6 +31,16 @@
|
||||
<span class="role-switch__item-text">{{ $role->label() }}</span>
|
||||
<x-heroicon-s-check class="role-switch__check" />
|
||||
</span>
|
||||
@elseif ($user instanceof \App\Models\Legacy\Account)
|
||||
{{-- Akun DB lama: peralihan sungguhan; peran baru dipakai setelah halaman dimuat ulang. --}}
|
||||
<form method="POST" action="{{ route('peran.ganti') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="role" value="{{ $role->value }}">
|
||||
<button type="submit" class="role-switch__item" data-no-busy>
|
||||
<x-dynamic-component :component="'heroicon-o-'.$role->roleIcon()" class="role-switch__icon" />
|
||||
<span class="role-switch__item-text">{{ $role->label() }}</span>
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user