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
37220c29
Commit
37220c29
authored
May 22, 2020
by
Gabriel-31415
Browse files
funcionalidade submeter edital
parent
381d10f5
Changes
41
Hide whitespace changes
Inline
Side-by-side
app/
CoordenadorComite
.php
→
app/
AdministradorResponsavel
.php
View file @
37220c29
...
...
@@ -4,7 +4,7 @@ namespace App;
use
Illuminate\Database\Eloquent\Model
;
class
CoordenadorComite
extends
Model
class
AdministradorResponsavel
extends
Model
{
public
function
user
(){
return
$this
->
belongsTo
(
'App\User'
);
...
...
app/
Reitor
.php
→
app/
FuncaoParticipantes
.php
View file @
37220c29
...
...
@@ -4,9 +4,7 @@ namespace App;
use
Illuminate\Database\Eloquent\Model
;
class
Reitor
extends
Model
class
FuncaoParticipantes
extends
Model
{
public
function
user
(){
return
$this
->
belongsTo
(
'App\User'
);
}
//
}
app/GrandeArea.php
0 → 100644
View file @
37220c29
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
GrandeArea
extends
Model
{
//
}
app/Http/Controllers/CoordenadorComiteController.php
deleted
100644 → 0
View file @
381d10f5
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
class
CoordenadorComiteController
extends
Controller
{
//
}
app/Http/Controllers/ProReitorController.php
deleted
100644 → 0
View file @
381d10f5
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
class
ProReitorController
extends
Controller
{
//
}
app/Http/Controllers/ReitorController.php
deleted
100644 → 0
View file @
381d10f5
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
class
ReitorController
extends
Controller
{
//
}
app/Http/Controllers/TrabalhoController.php
View file @
37220c29
...
...
@@ -12,6 +12,9 @@ use App\Revisor;
use
App\Modalidade
;
use
App\Atribuicao
;
use
App\Arquivo
;
use
App\GrandeArea
;
use
App\SubArea
;
use
App\FuncaoParticipantes
;
use
Carbon\Carbon
;
use
Auth
;
use
Illuminate\Http\Request
;
...
...
@@ -31,31 +34,18 @@ class TrabalhoController extends Controller
*/
public
function
index
(
$id
)
{
$evento
=
Evento
::
find
(
$id
);
$areas
=
Area
::
where
(
'eventoId'
,
$evento
->
id
)
->
get
();
$areasId
=
Area
::
where
(
'eventoId'
,
$evento
->
id
)
->
select
(
'id'
)
->
get
();
$revisores
=
Revisor
::
where
(
'eventoId'
,
$evento
->
id
)
->
get
();
$modalidades
=
Modalidade
::
all
();
$areaModalidades
=
AreaModalidade
::
whereIn
(
'areaId'
,
$areasId
)
->
get
();
$areasEnomes
=
Area
::
wherein
(
'id'
,
$areasId
)
->
get
();
$modalidadesIDeNome
=
[];
foreach
(
$areaModalidades
as
$key
)
{
array_push
(
$modalidadesIDeNome
,[
'areaId'
=>
$key
->
area
->
id
,
'modalidadeId'
=>
$key
->
modalidade
->
id
,
'modalidadeNome'
=>
$key
->
modalidade
->
nome
]);
}
$trabalhos
=
Trabalho
::
where
(
'autorId'
,
Auth
::
user
()
->
id
)
->
whereIn
(
'areaId'
,
$areasId
)
->
get
();
// dd($evento);
$edital
=
Evento
::
find
(
$id
);
$grandeAreas
=
GrandeArea
::
all
();
$areas
=
Area
::
all
();
$subAreas
=
SubArea
::
all
();
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
return
view
(
'evento.submeterTrabalho'
,[
'evento'
=>
$evento
,
'areas'
=>
$areas
,
'revisores'
=>
$revisores
,
'modalidades'
=>
$modalidades
,
'areaModalidades'
=>
$areaModalidades
,
'trabalhos'
=>
$trabalhos
,
'areasEnomes'
=>
$areasEnomes
,
'modalidadesIDeNome'
=>
$modalidadesIDeNome
,
'edital'
=>
$edital
,
'grandeAreas'
=>
$grandeAreas
,
'areas'
=>
$areas
,
'subAreas'
=>
$subAreas
,
'funcaoParticipantes'
=>
$funcaoParticipantes
]);
}
...
...
@@ -76,6 +66,7 @@ class TrabalhoController extends Controller
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
){
dd
(
$request
->
all
());
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$evento
=
Evento
::
find
(
$request
->
eventoId
);
...
...
app/P
roReitor
.php
→
app/P
lanoTrabalho
.php
View file @
37220c29
...
...
@@ -4,9 +4,10 @@ namespace App;
use
Illuminate\Database\Eloquent\Model
;
class
P
roReitor
extends
Model
class
P
lanoTrabalho
extends
Model
{
public
function
user
(){
return
$this
->
belongsTo
(
'App\User'
);
public
function
trabalho
()
{
return
$this
->
belongsTo
(
'App\Trabalho'
);
}
}
app/SubArea.php
0 → 100644
View file @
37220c29
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
SubArea
extends
Model
{
//
}
app/Trabalho.php
View file @
37220c29
...
...
@@ -50,4 +50,7 @@ class Trabalho extends Model
public
function
evento
(){
return
$this
->
belongsTo
(
'App\Evento'
,
'eventoId'
);
}
public
function
planoTrabalho
(){
return
$this
->
hasMany
(
'App\PlanoTrabalho'
);
}
}
app/User.php
View file @
37220c29
...
...
@@ -82,17 +82,10 @@ class User extends Authenticatable implements MustVerifyEmail
public
function
Proponentes
(){
return
$this
->
hasMany
(
'App\Proponente'
);
}
public
function
Reitors
(){
return
$this
->
hasMany
(
'App\
Reitor
'
);
public
function
AdministradorResponsavel
(){
return
$this
->
hasMany
(
'App\
AdministradorResponsavel
'
);
}
public
function
ProReitors
(){
return
$this
->
hasMany
(
'App\ProReitor'
);
}
public
function
CoordenadorComites
(){
return
$this
->
hasMany
(
'App\CoordenadorComite'
);
}
public
function
sendPasswordResetNotification
(
$token
){
$this
->
notify
(
new
recuperacaoSenha
(
$token
));
}
...
...
database/migrations/2020_02_05_123048_create_trabalhos_table.php
View file @
37220c29
...
...
@@ -17,6 +17,19 @@ class CreateTrabalhosTable extends Migration
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
string
(
'titulo'
);
$table
->
string
(
'grandeArea'
);
$table
->
string
(
'area'
);
$table
->
string
(
'subArea'
);
$table
->
string
(
'decisaoCONSU'
);
$table
->
string
(
'anexoDecisaoCONSU'
);
$table
->
string
(
'autorizacaoComiteEtica'
);
$table
->
string
(
'anexoAutorizacaoComiteEtica'
);
$table
->
string
(
'coordenador'
);
//preencher automaticamente
$table
->
string
(
'anexoLattesCoordenador'
);
$table
->
string
(
'anexoPlanilhaPontuacao'
);
$table
->
string
(
'pontuacaoPlanilha'
);
$table
->
string
(
'linkGrupoPesquisa'
);
$table
->
string
(
'linkLattesEstudante'
);
$table
->
string
(
'autores'
)
->
nullable
();
$table
->
date
(
'data'
)
->
nullable
();
$table
->
text
(
'resumo'
)
->
nullable
();
...
...
@@ -26,6 +39,7 @@ class CreateTrabalhosTable extends Migration
$table
->
integer
(
'areaId'
);
$table
->
integer
(
'autorId'
);
$table
->
integer
(
'eventoId'
);
$table
->
integer
(
'proponente_id'
);
});
}
...
...
database/migrations/2020_02_05_123139_create_areas_table.php
View file @
37220c29
...
...
@@ -14,12 +14,12 @@ class CreateAreasTable extends Migration
public
function
up
()
{
Schema
::
create
(
'areas'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'nome'
);
$table
->
integer
(
'modalidadeId'
)
->
nullable
();
$table
->
integer
(
'eventoId'
);
$table
->
timestamps
();
// $table->integer('modalidadeId')->nullable();
// $table->integer('eventoId');
});
}
...
...
database/migrations/2020_02_06_132418_chaves_estrangeiras.php
View file @
37220c29
...
...
@@ -16,18 +16,18 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
});
//
Schema::table('areas', function (Blueprint $table) {
//
$table->foreign('eventoId')->references('id')->on('eventos');
//
});
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
Schema
::
table
(
'area_modalidades'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
Schema
::
table
(
'area_modalidades'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'modalidadeId'
)
->
references
(
'id'
)
->
on
(
'modalidades'
);
});
//
Schema::table('area_modalidades', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
//
Schema::table('area_modalidades', function (Blueprint $table) {
//
$table->foreign('modalidadeId')->references('id')->on('modalidades');
//
});
//------------------------------------------------------------------------
...
...
@@ -61,9 +61,7 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'enderecoId'
)
->
references
(
'id'
)
->
on
(
'enderecos'
);
});
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'coordenadorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
@@ -85,9 +83,9 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
//
Schema::table('pertences', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'revisorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
@@ -106,9 +104,9 @@ class ChavesEstrangeiras extends Migration
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'modalidadeId'
)
->
references
(
'id'
)
->
on
(
'modalidades'
);
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
//
Schema::table('trabalhos', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'autorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
@@ -130,9 +128,9 @@ class ChavesEstrangeiras extends Migration
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
});
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
//
Schema::table('revisors', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
){
$table
->
foreign
(
'coordComissaoId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
database/migrations/2020_05_20_211421_create_proponentes_table.php
View file @
37220c29
...
...
@@ -15,6 +15,19 @@ class CreateProponentesTable extends Migration
{
Schema
::
create
(
'proponentes'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'CPF'
);
$table
->
string
(
'SIAPE'
);
$table
->
string
(
'email'
)
->
unique
();
$table
->
string
(
'cargo'
);
$table
->
string
(
'vinculo'
);
$table
->
string
(
'titulacaoMaxima'
);
$table
->
string
(
'anoTitulacao'
);
$table
->
string
(
'grandeArea'
);
$table
->
string
(
'area'
);
$table
->
string
(
'subArea'
);
$table
->
string
(
'bolsistaProdutividade'
);
$table
->
string
(
'nivel'
);
$table
->
string
(
'linkLattes'
);
$table
->
timestamps
();
});
}
...
...
database/migrations/2020_05_2
0_211149_add_user
s_to_pro
_reitor
s_table.php
→
database/migrations/2020_05_2
1_014825_add_trabalho
s_to_pro
ponente
s_table.php
View file @
37220c29
...
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
Add
UsersToProReitor
sTable
extends
Migration
class
Add
TrabalhosToProponente
sTable
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -13,9 +13,9 @@ class AddUsersToProReitorsTable extends Migration
*/
public
function
up
()
{
Schema
::
table
(
'pro
_reitor
s'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'
user
_id'
);
$table
->
foreign
(
'
user
_id'
)
->
references
(
'id'
)
->
on
(
'
user
s'
);
Schema
::
table
(
'pro
ponente
s'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'
trabalho
_id'
);
$table
->
foreign
(
'
trabalho
_id'
)
->
references
(
'id'
)
->
on
(
'
trabalho
s'
);
});
}
...
...
@@ -26,9 +26,9 @@ class AddUsersToProReitorsTable extends Migration
*/
public
function
down
()
{
Schema
::
table
(
'pro
_reitor
s'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'pro
_reitors_user
_id_foreign'
);
$table
->
dropColumn
(
'
user
_id'
);
Schema
::
table
(
'pro
ponente
s'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'pro
ponentes_trabalho
_id_foreign'
);
$table
->
dropColumn
(
'
trabalho
_id'
);
});
}
}
database/migrations/2020_05_21_020029_create_plano_trabalhos_table.php
0 → 100644
View file @
37220c29
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePlanoTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'plano_trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'titulo'
);
$table
->
string
(
'anexoPlanoTrabalho'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'plano_trabalhos'
);
}
}
database/migrations/2020_05_21_020133_add_trabalhos_to_plano_trabalhos_table.php
0 → 100644
View file @
37220c29
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddTrabalhosToPlanoTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'plano_trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'plano_trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'plano_trabalhos_trabalho_id_foreign'
);
$table
->
dropColumn
(
'trabalho_id'
);
});
}
}
database/migrations/2020_05_2
0_211258_create_coordenador_comite
s_table.php
→
database/migrations/2020_05_2
1_025543_create_administrador_responsavel
s_table.php
View file @
37220c29
...
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
Create
CoordenadorComite
sTable
extends
Migration
class
Create
AdministradorResponsavel
sTable
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -13,7 +13,7 @@ class CreateCoordenadorComitesTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'
coordenador_comite
s'
,
function
(
Blueprint
$table
)
{
Schema
::
create
(
'
administrador_responsavel
s'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
});
...
...
@@ -26,6 +26,6 @@ class CreateCoordenadorComitesTable extends Migration
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'
coordenador_comite
s'
);
Schema
::
dropIfExists
(
'
administrador_responsavel
s'
);
}
}
database/migrations/2020_05_2
0_211333
_add_users_to_
coordenador_comite
s_table.php
→
database/migrations/2020_05_2
1_025624
_add_users_to_
administrador_responsavel
s_table.php
View file @
37220c29
...
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddUsersTo
CoordenadorComite
sTable
extends
Migration
class
AddUsersTo
AdministradorResponsavel
sTable
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -13,7 +13,7 @@ class AddUsersToCoordenadorComitesTable extends Migration
*/
public
function
up
()
{
Schema
::
table
(
'
coordenador_comite
s'
,
function
(
Blueprint
$table
)
{
Schema
::
table
(
'
administrador_responsavel
s'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
@@ -26,8 +26,8 @@ class AddUsersToCoordenadorComitesTable extends Migration
*/
public
function
down
()
{
Schema
::
table
(
'
coordenador_comite
s'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'
coordenador_comite
s_user_id_foreign'
);
Schema
::
table
(
'
administrador_responsavel
s'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'
administrador_responsavel
s_user_id_foreign'
);
$table
->
dropColumn
(
'user_id'
);
});
}
...
...
Prev
1
2
3
Next
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