add: Seperate dashboards for all types of users

This commit is contained in:
Sallu9007
2025-01-26 01:49:34 +05:30
parent 9ad7f0939c
commit 7cd4a4c642
13 changed files with 262 additions and 9 deletions

View File

@@ -0,0 +1,23 @@
@extends('layouts.app')
@section('header')
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
Admin Dashboard
</h2>
@endsection
@section('content')
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 text-gray-900">
Welcome, Admin! Here you can manage roles, users, and departments.
</div>
</div>
<div class="mt-6">
<a href="{{ route('roles.index') }}" class="text-blue-500 underline">Manage Roles</a><br>
<a href="{{ route('departments.index') }}" class="text-blue-500 underline">Manage Departments</a><br>
<a href="{{ route('users.index') }}" class="text-blue-500 underline">Manage Users</a><br>
<a href="{{ route('profile.edit') }}" class="text-blue-500 underline">Edit Profile</a>
</div>
</div>
@endsection

View File

@@ -0,0 +1,22 @@
@extends('layouts.app')
@section('header')
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
Coordinator Dashboard
</h2>
@endsection
@section('content')
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 text-gray-900">
Welcome, Coordinator! Manage department-related tasks here.
</div>
</div>
<div class="mt-6">
<a href="{{ route('departments.index') }}" class="text-blue-500 underline">View Departments</a><br>
<a href="{{ route('users.index') }}" class="text-blue-500 underline">View Faculty</a><br>
<a href="{{ route('profile.edit') }}" class="text-blue-500 underline">Edit Profile</a>
</div>
</div>
@endsection

View File

@@ -0,0 +1,20 @@
@extends('layouts.app')
@section('header')
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
Faculty Dashboard
</h2>
@endsection
@section('content')
<div class="max-w-7xl mx-auto pt-3 sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 text-gray-900">
Welcome, Faculty! Manage your tasks and profile here.
</div>
</div>
<div class="mt-6">
<a href="{{ route('profile.edit') }}" class="text-blue-500 underline">Edit Profile</a>
</div>
</div>
@endsection

View File

@@ -19,17 +19,17 @@
@include('layouts.navigation')
<!-- Page Heading -->
@isset($header)
@hasSection('header')
<header class="bg-white shadow">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
{{ $header }}
@yield('header')
</div>
</header>
@endisset
@endif
<!-- Page Content -->
<main>
{{ $slot }}
@yield('content')
</main>
</div>
</body>

View File

@@ -15,6 +15,28 @@
<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')
<x-nav-link :href="route('admin.responses')" :active="request()->routeIs('admin.responses')">
{{ __('View Form Responses') }}
</x-nav-link>
@endcan
@can('isCoordinator')
<x-nav-link :href="route('coordinator.responses')" :active="request()->routeIs('coordinator.responses')">
{{ __('View Form Responses') }}
</x-nav-link>
@endcan
@can('isFaculty')
<x-nav-link :href="route('faculty.responseForm')" :active="request()->routeIs('faculty.responseForm')">
{{ __('Respond to a Form') }}
</x-nav-link>
@endcan
</div>
</div>
@@ -70,6 +92,25 @@
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
{{ __('Dashboard') }}
</x-responsive-nav-link>
<!-- Role-specific Links -->
@can('isAdmin')
<x-responsive-nav-link :href="route('admin.responses')" :active="request()->routeIs('admin.responses')">
{{ __('View Form Responses') }}
</x-responsive-nav-link>
@endcan
@can('isCoordinator')
<x-responsive-nav-link :href="route('coordinator.responses')" :active="request()->routeIs('coordinator.responses')">
{{ __('View Form Responses') }}
</x-responsive-nav-link>
@endcan
@can('isFaculty')
<x-responsive-nav-link :href="route('faculty.responseForm')" :active="request()->routeIs('faculty.responseForm')">
{{ __('Respond to a Form') }}
</x-responsive-nav-link>
@endcan
</div>
<!-- Responsive Settings Options -->