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
9a0fe5d8
Commit
9a0fe5d8
authored
Nov 15, 2022
by
Lucas Henrique
Browse files
Removendo restrição para cadastro de projetos sem discentes
parent
7a07db0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/StoreTrabalho.php
View file @
9a0fe5d8
...
...
@@ -31,9 +31,6 @@ class StoreTrabalho extends FormRequest
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
if
(
!
(
$this
->
has
(
'marcado'
))){
$rules
[
'erro'
]
=
[
'required'
];
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
...
...
app/Http/Requests/UpdateTrabalho.php
View file @
9a0fe5d8
...
...
@@ -32,9 +32,6 @@ class UpdateTrabalho extends FormRequest
$projeto
=
Trabalho
::
find
(
$this
->
id
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
if
(
!
(
$this
->
has
(
'marcado'
))){
$rules
[
'erro'
]
=
[
'required'
];
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
...
...
@@ -67,20 +64,13 @@ class UpdateTrabalho extends FormRequest
if
(
$evento
->
tipo
!=
"PIBEX"
)
{
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
if
(
$participante
!=
null
){
$arquivo
=
Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
where
(
'trabalhoId'
,
$projeto
->
id
)
->
first
();
if
(
$arquivo
==
null
||
$this
->
nomePlanoTrabalho
[
$value
]
!=
$arquivo
->
titulo
){
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
}
}
else
{
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
}
}
}
}
// dd($this->all());
if
(
$this
->
has
(
'rascunho'
))
{
$rules
=
[];
...
...
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