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
Commit
645a89ca
authored
May 27, 2022
by
Guilherme Silva
Browse files
Fornecendo pdf padrão na avaliação dos planos
parent
68143229
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/Evento.php
View file @
645a89ca
...
@@ -18,7 +18,8 @@ class Evento extends Model
...
@@ -18,7 +18,8 @@ class Evento extends Model
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'criador_id'
,
'numParticipantes'
,
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'criador_id'
,
'numParticipantes'
,
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
,
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
,
'formAvaliacaoExterno'
,
'formAvaliacaoInterno'
,
'formAvaliacaoExterno'
,
'formAvaliacaoInterno'
,
'cotaDoutor'
,
'inicioProjeto'
,
'fimProjeto'
'cotaDoutor'
,
'inicioProjeto'
,
'fimProjeto'
,
'formAvaliacaoRelatorio'
];
];
public
function
endereco
(){
public
function
endereco
(){
...
...
app/Http/Controllers/EventoController.php
View file @
645a89ca
...
@@ -236,6 +236,16 @@ class EventoController extends Controller
...
@@ -236,6 +236,16 @@ class EventoController extends Controller
$evento
->
formAvaliacaoExterno
=
$path
.
$nome
;
$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
();
$evento
->
update
();
// $user = Auth::user();
// $user = Auth::user();
...
@@ -273,6 +283,10 @@ class EventoController extends Controller
...
@@ -273,6 +283,10 @@ class EventoController extends Controller
$pasta
=
'pdfFormAvalExterno/'
.
$eventoTemp
->
id
;
$pasta
=
'pdfFormAvalExterno/'
.
$eventoTemp
->
id
;
$eventoTemp
->
formAvaliacaoExterno
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfFormAvalExterno
,
'formulario de avaliação externo.pdf'
);
$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
();
$eventoTemp
->
update
();
...
@@ -412,6 +426,7 @@ class EventoController extends Controller
...
@@ -412,6 +426,7 @@ class EventoController extends Controller
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfEdital'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalRelatorio'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'inicioProjeto'
=>
[
'required'
,
'date'
],
'inicioProjeto'
=>
[
'required'
,
'date'
],
'fimProjeto'
=>
[
'required'
,
'date'
],
'fimProjeto'
=>
[
'required'
,
'date'
],
]);
]);
...
@@ -437,6 +452,7 @@ class EventoController extends Controller
...
@@ -437,6 +452,7 @@ class EventoController extends Controller
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'dt_fimRelatorioFinal'
=>
[
'required'
,
'date'
,
'after_or_equal:dt_inicioRelatorioFinal'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'modeloDocumento'
=>
[
'file'
,
'mimes:zip,doc,docx,odt,pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalExterno'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'pdfFormAvalRelatorio'
=>
[
'file'
,
'mimes:pdf'
,
'max:2048'
],
'inicioProjeto'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'inicioProjeto'
=>
[
'required'
,
'date'
,
'after:resultado_final'
],
'fimProjeto'
=>
[
'required'
,
'date'
,
'after:inicioProjeto'
],
'fimProjeto'
=>
[
'required'
,
'date'
,
'after:inicioProjeto'
],
]);
]);
...
@@ -490,6 +506,16 @@ class EventoController extends Controller
...
@@ -490,6 +506,16 @@ class EventoController extends Controller
$evento
->
formAvaliacaoExterno
=
$path
.
$nome
;
$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
();
$evento
->
update
();
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
$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 @@
...
@@ -108,6 +108,16 @@
@
if
(
isset
(
$relatParcial
))
value
=
"
{
{$relatParcial->nota}
}
"
@
endif
>
@
if
(
isset
(
$relatParcial
))
value
=
"
{
{$relatParcial->nota}
}
"
@
endif
>
</
div
>
</
div
>
</
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"
>
<
div
class
=
"row"
style
=
"margin-top: 10px"
>
<
label
for
=
"lattes"
class
=
"col-form-label font-tam"
<
label
for
=
"lattes"
class
=
"col-form-label font-tam"
style
=
"font-weight: bold;margin-right: 5px;"
>
{{
__
(
'Arquivo: '
)
}}
</
label
>
style
=
"font-weight: bold;margin-right: 5px;"
>
{{
__
(
'Arquivo: '
)
}}
</
label
>
...
...
resources/views/evento/criarEvento.blade.php
View file @
645a89ca
...
@@ -419,7 +419,7 @@
...
@@ -419,7 +419,7 @@
@
enderror
@
enderror
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"col-sm-
12
"
>
<
div
class
=
"col-sm-
6
"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfFormAvalExterno"
>
Formulário
de
avaliação
externa
:</
label
>
<
label
for
=
"pdfFormAvalExterno"
>
Formulário
de
avaliação
externa
:</
label
>
@
if
(
old
(
'pdfFormAvalExternoPreenchido'
)
!=
null
)
@
if
(
old
(
'pdfFormAvalExternoPreenchido'
)
!=
null
)
...
@@ -435,6 +435,22 @@
...
@@ -435,6 +435,22 @@
@
enderror
@
enderror
</
div
>
</
div
>
</
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
>
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
...
@@ -469,9 +485,9 @@
...
@@ -469,9 +485,9 @@
var
pdfFormAvalExternoPreenchido
=
document
.
getElementById
(
'pdfFormAvalExternoPreenchido'
);
var
pdfFormAvalExternoPreenchido
=
document
.
getElementById
(
'pdfFormAvalExternoPreenchido'
);
pdfFormAvalExternoPreenchido
.
value
=
"sim"
;
pdfFormAvalExternoPreenchido
.
value
=
"sim"
;
}
}
if
(
file
.
id
===
"pdfFormAval
Intern
o"
){
if
(
file
.
id
===
"pdfFormAval
Relatori
o"
){
var
pdfFormAval
Intern
oPreenchido
=
document
.
getElementById
(
'pdfFormAval
Intern
oPreenchido'
);
var
pdfFormAval
Relatori
oPreenchido
=
document
.
getElementById
(
'pdfFormAval
Relatori
oPreenchido'
);
pdfFormAval
Intern
oPreenchido
.
value
=
"sim"
;
pdfFormAval
Relatori
oPreenchido
.
value
=
"sim"
;
}
}
}
}
...
...
resources/views/evento/editarEvento.blade.php
View file @
645a89ca
...
@@ -138,7 +138,6 @@
...
@@ -138,7 +138,6 @@
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
class
=
"modal-body"
>
<
div
class
=
"modal-body"
>
<
table
class
=
"table table-bordered"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
thead
>
...
@@ -155,12 +154,12 @@
...
@@ -155,12 +154,12 @@
<
tr
>
<
tr
>
<
td
>
{{
$coordenador
->
user
->
name
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
name
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
email
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
email
}}
</
td
>
@
if
(
$coordenador
->
user
->
instituicao
|
=
null
)
@
if
(
$coordenador
->
user
->
celular
!
=
null
)
<
td
>
{{
$coordenador
->
user
->
celular
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
celular
}}
</
td
>
@
else
@
else
<
td
>
Não
Definido
</
td
>
<
td
>
Não
Definido
</
td
>
@
endif
@
endif
@
if
(
$coordenador
->
user
->
instituicao
|
=
null
)
@
if
(
$coordenador
->
user
->
instituicao
!
=
null
)
<
td
>
{{
$coordenador
->
user
->
instituicao
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
instituicao
}}
</
td
>
@
else
@
else
<
td
>
Não
Definida
</
td
>
<
td
>
Não
Definida
</
td
>
...
@@ -400,7 +399,7 @@
...
@@ -400,7 +399,7 @@
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"col-sm-
12
"
>
<
div
class
=
"col-sm-
6
"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
externa
:</
label
>
<
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;"
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoExterno
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
...
@@ -415,6 +414,21 @@
...
@@ -415,6 +414,21 @@
@
enderror
@
enderror
</
div
>
</
div
>
</
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
>
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
<
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