Unverified Commit 561a6f19 authored by Gabriel Antônio da Silva's avatar Gabriel Antônio da Silva Committed by GitHub
Browse files

Merge pull request #13 from lmts-ufape/carlos

Carlos
parents 7387b6c8 9f414dff
......@@ -18,7 +18,8 @@ class CreateEventosTable extends Migration
$table->timestamps();
$table->string('nome')->nullable();
$table->string('descricao')->nullable();
$table->string('tipo')->nullable();
$table->string('tipo')->nullable();
$table->unsignedBigInteger('natureza_id')->nullable();
$table->date('inicioSubmissao')->nullable();
$table->date('fimSubmissao')->nullable();
$table->date('inicioRevisao')->nullable();
......@@ -31,6 +32,7 @@ class CreateEventosTable extends Migration
$table->integer('coordenadorId')->nullable();
$table->string('pdfEdital')->nullable();
$table->string('modeloDocumento')->nullable();
});
}
......
......@@ -22,6 +22,7 @@ class CreateProponentesTable extends Migration
$table->string('vinculo');
$table->string('titulacaoMaxima');
$table->string('anoTitulacao');
$table->string('areaFormacao');
$table->string('grandeArea');
$table->string('area');
$table->string('subArea');
......
......@@ -19,6 +19,9 @@ class CreateAvaliadorsTable extends Migration
$table->unsignedBigInteger('user_id')->nullable();
$table->foreign('user_id')->references('id')->on('users');
$table->unsignedBigInteger('area_id')->nullable();
$table->foreign('area_id')->references('id')->on('areas');
});
}
......
......@@ -15,6 +15,7 @@ class CreateParticipantesTable extends Migration
{
Schema::create('participantes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->boolean('confirmacao_convite')->nullable();
$table->timestamps();
$table->unsignedBigInteger('user_id')->nullable();
......
......@@ -14,6 +14,14 @@ class CreateAvaliadorsTrabalhosTable extends Migration
public function up()
{
Schema::create('avaliador_trabalho', function (Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->text('parecer')->nullable();
$table->string('AnexoParecer')->nullable();
$table->boolean('status')->nullable();
$table->string('recomendacao')->nullable();
$table->unsignedBigInteger('trabalho_id');
$table->unsignedBigInteger('avaliador_id');
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNaturezasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('naturezas', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('nome');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('naturezas');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAvaliadorsEventosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('avaliador_evento', function (Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->unsignedBigInteger('avaliador_id');
$table->unsignedBigInteger('evento_id');
$table->foreign('avaliador_id')->references('id')->on('avaliadors');
$table->foreign('evento_id')->references('id')->on('eventos');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('avaliador_evento');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddNaturezaEvento extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('eventos', function (Blueprint $table) {
$table->foreign('natureza_id')->references('id')->on('naturezas');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
......@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTrabalhosProponentesTable extends Migration
class CreateRecomendacaosTable extends Migration
{
/**
* Run the migrations.
......@@ -13,12 +13,11 @@ class CreateTrabalhosProponentesTable extends Migration
*/
public function up()
{
Schema::create('trabalho_proponente', function (Blueprint $table) {
$table->unsignedBigInteger('trabalho_id');
$table->unsignedBigInteger('proponente_id');
Schema::create('recomendacaos', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('nome');
$table->timestamps();
$table->foreign('trabalho_id')->references('id')->on('trabalhos');
$table->foreign('proponente_id')->references('id')->on('proponentes');
});
}
......@@ -29,6 +28,6 @@ class CreateTrabalhosProponentesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('trabalho_proponente');
Schema::dropIfExists('recomendacaos');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddPartipanteArquivo extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('arquivos', function (Blueprint $table) {
$table->foreign('participanteId')->references('id')->on('participantes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
<?php
use Illuminate\Database\Seeder;
class AvaliadorSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$user_id = DB::table('users')->where('name','Avaliador1')->pluck('id');
DB::table('avaliadors')->insert([
'user_id' => $user_id[0],
'area_id' => 1,
]);
$aval = App\Avaliador::find(1);
$evento = App\Evento::find(1);
$trabalho = App\Trabalho::find(1);
$trabalho2 = App\Trabalho::find(2);
$aval->eventos()->attach($evento);
$aval->trabalhos()->attach($trabalho);
$aval->trabalhos()->attach($trabalho2);
$aval->trabalhos->first()->pivot->status = 1;
$aval->save();
$user_id = DB::table('users')->where('name','Avaliador2')->pluck('id');
DB::table('avaliadors')->insert([
'user_id' => $user_id[0],
'area_id' => 1,
]);
$aval = App\Avaliador::find(2);
$evento = App\Evento::find(1);
$trabalho = App\Trabalho::find(1);
$aval->trabalhos()->attach($trabalho);
$aval->trabalhos->first()->pivot->status = 1;
$aval->eventos()->attach($evento);
$aval->save();
$user_id = DB::table('users')->where('name','Avaliador3')->pluck('id');
DB::table('avaliadors')->insert([
'user_id' => $user_id[0],
'area_id' => 1,
]);
// $aval = App\Avaliador::find(2);
// $evento = App\Evento::find(1);
// $aval->eventos()->attach($evento);
// $aval->save();
$user_id = DB::table('users')->where('name','Avaliador4')->pluck('id');
DB::table('avaliadors')->insert([
'user_id' => $user_id[0],
'area_id' => 1,
]);
}
}
......@@ -22,6 +22,8 @@ class DatabaseSeeder extends Seeder
$this->call(FuncaoParticipanteSeeder::class);
$this->call(CoordenadorComissaoSeeder::class);
$this->call(ParticipanteSeeder::class);
$this->call(NaturezaSeeder::class);
$this->call(RecomendacaoSeeder::class);
// $this->call(UsersTableSeeder::class);
......@@ -74,6 +76,7 @@ class DatabaseSeeder extends Seeder
O número máximo de autores por trabalho será seis autores;
Os trabalhos deverão ser submetidos na forma de resumo simples com no máximo uma (01) página, no formato PDF;',
'tipo'=>'PIBIC',
'natureza_id'=>'1',
'inicioSubmissao'=>'2020-03-30',
'fimSubmissao'=>'2020-09-20',
'inicioRevisao'=>'2020-04-21',
......@@ -82,6 +85,7 @@ class DatabaseSeeder extends Seeder
'numMaxTrabalhos' => 2,
'numMaxCoautores' => 5,
'coordenadorId'=>1,
'created_at'=>'2020-03-30',
'criador_id'=>1,
]);
......@@ -92,6 +96,7 @@ class DatabaseSeeder extends Seeder
O número máximo de autores por trabalho será seis autores;
Os trabalhos deverão ser submetidos na forma de resumo simples com no máximo uma (01) página, no formato PDF;',
'tipo'=>'PIBIC',
'natureza_id'=>'2',
'inicioSubmissao'=>'2020-03-30',
'fimSubmissao'=>'2020-09-20',
'inicioRevisao'=>'2020-04-21',
......@@ -110,6 +115,7 @@ class DatabaseSeeder extends Seeder
O número máximo de autores por trabalho será seis autores;
Os trabalhos deverão ser submetidos na forma de resumo simples com no máximo uma (01) página, no formato PDF;',
'tipo'=>'PIBIC',
'natureza_id'=>'3',
'inicioSubmissao'=>'2020-03-30',
'fimSubmissao'=>'2020-09-20',
'inicioRevisao'=>'2020-04-21',
......@@ -136,5 +142,6 @@ class DatabaseSeeder extends Seeder
$this->call(TrabalhoSeeder::class);
$this->call(AvaliadorSeeder::class);
}
}
<?php
use Illuminate\Database\Seeder;
class NaturezaSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('naturezas')->insert([
'nome' => 'Ensino',
]);
DB::table('naturezas')->insert([
'nome' => 'Pesquisa',
]);
DB::table('naturezas')->insert([
'nome' => 'Extensão',
]);
}
}
......@@ -24,6 +24,7 @@ class ProponenteSeeder extends Seeder
'vinculo' => '123123123',
'titulacaoMaxima' => '123123123',
'anoTitulacao' => '123123123',
'areaFormacao' => '123123123',
'grandeArea' => '123123123',
'area' => '123123123',
'subArea' => '123123123',
......
<?php
use Illuminate\Database\Seeder;
class RecomendacaoSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('recomendacaos')->insert([
'nome' => 'Aceitacao Forte',
]);
DB::table('recomendacaos')->insert([
'nome' => 'Aceitacao Média',
]);
DB::table('recomendacaos')->insert([
'nome' => 'Aceitacao Fraca',
]);
}
}
......@@ -34,6 +34,7 @@ class TrabalhoSeeder extends Seeder
'linkGrupoPesquisa' =>'link',
'linkLattesEstudante' =>'link',
'pontuacaoPlanilha' =>'link',
'aprovado' =>0,
'data' =>'2020-01-01',
'anexoProjeto' =>'Álgebra',
'anexoDecisaoCONSU' =>'Álgebra',
......@@ -45,7 +46,30 @@ class TrabalhoSeeder extends Seeder
'sub_area_id' =>1,
'evento_id' =>1,
'coordenador_id' =>1,
'proponente_id' =>1,
'created_at' =>'2020-01-01',
]);
DB::table('trabalhos')->insert([
'titulo' =>'Projeto 2',
'linkGrupoPesquisa' =>'link',
'linkLattesEstudante' =>'link',
'pontuacaoPlanilha' =>'link',
'aprovado' =>0,
'data' =>'2020-01-01',
'anexoProjeto' =>'Álgebra',
'anexoDecisaoCONSU' =>'Álgebra',
'anexoPlanilhaPontuacao' =>'Álgebra',
'anexoAutorizacaoComiteEtica' =>'Álgebra',
'anexoLattesCoordenador' =>'Álgebra',
'grande_area_id' =>1,
'area_id' =>1,
'sub_area_id' =>1,
'evento_id' =>1,
'coordenador_id' =>1,
'proponente_id' =>1,
'created_at' =>'2020-01-02',
]);
}
}
......@@ -84,5 +84,41 @@ class UsuarioSeeder extends Seeder
'email_verified_at'=>'2020-01-01'
]);
DB::table('users')->insert([
'name'=>'Avaliador1',
'email'=>'aval1@ufrpe.br',
'password'=>Hash::make('12345678'),
'tipo'=>'avaliador',
'email_verified_at'=>'2020-01-01'
]);
DB::table('users')->insert([
'name'=>'Avaliador2',
'email'=>'aval2@ufrpe.br',
'password'=>Hash::make('12345678'),
'tipo'=>'avaliador',
'email_verified_at'=>'2020-01-01'
]);
DB::table('users')->insert([
'name'=>'Avaliador3',
'email'=>'aval3@ufrpe.br',
'password'=>Hash::make('12345678'),
'tipo'=>'avaliador',
'email_verified_at'=>'2020-01-01'
]);
DB::table('users')->insert([
'name'=>'Avaliador4',
'email'=>'aval4@ufrpe.br',
'password'=>Hash::make('12345678'),
'tipo'=>'avaliador',
'email_verified_at'=>'2020-01-01'
]);
}
}
@extends('layouts.app')
@section('content')
<div class="container">
<h2 style="margin-top: 100px; ">{{ Auth()->user()->name }}</h2>
<div class="container" >
<div class="row justify-content-center d-flex align-items-center" >
<h3>Edital Selecionado: {{ $evento->nome }} </h3>
</div>
</div>
<div class="row justify-content-center d-flex align-items-center">
<div class="col-sm-3 d-flex justify-content-center ">
<a href="{{route('admin.selecionar', ['evento_id' => $evento->id])}}" style="text-decoration:none; color: inherit;">
<div class="card text-center " style="border-radius: 30px; width: 13rem;height: 15rem;">
<div class="card-body d-flex justify-content-center">
<h2 style="padding-top:15px">Selecionar Avaliadores</h2>
</div>
</div>
</a>
</div>
<div class="col-sm-3 d-flex justify-content-center">
<a href="{{ route('admin.projetos', ['evento_id' => $evento->id]) }}" style="text-decoration:none; color: inherit;">
<div class="card text-center " style="border-radius: 30px; width: 13rem;height: 15rem;">
<div class="card-body d-flex justify-content-center">
<h2 style="padding-top:15px">Selecionar Projetos</h2>
</div>
</div>
</a>
</div>
<div class="col-sm-3 d-flex justify-content-center">
<a href="#" style="text-decoration:none; color: inherit;">
<div class="card text-center " style="border-radius: 30px; width: 13rem;height: 15rem;">
<div class="card-body d-flex justify-content-center">
<h2 style="padding-top:15px">Mensagens</h2>
</div>
</div>
</a>
</div>
</div>
</div>
@endsection
......@@ -7,61 +7,131 @@
<div class="container" >
<div class="row" >
<div class="col-sm-10">
<h3>Meus Editais</h3>
</div>
<div class="col-sm-2">
<a href="{{route('evento.criar')}}" class="btn btn-primary">Criar Edital</a>
@if(auth()->user()->tipo === "administrador")
<h3>Meus Editais</h3>
@else
<h3>Editais</h3>
@endif
</div>
@if(auth()->user()->tipo === "administrador")
<div class="col-sm-2">
<a href="{{route('evento.criar')}}" class="btn btn-primary">Criar Edital</a>
</div>
@endif
</div>
</div>
<hr>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Nome do Edital</th>
<th scope="col">Data de Criação</th>
<th scope="col">Opção</th>
</tr>
</thead>
<tbody>
@foreach ($eventos as $evento)
<tr>
<td>
<a href="{{ route('evento.visualizar',['id'=>$evento->id]) }}" class="visualizarEvento">
{{ $evento->nome }}
</a>
</td>
<td>10/05/2020</td>
<td>
<div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{-- <img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px"> --}}
</a>
<div class="dropdown-menu">
<a href="{{ route('coord.detalhesEvento', ['eventoId' => $evento->id]) }}" class="dropdown-item">
<img src="{{asset('img/icons/eye-regular.svg')}}" class="icon-card" alt="">
Editar Edital
</a>
<a href="{{route('evento.editar',$evento->id)}}" class="dropdown-item">
<img src="{{asset('img/icons/edit-regular.svg')}}" class="icon-card" alt="">
Atribuir Avaliadores
</a>
<form method="POST" action="{{route('evento.deletar',$evento->id)}}">
{{ csrf_field() }}
{{ method_field('DELETE') }}
<button type="submit" class="dropdown-item">
<img src="{{asset('img/icons/trash-alt-regular.svg')}}" class="icon-card" alt="">
Deletar
</button>
@if(auth()->user()->tipo === "administrador")
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Nome do Edital</th>
<th scope="col">Data de Criação</th>
<th scope="col">Opção</th>
</tr>
</thead>
<tbody>
@foreach ($eventos as $evento)
<tr>
<td>
<a href="{{ route('evento.visualizar',['id'=>$evento->id]) }}" class="visualizarEvento">
{{ $evento->nome }}
</a>
</td>
<td>{{ $evento->created_at }}</td>
<td>
@if(auth()->user()->id == $evento->criador_id)
<div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{-- <img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px"> --}}
</a>
<div class="dropdown-menu">
<a href="{{ route('coord.detalhesEvento', ['eventoId' => $evento->id]) }}" class="dropdown-item text-center">
Editar Edital
</a>
<a href="{{route('admin.atribuir', ['evento_id' => $evento->id])}}" class="dropdown-item text-center">
Atribuir Avaliadores
</a>
<a href="{{route('admin.pareceres', ['evento_id' => $evento->id])}}" class="dropdown-item text-center">
Visualizar Pareceres
</a>
<form method="POST" action="{{route('evento.deletar',$evento->id)}}" class="text-center">
{{ csrf_field() }}
{{ method_field('DELETE') }}
<button type="submit" class="dropdown-item">
Deletar
</button>
</form>
</div>
</div>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</form>
</div>
</div>
</td>
@if(auth()->user()->tipo === "proponente")
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Nome do Edital</th>
<th scope="col">Status</th>
<th scope="col">Data de Criação</th>
<th scope="col">Baixar edital</th>
<th scope="col">Opção</th>
</tr>
@endforeach
</tbody>
</table>
</thead>
<tbody>
@foreach ($eventos as $evento)
<tr>
<td>
<a href="{{ route('evento.visualizar',['id'=>$evento->id]) }}" class="visualizarEvento">
{{ $evento->nome }}
</a>
</td>
<td></td>
<td>{{ $evento->created_at }}</td>
<td style="text-align: center">
<a href="{{ route('baixar.edital', ['id' => $evento->id]) }}">
<img src="{{asset('img/icons/file-download-solid.svg')}}" width="15px">
</a>
</td>
<td>
<div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{-- <img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px"> --}}
</a>
<div class="dropdown-menu">
<a href="{{ route('projetos.edital', ['id' => $evento->id]) }}" class="dropdown-item" style="text-align: center">
Projetos submetidos
</a>
<a href="" class="dropdown-item" style="text-align: center">
Visualizar resultado
</a>
{{-- <a href="" class="dropdown-item" style="text-align: center">
Recurso ao resultado
</a>
<a href="" class="dropdown-item" style="text-align: center">
Resultado preeliminar
</a>
<a href="" class="dropdown-item" style="text-align: center">
Resultado final
</a> --}}
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
@endsection
......
......@@ -121,6 +121,9 @@
<label class="col-form-label">{{ __('Ano Titulação') }}</label>
<input value="{{$proponente->anoTitulacao}}" id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" autocomplete="anoTitulacao">
<label class="col-form-label">{{ __('Area Formação') }}</label>
<input value="{{$proponente->areaFormacao}}" id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" autocomplete="areaFormacao">
<label class="col-form-label">{{ __('Área') }}</label>
<input value="{{$proponente->grandeArea}}" id="grandeArea" type="text" class="form-control @error('grandeArea') is-invalid @enderror" name="grandeArea" autocomplete="grandeArea">
......@@ -150,6 +153,9 @@
<label class="col-form-label">{{ __('Ano Titulação') }}</label>
<input value="" id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" autocomplete="anoTitulacao">
<label class="col-form-label">{{ __('Area Formação') }}</label>
<input value="{{$proponente->areaFormacao}}" id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" autocomplete="areaFormacao">
<label class="col-form-label">{{ __('Área') }}</label>
<input value="" id="grandeArea" type="text" class="form-control @error('grandeArea') is-invalid @enderror" name="grandeArea" autocomplete="grandeArea">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment