feat: navigation
This commit is contained in:
@@ -15,28 +15,21 @@
|
||||
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||
{{ __('Dashboard') }}
|
||||
</x-nav-link>
|
||||
|
||||
<!-- <x-nav-link :href="route('admin.responses')" :active="request()->routeIs('admin.responses')">
|
||||
{{ __('View Form Responses') }}
|
||||
</x-nav-link> -->
|
||||
<!-- Role-specific Links -->
|
||||
@can('isAdmin')
|
||||
|
||||
<!-- Role-specific Links using direct role checks -->
|
||||
@if(auth()->user()->role->name === 'Admin')
|
||||
<x-nav-link :href="route('admin.responses')" :active="request()->routeIs('admin.responses')">
|
||||
{{ __('View Form Responses') }}
|
||||
{{ __('Activities Attended') }}
|
||||
</x-nav-link>
|
||||
@endcan
|
||||
|
||||
@can('isCoordinator')
|
||||
@elseif(auth()->user()->role->name === 'Coordinator')
|
||||
<x-nav-link :href="route('coordinator.responses')" :active="request()->routeIs('coordinator.responses')">
|
||||
{{ __('View Form Responses') }}
|
||||
{{ __('Activities Attended') }}
|
||||
</x-nav-link>
|
||||
@endcan
|
||||
|
||||
@can('isFaculty')
|
||||
@elseif(auth()->user()->role->name === 'Faculty')
|
||||
<x-nav-link :href="route('faculty.responseForm')" :active="request()->routeIs('faculty.responseForm')">
|
||||
{{ __('Respond to a Form') }}
|
||||
{{ __('Activities Attended') }}
|
||||
</x-nav-link>
|
||||
@endcan
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,8 +58,7 @@
|
||||
@csrf
|
||||
|
||||
<x-dropdown-link :href="route('logout')"
|
||||
onclick="event.preventDefault();
|
||||
this.closest('form').submit();">
|
||||
onclick="event.preventDefault(); this.closest('form').submit();">
|
||||
{{ __('Log Out') }}
|
||||
</x-dropdown-link>
|
||||
</form>
|
||||
@@ -93,24 +85,20 @@
|
||||
{{ __('Dashboard') }}
|
||||
</x-responsive-nav-link>
|
||||
|
||||
<!-- Role-specific Links -->
|
||||
@can('isAdmin')
|
||||
<!-- Role-specific Links using direct role checks -->
|
||||
@if(auth()->user()->role->name === 'Admin')
|
||||
<x-responsive-nav-link :href="route('admin.responses')" :active="request()->routeIs('admin.responses')">
|
||||
{{ __('View Form Responses') }}
|
||||
{{ __('Activities Attended') }}
|
||||
</x-responsive-nav-link>
|
||||
@endcan
|
||||
|
||||
@can('isCoordinator')
|
||||
@elseif(auth()->user()->role->name === 'Coordinator')
|
||||
<x-responsive-nav-link :href="route('coordinator.responses')" :active="request()->routeIs('coordinator.responses')">
|
||||
{{ __('View Form Responses') }}
|
||||
{{ __('Activities Attended') }}
|
||||
</x-responsive-nav-link>
|
||||
@endcan
|
||||
|
||||
@can('isFaculty')
|
||||
@elseif(auth()->user()->role->name === 'Faculty')
|
||||
<x-responsive-nav-link :href="route('faculty.responseForm')" :active="request()->routeIs('faculty.responseForm')">
|
||||
{{ __('Respond to a Form') }}
|
||||
{{ __('Activities Attended') }}
|
||||
</x-responsive-nav-link>
|
||||
@endcan
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Responsive Settings Options -->
|
||||
@@ -130,8 +118,7 @@
|
||||
@csrf
|
||||
|
||||
<x-responsive-nav-link :href="route('logout')"
|
||||
onclick="event.preventDefault();
|
||||
this.closest('form').submit();">
|
||||
onclick="event.preventDefault(); this.closest('form').submit();">
|
||||
{{ __('Log Out') }}
|
||||
</x-responsive-nav-link>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user