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
c2c5a599
Commit
c2c5a599
authored
May 05, 2023
by
Yuri Resende
Browse files
Alterando a edisão de submisão de editais
parent
bdb5d654
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/UpdateTrabalho.php
View file @
c2c5a599
...
...
@@ -58,15 +58,20 @@ class UpdateTrabalho extends FormRequest
$rules
[
'rg.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'data_de_nascimento.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'curso.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$evento
->
tipo
!=
"PIBEX"
)
{
if
(
$evento
->
tipo
!=
"PIBEX"
&&
$evento
->
tipo
!=
"CONTINUO"
)
{
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
Rule
::
requiredIf
(
$participante
->
planoTrabalho
==
null
)];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$rules
[
'turno.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'ordem_prioridade.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'periodo_atual.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'total_periodos.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
Rule
::
requiredIf
(
$participante
->
planoTrabalho
==
null
)];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
}
}
}
...
...
@@ -113,7 +118,6 @@ class UpdateTrabalho extends FormRequest
$rules
[
'anexoProjeto'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoProjeto
==
null
),
'mimes:pdf'
];
$rules
[
'anexoDecisaoCONSU'
]
=
[
Rule
::
requiredIf
(
$evento
->
consu
&&
$projeto
->
anexoDecisaoCONSU
==
null
),
'mimes:pdf'
];
}
return
$rules
;
}
}
...
...
resources/views/projeto/editaFormulario/integrantes.blade.php
View file @
c2c5a599
...
...
@@ -157,6 +157,7 @@
}
function
preencherUsuarioExistente
()
{
console
.
log
(
modal_id
);
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
exibirModalNumeroMaximoDeIntegrantes
();
return
;
...
...
@@ -264,7 +265,11 @@
$
(
document
).
ready
(
function
()
{
@
foreach
(
$trabalhos_user
as
$trabalho_user
)
modal_id
+=
1
;
if
(
<?php
echo
json_encode
(
$trabalho_user
)
?>
[
'
funcao
'
]){
modal_id
+=
1
;
}
$
(
'
#integrante
'
).
append
(
`
<div id="integrante{{$trabalho_user->id}}" class="col-md-6">
<div class="row">
...
...
resources/views/projeto/editaFormulario/participantes.blade.php
View file @
c2c5a599
...
...
@@ -88,7 +88,7 @@
@if (isset(old('funcao')[$i]))
Função: {{ old('funcao')[$i] }}
@else
Função: {{ $
participante
->funcao }}
Função: {{ $
trabalhos_user[$i]
->funcao
->nome
}}
@endif
@endif
<h6>
...
...
@@ -103,8 +103,7 @@
id=
"cancelar{{ $i }}"
class=
" btn btn-danger btn-sm"
style=
"font-size: 12px"
onclick=
"desmarcar({{ $i }})"
@
if
(
isset
(
old
('
marcado
')[$
i
+
1]))
disabled
@
endif
>
Excluir
</button>
onclick=
"desmarcar({{ $i }})"
>
Excluir
</button>
</div>
</div>
...
...
resources/views/projeto/editar.blade.php
View file @
c2c5a599
...
...
@@ -232,20 +232,20 @@
let
cpf
=
document
.
getElementById
(
"cpf"
+
id
);
let
funcao
=
document
.
getElementById
(
"funcao_participante"
);
let
email
=
document
.
getElementById
(
"email"
+
id
);
let
funcaoParticipantes
=
<?
php
echo
json_encode
(
$funcaoParticipantes
);
?>
;
if(nome.value != ""){
if(planoTrabalho != null
&&
planoTrabalho.value != ""){
linkNome
.
innerText
=
`Nome: ${nome.value} \n Plano: ${planoTrabalho.value} \n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção: ${funcao
.valu
e}`
;
linkNome.innerText = `Nome: ${nome.value} \n Plano: ${planoTrabalho.value} \n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção: ${funcao
Participantes[funcao.value -1].nom
e}`;
}else {
linkNome
.
innerText
=
`Nome: ${nome.value} \n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção: ${funcao
.valu
e}`
;
linkNome.innerText = `Nome: ${nome.value} \n E-mail: ${email.value} \n CPF: ${cpf.value}\nFunção: ${funcao
Participantes[funcao.value -1].nom
e}`;
}
}
if
(
id
>=
1
){
document
.
getElementById
(
"cancelar"
+
(
id
-
1
))
.
setAttribute
(
"disabled"
,
true
);
}
console
.
log
(
document
.
getElementById
(
"exampleModal"
+
id
));
//
if(id >=1){
//
document.getElementById("cancelar"+(id-1)).setAttribute("disabled", true);
//
}
//
console.log(document.getElementById("exampleModal"+id));
document.getElementById("checkB"+id).checked = true;
// $("#atribuir1").attr('data-target','#exampleModal'+(id+1));
...
...
@@ -256,14 +256,15 @@
function desmarcar(id){
if
(
id
>=
1
){
document
.
getElementById
(
"cancelar"
+
(
id
-
1
))
.
removeAttribute
(
"disabled"
);
}
//
if(id >= 1){
//
document.getElementById("cancelar"+(id-1)).removeAttribute("disabled");
//
}
document.getElementById("checkB"+id).checked = false;
document.getElementById("part"+id).setAttribute("hidden",true);
// $("#atribuir1").attr('data-target','#exampleModal'+(id));
// document.getElementById("exampleModal"+id).modal('hide');
modal_id -= 1;
console.log(modal_id);
}
@endif
</script>
...
...
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