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
5dd03291
Commit
5dd03291
authored
Jun 14, 2022
by
GuilhermeGz
Browse files
Realizado arquivamento de planos de trabalho caso o projeto em si seja arquivado
parent
7b287f93
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
5dd03291
...
...
@@ -117,11 +117,20 @@ class TrabalhoController extends Controller
public
function
arquivar
(
Request
$request
){
$trabalho
=
Trabalho
::
find
(
$request
->
trabalho_id
);
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$trabalho
->
id
)
->
get
();
if
(
$request
->
arquivar_tipo
==
1
){
$trabalho
->
arquivado
=
true
;
foreach
(
$arquivos
as
$arquivo
){
$arquivo
->
arquivado
=
true
;
$arquivo
->
update
();
}
$message
=
"Projeto "
.
$trabalho
->
titulo
.
" arquivado"
;
}
else
{
$trabalho
->
arquivado
=
false
;
foreach
(
$arquivos
as
$arquivo
){
$arquivo
->
arquivado
=
false
;
$arquivo
->
update
();
}
$message
=
"Projeto "
.
$trabalho
->
titulo
.
" desarquivado"
;
}
$trabalho
->
update
();
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
5dd03291
...
...
@@ -185,7 +185,7 @@
<
input
value
=
'1'
name
=
'arquivar_tipo'
type
=
'hidden'
/>
</
form
>
@
else
<
a
title
=
"Desarquivar"
href
=
'javascript:arquivar2{{$participante->id}}.submit()'
>
<
a
@
if
(
$trabalho
->
arquivado
==
true
)
style
=
"pointer-events: none"
@
endif
title
=
"Desarquivar"
href
=
'javascript:arquivar2{{$participante->id}}.submit()'
>
<
svg
xmlns
=
"http://www.w3.org/2000/svg"
width
=
"24"
height
=
"24"
viewBox
=
"0 0 24 24"
fill
=
"none"
stroke
=
"#808080"
stroke
-
width
=
"2"
stroke
-
linecap
=
"round"
stroke
-
linejoin
=
"round"
><
path
d
=
"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h5l2 3h9a2 2 0 0 1 2 2v11zM9.9 16.1L14 12M9.9 11.9L14 16"
/></
svg
>
</
a
>
<
form
method
=
"GET"
name
=
'arquivar2{{$participante->id}}'
action
=
'{{route('
arquivo
.
arquivar
')}}'
>
...
...
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