Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
0c17c7cd
Unverified
Commit
0c17c7cd
authored
May 14, 2023
by
Alisson Albuquerque
Committed by
GitHub
May 14, 2023
Browse files
Merge pull request #10 from yuriresendematias/main
Base para os relatórios do PAD
parents
6d6fdcb4
494580dc
Changes
8
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
0c17c7cd
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
App\Models\AvaliadorPad
;
use
App\Models\Avaliacao
;
use
App\Models\Avaliacao
;
use
App\Models\User
;
use
App\Models\User
;
use
App\Models\Curso
;
use
App\Models\Curso
;
...
@@ -144,4 +145,16 @@ class AvaliadorController extends Controller
...
@@ -144,4 +145,16 @@ class AvaliadorController extends Controller
public
function
destroy
(
$id
)
public
function
destroy
(
$id
)
{
{
}
}
public
function
relatorio
(){
$menu
=
MenuItemsAvaliador
::
REPORT
;
$user
=
Auth
::
user
();
$userPads
=
AvaliadorPad
::
where
(
'user_id'
,
'='
,
$user
->
id
)
->
join
(
'pad'
,
'avaliador_pad.pad_id'
,
'='
,
'pad.id'
)
->
get
();
return
view
(
'pad.relatorio.index'
,
[
'userPads'
=>
$userPads
,
'index_menu'
=>
$menu
]);
}
}
}
app/Http/Controllers/PadController.php
View file @
0c17c7cd
...
@@ -609,4 +609,10 @@ class PadController extends Controller
...
@@ -609,4 +609,10 @@ class PadController extends Controller
return
$ch
;
return
$ch
;
}
}
public
function
relatorio
(
$id
){
$menu
=
MenuItemsAvaliador
::
REPORT
;
$pad
=
Pad
::
find
(
$id
);
return
view
(
'pad.relatorio.relatorio'
,
[
'pad'
=>
$pad
,
'index_menu'
=>
$menu
]);
}
}
}
app/Models/Util/MenuItemsAvaliador.php
View file @
0c17c7cd
...
@@ -7,4 +7,5 @@ class MenuItemsAvaliador
...
@@ -7,4 +7,5 @@ class MenuItemsAvaliador
{
{
const
HOME
=
0
;
const
HOME
=
0
;
const
PADs
=
1
;
const
PADs
=
1
;
const
REPORT
=
2
;
}
}
resources/views/components/cards/relatorio_pad.blade.php
0 → 100644
View file @
0c17c7cd
<div
class=
"card mx-2"
style=
"width: 12rem;"
>
<div
class=
"card-body"
>
<h3
class=
"text-center"
>
<i
class=
"bi bi-file-bar-graph-fill"
></i>
</h3>
<h5
class=
"text-center"
>
PAD: {{ $userPad->pad->nome }}
</h4>
<h5
class=
"text-center"
>
Status: {{ $userPad->pad->statusAsString() }}
</h4>
<a
class=
"stretched-link"
href=
"{{ route('pad_relatório', ['id' => $userPad->id]) }}"
></a>
</div>
</div>
resources/views/layouts/user-navigation/navigation_avaliador.blade.php
View file @
0c17c7cd
<!-- Botoes link lista vertical sidebarMenu -->
@
php
use
App\Models\Util\MenuItemsAvaliador
;
if
(
!
isset
(
$index_menu
))
{
$index_menu
=
MenuItemsAvaliador
::
HOME
;
}
$home_active
=
$index_menu
===
MenuItemsAvaliador
::
HOME
?
'active'
:
''
;
$report_active
=
$index_menu
===
MenuItemsAvaliador
::
REPORT
?
'active'
:
''
;
@
endphp
<!--
SidebarMenu
:
Vertical
Options
-->
<
ul
class
=
"nav flex-column nav-pills"
id
=
"myTab"
role
=
"tablist"
aria
-
orientation
=
"vertical"
>
<
ul
class
=
"nav flex-column nav-pills"
id
=
"myTab"
role
=
"tablist"
aria
-
orientation
=
"vertical"
>
<
li
class
=
"nav-item"
>
<
li
class
=
"nav-item"
>
<a
class=
"custom-nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 0? "
active
"
:
"")
}}"
href=
"{{ route('dashboard') }}"
<
a
href
=
"{{ route('dashboard') }}"
class
=
"custom-nav-link {{
$home_active
}}"
>
aria-selected=
"true"
>
<
i
class
=
"bi bi-house-fill"
></
i
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-house-fill"
viewBox=
"0 0 16 16"
>
<path
fill-rule=
"evenodd"
d=
"m8 3.293 6 6V13.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5V9.293l6-6zm5-.793V6l-2-2V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z"
/>
<path
fill-rule=
"evenodd"
d=
"M7.293 1.5a1 1 0 0 1 1.414 0l6.647 6.646a.5.5 0 0 1-.708.708L8 2.207 1.354 8.854a.5.5 0 1 1-.708-.708L7.293 1.5z"
/>
</svg>
Home
Home
</
a
>
</
a
>
</
li
>
</
li
>
{{--
<li
class=
"nav-item"
>
<a
class=
"custom-nav-link {{ ((!empty($index_menu) ? $index_menu : 0) == 1? "
active
"
:
"")
}}"
id=
"pad-tab"
href=
"{{ route('avaliador_index') }}"
aria-controls=
"pad"
aria-selected=
"false"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-book-half"
viewBox=
"0 0 16 16"
>
<path
d=
"M8.5 2.687c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"
/>
</svg>
PADs
</a>
</li>
--}}
<
li
class
=
"nav-item"
>
<
li
class
=
"nav-item"
>
<a
class=
"custom-nav-link"
id=
"update-perfil-tab"
data-toggle=
"tab"
href=
"#update-perfil"
role=
"tab"
<
a
href
=
"{{ route('avaliador_relatorio') }}"
class
=
"custom-nav-link {{
$report_active
}}"
>
aria-controls=
"update-perfil"
aria-selected=
"true"
>
<
svg
xmlns
=
"http://www.w3.org/2000/svg"
width
=
"16"
height
=
"16"
fill
=
"currentColor"
class
=
"bi bi-file-bar-graph-fill"
viewBox
=
"0 0 16 16"
>
<!-- Update Perfil - Hidden -->
<
path
d
=
"M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm-2 11.5v-6a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm-2.5.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-1zm-3 0a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-1z"
/>
</
svg
>
Relatórios
</
a
>
</
a
>
</
li
>
</
li
>
</ul>
</
ul
>
\ No newline at end of file
resources/views/pad/relatorio/index.blade.php
0 → 100644
View file @
0c17c7cd
@
extends
(
'layouts.main'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'menu'
=>
$index_menu
])
@
endsection
@
section
(
'title'
,
'Relatórios'
)
@
section
(
'body'
)
<
div
class
=
"tab-content"
>
<
div
class
=
"tab-pane active"
id
=
"home"
role
=
"tabpanel"
aria
-
labelledby
=
"home-tab"
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
>
<
h1
class
=
"h2"
>
Relatórios
</
h1
>
</
div
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3"
>
<
h3
>
<
i
class
=
"bi bi-exclamation-octagon-fill"
></
i
>
PADs
com
Relatórios
Disponíveis
</
h3
>
</
div
>
<
div
class
=
"d-flex"
>
{{
--
Lista
de
pads
onde
o
meu
usuário
é
avaliador
naquele
pad
--
}}
@
foreach
(
$userPads
as
$userPad
)
@
include
(
'components.cards.relatorio_pad'
,
[
'userPad'
=>
$userPad
])
@
endforeach
</
div
>
</
div
>
</
div
>
@
endsection
\ No newline at end of file
resources/views/pad/relatorio/relatorio.blade.php
0 → 100644
View file @
0c17c7cd
@
extends
(
'layouts.main'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'menu'
=>
$index_menu
])
@
endsection
@
section
(
'title'
,
'Relatórios'
)
@
section
(
'body'
)
<
div
class
=
"tab-content"
>
<
div
class
=
"tab-pane active"
id
=
"home"
role
=
"tabpanel"
aria
-
labelledby
=
"home-tab"
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
>
<
h1
class
=
"h2"
>
Relatórios
</
h1
>
</
div
>
<
div
class
=
"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3"
>
<
h3
>
<
i
class
=
"bi bi-exclamation-octagon-fill"
></
i
>
Relatório
pad
{{
$pad
->
nome
}}
</
h3
>
</
div
>
<
table
class
=
"table"
>
<
thead
>
<
th
scope
=
'col'
>
Professor
</
th
>
<
th
scope
=
'col'
>
Ch
Ensino
</
th
>
<
th
scope
=
'col'
>
Ch
Pesqiosa
</
th
>
<
th
scope
=
'col'
>
Ch
Extensão
</
th
>
<
th
scope
=
'col'
>
Ch
Gestão
</
th
>
<
th
scope
=
'col'
>
Curso
</
th
>
</
thead
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
tbody
>
</
tbody
>
</
table
>
</
div
>
</
div
>
@
endsection
\ No newline at end of file
routes/web.php
View file @
0c17c7cd
...
@@ -7,6 +7,7 @@ use App\Http\Controllers\CoordenadorController;
...
@@ -7,6 +7,7 @@ use App\Http\Controllers\CoordenadorController;
use
App\Http\Controllers\DiretorController
;
use
App\Http\Controllers\DiretorController
;
use
App\Http\Controllers\ProfessorController
;
use
App\Http\Controllers\ProfessorController
;
use
App\Http\Controllers\AvaliadorController
;
use
App\Http\Controllers\AvaliadorController
;
use
App\Http\Controllers\PadController
;
use
Illuminate\Support\Facades\Route
;
use
Illuminate\Support\Facades\Route
;
...
@@ -98,6 +99,9 @@ Route::prefix('/avaliador')->group(function () {
...
@@ -98,6 +99,9 @@ Route::prefix('/avaliador')->group(function () {
Route
::
get
(
'/edit/{id}'
,
[
AvaliadorController
::
class
,
'edit'
])
->
name
(
'avaliador_edit'
);
Route
::
get
(
'/edit/{id}'
,
[
AvaliadorController
::
class
,
'edit'
])
->
name
(
'avaliador_edit'
);
Route
::
post
(
'/update/{id}'
,
[
AvaliadorController
::
class
,
'update'
])
->
name
(
'avaliador_update'
);
Route
::
post
(
'/update/{id}'
,
[
AvaliadorController
::
class
,
'update'
])
->
name
(
'avaliador_update'
);
Route
::
delete
(
'/delete/{id}'
,
[
AvaliadorController
::
class
,
'destroy'
])
->
name
(
'avaliador_delete'
);
Route
::
delete
(
'/delete/{id}'
,
[
AvaliadorController
::
class
,
'destroy'
])
->
name
(
'avaliador_delete'
);
Route
::
get
(
'/relatorio'
,
[
AvaliadorController
::
class
,
'relatorio'
])
->
name
(
'avaliador_relatorio'
);
Route
::
get
(
'/relatorio/{id}'
,
[
PadController
::
class
,
'relatorio'
])
->
name
(
'pad_relatório'
);
});
});
Route
::
prefix
(
'/user'
)
->
group
(
function
()
{
Route
::
prefix
(
'/user'
)
->
group
(
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment