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
e32e7701
"git@sites.upe.br:walter.felipe/submeta.git" did not exist on "5e16fb3bd6617596fd287fe81725f6e1b365713a"
Commit
e32e7701
authored
Mar 21, 2022
by
KelwinJonas
Browse files
Merge branch 'master' of
https://github.com/lmts-ufape/submeta
parents
4bab285e
c57f3a05
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
app/DocumentacaoComplementar.php
deleted
100644 → 0
View file @
4bab285e
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
DocumentacaoComplementar
extends
Model
{
protected
$fillable
=
[
'termoCompromisso'
,
'comprovanteMatricula'
,
'linkLattes'
,
'pdfLattes'
,
'participante_id'
,
];
public
function
participante
(){
return
$this
->
belongsTo
(
Participante
::
class
,
'participante_id'
,
'id'
);
}
}
app/Evento.php
View file @
e32e7701
...
...
@@ -16,7 +16,8 @@ class Evento extends Model
'inicioSubmissao'
,
'fimSubmissao'
,
'inicioRevisao'
,
'fimRevisao'
,
'resultado_final'
,
'resultado_preliminar'
,
'coordenadorId'
,
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'criador_id'
,
'numParticipantes'
,
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
'dt_inicioRelatorioParcial'
,
'dt_fimRelatorioParcial'
,
'dt_inicioRelatorioFinal'
,
'dt_fimRelatorioFinal'
,
'formAvaliacaoExterno'
,
'formAvaliacaoInterno'
];
public
function
endereco
(){
...
...
app/Http/Controllers/DocumentacaoComplementarController.php
View file @
e32e7701
...
...
@@ -17,9 +17,10 @@ class DocumentacaoComplementarController extends Controller
$docComp
=
DocumentacaoComplementar
::
find
(
$request
->
docId
);
}
else
{
$docComp
=
new
DocumentacaoComplementar
;
$docComp
->
save
();
}
$pasta
=
'docComplementar/'
.
Auth
::
user
()
->
id
;
$pasta
=
'docComplementar/'
.
$docComp
->
id
;
$docComp
->
termoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"Termo De Compromisso.pdf"
);
$docComp
->
comprovanteMatricula
=
Storage
::
putFileAs
(
$pasta
,
$request
->
comprovanteMatricula
,
"Comprovante De Matricula.pdf"
);
...
...
@@ -27,11 +28,9 @@ class DocumentacaoComplementarController extends Controller
$docComp
->
termoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"TermoDeCompromisso.pdf"
);
$docComp
->
participante_id
=
$request
->
partcipanteId
;
$docComp
->
linkLattes
=
$request
->
linkLattes
;
if
(
$request
->
docId
!=
null
){
$docComp
->
update
();
}
else
{
$docComp
->
save
();
}
$docComp
->
update
();
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
"Documentação complementar enviada com sucesso"
]);
...
...
app/Http/Controllers/EventoController.php
View file @
e32e7701
This diff is collapsed.
Click to expand it.
app/Http/Controllers/ParticipanteController.php
View file @
e32e7701
...
...
@@ -117,4 +117,16 @@ class ParticipanteController extends Controller
$participante
->
save
();
return
redirect
()
->
back
()
->
with
([
'mensagem'
=>
'Alteração da bolsa realizada com sucesso!'
]);
}
public
function
atualizarDocComplementar
(
Request
$request
){
$participante
=
Participante
::
find
(
$request
->
partcipanteId
);
$pasta
=
'participantes/'
.
$participante
->
id
;
$participante
->
anexoTermoCompromisso
=
Storage
::
putFileAs
(
$pasta
,
$request
->
termoCompromisso
,
"Termo_de_Compromisso.pdf"
);
$participante
->
anexoComprovanteMatricula
=
Storage
::
putFileAs
(
$pasta
,
$request
->
comprovanteMatricula
,
"Comprovante_de_Matricula.pdf"
);
$participante
->
anexoLattes
=
Storage
::
putFileAs
(
$pasta
,
$request
->
pdfLattes
,
"Curriculo_Lattes.pdf"
);
$participante
->
linkLattes
=
$request
->
linkLattes
;
$participante
->
update
();
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
"Documentação complementar enviada com sucesso"
]);
}
}
database/migrations/2022_0
2_22_094237_create_documentacao_complementars_table
.php
→
database/migrations/2022_0
3_17_085158_alter_table_eventos3
.php
View file @
e32e7701
...
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateDocumentacaoComplementarsTable
extends
Migration
class
AlterTableEventos3
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -13,17 +13,9 @@ class CreateDocumentacaoComplementarsTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'documentacao_complementars'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'termoCompromisso'
);
$table
->
string
(
'comprovanteMatricula'
);
$table
->
string
(
'pdfLattes'
);
$table
->
string
(
'linkLattes'
);
$table
->
integer
(
'participante_id'
)
->
nullable
();
$table
->
foreign
(
'participante_id'
)
->
references
(
'id'
)
->
on
(
'participantes'
);
$table
->
timestamps
();
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'formAvaliacaoExterno'
)
->
nullable
();
$table
->
string
(
'formAvaliacaoInterno'
)
->
nullable
();
});
}
...
...
@@ -34,6 +26,9 @@ class CreateDocumentacaoComplementarsTable extends Migration
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'documentacao_complementars'
);
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'formAvaliacaoExterno'
);
$table
->
dropColumn
(
'formAvaliacaoInterno'
);
});
}
}
resources/views/documentacaoComplementar/listar.blade.php
View file @
e32e7701
...
...
@@ -34,7 +34,9 @@
<td style="
text
-
align
:
center
;
" title="
{{
$participante
->
user
->
name
}}
">
{
{$participante->user->name}
}
</td>
<td style="
text
-
align
:
center
;
">
<button type="
button
" class="
btn
btn
-
primary
" data-toggle="
modal
" data-target="
#modalConfirm{{$participante->id}}" @if($trabalho->status!="aprovado")disabled="disabled" @endif>
@
if
(
$participante
->
documentacaoComplementar
==
null
)
@
if
(
$participante
->
anexoComprovanteMatricula
==
null
||
$participante
->
anexoTermoCompromisso
==
null
||
$participante
->
anexoLattes
==
null
||
$participante
->
linkLattes
==
null
)
Pendente
@
else
Visualizar
...
...
@@ -43,7 +45,7 @@
</
td
>
</
tbody
>
<
div
class
=
"modal fade"
id
=
"modalConfirm
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"dial
o
g"
<
div
class
=
"modal fade"
id
=
"modalConfirm
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"
o
dialg"
aria
-
labelledby
=
"modalConfirmLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-lg"
role
=
"document"
>
<
div
class
=
"modal-content"
>
...
...
@@ -57,7 +59,11 @@
<
input
type
=
"hidden"
value
=
"
{
{$participante->id}
}
"
name
=
"partcipanteId"
>
<
div
class
=
"row col-md-12"
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
Termo
de
Compromisso
</
label
>
<
label
class
=
"control-label "
>
Termo
de
Compromisso
@
if
(
$participante
->
anexoTermoCompromisso
)
:
<
a
id
=
"modeloDocumentoTemp"
href
=
"{{ route('baixar.documentosParticipante', ['pathDocumento' =>
$participante->anexoTermoCompromisso
]) }}"
>
Arquivo
atual
</
a
>
@
endif
</
label
>
<
br
>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"termoCompromisso"
accept
=
".pdf"
id
=
"termoCompromisso
{
{$participante->id}
}
"
required
/>
...
...
@@ -69,7 +75,11 @@
<
br
>
</
div
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
Comprovante
de
Matricula
</
label
>
<
label
class
=
"control-label "
>
Comprovante
de
Matricula
@
if
(
$participante
->
anexoComprovanteMatricula
)
:
<
a
id
=
"modeloDocumentoTemp"
href
=
"{{ route('baixar.documentosParticipante', ['pathDocumento' =>
$participante->anexoComprovanteMatricula
]) }}"
>
Arquivo
atual
</
a
>
@
endif
</
label
>
<
br
>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"comprovanteMatricula"
accept
=
".pdf"
id
=
"comprovanteMatricula
{
{$participante->id}
}
"
required
/>
@
error
(
'comprovanteMatricula'
)
...
...
@@ -81,7 +91,10 @@
</
div
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
PDF
Lattes
</
label
>
<
label
class
=
"control-label "
>
PDF
Lattes
@
if
(
$participante
->
anexoLattes
)
:
<
a
id
=
"modeloDocumentoTemp"
href
=
"{{ route('baixar.documentosParticipante', ['pathDocumento' =>
$participante->anexoLattes
]) }}"
>
Arquivo
atual
</
a
>
@
endif
</
label
>
<
br
>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"pdfLattes"
accept
=
".pdf"
id
=
"pdfLattes
{
{$participante->id}
}
"
required
/>
...
...
@@ -92,10 +105,10 @@
@
enderror
</
div
>
<
div
class
=
"col-md-6"
>
<
label
class
=
"control-label "
>
Link
Lattes
</
label
>
<
label
class
=
"control-label "
>
Link
Lattes
</
label
>
<
br
>
<
input
type
=
"text"
class
=
"input-group-text col-md-12"
name
=
"linkLattes"
placeholder
=
"Link Lattes"
id
=
"linkLattes
{
{$participante->id}
}
"
required
/>
required
@
if
(
$participante
->
linkLattes
)
value
=
"
{
{$participante->linkLattes}
}
"
@
endif
/>
@
error
(
'linkLattes'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
<
strong
>
{{
$message
}}
</
strong
>
...
...
resources/views/evento/criarEvento.blade.php
View file @
e32e7701
...
...
@@ -25,13 +25,13 @@
</
span
>
@
enderror
</
div
>
<
div
class
=
"col-sm-5"
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo*:'
)
}}
</
label
>
<
select
id
=
"tipo"
type
=
"text"
class
=
"form-control @error('tipo') is-invalid @enderror"
name
=
"tipo"
value
=
"{{ old('tipo') }}"
required
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBIC'
)
selected
@
endif
value
=
"PIBIC"
>
PIBIC
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBIC-EM'
)
selected
@
endif
value
=
"PIBIC-EM"
>
PIBIC
-
EM
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBITI'
)
selected
@
endif
value
=
"PIBITI"
>
PIBITI
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
'PIBITI'
)
selected
@
endif
value
=
"PIBITI"
>
PIBITI
</
option
>
</
select
>
@
error
(
'tipo'
)
...
...
@@ -45,8 +45,8 @@
<
label
for
=
"natureza"
class
=
"col-form-label"
>
{{
__
(
'Natureza*:'
)
}}
</
label
>
<
select
id
=
"natureza"
type
=
"text"
class
=
"form-control @error('natureza') is-invalid @enderror"
name
=
"natureza"
value
=
"{{ old('natureza') }}"
required
>
@
foreach
(
$naturezas
as
$natureza
)
<
option
@
if
(
old
(
'natureza'
)
==
$natureza
->
id
)
selected
@
endif
value
=
"{{
$natureza->id
}}"
>
{{
$natureza
->
nome
}}
</
option
>
@
endforeach
<
option
@
if
(
old
(
'natureza'
)
==
$natureza
->
id
)
selected
@
endif
value
=
"{{
$natureza->id
}}"
>
{{
$natureza
->
nome
}}
</
option
>
@
endforeach
</
select
>
@
error
(
'natureza'
)
...
...
@@ -57,7 +57,7 @@
</
div
>
<
div
class
=
"col-sm-2"
>
<
label
for
=
"numParticipantes"
class
=
"col-form-label"
>
{{
__
(
'Nº de Participantes*:'
)
}}
</
label
>
<
input
id
=
"numParticipantes"
type
=
"number"
min
=
"1"
max
=
"20"
class
=
"form-control @error('numParticipantes') is-invalid @enderror"
name
=
"numParticipantes"
value
=
"{{ old('numParticipantes') }}"
required
autocomplete
=
"numParticipantes"
autofocus
>
@
error
(
'numParticipantes'
)
...
...
@@ -127,10 +127,10 @@
<span class="
invalid
-
feedback
" role="
alert
">
<strong>
@if (
$message
!= null)
@for (
$i
= 0;
$i
< 9;
$i
++)
@for (
$i
= 0;
$i
< 9;
$i
++)
@if (
$i
< 8)
{{ explode("
",
$message
)[
$i
] }}
@else
@else
{{ date('d/m/Y', strtotime(explode("
",
$message
)[
$i
])) }}
@endif
@endfor
...
...
@@ -195,7 +195,7 @@
</span>
@enderror
</div>
</div>
<div class="
row
justify
-
content
-
left
">
<div class="
col
-
sm
-
6
">
...
...
@@ -208,7 +208,7 @@
</span>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label for="
resultado_final
" class="
col
-
form
-
label
">{{ __('Resultado Final*:') }}</label>
<input id="
resultado_final
" type="
date
" class="
form
-
control
@
error
(
'resultado_final'
)
is
-
invalid
@
enderror
" name="
resultado_final
" value="
{{
old
(
'resultado_final'
)
}}
" required autocomplete="
resultado
" autofocus>
...
...
@@ -288,11 +288,11 @@
<div class="
row
justify
-
content
-
center
" style="
margin
-
top
:
10
px
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
pdfEdital
">Anexar edital*:</label>
<label for="
pdfEdital
">Anexar edital*:</label>
@if(old('pdfEditalPreenchido') != null)
<a id="
pdfEditalTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'pdfEdital'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfEditalPreenchido
" name="
pdfEditalPreenchido
" value="
{{
old
(
'pdfEditalPreenchido'
)
}}
" >
<input type="
hidden
" id="
pdfEditalPreenchido
" name="
pdfEditalPreenchido
" value="
{{
old
(
'pdfEditalPreenchido'
)
}}
" >
<input type="
file
" accept="
.
pdf
" class="
form
-
control
-
file
pdf
@
error
(
'pdfEdital'
)
is
-
invalid
@
enderror
" name="
pdfEdital
" value="
{{
old
(
'pdfEdital'
)
}}
" id="
pdfEdital
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfEdital')
...
...
@@ -302,7 +302,7 @@
@enderror
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
modeloDocumento
">Anexar arquivo com os modelos de documentos do edital:</label>
...
...
@@ -319,7 +319,40 @@
@enderror
</div>
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
pdfFormAvalExterno
">Formulário de avaliação externo:</label>
@if(old('pdfFormAvalExternoPreenchido') != null)
<a id="
pdfFormAvalExternoTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'formAvaliacaoExterno'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfFormAvalExternoPreenchido
" name="
pdfFormAvalExternoPreenchido
" value="
{{
old
(
'pdfFormAvalExternoPreenchido'
)
}}
" >
<input type="
file
" accept="
.
pdf
" class="
form
-
control
-
file
pdf
@
error
(
'pdfFormAvalExterno'
)
is
-
invalid
@
enderror
" name="
pdfFormAvalExterno
" value="
{{
old
(
'pdfFormAvalExterno'
)
}}
" id="
pdfFormAvalExterno
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfFormAvalExterno')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
">
<label for="
pdfFormAvalExterno
">Formulário de avaliação interno:</label>
@if(old('pdfFormAvalInternoPreenchido') != null)
<a id="
pdfFormAvalExternoTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'formAvaliacaoInterno'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfFormAvalInternoPreenchido
" name="
pdfFormAvalInternoPreenchido
" value="
{{
old
(
'pdfFormAvalInternoPreenchido'
)
}}
" >
<input type="
file
" accept="
.
pdf
" class="
form
-
control
-
file
pdf
@
error
(
'pdfFormAvalInterno'
)
is
-
invalid
@
enderror
" name="
pdfFormAvalInterno
" value="
{{
old
(
'pdfFormAvalInterno'
)
}}
" id="
pdfFormAvalInterno
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfFormAvalInterno')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="
row
justify
-
content
-
center
" style="
margin
:
20
px
0
20
px
0
">
...
...
@@ -349,6 +382,14 @@
var modeloDocumentoPreenchido = document.getElementById('modeloDocumentoPreenchido');
modeloDocumentoPreenchido.value = "
sim
";
}
if(file.id === "
pdfFormAvalExterno
"){
var pdfFormAvalExternoPreenchido = document.getElementById('pdfFormAvalExternoPreenchido');
pdfFormAvalExternoPreenchido.value = "
sim
";
}
if(file.id === "
pdfFormAvalInterno
"){
var pdfFormAvalInternoPreenchido = document.getElementById('pdfFormAvalInternoPreenchido');
pdfFormAvalInternoPreenchido.value = "
sim
";
}
}
$("
input
[
type
=
'file'
]
").on("
change
", function () {
...
...
resources/views/evento/editarEvento.blade.php
View file @
e32e7701
...
...
@@ -311,6 +311,38 @@
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
externo
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoExterno
])}}"
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('pdfFormAvalExterno') is-invalid @enderror"
name
=
"pdfFormAvalExterno"
value
=
"{{ old('pdfFormAvalExterno') }}"
id
=
"pdfFormAvalExterno"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfFormAvalExterno'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"pdfEdital"
>
Formulário
de
avaliação
interno
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$evento->formAvaliacaoInterno
])}}"
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('pdfFormAvalInterno') is-invalid @enderror"
name
=
"pdfFormAvalInterno"
value
=
"{{ old('pdfFormAvalInterno') }}"
id
=
"pdfFormAvalInterno"
>
<
small
>
O
arquivo
selecionado
deve
ser
no
formato
PDF
de
até
2
mb
.
</
small
>
@
error
(
'pdfFormAvalInterno'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
</
div
>
...
...
routes/web.php
View file @
e32e7701
...
...
@@ -154,7 +154,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
//########## Documentação Complementar
Route
::
get
(
'/documentacaoComplementar'
,
'ParticipanteController@listarParticipanteProjeto'
)
->
name
(
'docComplementar.listar'
);
Route
::
post
(
'/documentacaoComplementar/enviar'
,
'
DocumentacaoComplementarController@cri
ar'
)
->
name
(
'docComplementar.enviar'
);
Route
::
post
(
'/documentacaoComplementar/enviar'
,
'
ParticipanteController@atualizarDocComplement
ar'
)
->
name
(
'docComplementar.enviar'
);
//######### Atribuição #######################################
Route
::
get
(
'/atribuir'
,
'AtribuicaoController@distribuicaoAutomatica'
)
->
name
(
'distribuicao'
);
...
...
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