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
bd9727a3
Commit
bd9727a3
authored
5 years ago
by
carlos
Browse files
Options
Download
Email Patches
Plain Diff
criar projeto em edital de pibiti
parent
323bcad2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Http/Controllers/TrabalhoController.php
+12
-6
app/Http/Controllers/TrabalhoController.php
database/migrations/2020_02_05_123048_create_trabalhos_table.php
+2
-2
...e/migrations/2020_02_05_123048_create_trabalhos_table.php
with
14 additions
and
8 deletions
+14
-8
app/Http/Controllers/TrabalhoController.php
View file @
bd9727a3
...
...
@@ -133,7 +133,7 @@ class TrabalhoController extends Controller
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
,
]);
//dd($trabalho);
}
else
{
}
else
{
//Caso em que o anexo da Decisão do CONSU não necessário
$validatedData
=
$request
->
validate
([
'editalId'
=>
[
'required'
,
'string'
],
...
...
@@ -144,7 +144,6 @@ class TrabalhoController extends Controller
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupo'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'nomeCoordenador'
=>
[
'required'
,
'string'
],
'nomeParticipante.*'
=>
[
'required'
,
'string'
],
'emailParticipante.*'
=>
[
'required'
,
'string'
],
'funcaoParticipante.*'
=>
[
'required'
,
'string'
],
...
...
@@ -160,8 +159,7 @@ class TrabalhoController extends Controller
'coordenador_id'
=>
$coordenador
->
id
,
'grande_area_id'
=>
$request
->
grandeArea
,
'area_id'
=>
$request
->
area
,
'sub_area_id'
=>
$request
->
subArea
,
'coordenador'
=>
$request
->
nomeCoordenador
,
'sub_area_id'
=>
$request
->
subArea
,
'pontuacaoPlanilha'
=>
$request
->
pontuacaoPlanilha
,
'linkGrupoPesquisa'
=>
$request
->
linkGrupo
,
'linkLattesEstudante'
=>
$request
->
linkLattesEstudante
,
...
...
@@ -238,9 +236,17 @@ class TrabalhoController extends Controller
$pasta
=
'trabalhos/'
.
$request
->
editalId
.
'/'
.
$trabalho
->
id
;
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
"CONSU.pdf"
);
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
)
{
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
"CONSU.pdf"
);
}
if
(
!
(
is_null
(
$request
->
anexoComiteEtica
)))
{
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
"Comite_de_etica.pdf"
);
}
else
{
$trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
"Justificativa.pdf"
);
}
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
"Projeto.pdf"
);
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
"Comite_de_etica.pdf"
);
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLatterCoordenador
,
"Latter_Coordenador.pdf"
);
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha.pdf"
);
$trabalho
->
update
();
...
...
This diff is collapsed.
Click to expand it.
database/migrations/2020_02_05_123048_create_trabalhos_table.php
View file @
bd9727a3
...
...
@@ -26,8 +26,8 @@ class CreateTrabalhosTable extends Migration
$table
->
string
(
'anexoDecisaoCONSU'
)
->
nullable
();
$table
->
string
(
'anexoPlanilhaPontuacao'
);
$table
->
string
(
'anexoLattesCoordenador'
);
$table
->
string
(
'anexoAutorizacaoComiteEtica'
)
->
nullable
();
;
$table
->
string
(
'
J
ustificativaAutorizacaoEtica'
)
->
nullable
();
;
$table
->
string
(
'anexoAutorizacaoComiteEtica'
)
->
nullable
();
$table
->
string
(
'
j
ustificativaAutorizacaoEtica'
)
->
nullable
();
//chaves estrangeiras
$table
->
unsignedBigInteger
(
'grande_area_id'
);
$table
->
unsignedBigInteger
(
'area_id'
);
...
...
This diff is collapsed.
Click to expand it.
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