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
submeta
Commits
645a89ca
"app/Http/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "e48b7b8f92de81b367b4215792a9ad03f2ab1c8c"
Commit
645a89ca
authored
May 27, 2022
by
Guilherme Silva
Browse files
Fornecendo pdf padrão na avaliação dos planos
parent
68143229
Changes
6
Show whitespace changes
Inline
Side-by-side
app/Evento.php
View file @
645a89ca
...
...
@@ -18,7 +18,8 @@ class Evento extends Model
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'criador_id'
,
'numParticipantes'
,
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
,
'formAvaliacaoExterno'
,
'formAvaliacaoInterno'
,
'cotaDoutor'
,
'inicioProjeto'
,
'fimProjeto'
'cotaDoutor'
,
'inicioProjeto'
,
'fimProjeto'
,
'formAvaliacaoRelatorio'
];
public
function
endereco
(){
...
...
app/Http/Controllers/EventoController.php
View file @
645a89ca
...
...
@@ -236,6 +236,16 @@ class EventoController extends Controller
$evento
->
formAvaliacaoExterno
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
pdfFormAvalRelatorio
)){
$pdfFormAvalRelatorio
=
$request
->
pdfFormAvalRelatorio
;
$extension
=
$pdfFormAvalRelatorio
->
extension
();
$path
=
'pdfFormAvalRelatorio/'
.
$evento
->
id
.
'/'
;
$nome
=
"formulario de avaliação do relatorio"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$pdfFormAvalRelatorio
,
$nome
);
$evento
->
formAvaliacaoRelatorio
=
$path
.
$nome
;
}
$evento
->
update
();
// $user = Auth::user();
...
...
@@ -273,6 +283,10 @@ class EventoController extends Controller
$pasta
=
'pdfFormAvalExterno/'
.
$eventoTemp
->
id
;
$eventoTemp
->
formAvaliacaoExterno
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfFormAvalExterno
,
'formulario de avaliação externo.pdf'
);
}
if
(
!
(
is_null
(
$request
->
pdfFormAvalRelatorio
))
)
{
$pasta
=
'pdfFormAvalRelatorio/'
.
$eventoTemp
->
id
;
$eventoTemp
->
formAvaliacaoRelatorio
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfFormAvalRelatorio
,
'formulario de avaliação do relatorio.pdf'
);
}
$eventoTemp
->
update
();
...
...
@@ -412,6 +426,7 @@ class EventoController extends Controller
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalRelatorio'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'inicioProjeto'
=>
[
'required'
,
'date'
],
'fimProjeto'
=>
[
'required'
,
'date'
],
]);
...
...
@@ -437,6 +452,7 @@ class EventoController extends Controller
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalRelatorio'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'inicioProjeto'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'fimProjeto'
=>
[
'required'
,
'date'
,
'after:inicioProjeto'
],
]);
...
...
@@ -490,6 +506,16 @@ class EventoController extends Controller
$evento
->
formAvaliacaoExterno
=
$path
.
$nome
;
}
if
(
isset
(
$request
->
pdfFormAvalRelatorio
)){
$pdfFormAvalRelatorio
=
$request
->
pdfFormAvalRelatorio
;
$extension
=
$pdfFormAvalRelatorio
->
extension
();
$path
=
'pdfFormAvalRelatorio/'
.
$evento
->
id
.
'/'
;
$nome
=
"formulario de avaliação do relatorio"
.
"."
.
$extension
;
Storage
::
putFileAs
(
$path
,
$pdfFormAvalRelatorio
,
$nome
);
$evento
->
formAvaliacaoRelatorio
=
$path
.
$nome
;
}
$evento
->
update
();
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
...
...
database/migrations/2022_05_25_054234_add_form_avaliacao_relatorio_to_eventos_table.php
0 → 100644
View file @
645a89ca
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddFormAvaliacaoRelatorioToEventosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'formAvaliacaoRelatorio'
)
->
nullable
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'formAvaliacaoRelatorio'
);
});
}
}
resources/views/avaliacaoRelatorio/listar.blade.php
View file @
645a89ca
...
...
@@ -108,6 +108,16 @@
@
if
(
isset
(
$relatParcial
))
value
=
"
{
{$relatParcial->nota}
}
"
@
endif
>
</
div
>
</
div
>
<
div
class
=
"row"
style
=
"margin-top: 10px"
>
<
label
for
=
"lattes"
class
=
"col-form-label font-tam"
style
=
"font-weight: bold;margin-right: 5px;"
>
{{
__
(
'Formulário de Avaliação: '
)
}}
</
label
>
@
if
(
$evento
->
formAvaliacaoRelatorio
!=
null
)
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoRelatorio
])}}"
target
=
"_new"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/pdf.ico')}
}
"
style
=
"width:40px"
>
</
a
>
@
endif
</
div
>
<
div
class
=
"row"
style
=
"margin-top: 10px"
>
<
label
for
=
"lattes"
class
=
"col-form-label font-tam"
style
=
"font-weight: bold;margin-right: 5px;"
>
{{
__
(
'Arquivo: '
)
}}
</
label
>
...
...
resources/views/evento/criarEvento.blade.php
View file @
645a89ca
...
...
@@ -419,7 +419,7 @@
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-
12
"
>
<
div
class
=
"col-sm-
6
"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfFormAvalExterno"
>
Formulário
de
avaliação
externa
:</
label
>
@
if
(
old
(
'pdfFormAvalExternoPreenchido'
)
!=
null
)
...
...
@@ -435,6 +435,22 @@
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfFormAvalExterno"
>
Formulário
de
avaliação
do
relatório
:</
label
>
@
if
(
old
(
'pdfFormAvalRelatorioPreenchido'
)
!=
null
)
<
a
id
=
"pdfFormAvalRelatorioTemp"
href
=
"{{ route('baixar.evento.temp', ['nomeAnexo' => 'formAvaliacaoPlano' ])}}"
>
Arquivo
atual
</
a
>
@
endif
<
input
type
=
"hidden"
id
=
"pdfFormAvalRelatorioPreenchido"
name
=
"pdfFormAvalRelatorioPreenchido"
value
=
"{{ old('pdfFormAvalRelatorioPreenchido') }}"
>
<
input
type
=
"file"
accept
=
".pdf"
class
=
"form-control-file pdf @error('pdfFormAvalRelatorio') is-invalid @enderror"
name
=
"pdfFormAvalRelatorio"
value
=
"{{ old('pdfFormAvalRelatorio') }}"
id
=
"pdfFormAvalRelatorio"
onchange
=
"exibirAnexoTemp(this)"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfFormAvalRelatorio'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
...
...
@@ -469,9 +485,9 @@
var
pdfFormAvalExternoPreenchido
=
document
.
getElementById
(
'pdfFormAvalExternoPreenchido'
);
pdfFormAvalExternoPreenchido
.
value
=
"sim"
;
}
if
(
file
.
id
===
"pdfFormAval
Intern
o"
){
var
pdfFormAval
Intern
oPreenchido
=
document
.
getElementById
(
'pdfFormAval
Intern
oPreenchido'
);
pdfFormAval
Intern
oPreenchido
.
value
=
"sim"
;
if
(
file
.
id
===
"pdfFormAval
Relatori
o"
){
var
pdfFormAval
Relatori
oPreenchido
=
document
.
getElementById
(
'pdfFormAval
Relatori
oPreenchido'
);
pdfFormAval
Relatori
oPreenchido
.
value
=
"sim"
;
}
}
...
...
resources/views/evento/editarEvento.blade.php
View file @
645a89ca
...
...
@@ -138,7 +138,6 @@
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
...
...
@@ -155,12 +154,12 @@
<
tr
>
<
td
>
{{
$coordenador
->
user
->
name
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
email
}}
</
td
>
@
if
(
$coordenador
->
user
->
instituicao
|
=
null
)
@
if
(
$coordenador
->
user
->
celular
!
=
null
)
<
td
>
{{
$coordenador
->
user
->
celular
}}
</
td
>
@
else
<
td
>
Não
Definido
</
td
>
@
endif
@
if
(
$coordenador
->
user
->
instituicao
|
=
null
)
@
if
(
$coordenador
->
user
->
instituicao
!
=
null
)
<
td
>
{{
$coordenador
->
user
->
instituicao
}}
</
td
>
@
else
<
td
>
Não
Definida
</
td
>
...
...
@@ -400,7 +399,7 @@
</
div
>
</
div
>
<
div
class
=
"col-sm-
12
"
>
<
div
class
=
"col-sm-
6
"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
externa
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoExterno
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
...
...
@@ -415,6 +414,21 @@
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
do
relatório
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoRelatorio
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
<
input
type
=
"file"
class
=
"form-control-file @error('pdfFormAvalRelatorio') is-invalid @enderror"
name
=
"pdfFormAvalRelatorio"
value
=
"{{ old('pdfFormAvalRelatorio') }}"
id
=
"pdfFormAvalRelatorio"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfFormAvalRelatorio'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
...
...
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