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
cb1a2654
Commit
cb1a2654
authored
May 27, 2022
by
Guilherme Silva
Browse files
Adicionado arquivamento de projeto
parent
6e996fe1
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
cb1a2654
...
...
@@ -113,7 +113,21 @@ class TrabalhoController extends Controller
'areaTematicas'
=>
$areaTematicas
,
]);
}
public
function
arquivar
(
Request
$request
){
$trabalho
=
Trabalho
::
find
(
$request
->
trabalho_id
);
if
(
$request
->
arquivar_tipo
==
1
){
$trabalho
->
arquivado
=
true
;
$message
=
"Projeto "
.
$trabalho
->
titulo
.
" arquivado"
;
}
else
{
$trabalho
->
arquivado
=
false
;
$message
=
"Projeto "
.
$trabalho
->
titulo
.
" desarquivado"
;
}
$trabalho
->
update
();
return
redirect
()
->
back
()
->
with
([
'sucesso'
=>
$message
]);
}
public
function
storeParcial
(
Request
$request
){
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
...
...
database/migrations/2022_05_25_092411_add_arquivado_to_trabalhos_table.php
0 → 100644
View file @
cb1a2654
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddArquivadoToTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
boolean
(
'arquivado'
)
->
nullable
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'arquivado'
);
});
}
}
routes/web.php
View file @
cb1a2654
...
...
@@ -170,7 +170,10 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route
::
get
(
'/bolsas'
,
'ParticipanteController@listarParticipanteEdital'
)
->
name
(
'bolsas.listar'
);
Route
::
post
(
'/bolsas/alteracao'
,
'ParticipanteController@alterarBolsa'
)
->
name
(
'bolsa.alterar'
);
//######### Imprimir Resultado #################################
//########## Arquivar Projeto e Plano
Route
::
get
(
'/arquivar/projeto'
,
'TrabalhoController@arquivar'
)
->
name
(
'projeto.arquivar'
);
//######### Imprimir Resultado #################################
Route
::
get
(
'/usuarios/showResultados/imprimir'
,
'AdministradorController@imprimirResultados'
)
->
name
(
'resultados.gerar'
);
//########## Relatórios
...
...
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