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
60c463a7
Commit
60c463a7
authored
Jun 03, 2023
by
unknown
Browse files
modificações das telas referentes a adição de itegrantes
parent
0fa0a637
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/AdicionarIntegranteRequest.php
0 → 100644
View file @
60c463a7
<?php
namespace
App\Http\Requests
;
use
Illuminate\Foundation\Http\FormRequest
;
class
AdicionarIntegranteRequest
extends
FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public
function
rules
()
{
return
[
'cpf_consulta'
=>
[
'required'
,
'string'
,
'regex:/^\d{3}.\d{3}.\d{3}-\d{2}$/'
,
'exists:users,cpf'
],
'funcao_participante'
=>
[
'required'
,
'exists:funcao_participantes,id'
]
];
}
public
function
messages
()
{
return
[
'cpf_consulta.required'
=>
'O CPF é obrigatório'
,
'cpf_consulta.regex'
=>
'O CPF é inválido'
,
'cpf_consulta.exists'
=>
'Usuário não encontrado'
,
'funcao_participante.required'
=>
'A função do participantes é obrigatória'
];
}
}
resources/views/projeto/formularioVisualizar/integrantes.blade.php
View file @
60c463a7
...
@@ -4,11 +4,14 @@
...
@@ -4,11 +4,14 @@
<div
class=
"card-body"
style=
"padding-top: 0.2rem;"
>
<div
class=
"card-body"
style=
"padding-top: 0.2rem;"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"form-row mt-3"
>
<div
class=
"form-row mt-3"
>
<div
class=
"col-sm-
8
"
><h5
style=
"color: #234B8B; font-weight: bold"
>
Integrantes
</h5></div>
<div
class=
"col-sm-
5
"
><h5
style=
"color: #234B8B; font-weight: bold"
>
Integrantes
</h5></div>
<div
class=
"col-sm-4 text-sm
-right
"
>
<div
class=
"col-sm-4 text-sm"
>
<a
href=
"{{route('trabalho.trocaParticipante', ['evento_id' => $projeto->evento->id, 'projeto_id' => $projeto->id])}}"
<a
href=
"{{route('trabalho.trocaParticipante', ['evento_id' => $projeto->evento->id, 'projeto_id' => $projeto->id])}}"
class=
"button"
>
Solicitar Substituições/Desligamentos
</a>
class=
"button"
>
Solicitar Substituições/Desligamentos
</a>
</div>
</div>
<div
class=
"col-sm-3 text-sm-right"
>
<a
href=
""
data-toggle=
"modal"
data-target=
"#modalAdicionarParticipante"
class=
"button"
>
Adicionar Participante
</a>
</div>
</div>
</div>
<hr
style=
"border-top: 1px solid#1492E6"
>
<hr
style=
"border-top: 1px solid#1492E6"
>
...
...
resources/views/projeto/visualizar.blade.php
View file @
60c463a7
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
@
endif
@
endif
@
if
(
$edital
->
natureza_id
==
3
)
@
if
(
$edital
->
natureza_id
==
3
)
@
component
(
'projeto.formularioVisualizar.integrantes'
,
[
'projeto'
=>
$projeto
,
'edital'
=>
$edital
,
'trabalhos_user'
=>
$trabalhos_user
])
@
component
(
'projeto.formularioVisualizar.integrantes'
,
[
'projeto'
=>
$projeto
,
'edital'
=>
$edital
,
'trabalhos_user'
=>
$trabalhos_user
,
'funcaoParticipantes'
=>
$funcaoParticipantes
])
@
endcomponent
@
endcomponent
@
endif
@
endif
...
@@ -149,6 +149,64 @@
...
@@ -149,6 +149,64 @@
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"modal fade"
id
=
"modalAdicionarParticipante"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-sm"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Adicionar
Integrante
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"container"
>
<
div
class
=
"row justify-content-center"
style
=
"padding-left:35px; padding-right:45px"
>
<
div
class
=
"form-controll"
style
=
"margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;"
>
<
form
action
=
"{{route('trabalho.adicionarParticipante', ['id' =>
$projeto->id
])}}"
method
=
"POST"
>
@
csrf
<
div
class
=
"form-row d-flex"
>
<
label
for
=
"cpf_consulta"
>
CPF
:</
label
>
<
input
type
=
"text"
id
=
"cpf_consulta"
name
=
"cpf_consulta"
class
=
"form-control"
pattern
=
"\d
{
3}.\d{3}.\d{3}-\d{2
}
"
title
=
"Digite um CPF válido no formato XXX.XXX.XXX-XX"
required
>
</
div
>
<
div
class
=
"form-row d-flex"
style
=
"margin-top:10px"
>
<
label
for
=
"funcao_participante"
>
Função
do
Integrante
:</
label
>
<
select
name
=
"funcao_participante"
id
=
"funcao_participante"
class
=
"form-control"
>
@
foreach
(
$funcaoParticipantes
as
$funcao
)
<!--
EXTENSÃO
-->
@
if
(
$edital
->
natureza_id
==
3
&&
$edital
->
tipo
==
"CONTINUO"
)
@
if
(
$funcao
->
nome
==
"Vice-coordenador"
||
$funcao
->
nome
==
"Colaborador"
)
<
option
value
=
"
{
{$funcao->id}
}
"
checked
>
{{
$funcao
->
nome
}}
</
option
>
@
endif
@
elseif
(
$edital
->
natureza_id
==
3
&&
$edital
->
tipo
==
"PIBEX"
)
@
if
(
$funcao
->
nome
==
"Vice-coordenador"
||
$funcao
->
nome
==
"Colaborador"
)
<
option
value
=
"
{
{$funcao->id}
}
"
checked
>
{{
$funcao
->
nome
}}
</
option
>
@
endif
<!--
PESQUISA
-->
@
else
@
if
(
$funcao
->
nome
==
"Bolsista"
||
$funcao
->
nome
==
"Voluntário"
)
<
option
value
=
"
{
{$funcao->id}
}
"
checked
>
{{
$funcao
->
nome
}}
</
option
>
@
endif
@
endif
@
endforeach
</
select
>
</
div
>
<
div
class
=
"form-row justify-content-center"
style
=
"margin-top:20px;"
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Adicionar
</
button
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
endsection
@
section
(
'javascript'
)
@
section
(
'javascript'
)
...
@@ -181,6 +239,7 @@
...
@@ -181,6 +239,7 @@
</
style
>
</
style
>
<
script
>
<
script
>
$
(
"#cpf_consulta"
)
.
mask
(
"000.000.000-00"
)
if
(
document
.
getElementById
(
"radioSim"
)
.
checked
){
if
(
document
.
getElementById
(
"radioSim"
)
.
checked
){
document
.
getElementById
(
"radioSim"
)
.
checked
=
true
;
document
.
getElementById
(
"radioSim"
)
.
checked
=
true
;
...
...
routes/web.php
View file @
60c463a7
...
@@ -165,6 +165,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () {
...
@@ -165,6 +165,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () {
Route
::
post
(
'/projeto/buscarUsuario'
,
'TrabalhoController@buscarUsuario'
)
->
name
(
'trabalho.buscarUsuario'
);
Route
::
post
(
'/projeto/buscarUsuario'
,
'TrabalhoController@buscarUsuario'
)
->
name
(
'trabalho.buscarUsuario'
);
Route
::
post
(
'/projeto/{id}/adicionarParticipante'
,
'TrabalhoController@adicionarParticipante'
)
->
name
(
'trabalho.adicionarParticipante'
);
Route
::
post
(
'/projeto/{id}/atualizar'
,
'TrabalhoController@update'
)
->
name
(
'trabalho.update'
);
Route
::
post
(
'/projeto/{id}/atualizar'
,
'TrabalhoController@update'
)
->
name
(
'trabalho.update'
);
Route
::
get
(
'/projeto/{id}/excluir'
,
'TrabalhoController@destroy'
)
->
name
(
'trabalho.destroy'
);
Route
::
get
(
'/projeto/{id}/excluir'
,
'TrabalhoController@destroy'
)
->
name
(
'trabalho.destroy'
);
Route
::
get
(
'/projeto/{id}/excluirParticipante'
,
'TrabalhoController@excluirParticipante'
)
->
name
(
'trabalho.excluirParticipante'
);
Route
::
get
(
'/projeto/{id}/excluirParticipante'
,
'TrabalhoController@excluirParticipante'
)
->
name
(
'trabalho.excluirParticipante'
);
...
...
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