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 @@ +
+
+

Bem Vindo ao PAD

+
+
+

+ + Atividades pendentes do Avaliador +

+
+
+ @foreach($userPads as $userPad) +
+
+ +

+ +
PAD: {{ $userPad->pad->nome }}
+
Status: {{ $userPad->pad->statusAsString() }}
+ +
+
+ @endforeach +
+
+ +
+
+

Dimenções-PAD

+
+
+
+
+
Special title treatment
+

With supporting text below as a natural lead-in to additional content.

+ Go somewhere +
+
+
+
+
Special title treatment
+

With supporting text below as a natural lead-in to additional content.

+
+
+
+
+
Special title treatment
+

With supporting text below as a natural lead-in to additional content.

+ Go somewhere +
+
+
+
diff --git a/resources/views/layouts/user-navigation/navigation_avaliador.blade.php b/resources/views/layouts/user-navigation/navigation_avaliador.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..99367b6b4d5cd0dadee2210c4be3501e391794d2 --- /dev/null +++ b/resources/views/layouts/user-navigation/navigation_avaliador.blade.php @@ -0,0 +1,35 @@ + + diff --git a/resources/views/pad/avaliacao/dimensao/ensino.blade.php b/resources/views/pad/avaliacao/dimensao/ensino.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..1eae3513a25f3c2366cd198f8f28bc318cdece2f --- /dev/null +++ b/resources/views/pad/avaliacao/dimensao/ensino.blade.php @@ -0,0 +1,78 @@ +@extends('layouts.main') + +@section('title', 'Ensino') +@section('header') + @include('layouts.header', [ + 'user' => Auth::user(), + ]) +@endsection +@section('nav') + @include('layouts.navigation', [ + 'index_menu' => $index_menu, + ]) +@endsection +@section('body') +
+ +

Professor 1 - Ensino

+ +
+
Cód. Atividade - 1-A
+
+ Componente Curricular: Programação II
+ Curso: Computação
+ Nível: Pós-graduação Stricto Sensu
+ Modalidade: Presencial
+ Resolução: Aula na graduação e/ou pós-graduação stricto sensu
+ CH. Semanal: 6 horas
+ + +
+ @include('components.buttons.btn-reprovar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Reprovar', + 'id' => '', + ]) +    + @include('components.buttons.btn-aprovar', [ + 'route' => route('avaliador_avaliar'), + 'class' => 'ml-2', + 'content' => 'Aprovar', + 'id' => '', + ]) + +
+
+
+
+
Cód. Atividade - 1-B
+
+ Componente Curricular: Computação Gráfica
+ Curso: Computação
+ Nível: Pós-graduação Stricto Sensu
+ Modalidade: Presencial
+ Resolução: Aula na graduação e/ou pós-graduação stricto sensu
+ CH. Semanal: 4 horas
+ + +
+ @include('components.buttons.btn-reprovar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Reprovar', + 'id' => '', + ]) +    + @include('components.buttons.btn-aprovar', [ + 'route' => route('avaliador_avaliar'), + 'class' => 'ml-2', + 'content' => 'Aprovar', + 'id' => '', + ]) + +
+
+
+
+@endsection diff --git a/resources/views/pad/avaliacao/dimensao/extensao.blade.php b/resources/views/pad/avaliacao/dimensao/extensao.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..dcb502fe11fa419135764832de60462e60eefc8e --- /dev/null +++ b/resources/views/pad/avaliacao/dimensao/extensao.blade.php @@ -0,0 +1 @@ +extensao \ No newline at end of file diff --git a/resources/views/pad/avaliacao/dimensao/gestao.blade.php b/resources/views/pad/avaliacao/dimensao/gestao.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..2fe6ae79e51480c121b5420cbbb5a94e951604d2 --- /dev/null +++ b/resources/views/pad/avaliacao/dimensao/gestao.blade.php @@ -0,0 +1 @@ +gestao \ No newline at end of file diff --git a/resources/views/pad/avaliacao/dimensao/pesquisa.blade.php b/resources/views/pad/avaliacao/dimensao/pesquisa.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..b892994ab8daab363dd638a9cd5a535c779ef358 --- /dev/null +++ b/resources/views/pad/avaliacao/dimensao/pesquisa.blade.php @@ -0,0 +1,38 @@ +@extends('layouts.main') + +@section('title', 'Pesquisa') +@section('header') + @include('layouts.header', [ + 'user' => Auth::user(), + ]) +@endsection +@section('nav') + @include('layouts.navigation', [ + 'index_menu' => $index_menu, + ]) +@endsection +@section('body') +
+ + @include('pad.components.templates.dropdown-eixo', ['divs' => $divs]) + + @include('components.alerts') + + @include('pad.components.templates.dimensao.pesquisa.coordenacao.form_create', ['user_pad_id' => $user_pad_id]) + + @include('pad.components.templates.dimensao.pesquisa.lideranca.form_create', ['user_pad_id' => $user_pad_id]) + + @include('pad.components.templates.dimensao.pesquisa.orientacao.form_create', ['user_pad_id' => $user_pad_id]) + + @include('components.modal', ['size' => 'modal-lg']) +
+@endsection + +@section('scripts') + + @include('pad.components.scripts.dropdown-eixo', ['divs' => $divs]) + @include('pad.components.scripts.dimensao.pesquisa.general') + + @include('pad.components.scripts.dimensao.pesquisa.coordenacao') + +@endsection diff --git a/resources/views/pad/avaliacao/index.blade.php b/resources/views/pad/avaliacao/index.blade.php index 3469a7e6ef59b150c3650d9c4c6f25973d7ffa06..c7a7119ffec5e8c18e9376910279b21e5f8c9f27 100644 --- a/resources/views/pad/avaliacao/index.blade.php +++ b/resources/views/pad/avaliacao/index.blade.php @@ -15,12 +15,7 @@ @include('components.alerts')

PADs

- @include('components.buttons.btn-create', [ - 'route' => route('campus_create'), - 'class' => '', - 'content' => 'Novo Campus', - 'id' => '', - ]) +
@@ -28,13 +23,223 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- @foreach ($campus as $camp) 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') + +
+ +
+
+

+

Ensino

+ +
+
+ +
+
+

+

Pesquisa

+ +
+
+ +
+
+

+

Extensão

+ +
+
+ +
+
+

+

Gestão

+ +
+
+ +
+
+

+

Anexo

+ +
+
+
+@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');
NomeUnidadeAçõesProfessorDimensãoOpções
Professor 1Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 2Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 3Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 4Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 5Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 6Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 7Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 8Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 9Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 10Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 11Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 12Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 13Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 14Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
Professor 17Ensino + + @include('components.buttons.btn-avaliar', [ + 'route' => route('avaliador_avaliar'), + 'class' => '', + 'content' => 'Avaliar', + 'id' => '', + ]) +
{{ $camp->name }}