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
520f206f
Commit
520f206f
authored
Apr 10, 2023
by
Yuri Resende
Browse files
Corrigindo envio do anexo SIPAC na submissão do edital de fluxo contínuo
parent
ff06a2da
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
520f206f
...
...
@@ -327,14 +327,6 @@ class TrabalhoController extends Controller
$trabalho
->
anexo_docExtra
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexo_docExtra
,
"Documento_Extra."
.
$request
->
file
(
'anexo_docExtra'
)
->
extension
());
}
//Anexo SIPAC
if
(
isset
(
$request
->
anexo_SIPAC
))
{
if
(
Storage
::
disk
()
->
exists
(
$trabalho
->
anexo_SIPAC
))
{
Storage
::
delete
(
$trabalho
->
anexo_SIPAC
);
}
$trabalho
->
anexo_SIPAC
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexo_SIPAC
,
"Anexo_SIPAC."
.
$request
->
file
(
'anexo_SIPAC'
)
->
extension
());
}
$trabalho
->
save
();
return
$trabalho
;
}
...
...
@@ -382,6 +374,14 @@ class TrabalhoController extends Controller
$trabalho
->
anexo_docExtra
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexo_docExtra
,
"Documento_Extra."
.
$request
->
file
(
'anexo_docExtra'
)
->
extension
());
}
//Anexo SIPAC
if
(
isset
(
$request
->
anexo_SIPAC
))
{
if
(
Storage
::
disk
()
->
exists
(
$trabalho
->
anexo_SIPAC
))
{
Storage
::
delete
(
$trabalho
->
anexo_SIPAC
);
}
$trabalho
->
anexo_SIPAC
=
Storage
::
putFileAs
(
$pasta
,
$request
->
anexo_SIPAC
,
"Anexo_SIPAC."
.
$request
->
file
(
'anexo_SIPAC'
)
->
extension
());
}
return
$trabalho
;
}
...
...
app/Http/Requests/StoreTrabalho.php
View file @
520f206f
...
...
@@ -101,7 +101,9 @@ class StoreTrabalho extends FormRequest
$rules
[
'anexoDecisaoCONSU'
]
=
[
Rule
::
requiredIf
(
$evento
->
consu
),
'mimes:pdf'
];
if
(
$evento
->
tipo
!=
"CONTINUO"
){
$rules
[
'anexoProjeto'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoProjeto'
]
=
[
'required'
,
'mimes:pdf'
];
}
else
{
$rules
[
'anexo_SIPAC'
]
=
[
'required'
,
'mimes:pdf'
];
}
return
$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