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
bc3a8113
Commit
bc3a8113
authored
Jul 03, 2021
by
Gabriel-31415
Browse files
ajustes
parent
f06d9de5
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
bc3a8113
...
@@ -721,8 +721,7 @@ class TrabalhoController extends Controller
...
@@ -721,8 +721,7 @@ class TrabalhoController extends Controller
$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
();
// dd($request->all());
// dd($request->has('justificativaAutorizacaoEtica') && ($request->justificativaAutorizacaoEtica == null));
if
(
$request
->
has
(
'anexoAutorizacaoComiteEtica'
)){
if
(
$request
->
has
(
'anexoAutorizacaoComiteEtica'
)){
$trabalho
->
justificativaAutorizacaoEtica
=
null
;
$trabalho
->
justificativaAutorizacaoEtica
=
null
;
$trabalho
->
save
();
$trabalho
->
save
();
...
@@ -732,27 +731,24 @@ class TrabalhoController extends Controller
...
@@ -732,27 +731,24 @@ class TrabalhoController extends Controller
}
}
$trabalho
->
update
(
$request
->
except
([
$trabalho
->
update
(
$request
->
except
([
'anexoProjeto'
,
'anexoDecisaoCONSU'
,
'anexoPlanilhaPontuacao'
,
'anexoProjeto'
,
'anexoDecisaoCONSU'
,
'anexoPlanilhaPontuacao'
,
'anexoLattesCoordenador'
,
'anexoGrupoPesquisa'
,
'justificativaAutorizacaoEtica'
,
'anexoLattesCoordenador'
,
'anexoGrupoPesquisa'
'anexoAutorizacaoComiteEtica'
]));
]));
// dd($trabalho);
if
(
$request
->
marcado
==
null
)
{
if
(
$request
->
marcado
==
null
)
{
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
}
else
{
}
else
{
$idExcluido
=
[];
$idExcluido
=
[];
}
}
// dd($idExcluido);
// dd(array_search( 2, $request->marcado));
foreach
(
$request
->
participante_id
as
$key
=>
$value
)
{
foreach
(
$request
->
participante_id
as
$key
=>
$value
)
{
// $value = intval($value);
if
(
$request
->
marcado
!=
null
&&
array_search
(
$key
,
$request
->
marcado
)
===
false
){
if
(
$request
->
marcado
!=
null
&&
array_search
(
$key
,
$request
->
marcado
)
===
false
){
if
(
$value
!==
null
)
if
(
$value
!==
null
)
array_push
(
$idExcluido
,
$value
);
array_push
(
$idExcluido
,
$value
);
}
}
}
}
// dd($idExcluido);
foreach
(
$idExcluido
as
$key
=>
$value
)
{
foreach
(
$idExcluido
as
$key
=>
$value
)
{
$trabalho
->
participantes
()
->
find
(
$value
)
->
delete
();
$trabalho
->
participantes
()
->
find
(
$value
)
->
delete
();
}
}
...
...
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