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
697a7c70
Commit
697a7c70
authored
May 21, 2021
by
Carlos André
Browse files
editar projeto
parent
72f53e8f
Changes
4
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
697a7c70
...
@@ -1059,7 +1059,7 @@ class TrabalhoController extends Controller
...
@@ -1059,7 +1059,7 @@ class TrabalhoController extends Controller
// Salvando participantes
// Salvando participantes
$this
->
salvarParticipantes
(
$request
,
$edital
,
$projeto
);
$this
->
salvarParticipantes
(
$request
,
$edital
,
$projeto
);
dd
(
"foi"
);
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Projeto submetido com sucesso!'
]
);
}
}
public
function
atribuirDados
(
Request
$request
,
$edital
,
Trabalho
$projeto
=
null
)
{
public
function
atribuirDados
(
Request
$request
,
$edital
,
Trabalho
$projeto
=
null
)
{
...
@@ -1246,7 +1246,7 @@ class TrabalhoController extends Controller
...
@@ -1246,7 +1246,7 @@ class TrabalhoController extends Controller
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$projeto
->
id
;
$arquivo
->
trabalhoId
=
$projeto
->
id
;
$arquivo
->
data
=
$agora
;
$arquivo
->
data
=
$agora
;
$arquivo
->
participanteId
=
$
participante
->
id
;
$arquivo
->
participanteId
=
$id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
$arquivo
->
save
();
}
}
...
@@ -1255,8 +1255,12 @@ class TrabalhoController extends Controller
...
@@ -1255,8 +1255,12 @@ class TrabalhoController extends Controller
// Excluidos
// Excluidos
$participantesExcluidos
=
$participantes
->
diff
(
$participantesPermanecem
);
$participantesExcluidos
=
$participantes
->
diff
(
$participantesPermanecem
);
foreach
(
$participantesExcluidos
as
$participante
)
{
foreach
(
$participantesExcluidos
as
$participante
)
{
$plano
=
$participante
->
planoTrabalho
;
$plano
->
delete
();
$participante
->
delete
();
$participante
->
delete
();
}
}
return
true
;
}
}
if
(
$request
->
emailParticipante
!=
null
)
{
if
(
$request
->
emailParticipante
!=
null
)
{
foreach
(
$request
->
emailParticipante
as
$key
=>
$email
)
{
foreach
(
$request
->
emailParticipante
as
$key
=>
$email
)
{
...
@@ -1351,6 +1355,8 @@ class TrabalhoController extends Controller
...
@@ -1351,6 +1355,8 @@ class TrabalhoController extends Controller
}
}
}
}
}
}
return
true
;
}
}
public
function
atualizar
(
Request
$request
,
$id
)
{
public
function
atualizar
(
Request
$request
,
$id
)
{
...
@@ -1369,6 +1375,6 @@ class TrabalhoController extends Controller
...
@@ -1369,6 +1375,6 @@ class TrabalhoController extends Controller
// Salvando participantes
// Salvando participantes
$this
->
salvarParticipantes
(
$request
,
$edital
,
$projeto
,
true
);
$this
->
salvarParticipantes
(
$request
,
$edital
,
$projeto
,
true
);
dd
(
"foi"
);
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Projeto atualizado com sucesso!'
]
);
}
}
}
}
\ No newline at end of file
resources/views/projeto/editar.blade.php
View file @
697a7c70
...
@@ -480,10 +480,9 @@
...
@@ -480,10 +480,9 @@
</div>
</div>
<h6 class="
mb
-
1
">Possui plano de trabalho?</h6>
<h6 class="
mb
-
1
">Possui plano de trabalho?</h6>
{
{dd($participantes[1]->user->email)}
}
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
simPlano
">Sim</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
simPlano
">Sim</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
naoPlano
">Não</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
naoPlano
">Não</button>
{{--
{
{dd($participantes)}
}
--}}
<div id="
planoHabilitado
" style="
display
:@
if
(
$participante
->
planoTrabalho
!=
null
)
block
;
@
else
none
;
@
endif
">
<div id="
planoHabilitado
" style="
display
:@
if
(
$participante
->
planoTrabalho
!=
null
)
block
;
@
else
none
;
@
endif
">
<h5>Dados do plano de trabalho</h5>
<h5>Dados do plano de trabalho</h5>
<div class="
row
">
<div class="
row
">
...
...
resources/views/proponente/projetos.blade.php
View file @
697a7c70
...
@@ -3,14 +3,15 @@
...
@@ -3,14 +3,15 @@
@
section
(
'content'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
@
if
(
isset
(
$mensagem
))
{{
--
@
if
(
isset
(
$mensagem
))
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
<
br
>
<
br
>
<
div
class
=
"alert alert-success"
>
<
div
class
=
"alert alert-success"
>
<
p
>
{{
$mensagem
}}
</
p
>
<
p
>
{{
$mensagem
}}
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endif
@
endif
--
}}
<
div
class
=
"container"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1"
>
<
div
class
=
"col-sm-1"
>
...
@@ -39,7 +40,19 @@
...
@@ -39,7 +40,19 @@
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
if
(
session
(
'mensagem'
))
<
div
class
=
"row"
>
<
div
class
=
"col-sm-12"
>
<
br
>
<
div
class
=
"alert alert-success"
>
<
p
>
{{
session
(
'mensagem'
)}}
</
p
>
</
div
>
</
div
>
</
div
>
@
endif
<
hr
>
<
hr
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
table
class
=
"table table-bordered"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
thead
>
<
tr
>
<
tr
>
...
@@ -124,6 +137,8 @@
...
@@ -124,6 +137,8 @@
@
endforeach
@
endforeach
</
tbody
>
</
tbody
>
</
table
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
endsection
...
...
routes/web.php
View file @
697a7c70
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