Marker for head director on admin users page
This commit is contained in:
parent
6e2b894712
commit
4fe7251a4f
|
|
@ -23,7 +23,7 @@ class UserController extends Controller
|
||||||
if (! Auth::user()->is_admin) {
|
if (! Auth::user()->is_admin) {
|
||||||
abort(403);
|
abort(403);
|
||||||
}
|
}
|
||||||
$users = User::with('school')->orderBy('last_name')->orderBy('first_name')->get();
|
$users = User::with('school')->with('flags')->orderBy('last_name')->orderBy('first_name')->get();
|
||||||
|
|
||||||
return view('admin.users.index', ['users' => $users]);
|
return view('admin.users.index', ['users' => $users]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<x-card.card>
|
<x-card.card>
|
||||||
<x-table.table with_title_area>
|
<x-table.table with_title_area>
|
||||||
<x-slot:title class="ml-3">Users</x-slot:title>
|
<x-slot:title class="ml-3">Users</x-slot:title>
|
||||||
<x-slot:subtitle class="ml-3">Click name to edit or delete</x-slot:subtitle>
|
<x-slot:subtitle class="ml-3">Click name to edit or delete<br>(*) Head Director</x-slot:subtitle>
|
||||||
<x-slot:title_block_right class="mr-3">
|
<x-slot:title_block_right class="mr-3">
|
||||||
<x-form.button href="{{ route('admin.users.create') }}">New User</x-form.button>
|
<x-form.button href="{{ route('admin.users.create') }}">New User</x-form.button>
|
||||||
</x-slot:title_block_right>
|
</x-slot:title_block_right>
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<x-table.body>
|
<x-table.body>
|
||||||
@foreach($users as $user)
|
@foreach($users as $user)
|
||||||
<tr class="hover:bg-gray-50">
|
<tr class="hover:bg-gray-50">
|
||||||
<x-table.td><a href="{{ route('admin.users.edit',$user) }}">{{ $user->full_name(true) }}</a></x-table.td>
|
<x-table.td><a href="{{ route('admin.users.edit',$user) }}">{{ $user->full_name(true) }}</a>{{ $user->hasFlag('head_director') ? ' *':'' }}</x-table.td>
|
||||||
<x-table.td>{{ $user->has_school() ? $user->school->name : ' ' }}</x-table.td>
|
<x-table.td>{{ $user->has_school() ? $user->school->name : ' ' }}</x-table.td>
|
||||||
<x-table.td>{{ $user->email }}</x-table.td>
|
<x-table.td>{{ $user->email }}</x-table.td>
|
||||||
<x-table.td>{{ $user->cell_phone }}</x-table.td>
|
<x-table.td>{{ $user->cell_phone }}</x-table.td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue