diff --git a/app/Http/Controllers/AvaliadorController.php b/app/Http/Controllers/AvaliadorController.php index c0c6c582c941d9683e9f353e6f681f2532a12144..e06bbe6caabebcbceddd15c7f207a5db8717b7c3 100644 --- a/app/Http/Controllers/AvaliadorController.php +++ b/app/Http/Controllers/AvaliadorController.php @@ -1,9 +1,12 @@ isTypeTeacher())->get(); + return view('pad.avaliacao.index', [ + 'index_menu' => MenuItemsAvaliador::PADs, + 'professores' => null + ]); + } + public function avaliar() + { + // $professores = User::where('type', '=', User::->isTypeTeacher())->get(); + return view('pad.avaliacao.dimensao.ensino', [ + 'index_menu' => MenuItemsAvaliador::PADs, + 'user_pad_id' => 1 + ]); } /** diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index e5802f258915a94e4a9fcaf09901966e1deec20c..e96e4eb554527b32eb4649e3b9675f31206af1ae 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -45,6 +45,17 @@ class DashboardController extends Controller return view('dashboard', ['PADs' => PAD::all(), 'menu_index'=> 0]); } + if($user->isTypeEvaluator()) + { + $userPads = + UserPad::initQuery() + ->whereUser($user->id) + ->wherePadStatus(Status::ATIVO) + ->get(); + + return view('dashboard', ['userPads' => $userPads, 'menu_index'=> MenuItemsTeacher::HOME]); + } + //return redirect()->route('login'); } } diff --git a/app/Models/User.php b/app/Models/User.php index 390109ae254a2cc97ed085ae72b0b84fb723f50a..0daa08ac46bf5f67282c26483ba6a351583a3fbf 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -137,6 +137,14 @@ class User extends Authenticatable return $this->perfilSelected()->type === UserType::COORDINATOR; } + /** + * @return bool + */ + public function isTypeEvaluator() + { + return $this->perfilSelected()->type === UserType::EVALUATOR; + } + public static function initQuery() { return new UserQuery(get_called_class()); diff --git a/app/Models/UserType.php b/app/Models/UserType.php index 1ab438200c88855cfe6fb876b54f5f9c8ff0b3cb..6fee359c6d7a00b517ebcabf6471c1b6b3776dff 100644 --- a/app/Models/UserType.php +++ b/app/Models/UserType.php @@ -13,6 +13,7 @@ class UserType extends Model const TEACHER = 2; // Professor const DIRECTOR= 3; // Diretor const COORDINATOR = 4; // Coordenador + const EVALUATOR = 5; // Avaliador protected $table = 'user_type'; @@ -43,11 +44,11 @@ class UserType extends Model $values = [ self::ADMIN => 'Administrador', self::TEACHER => 'Professor', - self::DIRECTOR=> 'Diretor', + self::DIRECTOR => 'Diretor', self::COORDINATOR => 'Coordenador', + self::EVALUATOR => 'Evaluator', ]; return $value !== null? $values[$value] : $values; } - } diff --git a/app/Models/Util/MenuItemsAvaliador.php b/app/Models/Util/MenuItemsAvaliador.php new file mode 100644 index 0000000000000000000000000000000000000000..f2520808d16e72690a0070355633aaa31cced725 --- /dev/null +++ b/app/Models/Util/MenuItemsAvaliador.php @@ -0,0 +1,10 @@ + '', + 'route' => '', + 'content' => '' + ]) +--}} + + + {{-- --}} + {{$content}} + diff --git a/resources/views/components/buttons/btn-avaliar.blade.php b/resources/views/components/buttons/btn-avaliar.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..eb7c2bbdc79eded1bd5e0d839cf2c3f8e6462dcd --- /dev/null +++ b/resources/views/components/buttons/btn-avaliar.blade.php @@ -0,0 +1,12 @@ +{{-- + @include('components.buttons.btn-create', [ + 'id' => '', + 'route' => '', + 'content' => '' + ]) +--}} + + + {{-- --}} + {{$content}} + diff --git a/resources/views/components/buttons/btn-reprovar.blade.php b/resources/views/components/buttons/btn-reprovar.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..2010d579268ac7024cc85585f43fc84c98ab5d78 --- /dev/null +++ b/resources/views/components/buttons/btn-reprovar.blade.php @@ -0,0 +1,12 @@ +{{-- + @include('components.buttons.btn-create', [ + 'id' => '', + 'route' => '', + 'content' => '' + ]) +--}} + + + {{-- --}} + {{$content}} + diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 98f917a6c95c577b97faecd1f7e90e736df8b52c..8c60ebb1d1b5a2639efa70dc8352be0ef04f724e 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -17,6 +17,10 @@ @if(Auth::user()->isTypeCoordinator()) @include('layouts.user-dashboard.dashboard_coordinator') @endif + + @if(Auth::user()->isTypeEvaluator()) + @include('layouts.user-dashboard.dashboard_avaliador', ['user' => Auth::user()]) + @endif diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php index 386a36a5d36d253fe2ad1465b45ed4cee057be9a..abd6b8fcb6f7f553dbfa9da119c4f0950e92fb0a 100644 --- a/resources/views/layouts/navigation.blade.php +++ b/resources/views/layouts/navigation.blade.php @@ -33,4 +33,9 @@ @include('layouts.user-navigation.navigation_coordinator') @endif + + @if (Auth::user()->isTypeEvaluator()) + @include('layouts.user-navigation.navigation_avaliador') + @endif + diff --git a/resources/views/layouts/user-dashboard/dashboard_avaliador.blade.php b/resources/views/layouts/user-dashboard/dashboard_avaliador.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..fc4702ba5517846565014c233b096ce063a462cd --- /dev/null +++ b/resources/views/layouts/user-dashboard/dashboard_avaliador.blade.php @@ -0,0 +1,54 @@ +
With supporting text below as a natural lead-in to additional content.
+ Go somewhere +With supporting text below as a natural lead-in to additional content.
+With supporting text below as a natural lead-in to additional content.
+ Go somewhere +Nome | -Unidade | -Ações | +Professor | +Dimensão | +Opções |
---|---|---|---|---|---|
Professor 1 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 2 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 3 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 4 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 5 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 6 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 7 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 8 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 9 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 10 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 11 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 12 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 13 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 14 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
Professor 17 | +Ensino | ++ + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) + | +|||
{{ $camp->name }} | diff --git a/resources/views/pad/avaliacao/view.blade.php b/resources/views/pad/avaliacao/view.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..0692f6ae06f954963a3b639e91f8e4a0d5cb90e8 --- /dev/null +++ b/resources/views/pad/avaliacao/view.blade.php @@ -0,0 +1,62 @@ +@extends('layouts.main') + +@php + use App\Models\Tabelas\Constants; +@endphp + +@section('title', 'Unidade') +@section('header') + @include('layouts.header', [ + 'user' => Auth::user(), + ]) +@endsection +@section('nav') + @include('layouts.navigation', [ + 'index_menu' => $index_menu, + ]) +@endsection +@section('body') + + +@endsection diff --git a/routes/web.php b/routes/web.php index 65563dc4c41fb7153c2dff868dbaf36a0e599198..2a4d662b88955b742400e54c7d06ea0d2f3a1a0a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -114,6 +114,7 @@ Route::prefix('/professor')->group(function () { Route::prefix('/avaliador')->group(function () { Route::get('/index', [AvaliadorController::class, 'index'])->name('avaliador_index'); + Route::get('/avaliar', [AvaliadorController::class, 'avaliar'])->name('avaliador_avaliar'); Route::get('/create', [AvaliadorController::class, 'create'])->name('avaliador_create'); Route::post('/store', [AvaliadorController::class, 'store'])->name('avaliador_store'); Route::get('/edit/{id}', [AvaliadorController::class, 'edit'])->name('avaliador_edit');