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
0f03a5f0
Commit
0f03a5f0
authored
Jun 23, 2020
by
alinetenorio
Browse files
ajustando path dos anexos do rascunho
parent
8d059a91
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
0f03a5f0
...
@@ -124,7 +124,7 @@ class TrabalhoController extends Controller
...
@@ -124,7 +124,7 @@ class TrabalhoController extends Controller
'botao'
=>
[
'required'
],
'botao'
=>
[
'required'
],
'anexoComiteEtica'
=>
[(
$request
->
anexoComitePreenchido
!==
'sim'
&&
$request
->
anexoJustificativaPreenchido
!==
'sim'
?
'required_without:justificativaAutorizacaoEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoComiteEtica'
=>
[(
$request
->
anexoComitePreenchido
!==
'sim'
&&
$request
->
anexoJustificativaPreenchido
!==
'sim'
?
'required_without:justificativaAutorizacaoEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'justificativaAutorizacaoEtica'
=>
[(
$request
->
anexoJustificativaPreenchido
!==
'sim'
&&
$request
->
anexoComitePreenchido
!==
'sim'
?
'required_without:anexoComiteEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'justificativaAutorizacaoEtica'
=>
[(
$request
->
anexoJustificativaPreenchido
!==
'sim'
&&
$request
->
anexoComitePreenchido
!==
'sim'
?
'required_without:anexoComiteEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls'
,
'max:2000000'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf,xls'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
]);
...
@@ -144,12 +144,12 @@ class TrabalhoController extends Controller
...
@@ -144,12 +144,12 @@ class TrabalhoController extends Controller
$trabalho
[
'status'
]
=
'Submetido'
;
$trabalho
[
'status'
]
=
'Submetido'
;
$trabalho
[
'proponente_id'
]
=
$proponente
->
id
;
$trabalho
[
'proponente_id'
]
=
$proponente
->
id
;
//Anexos
//Anexos
$trabalho
[
'anexoDecisaoCONSU'
]
=
$request
->
anexoCONSU
!=
null
?
$request
->
anexoCONSU
:
""
;
$trabalho
[
'anexoDecisaoCONSU'
]
=
$request
->
anexoCONSU
!=
null
?
$request
->
anexoCONSU
:
$trabalho
->
anexoDecisaoCONSU
;
$trabalho
[
'anexoProjeto'
]
=
$request
->
anexoProjeto
!=
null
?
$request
->
anexoProjeto
:
""
;
$trabalho
[
'anexoProjeto'
]
=
$request
->
anexoProjeto
!=
null
?
$request
->
anexoProjeto
:
$trabalho
->
anexoProjeto
;
$trabalho
[
'anexoAutorizacaoComiteEtica'
]
=
$request
->
anexoComiteEtica
!=
null
?
$request
->
anexoComiteEtica
:
""
;
$trabalho
[
'anexoAutorizacaoComiteEtica'
]
=
$request
->
anexoComiteEtica
!=
null
?
$request
->
anexoComiteEtica
:
$trabalho
->
anexoAutorizacaoComiteEtica
;
$trabalho
[
'justificativaAutorizacaoEtica'
]
=
$request
->
justificativaAutorizacaoEtica
!=
null
?
$request
->
justificativaAutorizacaoEtica
:
""
;
$trabalho
[
'justificativaAutorizacaoEtica'
]
=
$request
->
justificativaAutorizacaoEtica
!=
null
?
$request
->
justificativaAutorizacaoEtica
:
$trabalho
->
justificativaAutorizacaoEtica
;
$trabalho
[
'anexoLattesCoordenador'
]
=
$request
->
anexoLattesCoordenador
!=
null
?
$request
->
anexoLattesCoordenador
:
""
;
$trabalho
[
'anexoLattesCoordenador'
]
=
$request
->
anexoLattesCoordenador
!=
null
?
$request
->
anexoLattesCoordenador
:
$trabalho
->
anexoLattesCoordenador
;
$trabalho
[
'anexoPlanilhaPontuacao'
]
=
$request
->
anexoPlanilha
!=
null
?
$request
->
anexoPlanilha
:
""
;
$trabalho
[
'anexoPlanilhaPontuacao'
]
=
$request
->
anexoPlanilha
!=
null
?
$request
->
anexoPlanilha
:
$trabalho
->
anexoPlanilhaPontuacao
;
//dd($trabalho);
//dd($trabalho);
}
else
{
}
else
{
...
@@ -372,32 +372,32 @@ class TrabalhoController extends Controller
...
@@ -372,32 +372,32 @@ class TrabalhoController extends Controller
public
function
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
){
public
function
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
){
// Anexo Projeto
// Anexo Projeto
if
(
(
!
isset
(
$request
->
anexoProjeto
)
&&
$request
->
anexoProjetoPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoProjeto
)){
if
(
isset
(
$request
->
anexoProjeto
)){
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
'Projeto.pdf'
);
$trabalho
->
anexoProjeto
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoProjeto
,
'Projeto.pdf'
);
}
}
//Anexo Decisão CONSU
//Anexo Decisão CONSU
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
)
{
if
(
$evento
->
tipo
==
'PIBIC'
||
$evento
->
tipo
==
'PIBIC-EM'
)
{
if
(
(
!
isset
(
$request
->
anexoCONSU
)
&&
$request
->
anexoConsuPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoCONSU
)){
if
(
isset
(
$request
->
anexoCONSU
)){
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
'CONSU.pdf'
);
$trabalho
->
anexoDecisaoCONSU
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoCONSU
,
'CONSU.pdf'
);
}
}
}
}
//Autorização ou Justificativa
//Autorização ou Justificativa
if
(
(
!
isset
(
$request
->
anexoComiteEtica
)
&&
$request
->
anexoComitePreenchido
==
'sim'
)
||
isset
(
$request
->
anexoComiteEtica
)){
if
(
isset
(
$request
->
anexoComiteEtica
)){
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
'Comite_de_etica.pdf'
);
$trabalho
->
anexoAutorizacaoComiteEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoComiteEtica
,
'Comite_de_etica.pdf'
);
}
elseif
(
(
!
isset
(
$request
->
justificativaAutorizacaoEtica
)
&&
$request
->
anexoJustificativaPreenchido
==
'sim'
)
||
isset
(
$request
->
justificativaAutorizacaoEtica
)){
}
elseif
(
isset
(
$request
->
justificativaAutorizacaoEtica
)){
$trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
'Justificativa.pdf'
);
$trabalho
->
justificativaAutorizacaoEtica
=
Storage
::
putFileAs
(
$pasta
,
$request
->
justificativaAutorizacaoEtica
,
'Justificativa.pdf'
);
}
}
//Anexo Lattes
//Anexo Lattes
if
(
(
!
isset
(
$request
->
anexoLattesCoordenador
)
&&
$request
->
anexoLattesPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoLattesCoordenador
)){
if
(
isset
(
$request
->
anexoLattesCoordenador
)){
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
'Lattes_Coordenador.pdf'
);
$trabalho
->
anexoLattesCoordenador
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoLattesCoordenador
,
'Lattes_Coordenador.pdf'
);
}
}
//Anexo Planilha
//Anexo Planilha
if
(
(
!
isset
(
$request
->
anexoPlanilha
)
&&
$request
->
anexoPlanilhaPreenchido
==
'sim'
)
||
isset
(
$request
->
anexoPlanilha
)){
if
(
isset
(
$request
->
anexoPlanilha
)){
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha."
.
$request
->
file
(
'anexoPlanilha'
)
->
extension
());
$trabalho
->
anexoPlanilhaPontuacao
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexoPlanilha
,
"Planilha."
.
$request
->
file
(
'anexoPlanilha'
)
->
extension
());
}
}
...
@@ -868,6 +868,7 @@ class TrabalhoController extends Controller
...
@@ -868,6 +868,7 @@ class TrabalhoController extends Controller
public
function
baixarAnexoProjeto
(
$id
)
{
public
function
baixarAnexoProjeto
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
$projeto
=
Trabalho
::
find
(
$id
);
//dd($projeto);
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
anexoProjeto
))
{
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
anexoProjeto
))
{
return
Storage
::
download
(
$projeto
->
anexoProjeto
);
return
Storage
::
download
(
$projeto
->
anexoProjeto
);
}
}
...
...
resources/views/evento/submeterTrabalho.blade.php
View file @
0f03a5f0
...
@@ -142,7 +142,8 @@
...
@@ -142,7 +142,8 @@
<a id="
anexoProjetoTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
<a id="
anexoProjetoTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoProjeto'
])}}
">Arquivo atual</a>
'nomeAnexo'
=>
'anexoProjeto'
])}}
">Arquivo atual</a>
@endif
@endif
<input type="
hidden
" id="
anexoProjetoPreenchido
" name="
anexoProjetoPreenchido
" value="
{{
old
(
'anexoProjetoPreenchido'
)
}}
" >
<input type="
hidden
" id="
anexoProjetoPreenchido
" name="
anexoProjetoPreenchido
"
@if( isset(
$rascunho
) &&
$rascunho->anexoProjeto
!= "") value="
sim
" @else value="
old
(
'anexoProjetoPreenchido'
)
" @endif >
<div class="
input
-
group
">
<div class="
input
-
group
">
<div class="
custom
-
file
">
<div class="
custom
-
file
">
...
@@ -163,7 +164,8 @@
...
@@ -163,7 +164,8 @@
<a id="
anexoLattesTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
<a id="
anexoLattesTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoLattesCoordenador'
])}}
">Arquivo atual</a>
'nomeAnexo'
=>
'anexoLattesCoordenador'
])}}
">Arquivo atual</a>
@endif
@endif
<input type="
hidden
" id="
anexoLattesPreenchido
" name="
anexoLattesPreenchido
" value="
{{
old
(
'anexoLattesPreenchido'
)
}}
" >
<input type="
hidden
" id="
anexoLattesPreenchido
" name="
anexoLattesPreenchido
"
@if( isset(
$rascunho
) &&
$rascunho->anexoLattesCoordenador
!= "") value="
sim
" @else value="
old
(
'anexoLattesPreenchido'
)
" @endif >
<div class="
input
-
group
">
<div class="
input
-
group
">
...
@@ -195,7 +197,9 @@
...
@@ -195,7 +197,9 @@
<a id="
anexoComiteTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
<a id="
anexoComiteTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoAutorizacaoComiteEtica'
])}}
">Arquivo atual</a>
'nomeAnexo'
=>
'anexoAutorizacaoComiteEtica'
])}}
">Arquivo atual</a>
@endif
@endif
<input type="
hidden
" id="
anexoComitePreenchido
" name="
anexoComitePreenchido
" value="
{{
old
(
'anexoComitePreenchido'
)
}}
" >
<input type="
hidden
" id="
anexoComitePreenchido
" name="
anexoComitePreenchido
"
@if( isset(
$rascunho
) &&
$rascunho->anexoAutorizacaoComiteEtica
!= "") value="
sim
" @else value="
old
(
'anexoComitePreenchido'
)
" @endif >
<div class="
input
-
group
">
<div class="
input
-
group
">
<div class="
custom
-
file
">
<div class="
custom
-
file
">
...
@@ -216,7 +220,8 @@
...
@@ -216,7 +220,8 @@
<a id="
anexoPlanilhaTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
<a id="
anexoPlanilhaTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoPlanilhaPontuacao'
])}}
">Arquivo atual</a>
'nomeAnexo'
=>
'anexoPlanilhaPontuacao'
])}}
">Arquivo atual</a>
@endif
@endif
<input type="
hidden
" id="
anexoPlanilhaPreenchido
" name="
anexoPlanilhaPreenchido
" value="
{{
old
(
'anexoPlanilhaPreenchido'
)
}}
" >
<input type="
hidden
" id="
anexoPlanilhaPreenchido
" name="
anexoPlanilhaPreenchido
"
@if( isset(
$rascunho
) &&
$rascunho->anexoPlanilhaPontuacao
!= "") value="
sim
" @else value="
old
(
'anexoPlanilhaPreenchido'
)
" @endif >
<div class="
input
-
group
">
<div class="
input
-
group
">
<div class="
custom
-
file
">
<div class="
custom
-
file
">
...
@@ -237,7 +242,8 @@
...
@@ -237,7 +242,8 @@
<a id="
anexoJustificativaTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
<a id="
anexoJustificativaTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'justificativaAutorizacaoEtica'
])}}
">Arquivo atual</a>
'nomeAnexo'
=>
'justificativaAutorizacaoEtica'
])}}
">Arquivo atual</a>
@endif
@endif
<input type="
hidden
" id="
anexoJustificativaPreenchido
" name="
anexoJustificativaPreenchido
" value="
{{
old
(
'anexoJustificativaPreenchido'
)
}}
" >
<input type="
hidden
" id="
anexoJustificativaPreenchido
" name="
anexoJustificativaPreenchido
"
@if( isset(
$rascunho
) &&
$rascunho->justificativaAutorizacaoEtica
!= "") value="
sim
" @else value="
old
(
'anexoJustificativaPreenchido'
)
" @endif >
<div class="
input
-
group
">
<div class="
input
-
group
">
...
@@ -261,8 +267,8 @@
...
@@ -261,8 +267,8 @@
<a id="
anexoConsuTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
<a id="
anexoConsuTemp
" href="
{{
route
(
'baixar.anexo.temp'
,
[
'eventoId'
=>
$edital
->
id
,
'nomeAnexo'
=>
'anexoDecisaoCONSU'
])}}
">Arquivo atual</a>
'nomeAnexo'
=>
'anexoDecisaoCONSU'
])}}
">Arquivo atual</a>
@endif
@endif
<input type="
hidden
" id="
anexoConsuPreenchido
" name="
anexoConsuPreenchido
"
value="
{{
old
(
'anexoConsuPreenchido'
)
}}
" >
<input type="
hidden
" id="
anexoConsuPreenchido
" name="
anexoConsuPreenchido
"
@if( isset(
$rascunho
) &&
$rascunho->anexoDecisaoCONSU
!= "") value="
sim
" @else value="
old
(
'anexoConsuPreenchido'
)
" @endif >
<div class="
input
-
group
">
<div class="
input
-
group
">
<div class="
custom
-
file
">
<div class="
custom
-
file
">
...
@@ -605,11 +611,11 @@
...
@@ -605,11 +611,11 @@
"<div class="
+
"input-group"
+
">"
+
"<div class="
+
"input-group"
+
">"
+
"<div class='input-group-prepend'>"
+
"<div class='input-group-prepend'>"
+
"<span class='input-group-text' id='
inputGroupFileAddon01
'>Selecione um arquivo:</span>"
+
"<span class='input-group-text' id='
anexoPlanoTrabalho
'>Selecione um arquivo:</span>"
+
"</div>"
+
"</div>"
+
"<div class='custom-file'>"
+
"<div class='custom-file'>"
+
"<input type='file' class='custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror"
+
"id='
inputGroupFile01
'"
+
"<input type='file' class='custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror"
+
"id='
anexoPlanoTrabalho
'"
+
"aria-describedby='
inputGroupFileAddon01
' name='anexoPlanoTrabalho[]'>"
+
"
aria-describedby='
anexoPlanoTrabalho
' name='anexoPlanoTrabalho[]'>"
+
"<label class='custom-file-label' id='custom-file-label' for='inputGroupFile01'>O arquivo deve ser no formato PDF de até 2mb.</label>"
+
"<label class='custom-file-label' id='custom-file-label' for='inputGroupFile01'>O arquivo deve ser no formato PDF de até 2mb.</label>"
+
"</div>"
+
"</div>"
+
"</div>"
+
"</div>"
+
...
...
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