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

Merge pull request #20 from lmts-ufape/anexos

Anexos
parents 0b855c44 d5890a37
...@@ -9,7 +9,7 @@ class Participante extends Model ...@@ -9,7 +9,7 @@ class Participante extends Model
protected $fillable = ['name', 'user_id', 'trabalho_id', 'participante_id']; protected $fillable = ['name', 'user_id', 'trabalho_id', 'participante_id'];
public function user(){ public function user(){
return $this->belongsToMany('App\User'); return $this->belongsTo('App\User');
} }
public function trabalhos(){ public function trabalhos(){
return $this->belongsToMany('App\Trabalho', 'trabalho_participante'); return $this->belongsToMany('App\Trabalho', 'trabalho_participante');
......
...@@ -124,6 +124,54 @@ class AreaSeeder extends Seeder ...@@ -124,6 +124,54 @@ class AreaSeeder extends Seeder
'nome'=>'Engenharia Civil', 'nome'=>'Engenharia Civil',
'grande_area_id' => '3' 'grande_area_id' => '3'
]); ]);
DB::table('areas')->insert([
'nome'=>'Engenharia de Minas',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia de Materiais e Metalúrgica',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Elétrica',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Mecânica',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Química',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Sanitária',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia de Produção',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Nuclear',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia de Transportes',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Naval e Oceânica',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Aeroespacial',
'grande_area_id' => '3'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Biomédica',
'grande_area_id' => '3'
]);
// Ciências da Saúde ----------------- // Ciências da Saúde -----------------
...@@ -131,6 +179,39 @@ class AreaSeeder extends Seeder ...@@ -131,6 +179,39 @@ class AreaSeeder extends Seeder
'nome'=>'Medicina', 'nome'=>'Medicina',
'grande_area_id' => '4' 'grande_area_id' => '4'
]); ]);
DB::table('areas')->insert([
'nome'=>'Odontologia',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Farmácia',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Enfermagem',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Nutrição',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Saúde Coletiva',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Fonoaudiologia',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Fisioterapia e Terapia Ocupacional',
'grande_area_id' => '4'
]);
DB::table('areas')->insert([
'nome'=>'Educação Física',
'grande_area_id' => '4'
]);
//Ciências Agrárias ------------------ //Ciências Agrárias ------------------
...@@ -138,6 +219,30 @@ class AreaSeeder extends Seeder ...@@ -138,6 +219,30 @@ class AreaSeeder extends Seeder
'nome'=>'Agronomia', 'nome'=>'Agronomia',
'grande_area_id' => '5' 'grande_area_id' => '5'
]); ]);
DB::table('areas')->insert([
'nome'=>'Recursos Florestais e Engenharia Florestal',
'grande_area_id' => '5'
]);
DB::table('areas')->insert([
'nome'=>'Engenharia Agrícola',
'grande_area_id' => '5'
]);
DB::table('areas')->insert([
'nome'=>'Zootecnia',
'grande_area_id' => '5'
]);
DB::table('areas')->insert([
'nome'=>'Medicina Veterinária',
'grande_area_id' => '5'
]);
DB::table('areas')->insert([
'nome'=>'Recursos Pesqueiros e Engenharia de Pesca',
'grande_area_id' => '5'
]);
DB::table('areas')->insert([
'nome'=>'Ciência e Tecnologia de Alimentos',
'grande_area_id' => '5'
]);
//Ciências Sociais Aplicadas ---------- //Ciências Sociais Aplicadas ----------
...@@ -145,6 +250,54 @@ class AreaSeeder extends Seeder ...@@ -145,6 +250,54 @@ class AreaSeeder extends Seeder
'nome'=>'Direito', 'nome'=>'Direito',
'grande_area_id' => '6' 'grande_area_id' => '6'
]); ]);
DB::table('areas')->insert([
'nome'=>'Administração',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Economia',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Arquitetura e Urbanismo',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Planejamento Urbano e Regional',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Demografia',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Ciência da Informação',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Museologia',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Comunicação',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Serviço Social',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Economia Doméstica',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Desenho Industrial',
'grande_area_id' => '6'
]);
DB::table('areas')->insert([
'nome'=>'Turismo',
'grande_area_id' => '6'
]);
//Ciências Humanas ---------------------- //Ciências Humanas ----------------------
...@@ -152,13 +305,57 @@ class AreaSeeder extends Seeder ...@@ -152,13 +305,57 @@ class AreaSeeder extends Seeder
'nome'=>'Filosofia', 'nome'=>'Filosofia',
'grande_area_id' => '7' 'grande_area_id' => '7'
]); ]);
DB::table('areas')->insert([
'nome'=>'Sociologia',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Antropologia',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Arqueologia',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'História',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Geografia',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Psicologia',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Educação',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Ciência Política',
'grande_area_id' => '7'
]);
DB::table('areas')->insert([
'nome'=>'Teologia',
'grande_area_id' => '7'
]);
//Lingüística, Letras e Artes----------- //Lingüística, Letras e Artes-----------
DB::table('areas')->insert([ DB::table('areas')->insert([
'nome'=>'Lingüística', 'nome'=>'Lingüística',
'grande_area_id' => '8' 'grande_area_id' => '8'
]); ]);
DB::table('areas')->insert([
'nome'=>'Letras',
'grande_area_id' => '8'
]);
DB::table('areas')->insert([
'nome'=>'Artes',
'grande_area_id' => '8'
]);
......
...@@ -18,6 +18,12 @@ class ParticipanteSeeder extends Seeder ...@@ -18,6 +18,12 @@ class ParticipanteSeeder extends Seeder
]); ]);
// $participante = App\Participante::find(1);
// $user = App\User::where('name','Participante1')->first();
// $user->participantes()->save($participante);
// $user->save();
$user_id = DB::table('users')->where('name','Participante2')->pluck('id'); $user_id = DB::table('users')->where('name','Participante2')->pluck('id');
DB::table('participantes')->insert([ DB::table('participantes')->insert([
......
This diff is collapsed.
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
{{ $evento->nome }} {{ $evento->nome }}
</a> </a>
</td> </td>
<td>{{ $evento->created_at }}</td> <td>{{ date('d/m/Y', strtotime($evento->created_at)) }}</td>
<td> <td>
@if(auth()->user()->id == $evento->criador_id) @if(auth()->user()->id == $evento->criador_id)
<div class="btn-group dropright dropdown-options"> <div class="btn-group dropright dropdown-options">
...@@ -82,7 +82,6 @@ ...@@ -82,7 +82,6 @@
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do Edital</th> <th scope="col">Nome do Edital</th>
<th scope="col">Status</th>
<th scope="col">Data de Criação</th> <th scope="col">Data de Criação</th>
<th scope="col">Baixar edital</th> <th scope="col">Baixar edital</th>
<th scope="col">Opção</th> <th scope="col">Opção</th>
...@@ -96,8 +95,7 @@ ...@@ -96,8 +95,7 @@
{{ $evento->nome }} {{ $evento->nome }}
</a> </a>
</td> </td>
<td></td> <td>{{ date('d/m/Y', strtotime($evento->created_at)) }}</td>
<td>{{ $evento->created_at }}</td>
<td style="text-align: center"> <td style="text-align: center">
<a href="{{ route('baixar.edital', ['id' => $evento->id]) }}"> <a href="{{ route('baixar.edital', ['id' => $evento->id]) }}">
<img src="{{asset('img/icons/file-download-solid.svg')}}" width="15px"> <img src="{{asset('img/icons/file-download-solid.svg')}}" width="15px">
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
{{ __('Perfil Proponente') }} {{ __('Perfil Proponente') }}
</a> </a>
@endif @endif
@if(Auth::user()->participantes != null) @if(Auth::user()->participantes->where('user_id', Auth::user()->id)->count() != 0)
<a class="dropdown-item" href="{{ route('participante.index') }}"> <a class="dropdown-item" href="{{ route('participante.index') }}">
<img src="{{asset('img/icons/file-alt-regular-black.svg')}}" alt=""> <img src="{{asset('img/icons/file-alt-regular-black.svg')}}" alt="">
{{ __('Perfil Participante') }} {{ __('Perfil Participante') }}
......
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