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
50ce3448
Commit
50ce3448
authored
Jun 01, 2022
by
Guilherme Silva
Browse files
Ajuste do card de discente da edição da proposta
parent
d36032ee
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
50ce3448
...
@@ -805,15 +805,24 @@ class TrabalhoController extends Controller
...
@@ -805,15 +805,24 @@ class TrabalhoController extends Controller
return
back
()
->
withErrors
([
'Proposta não encontrada'
]);
return
back
()
->
withErrors
([
'Proposta não encontrada'
]);
}
}
$trabalho
->
update
(
$request
->
except
([
if
(
$evento
->
tipo
==
"PIBEX"
){
'anexoProjeto'
,
'anexoDecisaoCONSU'
,
'anexoPlanilhaPontuacao'
,
$trabalho
->
update
(
$request
->
except
([
'anexoLattesCoordenador'
,
'anexoGrupoPesquisa'
,
'justificativaAutorizacaoEtica'
,
'anexoAutorizacaoComiteEtica'
'anexoProjeto'
,
'anexoDecisaoCONSU'
,
'modalidade'
]));
}
else
{
$trabalho
->
update
(
$request
->
except
([
'anexoProjeto'
,
'anexoDecisaoCONSU'
,
'anexoPlanilhaPontuacao'
,
'anexoLattesCoordenador'
,
'anexoGrupoPesquisa'
,
'anexoAutorizacaoComiteEtica'
,
'justificativaAutorizacaoEtica'
,
'modalidade'
]));
}
]));
$pasta
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
;
$pasta
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
;
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$trabalho
->
save
();
$trabalho
->
save
();
if
(
$request
->
marcado
==
null
)
{
if
(
$request
->
marcado
==
null
)
{
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
...
@@ -883,8 +892,11 @@ class TrabalhoController extends Controller
...
@@ -883,8 +892,11 @@ class TrabalhoController extends Controller
$endereco
=
Endereco
::
create
(
$data
);
$endereco
=
Endereco
::
create
(
$data
);
$endereco
->
user
()
->
save
(
$user
);
$endereco
->
user
()
->
save
(
$user
);
$participante
=
Participante
::
create
(
$data
);
$participante
=
Participante
::
create
(
$data
);
$participante
->
data_entrada
=
$participante
->
created_at
;
$user
->
participantes
()
->
save
(
$participante
);
$user
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
save
();
}
else
{
}
else
{
// $user = $participante->user;
// $user = $participante->user;
...
@@ -905,10 +917,9 @@ class TrabalhoController extends Controller
...
@@ -905,10 +917,9 @@ class TrabalhoController extends Controller
}
}
if
(
$request
->
has
(
'anexoPlanoTrabalho'
)
&&
array_key_exists
(
$part
,
$request
->
anexoPlanoTrabalho
)
&&
$request
->
nomePlanoTrabalho
[
$part
]
!=
null
)
{
if
(
$request
->
has
(
'anexoPlanoTrabalho'
)
&&
array_key_exists
(
$part
,
$request
->
anexoPlanoTrabalho
))
{
if
(
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
count
())
{
if
(
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
count
())
{
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
();
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
where
(
'trabalhoId'
,
$trabalho
->
id
)
->
first
();
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$data
[
'nomePlanoTrabalho'
]
.
".pdf"
;
$nome
=
$data
[
'nomePlanoTrabalho'
]
.
".pdf"
;
$titulo
=
$data
[
'nomePlanoTrabalho'
];
$titulo
=
$data
[
'nomePlanoTrabalho'
];
...
...
resources/views/evento/formulario/participantes.blade.php
View file @
50ce3448
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<li
id=
"item"
>
<li
id=
"item"
>
<div
style=
"margin-bottom:15px"
>
<div
style=
"margin-bottom:15px"
>
<div
id=
"participante"
class=
"row"
>
<div
id=
"participante"
class=
"row"
>
@for($i = 0; $i
<
5
;
$
i
++)
@for($i = 0; $i
<
$
edital-
>
numParticipantes
; $i++)
<div
@
if
(!
isset
(
old
('
marcado
')[$
i
]))
hidden
@
endif
class=
"form-row mb-1 col-md-3"
style=
"margin-top: 10px"
id=
"part{{$i}}"
>
<div
@
if
(!
isset
(
old
('
marcado
')[$
i
]))
hidden
@
endif
class=
"form-row mb-1 col-md-3"
style=
"margin-top: 10px"
id=
"part{{$i}}"
>
<div
class=
"col-sm-4"
style=
"display: flex; align-items: center;"
>
<div
class=
"col-sm-4"
style=
"display: flex; align-items: center;"
>
...
...
resources/views/projeto/editaFormulario/anexos.blade.php
View file @
50ce3448
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"card-body"
style=
"padding-top: 0.2rem;"
>
<div
class=
"card-body"
style=
"padding-top: 0.2rem;"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"form-row mt-3"
>
<div
class=
"form-row mt-3"
>
<div
class=
"col-md-12"
><h5
style=
"color: #234B8B; font-weight: bold"
>
Anexos
</h5></div>
<div
class=
"col-md-12"
><h5
style=
"color: #234B8B; font-weight: bold"
>
Anexos
do Projeto
</h5></div>
</div>
</div>
<hr
style=
"border-top: 1px solid#1492E6; margin-bottom: 10px"
>
<hr
style=
"border-top: 1px solid#1492E6; margin-bottom: 10px"
>
...
...
resources/views/projeto/editaFormulario/participantes.blade.php
100755 → 100644
View file @
50ce3448
This diff is collapsed.
Click to expand it.
resources/views/projeto/editar.blade.php
View file @
50ce3448
...
@@ -33,15 +33,11 @@
...
@@ -33,15 +33,11 @@
@
include
(
'projeto.editaFormulario.proponente'
)
@
include
(
'projeto.editaFormulario.proponente'
)
@
include
(
'projeto.editaFormulario.anexos'
)
@
include
(
'projeto.editaFormulario.participantes'
)
@
include
(
'projeto.editaFormulario.participantes'
)
{{
--
@
include
(
'projeto.editaFormulario.participantes'
,
[
'estados'
=>
$estados
,
'enum_turno'
=>
$enum_turno
,
'edital'
=>
$edital
,
'projeto'
=>
$projeto
])
--
}}
@
include
(
'projeto.editaFormulario.anexos'
)
@
include
(
'projeto.editaFormulario.finalizar'
)
@
include
(
'projeto.editaFormulario.finalizar'
)
...
@@ -222,7 +218,39 @@
...
@@ -222,7 +218,39 @@
});
});
function
marcar
(
id
){
let
nome
=
document
.
getElementById
(
"nome"
+
id
);
let
linkNome
=
document
.
getElementById
(
"nomePart"
+
(
id
+
1
));
let
linkTituloProj
=
document
.
getElementById
(
"tituloProj"
+
(
id
+
1
));
let
planoTrabalho
=
document
.
getElementById
(
"nomePlanoTrabalho"
+
id
);
if
(
nome
.
value
!=
""
){
if
(
planoTrabalho
.
value
!=
""
){
linkNome
.
innerText
=
`Nome: ${nome.value} \n Plano: ${planoTrabalho.value}`
;
}
else
{
linkNome
.
innerText
=
`Nome: ${nome.value}`
;
}
}
if
(
id
>=
1
){
document
.
getElementById
(
"cancelar"
+
(
id
-
1
))
.
setAttribute
(
"disabled"
,
true
);
}
document
.
getElementById
(
"checkB"
+
id
)
.
checked
=
true
;
$
(
"#atribuir1"
)
.
attr
(
'data-target'
,
'#exampleModal'
+
(
id
+
1
));
document
.
getElementById
(
"part"
+
id
)
.
removeAttribute
(
"hidden"
);
document
.
getElementById
(
"exampleModal"
+
id
)
.
modal
(
'hide'
);
}
function
desmarcar
(
id
){
if
(
id
>=
1
){;
document
.
getElementById
(
"cancelar"
+
(
id
-
1
))
.
removeAttribute
(
"disabled"
);
}
document
.
getElementById
(
"checkB"
+
id
)
.
checked
=
false
;
document
.
getElementById
(
"part"
+
id
)
.
setAttribute
(
"hidden"
,
true
);
$
(
"#atribuir1"
)
.
attr
(
'data-target'
,
'#exampleModal'
+
(
id
));
document
.
getElementById
(
"exampleModal"
+
id
)
.
modal
(
'hide'
);
}
</
script
>
</
script
>
...
...
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