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
f8605b4d
Commit
f8605b4d
authored
Mar 12, 2024
by
alissonalbuquerque
Browse files
Merge branch 'main' into feat_task_time
parents
92bb9a49
f49e28fd
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorPadController.php
View file @
f8605b4d
...
...
@@ -120,7 +120,7 @@ class AvaliadorPadController extends Controller
$users
=
User
::
all
();
$dimensoes
=
Dimensao
::
listDimensao
();
return
view
(
'avaliator
-
pad.create'
,
[
return
view
(
'avaliator
_
pad.create'
,
[
'pad'
=>
$pad
,
'model'
=>
$model
,
'users'
=>
$users
,
...
...
@@ -139,7 +139,7 @@ class AvaliadorPadController extends Controller
$users
=
User
::
all
();
$dimensoes
=
Dimensao
::
listDimensao
();
return
view
(
'avaliator
-
pad.update'
,
[
return
view
(
'avaliator
_
pad.update'
,
[
'pad'
=>
$pad
,
'model'
=>
$model
,
'users'
=>
$users
,
...
...
app/Http/Controllers/DashboardController.php
View file @
f8605b4d
...
...
@@ -17,10 +17,8 @@ use Illuminate\Support\Facades\Auth;
class
DashboardController
extends
Controller
{
public
function
index
()
{
{
$user
=
Auth
::
user
();
if
(
$user
->
isTypeAdmin
())
{
...
...
@@ -28,6 +26,7 @@ class DashboardController extends Controller
}
if
(
$user
->
isTypeTeacher
())
{
$userPads
=
UserPad
::
whereUserId
(
$user
->
id
)
->
whereStatus
(
Status
::
ATIVO
)
->
get
();
return
view
(
'dashboard'
,
[
'userPads'
=>
$userPads
,
'menu'
=>
Menu
::
HOME
]);
...
...
@@ -50,7 +49,5 @@ class DashboardController extends Controller
return
view
(
'dashboard'
,
[
'userPads'
=>
$userPads
,
'menu'
=>
Menu
::
HOME
]);
}
//return redirect()->route('login');
}
}
app/Http/Controllers/DownloadFileController.php
0 → 100644
View file @
f8605b4d
<?php
namespace
App\Http\Controllers
;
use
App\Models\Util\Menu
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Storage
;
class
DownloadFileController
extends
Controller
{
public
function
index
()
{
return
view
(
'download.index'
,
[
'menu'
=>
Menu
::
FILES
,
]);
}
public
function
degreeSchedule
()
{
return
Storage
::
download
(
'public/grade_horario.docx'
);
}
public
function
manual
()
{
return
Storage
::
download
(
'public/manual.pdf'
);
}
}
app/Http/Controllers/TaskTimeController.php
View file @
f8605b4d
...
...
@@ -32,7 +32,7 @@ class TaskTimeController extends Controller
if
(
$model
->
save
())
{
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'success'
,
'Cadastro realizado com sucesso!'
);
}
}
...
...
@@ -54,12 +54,12 @@ class TaskTimeController extends Controller
if
(
$model
->
save
())
{
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'success'
,
'Atualizado com sucesso!'
);
}
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'fail'
,
'Erro ao Atualizar!'
);
}
...
...
@@ -70,12 +70,12 @@ class TaskTimeController extends Controller
if
(
$model
->
delete
())
{
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'success'
,
'Deletado com sucesso!'
);
}
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'fail'
,
'Erro ao Deletar!'
);
}
...
...
app/Models/TaskTime.php
View file @
f8605b4d
...
...
@@ -30,6 +30,7 @@ use App\Models\Tabelas\Pesquisa\PesquisaOrientacao;
use
App\Models\Tabelas\Pesquisa\PesquisaOutros
;
use
App\Rules\ValidationGreaterThanTime
;
use
App\Rules\ValidationLimitTime
;
use
Carbon\Carbon
;
use
DateInterval
;
use
DateTime
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -376,6 +377,14 @@ class TaskTime extends Model
return
$dateTime
->
format
(
$format
);
}
public
function
formatStartTime
()
{
return
Carbon
::
createFromFormat
(
'H:i:s'
,
$this
->
start_time
)
->
format
(
'H:i'
);
}
public
function
formatEndTime
()
{
return
Carbon
::
createFromFormat
(
'H:i:s'
,
$this
->
end_time
)
->
format
(
'H:i'
);
}
/**
* STATIC METHODS
*/
...
...
app/Models/User.php
View file @
f8605b4d
...
...
@@ -192,8 +192,8 @@ class User extends Authenticatable
* @return UserType|Null
*/
public
function
profileSelected
()
{
return
$this
->
profiles
()
->
whereSelected
(
true
)
->
first
();
{
return
$this
->
profiles
()
->
first
();
}
/**
...
...
app/Models/Util/Menu.php
View file @
f8605b4d
...
...
@@ -11,9 +11,5 @@ class Menu
const
CURSOS
=
5
;
const
UNIDADES
=
6
;
const
PADS
=
7
;
//Deletar depois
const
DIRETORES
=
4
;
const
COORDENADORES
=
5
;
const
PROFESSORES
=
7
;
const
FILES
=
8
;
}
\ No newline at end of file
app/Providers/AppServiceProvider.php
View file @
f8605b4d
...
...
@@ -6,6 +6,7 @@ use Illuminate\Pagination\Paginator;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\Collection
;
use
Illuminate\Pagination\LengthAwarePaginator
;
use
Illuminate\Routing\UrlGenerator
;
class
AppServiceProvider
extends
ServiceProvider
{
...
...
@@ -24,8 +25,12 @@ class AppServiceProvider extends ServiceProvider
*
* @return void
*/
public
function
boot
()
public
function
boot
(
UrlGenerator
$url
)
{
if
(
env
(
'APP_ENV'
)
!==
'local'
)
{
//so you can work on it locally
$url
->
forceScheme
(
'https'
);
}
Paginator
::
useBootstrap
();
Collection
::
macro
(
'paginate'
,
function
(
$perPage
,
$total
=
null
,
$page
=
null
,
$pageName
=
'page'
):
LengthAwarePaginator
{
...
...
composer.lock
View file @
f8605b4d
This diff is collapsed.
Click to expand it.
resources/views/auth/main.blade.php
View file @
f8605b4d
<!doctype html>
<html
lang=
"pt-br"
>
<head>
<title>
P
A
D - Plano de Avaliação Docente
</title>
<title>
PD
A
- Plano de Avaliação Docente
</title>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
...
...
@@ -15,14 +15,9 @@
<header>
<div
class=
"navbar shadow-sm"
alt=
"Max-width 100%"
>
<div
class=
"container d-flex justify-content-between"
>
<a
class=
"navbar-brand d-flex align-items-center"
href=
"#"
>
<img
src=
"http://www.avaliacaodocente.upe.br/assets/img/logo-upe.png"
class=
"img-fluid"
width=
"128"
height=
"93"
alt=
""
/>
</a>
<a
class=
"navbar-brand d-flex align-items-center"
href=
"#"
>
<img
src=
"https://www.gestaododesempenho.pe.gov.br/AvaliacaoDesempenho/public/resources/images/logos-direita.png"
class=
"img-fluid"
width=
"268"
height=
"100"
alt=
""
/>
<div
class=
""
>
<a
class=
"navbar-brand p-3"
href=
"#"
>
<img
src=
"{{url('images/estado_pe_logo.png')}}"
alt=
"Logo do Estado"
class=
"img-fluid"
width=
"300"
height=
"100"
/>
</a>
</div>
</div>
...
...
resources/views/avaliador-pad/create.blade.php
View file @
f8605b4d
<div
class=
"mb-3"
>
<h3
class=
"h3"
>
Cadastrar Professor (P
A
D)
</h3>
<h3
class=
"h3"
>
Cadastrar Professor (PD
A
)
</h3>
</div>
<form
id=
"form-user_pad"
action=
"{{ route('user-pad_store') }}"
method=
"post"
>
...
...
resources/views/avaliator
-
pad/create.blade.php
→
resources/views/avaliator
_
pad/create.blade.php
View file @
f8605b4d
<div
class=
"mb-3"
>
<h3
class=
"h3"
>
Cadastrar Avaliador (P
A
D)
</h3>
<h3
class=
"h3"
>
Cadastrar Avaliador (PD
A
)
</h3>
</div>
<form
id=
"form-user_pad"
action=
"{{ route('avaliator-pad_store') }}"
method=
"post"
>
@csrf
<form
id=
"form-user_pad"
action=
"{{ route('avaliator-pad_store') }}"
method=
"POST"
>
@method('POST')
@csrf
@include('avaliator
-
pad.form', [
@include('avaliator
_
pad.form', [
'pad' => $pad,
'model' => $model,
'users' => $users,
...
...
resources/views/avaliator
-
pad/form.blade.php
→
resources/views/avaliator
_
pad/form.blade.php
View file @
f8605b4d
...
...
@@ -30,7 +30,7 @@
</div>
<div class="
mb
-
3
col
-
sm
-
6
">
<label class="
form
-
label
" for="
pad_name
"> P
A
D </label>
<label class="
form
-
label
" for="
pad_name
"> PD
A
</label>
<input class="
form
-
control
" type="
text
" disabled value="
{{
$pad
->
nome
}}
">
</div>
...
...
resources/views/avaliator
-
pad/update.blade.php
→
resources/views/avaliator
_
pad/update.blade.php
View file @
f8605b4d
<div
class=
"mb-3"
>
<h3
class=
"h3"
>
Atualizar Avaliador (P
A
D)
</h3>
<h3
class=
"h3"
>
Atualizar Avaliador (PD
A
)
</h3>
</div>
<form
id=
"form-user_pad"
action=
"{{ route('avaliator-pad_update', ['id' => $model->id]) }}"
method=
"post"
>
@csrf
@method('POST')
@include('avaliator
-
pad.form', [
@include('avaliator
_
pad.form', [
'pad' => $pad,
'model' => $model,
'users' => $users,
...
...
resources/views/components/cards/avaliador_pad.blade.php
View file @
f8605b4d
...
...
@@ -5,7 +5,7 @@
<
div
class
=
"card mx-2"
style
=
"width: 12rem;"
>
<
div
class
=
"card-body"
>
<
h3
class
=
"text-center"
>
<
i
class
=
"bi bi-book-half"
></
i
>
</
h3
>
<
h5
class
=
"text-center"
>
P
A
D
:
{{
$userPad
->
pad
->
nome
}}
</
h4
>
<
h5
class
=
"text-center"
>
PD
A
:
{{
$userPad
->
pad
->
nome
}}
</
h4
>
<
h5
class
=
"text-center"
>
Status
:
{{
$userPad
->
pad
->
statusAsString
()
}}
</
h4
>
<
a
class
=
"stretched-link"
href
=
"{{ route('pad_professores', ['id' =>
$userPad->id
]) }}"
></
a
>
</
div
>
...
...
resources/views/components/cards/file_view.blade.php
0 → 100644
View file @
f8605b4d
<div
class=
"card mx-2"
style=
"width: 12rem;"
>
<div
class=
"card-body"
>
<h3
class=
"text-center"
>
<i
class=
"bi bi-file-earmark-arrow-down-fill"
></i>
</h3>
<h5
class=
"text-center"
>
{{ $title }}
</h4>
<a
class=
"stretched-link"
href=
"{{ route($route) }}"
></a>
</div>
</div>
resources/views/components/cards/relatorio_pad.blade.php
View file @
f8605b4d
...
...
@@ -2,6 +2,7 @@
<div
class=
"card-body"
>
<h3
class=
"text-center"
>
<i
class=
"bi bi-file-earmark-word-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>
...
...
resources/views/dashboard.blade.php
View file @
f8605b4d
...
...
@@ -7,7 +7,7 @@
@endif
@if(Auth::user()->isTypeTeacher())
@include('layouts.user-dashboard.dashboard_teacher', ['user' => Auth::user(), 'userPads => $userPads
'
])
@include('layouts.user-dashboard.dashboard_teacher', ['user' => Auth::user(), 'userPads
'
=> $userPads])
@endif
@if(Auth::user()->isTypeDirector())
...
...
resources/views/download/index.blade.php
0 → 100644
View file @
f8605b4d
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Arquivos'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'menu'
=>
$menu
,
])
@
endsection
@
section
(
'body'
)
<
div
class
=
"d-flex"
>
@
include
(
'components.cards.file_view'
,
[
'title'
=>
'Grade de Horário (.docx)'
,
'route'
=>
'download_grade_horario'
])
@
include
(
'components.cards.file_view'
,
[
'title'
=>
'Manual (.pdf)'
,
'route'
=>
'download_manual'
])
</
div
>
@
endsection
resources/views/layouts/guest.blade.php
View file @
f8605b4d
...
...
@@ -3,7 +3,7 @@
<head>
<title>
Avaliação de Desempanho Docente - P
A
D
</title>
<title>
Avaliação de Desempanho Docente - PD
A
</title>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
...
...
@@ -32,7 +32,7 @@
<div
class=
"stylo p-3 n-flex"
>
<h2>
Portal de acesso ao
</h2>
<h3>
Plano de Atividades Docentes - P
A
D
</h3>
<h3>
Plano de Atividades Docentes - PD
A
</h3>
</div>
<section
class=
"ftco-section"
>
...
...
Prev
1
2
3
Next
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