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
576b5454
Commit
576b5454
authored
May 25, 2020
by
Gabriel-31415
Browse files
refatoracao migrations
parent
19a258ed
Changes
33
Hide whitespace changes
Inline
Side-by-side
database/migrations/2020_05_22_044629_add_users_to_funcao_participantes_table.php
deleted
100644 → 0
View file @
19a258ed
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddUsersToFuncaoParticipantesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'users'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'funcao_participante_id'
)
->
nullable
();;
$table
->
foreign
(
'funcao_participante_id'
)
->
references
(
'id'
)
->
on
(
'funcao_participantes'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'users'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'users_funcao_participante_id_foreign'
);
$table
->
dropColumn
(
'funcao_participante_id'
);
});
}
}
database/migrations/2020_05_23_054649_create_coordenador_comissaos_table.php
View file @
576b5454
...
...
@@ -16,6 +16,9 @@ class CreateCoordenadorComissaosTable extends Migration
Schema
::
create
(
'coordenador_comissaos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
...
...
database/migrations/2020_05_23_054741_add_users_to_coordenador_comissaos_table.php
deleted
100644 → 0
View file @
19a258ed
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddUsersToCoordenadorComissaosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'coordenador_comissaos'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'coordenador_comissaos'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'coordenador_comissaos_user_id_foreign'
);
$table
->
dropColumn
(
'user_id'
);
});
}
}
database/migrations/2020_05_23_054805_create_avaliadors_table.php
View file @
576b5454
...
...
@@ -16,6 +16,9 @@ class CreateAvaliadorsTable extends Migration
Schema
::
create
(
'avaliadors'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
...
...
database/migrations/2020_05_23_054859_add_users_to_avaliadors_table.php
deleted
100644 → 0
View file @
19a258ed
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddUsersToAvaliadorsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'avaliadors'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'avaliadors'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'avaliadors_user_id_foreign'
);
$table
->
dropColumn
(
'user_id'
);
});
}
}
database/migrations/2020_05_23_054945_create_participantes_table.php
View file @
576b5454
...
...
@@ -16,6 +16,14 @@ class CreateParticipantesTable extends Migration
Schema
::
create
(
'participantes'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
unsignedBigInteger
(
'trabalho_id'
)
->
nullable
();
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
unsignedBigInteger
(
'funcao_participante_id'
)
->
nullable
();
$table
->
foreign
(
'funcao_participante_id'
)
->
references
(
'id'
)
->
on
(
'funcao_participantes'
);
});
}
...
...
database/migrations/2020_05_23_055033_add_users_to_participantes_table.php
deleted
100644 → 0
View file @
19a258ed
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddUsersToParticipantesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'participantes'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
unsignedBigInteger
(
'trabalho_id'
)
->
nullable
();
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'participantes'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'participantes_user_id_foreign'
);
$table
->
dropColumn
(
'user_id'
);
});
}
}
database/migrations/2020_05_23_071949_add_foreign_to_trabalhos_table.php
View file @
576b5454
...
...
@@ -19,7 +19,7 @@ class AddForeignToTrabalhosTable extends Migration
$table
->
foreign
(
'area_id'
)
->
references
(
'id'
)
->
on
(
'areas'
);
$table
->
foreign
(
'sub_area_id'
)
->
references
(
'id'
)
->
on
(
'sub_areas'
);
$table
->
foreign
(
'evento_id'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
$table
->
foreign
(
'
proponente
_id'
)
->
references
(
'id'
)
->
on
(
'
proponente
s'
);
$table
->
foreign
(
'
coordenador
_id'
)
->
references
(
'id'
)
->
on
(
'
coordenador_comissao
s'
);
//$table->foreignId('user_id')->constrained();
// $table->integer('coordenador');
...
...
database/migrations/2020_05_2
2_032714
_add_grande_areas_
to_
area
s
_table.php
→
database/migrations/2020_05_2
5_193809
_add_grande_areas_area_table.php
View file @
576b5454
...
...
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddGrandeAreas
To
Area
s
Table
extends
Migration
class
AddGrandeAreasAreaTable
extends
Migration
{
/**
* Run the migrations.
...
...
@@ -14,7 +14,6 @@ class AddGrandeAreasToAreasTable extends Migration
public
function
up
()
{
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'grande_area_id'
);
$table
->
foreign
(
'grande_area_id'
)
->
references
(
'id'
)
->
on
(
'grande_areas'
);
});
}
...
...
@@ -27,8 +26,7 @@ class AddGrandeAreasToAreasTable extends Migration
public
function
down
()
{
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
$table
->
dropForeign
(
'areas_grande_area_id_foreign'
);
$table
->
dropColumn
(
'grande_area_id'
);
//
});
}
}
database/seeds/DatabaseSeeder.php
View file @
576b5454
...
...
@@ -71,7 +71,7 @@ class DatabaseSeeder extends Seeder
'descricao'
=>
'Cada autor inscrito poderá submeter até dois (2) resumos;
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'
=>
'
teste
'
,
'tipo'
=>
'
PIBIC
'
,
'inicioSubmissao'
=>
'2020-03-30'
,
'fimSubmissao'
=>
'2020-09-20'
,
'inicioRevisao'
=>
'2020-04-21'
,
...
...
database/seeds/ProponenteSeeder.php
View file @
576b5454
...
...
@@ -30,6 +30,7 @@ class ProponenteSeeder extends Seeder
'bolsistaProdutividade'
=>
'123123123'
,
'nivel'
=>
'123123123'
,
'linkLattes'
=>
'123123123'
,
'created_at'
=>
'2020-01-01 00:00:00'
]);
}
...
...
resources/views/evento/submeterTrabalho.blade.php
View file @
576b5454
...
...
@@ -208,7 +208,7 @@
</div>
@if(
$edital->tipo
== 'PIBIC' ||
$edital->tipo
== 'PIBIC-EM')
{{-- Decisão do CONSU --}}
<div class="
row
justify
-
content
-
center
">
...
...
resources/views/layouts/app.blade.php
View file @
576b5454
...
...
@@ -58,6 +58,9 @@
@else
<!-- Se o usuário for um aluno -->
@if(Auth::user()->tipo == 'administrador')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Início
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{ route('admin.naturezas') }}"
>
Naturezas
</a>
...
...
@@ -104,6 +107,9 @@
{{-- Pro-reitor --}}
@if(Auth::user()->tipo == 'administradorResponsavel')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Início
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('evento.listar')}}"
>
Editais
</a>
...
...
@@ -142,7 +148,9 @@
@endif
@if(Auth::user()->tipo == 'coordenador')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Início
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('coordenador.editais')}}"
>
Meus Editais
</a>
</li>
...
...
@@ -180,17 +188,38 @@
@endif
@if(Auth::user()->tipo == 'proponente')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
Sair
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Início
</a>
</li>
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('admin.index') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
@endif
@if(Auth::user()->tipo == 'participante')
...
...
Prev
1
2
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