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
c061666d
Commit
c061666d
authored
Apr 19, 2022
by
Guilherme Silva
Browse files
Atualizado modo no qual é atribuido um coordenador no edital
parent
23b93973
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
c061666d
...
@@ -347,13 +347,15 @@ class EventoController extends Controller
...
@@ -347,13 +347,15 @@ class EventoController extends Controller
// dd($id);
// dd($id);
$evento
=
Evento
::
find
(
$id
);
$evento
=
Evento
::
find
(
$id
);
$coordenadors
=
CoordenadorComissao
::
with
(
'user'
)
->
get
();
$coordenadors
=
CoordenadorComissao
::
with
(
'user'
)
->
get
();
$coordEvent
=
CoordenadorComissao
::
find
(
$evento
->
coordenadorId
);
$naturezas
=
Natureza
::
orderBy
(
'nome'
)
->
get
();
$naturezas
=
Natureza
::
orderBy
(
'nome'
)
->
get
();
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
$yesterday
->
toDateString
();
$yesterday
=
$yesterday
->
toDateString
();
return
view
(
'evento.editarEvento'
,[
'evento'
=>
$evento
,
return
view
(
'evento.editarEvento'
,[
'evento'
=>
$evento
,
'coordenadores'
=>
$coordenadors
,
'coordenadores'
=>
$coordenadors
,
'naturezas'
=>
$naturezas
,
'naturezas'
=>
$naturezas
,
'ontem'
=>
$yesterday
]);
'ontem'
=>
$yesterday
,
'coordEvent'
=>
$coordEvent
]);
}
}
/**
/**
...
...
resources/views/evento/criarEvento.blade.php
View file @
c061666d
...
@@ -106,13 +106,27 @@
...
@@ -106,13 +106,27 @@
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"coordenador_id"
class
=
"col-form-label"
>
{{
__
(
'Coordenador*:'
)
}}
</
label
>
<
div
class
=
"row"
>
<
select
class
=
"form-control @error('coordenador_id') is-invalid @enderror"
id
=
"coordenador_id"
name
=
"coordenador_id"
>
<
div
class
=
"col-md-11"
>
<
label
for
=
"coordenador_id"
class
=
"col-form-label"
>
{{
__
(
'Coordenador*: '
)
}}
</
label
>
</
div
>
<
div
class
=
"col-md-1 text-sm-right"
>
<
a
type
=
"button"
value
=
"Selecionar"
data
-
toggle
=
"modal"
data
-
target
=
"#modalCoord"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/add.ico')}
}
"
style
=
"width:30px"
alt
=
""
>
</
a
>
</
div
>
</
div
>
<
input
id
=
"coordenador_id"
name
=
"coordenador_id"
class
=
"form-control"
value
=
""
hidden
>
<
input
style
=
"margin-top: 5px"
id
=
"coordenador_name"
name
=
"coordenador_name"
class
=
"form-control @error('coordenador_id') is-invalid @enderror"
value
=
""
placeholder
=
"Nenhum Coordenador atribuido"
required
readonly
>
{{
--
<
select
class
=
"form-control @error('coordenador_id') is-invalid @enderror"
id
=
"coordenador_id"
name
=
"coordenador_id"
style
=
"pointer-events: none"
>
<
option
value
=
""
disabled
selected
hidden
>--
Coordenador
da
Comissão
Avaliadora
--</
option
>
<
option
value
=
""
disabled
selected
hidden
>--
Coordenador
da
Comissão
Avaliadora
--</
option
>
@
foreach
(
$coordenadors
as
$coordenador
)
@
foreach
(
$coordenadors
as
$coordenador
)
<
option
@
if
(
old
(
'coordenador_id'
)
==
$coordenador
->
id
)
selected
@
endif
value
=
"
{
{$coordenador->id}}">{{$coordenador->user->name}
}
</option>
<
option
@
if
(
old
(
'coordenador_id'
)
==
$coordenador
->
id
)
selected
@
endif
value
=
"
{
{$coordenador->id}}">{{$coordenador->user->name}
}
</option>
@endforeach
@endforeach
</select>
</select>
--}}
@error('coordenador_id')
@error('coordenador_id')
<span class="
invalid
-
feedback
" role="
alert
">
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
}}</strong>
<strong>{{
$message
}}</strong>
...
@@ -120,6 +134,54 @@
...
@@ -120,6 +134,54 @@
@enderror
@enderror
</div>
</div>
</div>
</div>
<!-- Modal Coordenador -->
<div class="
modal
fade
" id="
modalCoord
" tabindex="
-
1
" role="
dialog
" aria-labelledby="
exampleModalLabel
" aria-hidden="
true
">
<div class="
modal
-
dialog
modal
-
dialog
-
centered
modal
-
lg
">
<div class="
modal
-
content
">
<div class="
modal
-
header
" style="
overflow
-
x
:
auto
">
<h5 class="
modal
-
title
" id="
exampleModalLabel
" style="
color
:
#1492E6">Coordenadores</h5>
<
button
type
=
"button"
class
=
"close"
aria
-
label
=
"Close"
data
-
dismiss
=
"modal"
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
</
th
>
<
th
scope
=
"col"
>
Email
</
th
>
<
th
scope
=
"col"
>
Celular
</
th
>
<
th
scope
=
"col"
>
Instituição
</
th
>
<
th
scope
=
"col"
>
Seleção
</
th
>
</
tr
>
</
thead
>
<
tbody
id
=
"projetos"
>
@
foreach
(
$coordenadors
as
$coordenador
)
<
tr
>
<
td
>
{{
$coordenador
->
user
->
name
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
email
}}
</
td
>
@
if
(
$coordenador
->
user
->
instituicao
|=
null
)
<
td
>
{{
$coordenador
->
user
->
celular
}}
</
td
>
@
else
<
td
>
Não
Definido
</
td
>
@
endif
@
if
(
$coordenador
->
user
->
instituicao
|=
null
)
<
td
>
{{
$coordenador
->
user
->
instituicao
}}
</
td
>
@
else
<
td
>
Não
Definida
</
td
>
@
endif
<
td
style
=
"text-align-last:center"
><
input
type
=
"button"
class
=
"btn-primary btn"
value
=
"Definir"
onclick
=
"defCoord(
{
{$coordenador->id}},'{{$coordenador->user->name}
}
')"
style
=
"width: 100px"
></
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
hr
>
<
div
class
=
"row subtitulo"
>
<
div
class
=
"row subtitulo"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
...
@@ -405,5 +467,12 @@
...
@@ -405,5 +467,12 @@
$
(
this
)
.
val
(
''
);
$
(
this
)
.
val
(
''
);
}
}
});
});
function
defCoord
(
data
,
data2
){
document
.
getElementById
(
'coordenador_id'
)
.
value
=
data
;
document
.
getElementById
(
'coordenador_name'
)
.
value
=
data2
;
$
(
"#modalCoord"
)
.
modal
(
'hide'
);
}
</
script
>
</
script
>
@
endsection
@
endsection
\ No newline at end of file
resources/views/evento/editarEvento.blade.php
View file @
c061666d
...
@@ -111,19 +111,70 @@
...
@@ -111,19 +111,70 @@
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"coordenador_id"
class
=
"col-form-label"
>
{{
__
(
'Coordenador*:'
)
}}
</
label
>
<
div
class
=
"row"
>
<
select
class
=
"form-control @error('funcaoParticipante') is-invalid @enderror"
id
=
"coordenador_id"
name
=
"coordenador_id"
>
<
div
class
=
"col-md-11"
>
<
option
value
=
""
disabled
selected
hidden
>--
Coordenador
da
Comissão
Avaliadora
--</
option
>
<
label
for
=
"coordenador_id"
class
=
"col-form-label"
>
{{
__
(
'Coordenador*: '
)
}}
</
label
>
</
div
>
<
div
class
=
"col-md-1 text-sm-right"
>
<
a
type
=
"button"
value
=
"Selecionar"
data
-
toggle
=
"modal"
data
-
target
=
"#modalCoord"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/add.ico')}
}
"
style
=
"width:30px"
alt
=
""
>
</
a
>
</
div
>
</
div
>
<
input
id
=
"coordenador_id"
name
=
"coordenador_id"
class
=
"form-control"
value
=
"
{
{$evento->coordenadorId}
}
"
hidden
>
<
input
style
=
"margin-top: 5px"
id
=
"coordenador_name"
name
=
"coordenador_name"
class
=
"form-control @error('coordenador_id') is-invalid @enderror"
value
=
"
{
{$coordEvent->user->name}
}
"
placeholder
=
"Selecione um Coordenador"
required
readonly
>
</
div
>
</
div
>
<!--
Modal
Coordenador
-->
<
div
class
=
"modal fade"
id
=
"modalCoord"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
Coordenadores
</
h5
>
<
button
type
=
"button"
class
=
"close"
aria
-
label
=
"Close"
data
-
dismiss
=
"modal"
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
</
th
>
<
th
scope
=
"col"
>
Email
</
th
>
<
th
scope
=
"col"
>
Celular
</
th
>
<
th
scope
=
"col"
>
Instituição
</
th
>
<
th
scope
=
"col"
>
Seleção
</
th
>
</
tr
>
</
thead
>
<
tbody
id
=
"projetos"
>
@
foreach
(
$coordenadores
as
$coordenador
)
@
foreach
(
$coordenadores
as
$coordenador
)
@
if
(
$coordenador
->
id
===
$evento
->
coordenadorId
)
<
tr
>
<
option
value
=
"
{
{$coordenador->id}
}
"
selected
>
{{
$coordenador
->
user
->
name
}}
</
option
>
<
td
>
{{
$coordenador
->
user
->
name
}}
</
td
>
<
td
>
{{
$coordenador
->
user
->
email
}}
</
td
>
@
if
(
$coordenador
->
user
->
instituicao
|=
null
)
<
td
>
{{
$coordenador
->
user
->
celular
}}
</
td
>
@
else
<
td
>
Não
Definido
</
td
>
@
endif
@
if
(
$coordenador
->
user
->
instituicao
|=
null
)
<
td
>
{{
$coordenador
->
user
->
instituicao
}}
</
td
>
@
else
@
else
<
option
value
=
"
{
{$coordenador->id}}">{{$coordenador->user->name}
}
</option
>
<
td
>
Não
Definida
</
td
>
@
endif
@
endif
<
td
style
=
"text-align-last:center"
><
input
type
=
"button"
class
=
"btn-primary btn"
value
=
"Definir"
onclick
=
"defCoord(
{
{$coordenador->id}},'{{$coordenador->user->name}
}
')"
style
=
"width: 100px"
></
td
>
</
tr
>
@
endforeach
@
endforeach
</select>
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
hr
>
<
div
class
=
"row subtitulo"
>
<
div
class
=
"row subtitulo"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
...
@@ -354,4 +405,16 @@
...
@@ -354,4 +405,16 @@
</
form
>
</
form
>
</
div
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
type
=
"text/javascript"
>
function
defCoord
(
data
,
data2
){
document
.
getElementById
(
'coordenador_id'
)
.
value
=
data
;
document
.
getElementById
(
'coordenador_name'
)
.
value
=
data2
;
$
(
"#modalCoord"
)
.
modal
(
'hide'
);
}
</
script
>
@
endsection
@
endsection
\ No newline at end of file
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