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
1c991cce
Commit
1c991cce
authored
Aug 31, 2022
by
GuilhermeGz
Browse files
Recuperação de plano de trabalho na edição de proposta
parent
8a62e11f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/UpdateTrabalho.php
View file @
1c991cce
...
...
@@ -37,7 +37,12 @@ class UpdateTrabalho extends FormRequest
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
if
(
intval
(
$value
)
==
$key
){
$participante
=
null
;
if
(
$this
->
participante_id
[
$value
]
!=
null
){
$participante
=
Participante
::
find
(
$this
->
participante_id
[
$value
]);
}
//user
$rules
[
'name.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'email.'
.
$value
]
=
[
'required'
,
'string'
];
...
...
@@ -63,11 +68,18 @@ class UpdateTrabalho extends FormRequest
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
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'
))
{
...
...
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