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
32d89c1a
Commit
32d89c1a
authored
Oct 21, 2022
by
unknown
Browse files
Adicinado a edição de ODS nas propostas
parent
8694c2c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
32d89c1a
...
...
@@ -454,6 +454,7 @@ class TrabalhoController extends Controller
$areaTematicas
=
AreaTematica
::
orderBy
(
'nome'
)
->
get
();
$areas
=
Area
::
all
();
$subareas
=
Subarea
::
all
();
$ODS
=
ObjetivoDeDesenvolvimentoSustentavel
::
orderBy
(
'nome'
)
->
get
();
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
get
();
$participantesUsersIds
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
select
(
'user_id'
)
->
get
();
...
...
@@ -475,6 +476,7 @@ class TrabalhoController extends Controller
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
'estados'
=>
$this
->
estados
,
'areaTematicas'
=>
$areaTematicas
,
'listaOds'
=>
$ODS
,
]);
}
...
...
@@ -844,6 +846,7 @@ class TrabalhoController extends Controller
'coordenador_id'
=>
$evento
->
coordenadorComissao
->
id
]);
$trabalho
=
Trabalho
::
find
(
$id
);
$trabalho
->
ods
()
->
sync
(
$request
->
ods
);
DB
::
beginTransaction
();
if
(
!
$trabalho
)
{
...
...
resources/views/projeto/editaFormulario/projeto.blade.php
View file @
32d89c1a
...
...
@@ -85,7 +85,23 @@
<strong>
{{ $message }}
</strong>
</span>
@enderror
</div>
</div>
<div
class=
"row col-md-12"
>
<div
class=
"form-group col-md-12"
>
<label
for=
"ods"
class=
"col-form-label"
style=
"font-weight: bold"
>
{{ __('Objetivo de Densenvolvimento Sustentável') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label><br>
<div
class=
"row col-md-12"
>
@foreach($listaOds as $ods)
<div
class=
"col-md-6"
>
<input
type=
"checkbox"
name=
"ods[]"
id=
"ods{{$ods->id}}"
value=
"{{$ods->id}}"
@
if
($
projeto-
>
ods->contains($ods->id)) checked @endif >
<label
class=
"form-check-label"
for=
"ods{{$ods->id}}"
>
{{ $ods->nome }}
</label>
</div>
@endforeach
</div>
</div>
</div>
@endif
</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