Hide student and entry menus if current user does not have a school. Hint on profile page that they should get a school
This commit is contained in:
parent
c6eb511146
commit
6e0d0cb27a
|
|
@ -1,4 +1,4 @@
|
||||||
@props(['active' => false])
|
@props(['active' => false, 'slot'])
|
||||||
@php($classes = $active ? 'bg-indigo-700' : 'hover:bg-indigo-500 hover:bg-opacity-75')
|
@php($classes = $active ? 'bg-indigo-700' : 'hover:bg-indigo-500 hover:bg-opacity-75')
|
||||||
@php($classes .= ' text-white rounded-md px-3 py-2 text-sm font-medium')
|
@php($classes .= ' text-white rounded-md px-3 py-2 text-sm font-medium')
|
||||||
<a {{ $attributes->merge(['class' => $classes]) }}
|
<a {{ $attributes->merge(['class' => $classes]) }}
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,12 @@
|
||||||
<div class="ml-10 flex items-baseline space-x-4">
|
<div class="ml-10 flex items-baseline space-x-4">
|
||||||
<x-layout.navbar.nav-link href="/dashboard" :active="request()->is('dashboard')">Dashboard
|
<x-layout.navbar.nav-link href="/dashboard" :active="request()->is('dashboard')">Dashboard
|
||||||
</x-layout.navbar.nav-link>
|
</x-layout.navbar.nav-link>
|
||||||
|
@if(Auth::user()->school_id)
|
||||||
<x-layout.navbar.nav-link href="/students" :active="request()->is('students')">Students
|
<x-layout.navbar.nav-link href="/students" :active="request()->is('students')">Students
|
||||||
</x-layout.navbar.nav-link>
|
</x-layout.navbar.nav-link>
|
||||||
<x-layout.navbar.nav-link href="/entries" :active="request()->is('entries')">Entries
|
<x-layout.navbar.nav-link href="/entries" :active="request()->is('entries')">Entries
|
||||||
</x-layout.navbar.nav-link>
|
</x-layout.navbar.nav-link>
|
||||||
|
@endif
|
||||||
@if(Auth::user()->isJudge() AND Settings::get('judging_enabled'))
|
@if(Auth::user()->isJudge() AND Settings::get('judging_enabled'))
|
||||||
<x-layout.navbar.nav-link href="/judging" :active="request()->is('judging')">Judging
|
<x-layout.navbar.nav-link href="/judging" :active="request()->is('judging')">Judging
|
||||||
</x-layout.navbar.nav-link>
|
</x-layout.navbar.nav-link>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
|
@php use Illuminate\Support\Facades\Auth; @endphp
|
||||||
<x-layout.app>
|
<x-layout.app>
|
||||||
<x-slot:page_title>Dashboard</x-slot:page_title>
|
<x-slot:page_title>Dashboard</x-slot:page_title>
|
||||||
|
@if(! Auth::user()->school_id)
|
||||||
|
You aren't currently associated with a school. <a href="/my_school" class="text-blue-600">Click here to choose or create one.</a>
|
||||||
|
@endif
|
||||||
</x-layout.app>
|
</x-layout.app>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue