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
04d40aaa
Commit
04d40aaa
authored
May 10, 2021
by
Carlos André
Browse files
modal enviar convite
parent
0b3bd513
Changes
3
Hide whitespace changes
Inline
Side-by-side
database/seeds/AvaliadorSeeder.php
View file @
04d40aaa
...
...
@@ -47,7 +47,7 @@ class AvaliadorSeeder extends Seeder
// $aval->eventos()->attach($evento);
// $aval->save();
//
$user_id = DB::table('users')->where('name','Avaliador3')->pluck('id');
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Avaliador3'
)
->
pluck
(
'id'
);
DB
::
table
(
'avaliadors'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
...
...
public/css/layout.css
View file @
04d40aaa
...
...
@@ -416,4 +416,48 @@ section {
border-right
:
none
;
border-radius
:
0px
;
border-color
:
rgb
(
0
,
140
,
255
);
}
\ No newline at end of file
}
.modal-header-submeta
{
border-bottom
:
1px
solid
rgb
(
0
,
140
,
255
);
padding-bottom
:
5px
;
margin-left
:
20px
;
margin-right
:
20px
;
}
.labels-blue
label
{
color
:
rgb
(
0
,
140
,
255
);
font-weight
:
500
;
}
.modal-submeta
{
border-radius
:
20px
;
border-color
:
rgba
(
204
,
204
,
204
,
0.555
);
}
.texto-info
{
color
:
rgba
(
102
,
102
,
102
,
0.555
);
text-align
:
justify
;
font-size
:
12px
;
padding-top
:
0px
;
margin-bottom
:
40px
;
border-top
:
1px
solid
rgba
(
102
,
102
,
102
,
0.555
)
;
}
button
.close
{
padding
:
0
;
font-size
:
35px
;
background-color
:
transparent
;
border
:
none
;
-webkit-appearance
:
none
;
}
.close
:hover
,
.close
:focus
{
color
:
none
;
text-decoration
:
none
;
text-shadow
:
none
;
box-shadow
:
none
;
border
:
none
;
}
resources/views/administrador/selecionarAvaliadores.blade.php
View file @
04d40aaa
...
...
@@ -2,30 +2,41 @@
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top:
10
0px;"
>
<
div
class
=
"container"
style
=
"margin-top:
3
0px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"col-md-9"
>
<
h3
>
Avaliadores
</
h3
>
</
div
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
style
=
"margin-bottom: 50px;"
>
<
div
class
=
"col-md-1"
>
<
a
href
=
"{{ route('admin.atribuir', ['evento_id' =>
$evento->id
]) }}"
class
=
"btn btn-
prim
ary"
>
<
a
href
=
"{{ route('admin.atribuir', ['evento_id' =>
$evento->id
]) }}"
class
=
"btn btn-
second
ary"
>
Voltar
</
a
>
</
div
>
<
div
class
=
"col-md-9"
style
=
"text-align: center;"
>
<
h3
class
=
"titulo-table"
>
Avaliadores
</
h3
>
</
div
>
<
div
class
=
"col-md-2"
>
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"btn btn-info"
data
-
toggle
=
"modal"
data
-
target
=
"#exampleModalCenter"
>
Enviar
Convite
</
button
>
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-8"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1"
>
<
button
class
=
"btn"
onclick
=
"buscar(this.parentElement.parentElement.children[1].children[0])"
>
<
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
>
</
button
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
input
type
=
"text"
class
=
"form-control form-control-edit"
placeholder
=
"Digite o e-mail do avaliador"
onkeyup
=
"buscar(this)"
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
...
...
@@ -36,7 +47,7 @@
<
th
scope
=
"col"
style
=
"text-align:center"
>
Ação
</
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tbody
id
=
"avaliadores"
>
@
foreach
(
$avaliadores
as
$avaliador
)
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
...
...
@@ -62,11 +73,9 @@
</
tbody
>
</
table
>
<
div
class
=
"container"
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
h4
>
Avaliadores
Selecionados
para
o
Edital
:
{{
$evento
->
nome
}}
</
h4
>
<
div
class
=
"container"
style
=
"margin-top: 50px;"
>
<
div
class
=
"row justify-content-center"
>
<
h4
class
=
"titulo-table"
>
Avaliadores
Selecionados
para
o
Edital
:
<
span
style
=
"color: black;"
>
{{
$evento
->
nome
}}
</
span
>
</
h4
>
</
div
>
</
div
>
<
hr
>
...
...
@@ -84,22 +93,21 @@
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
@
if
(
$avaliador
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
true
)
Aceito
@
elseif
(
is_null
(
$avaliador
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
))
Pendente
@
else
Recusado
@
endif
</
td
>
@
if
(
$avaliador
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
true
)
<
td
style
=
"color: rgb(3, 189, 3);"
>
Aceito
</
td
>
@
elseif
(
is_null
(
$avaliador
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
))
<
td
>
A
confirmar
</
td
>
@
else
<
td
style
=
"color: red;"
>
Recusado
</
td
>
@
endif
<
td
style
=
"text-align:center"
>
<
form
action
=
"{{ route('admin.remover') }}"
method
=
"POST"
>
@
csrf
<
input
type
=
"hidden"
name
=
"avaliador_id"
value
=
"{{
$avaliador->id
}}"
>
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
button
type
=
"submit"
class
=
"btn btn-
primary
"
@
if
(
$avaliador
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
()
!=
0
)
disabled
=
"disabled"
@
endif
>
Remover
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-
danger
"
@
if
(
$avaliador
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
()
!=
0
)
disabled
=
"disabled"
@
endif
>
Remover
</
button
>
</
form
>
</
td
>
</
tr
>
...
...
@@ -114,36 +122,39 @@
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"exampleModalCenter"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalCenterTitle"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLongTitle"
>
Enviar
Convite
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
div
class
=
"modal-content
modal-submeta
"
>
<
div
class
=
"modal-header
modal-header-submeta
"
>
<
h5
class
=
"modal-title
titulo-table
"
id
=
"exampleModalLongTitle"
style
=
"font-size: 20px;"
>
Enviar
Convite
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
style
=
"color: rgb(182, 182, 182)"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
div
class
=
"modal-body"
style
=
"margin-left: 20px; margin-right: 20px;"
>
<
form
action
=
"{{ route('admin.enviarConvite') }}"
method
=
"POST"
>
<
form
action
=
"{{ route('admin.enviarConvite') }}"
method
=
"POST"
class
=
"labels-blue"
>
@
csrf
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
Nome
Completo
</
label
>
<
label
for
=
"exampleInputEmail1"
>
Nome
Completo
<
span
style
=
"color: red;"
>*</
span
>
</
label
>
<
input
type
=
"text"
class
=
"form-control"
name
=
"nomeAvaliador"
id
=
"exampleInputNome1"
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
Email
</
label
>
<
label
for
=
"exampleInputEmail1"
>
Email
<
span
style
=
"color: red;"
>*</
span
>
</
label
>
<
input
type
=
"email"
class
=
"form-control"
name
=
"emailAvaliador"
id
=
"exampleInputEmail1"
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleFormControlSelect1"
>
Tipo
</
label
>
<
select
class
=
"form-control"
name
=
"tipo"
id
=
"exampleFormControlSelect1"
>
<
select
class
=
"form-control"
name
=
"tipo"
id
=
"exampleFormControlSelect1"
disabled
>
<
option
value
=
"avaliador"
>
Avaliador
</
option
>
</
select
>
</
div
>
<
div
class
=
"mx-auto"
>
<
button
type
=
"submit"
class
=
"btn btn-success mx-auto"
>
Enviar
</
button
>
</
div
>
<
div
class
=
"form-group"
style
=
"margin-top: 40px; margin-bottom: 40px;"
>
<
button
type
=
"submit"
class
=
"btn btn-info"
style
=
"width: 100%"
>
Enviar
</
button
>
</
div
>
<
div
class
=
"form-group texto-info"
>
O
convite
será
enviador
por
e
-
mail
e
o
preenchimento
dos
dados
será
de
inteira
responsabilidade
do
usuário
convidado
.
</
div
>
</
form
>
</
div
>
...
...
@@ -157,6 +168,24 @@
<
script
>
$
(
'#myModal'
)
.
on
(
'shown.bs.modal'
,
function
()
{
$
(
'#myInput'
)
.
trigger
(
'focus'
)
})
});
function
buscar
(
input
)
{
var
editais
=
document
.
getElementById
(
'avaliadores'
)
.
children
;
if
(
input
.
value
.
length
>
2
)
{
for
(
var
i
=
0
;
i
<
editais
.
length
;
i
++
)
{
var
nomeEvento
=
editais
[
i
]
.
children
[
1
]
.
textContent
;
if
(
nomeEvento
.
substr
(
0
)
.
indexOf
(
input
.
value
)
>=
0
)
{
editais
[
i
]
.
style
.
display
=
""
;
}
else
{
editais
[
i
]
.
style
.
display
=
"none"
;
}
}
}
else
{
for
(
var
i
=
0
;
i
<
editais
.
length
;
i
++
)
{
editais
[
i
]
.
style
.
display
=
""
;
}
}
}
</
script
>
@
endsection
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