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
da6b6a26
Commit
da6b6a26
authored
Apr 12, 2023
by
victorMendes18
Browse files
finalizando aprovar
parent
00de41e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
da6b6a26
...
@@ -35,7 +35,7 @@ class AvaliadorController extends Controller
...
@@ -35,7 +35,7 @@ class AvaliadorController extends Controller
'professor_id'
=>
[
'required'
,
'integer'
],
'professor_id'
=>
[
'required'
,
'integer'
],
'atividade_type'
=>
[
'required'
,
'integer'
],
'atividade_type'
=>
[
'required'
,
'integer'
],
'descricao'
=>
[
'nullable'
,
'string'
],
'descricao'
=>
[
'nullable'
,
'string'
],
'hora_reajuste'
=>
[
'nullable'
,
'
double
'
],
'hora_reajuste'
=>
[
'nullable'
,
'
integer
'
],
],
],
[
[
'required'
=>
'O campo de :attribute é obrigatório'
,
'required'
=>
'O campo de :attribute é obrigatório'
,
...
@@ -56,15 +56,10 @@ class AvaliadorController extends Controller
...
@@ -56,15 +56,10 @@ class AvaliadorController extends Controller
$avaliacao
->
status
=
$req
->
status
;
$avaliacao
->
status
=
$req
->
status
;
$avaliacao
->
avaliador_id
=
$user
->
id
;
$avaliacao
->
avaliador_id
=
$user
->
id
;
$avaliacao
->
descricao
=
$req
->
descricao
?
$req
->
descricao
:
NULL
;
$avaliacao
->
descricao
=
$req
->
descricao
?
$req
->
descricao
:
NULL
;
$avaliacao
->
hora_reajuste
=
$req
->
hora_reajuste
;
$avaliacao
->
hora
s
_reajuste
=
$req
->
hora_reajuste
;
if
(
$avaliacao
->
save
())
{
if
(
$avaliacao
->
save
())
{
return
redirect
()
->
back
();
dd
(
$avaliacao
);
//return view('pad.avaliacao.dimensao.ensino', [
// 'index_menu' => MenuItemsAvaliador::PADs,
// 'user_pad_id' => 1
//]);
}
}
}
}
}
}
...
...
app/Models/Avaliacao.php
View file @
da6b6a26
...
@@ -11,7 +11,7 @@ class Avaliacao extends Model
...
@@ -11,7 +11,7 @@ class Avaliacao extends Model
protected
$table
=
'avaliacao'
;
protected
$table
=
'avaliacao'
;
protected
$fillable
=
[
'tarefa_id'
,
'avaliador_id'
,
'type'
,
'status'
,
'descricao'
,
'ch_semanal'
];
protected
$fillable
=
[
'tarefa_id'
,
'avaliador_id'
,
'type'
,
'status'
,
'descricao'
,
'ch_semanal'
,
'hora_reajuste'
];
public
function
tarefa
()
{
public
function
tarefa
()
{
...
...
database/migrations/2023_04_1
2_230101_add_feedback
_avaliacao
_campos
.php
→
database/migrations/2023_04_1
3_024157_add_column_horas_reajuste_in_table
_avaliacao.php
View file @
da6b6a26
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Support\Facades\Schema
;
class
Add
Feedback
Avaliacao
Campos
extends
Migration
class
Add
ColumnHorasReajusteInTable
Avaliacao
extends
Migration
{
{
/**
/**
* Run the migrations.
* Run the migrations.
...
@@ -14,7 +14,7 @@ class AddFeedbackAvaliacaoCampos extends Migration
...
@@ -14,7 +14,7 @@ class AddFeedbackAvaliacaoCampos extends Migration
public
function
up
()
public
function
up
()
{
{
Schema
::
table
(
'avaliacao'
,
function
(
Blueprint
$table
)
{
Schema
::
table
(
'avaliacao'
,
function
(
Blueprint
$table
)
{
$table
->
double
(
'horas_reajuste'
)
->
nullable
(
true
);
$table
->
integer
(
'horas_reajuste'
)
->
nullable
(
true
);
});
});
}
}
...
...
resources/views/pad/avaliacao/taferas_professor.blade.php
View file @
da6b6a26
...
@@ -31,18 +31,21 @@
...
@@ -31,18 +31,21 @@
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
"
setaDadosModalAvaliacao(
$tarefa[
'
id
']
,
$professor[
'
id
']
, 6, )"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
style
=
"height: 38px;"
onclick
=
'
setaDadosModalAvaliacao(
"{{
$tarefa[
"
id
"]}}", "{{
$professor[
"
id
"]}}", "6", "{{$tarefa["tipo_atividade"]}}")'
>
Reprovar
Reprovar
</
button
>
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
@
include
(
'components.buttons.btn-aprovar'
,
[
'route'
=>
route
(
'avaliador_avaliar'
),
'class'
=>
'ml-2'
,
'content'
=>
'Aprovar'
,
'id'
=>
''
,
])
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$tarefa["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$professor["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$tarefa["tipo_atividade"]}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
><
br
>
</
div
><
br
>
...
@@ -66,17 +69,21 @@
...
@@ -66,17 +69,21 @@
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
"
setaDadosModalAvaliacao(
'a', 'b')"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
'
setaDadosModalAvaliacao(
"{{$tarefa["id"]}}", "{{$professor["id"]}}", "6", "{{$tarefa["tipo_atividade"]}}")'
>
Reprovar
Reprovar
</
button
>
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
@
include
(
'components.buttons.btn-aprovar'
,
[
'route'
=>
route
(
'avaliador_avaliar'
),
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
'class'
=>
'ml-2'
,
@
csrf
'content'
=>
'Aprovar'
,
@
method
(
"PUT"
)
'id'
=>
''
,
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$tarefa["id"]}
}
"
>
])
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$professor["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$tarefa["tipo_atividade"]}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -101,17 +108,21 @@
...
@@ -101,17 +108,21 @@
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
"
setaDadosModalAvaliacao(
'a', 'b')"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
'
setaDadosModalAvaliacao(
"{{$tarefa["id"]}}", "{{$professor["id"]}}", "6", "{{$tarefa["tipo_atividade"]}}")'
>
Reprovar
Reprovar
</
button
>
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
@
include
(
'components.buttons.btn-aprovar'
,
[
'route'
=>
route
(
'avaliador_avaliar'
),
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
'class'
=>
'ml-2'
,
@
csrf
'content'
=>
'Aprovar'
,
@
method
(
"PUT"
)
'id'
=>
''
,
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$tarefa["id"]}
}
"
>
])
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$professor["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$tarefa["tipo_atividade"]}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -136,17 +147,21 @@
...
@@ -136,17 +147,21 @@
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
"
setaDadosModalAvaliacao(
'a', 'b')"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
'
setaDadosModalAvaliacao(
"{{$tarefa["id"]}}", "{{$professor["id"]}}", "6", "{{$tarefa["tipo_atividade"]}}")'
>
Reprovar
Reprovar
</
button
>
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
@
include
(
'components.buttons.btn-aprovar'
,
[
'route'
=>
route
(
'avaliador_avaliar'
),
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
'class'
=>
'ml-2'
,
@
csrf
'content'
=>
'Aprovar'
,
@
method
(
"PUT"
)
'id'
=>
''
,
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$tarefa["id"]}
}
"
>
])
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$professor["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$tarefa["tipo_atividade"]}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -164,7 +179,9 @@
...
@@ -164,7 +179,9 @@
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
form
action
=
"#"
method
=
"POST"
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id"
>
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status"
>
...
@@ -180,7 +197,7 @@
...
@@ -180,7 +197,7 @@
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"
button
"
class
=
"btn btn-outline-danger"
>
Reprovar
</
button
>
<
input
type
=
"
submit
"
class
=
"btn btn-outline-danger"
value
=
"Reprovar"
>
</
div
>
</
div
>
</
form
>
</
form
>
</
div
>
</
div
>
...
@@ -190,9 +207,10 @@
...
@@ -190,9 +207,10 @@
@
endsection
@
endsection
<
script
>
<
script
>
function
setaDadosModalAvaliacao
(
a
,
b
){
function
setaDadosModalAvaliacao
(
tarefa_id
,
professor_id
,
status
,
atividade_type
){
document
.
getElementById
(
'a'
)
.
value
=
a
;
document
.
getElementById
(
'tarefa_id'
)
.
value
=
tarefa_id
;
document
.
getElementById
(
'b'
)
.
value
=
b
;
document
.
getElementById
(
'professor_id'
)
.
value
=
professor_id
;
document
.
getElementById
(
'status'
)
.
value
=
status
;
document
.
getElementById
(
'atividade_type'
)
.
value
=
atividade_type
;
}
}
</
script
>
</
script
>
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