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
6afb8fb7
Commit
6afb8fb7
authored
May 08, 2021
by
Gabriel-31415
Browse files
conflict resolved
parents
b2538c9c
ff70569f
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
6afb8fb7
# EventosCientificos_ModuloTrabalhos
<a
href=
"http://app.uag.ufrpe.br/submeta/"
target=
"_blank"
><img
src=
"http://app.uag.ufrpe.br/submeta/img/icons/logo_submeta_pemenor.png"
><a>
app/Http/Controllers/TrabalhoController.php
View file @
6afb8fb7
...
...
@@ -33,6 +33,7 @@ use App\Mail\SubmissaoTrabalho;
use
App\Mail\EventoCriado
;
use
Illuminate\Support\Facades\Validator
;
use
Illuminate\Validation\Rule
;
use
App\OutrasInfoParticipante
;
class
TrabalhoController
extends
Controller
{
...
...
@@ -45,7 +46,7 @@ class TrabalhoController extends Controller
{
$edital
=
Evento
::
find
(
$id
);
$grandeAreas
=
GrandeArea
::
orderBy
(
'nome'
)
->
get
();
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$funcaoParticipantes
=
FuncaoParticipantes
::
orderBy
(
'nome'
)
->
get
();
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
if
(
$proponente
==
null
){
...
...
@@ -61,7 +62,8 @@ class TrabalhoController extends Controller
'edital'
=>
$edital
,
'grandeAreas'
=>
$grandeAreas
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'rascunho'
=>
$rascunho
'rascunho'
=>
$rascunho
,
'enum_turno'
=>
OutrasInfoParticipante
::
ENUM_TURNO
]);
}
...
...
@@ -82,7 +84,7 @@ class TrabalhoController extends Controller
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
){
//
dd($request
->all()
);
dd
(
$request
);
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$evento
=
Evento
::
find
(
$request
->
editalId
);
...
...
@@ -128,10 +130,10 @@ class TrabalhoController extends Controller
'anexoComiteEtica'
=>
[(
$request
->
anexoComitePreenchido
!==
'sim'
&&
$request
->
anexoJustificativaPreenchido
!==
'sim'
?
'required_without:justificativaAutorizacaoEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'justificativaAutorizacaoEtica'
=>
[(
$request
->
anexoJustificativaPreenchido
!==
'sim'
&&
$request
->
anexoComitePreenchido
!==
'sim'
?
'required_without:anexoComiteEtica'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:
pdf,
xls,xlsx'
,
'max:2048'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:xls,xlsx
,ods
'
,
'max:2048'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2048'
],
]);
if
(
gettype
(
$this
->
validarAnexosRascunho
(
$request
,
$trabalho
))
!=
'integer'
){
return
$this
->
validarAnexosRascunho
(
$request
,
$trabalho
);
}
...
...
@@ -175,7 +177,7 @@ class TrabalhoController extends Controller
'nomePlanoTrabalho.*'
=>
[
'nullable'
,
'string'
],
'anexoProjeto'
=>
[(
$request
->
anexoProjetoPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'anexoLattesCoordenador'
=>
[(
$request
->
anexoLattesPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:
pdf,
xls,xlsx'
,
'max:2048'
],
'anexoPlanilha'
=>
[(
$request
->
anexoPlanilhaPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:xls,xlsx
,ods
'
,
'max:2048'
],
'anexoPlanoTrabalho.*'
=>
[
'nullable'
,
'file'
,
'mimes:pdf'
,
'max:2048'
],
]);
...
...
app/OutrasInfoParticipante.php
0 → 100644
View file @
6afb8fb7
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
OutrasInfoParticipante
extends
Model
{
protected
$fillable
=
[
'name'
,
'user_id'
,
'trabalho_id'
,
'participante_id'
];
public
const
ENUM_TURNO
=
[
'Matutino'
,
'Vespertino'
,
'Noturno'
,
'Integral'
];
}
composer.lock
View file @
6afb8fb7
This diff is collapsed.
Click to expand it.
database/migrations/2021_05_05_161225_create_outras_info_participantes_table.php
0 → 100644
View file @
6afb8fb7
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
use
App\OutrasInfoParticipante
;
class
CreateOutrasInfoParticipantesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'outras_info_participantes'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
"rg"
);
$table
->
date
(
"data_de_nascimento"
);
$table
->
string
(
"curso"
);
$table
->
enum
(
"turno"
,
OutrasInfoParticipante
::
ENUM_TURNO
)
->
nullable
(
true
);
$table
->
integer
(
"ordem_prioridade"
)
->
nullable
(
true
);
$table
->
string
(
"periodo_atual"
)
->
nullable
(
true
);
$table
->
string
(
"total_periodos"
)
->
nullable
(
true
);
$table
->
double
(
"media_do_curso"
,
3
,
2
)
->
nullable
(
true
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'outras_info_participantes'
);
}
}
database/migrations/2021_05_05_163601_add_column_participante.php
0 → 100644
View file @
6afb8fb7
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddColumnParticipante
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'participantes'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'outras_info_participante_id'
)
->
nullable
(
true
);
$table
->
foreign
(
'outras_info_participante_id'
)
->
references
(
'id'
)
->
on
(
'outras_info_participantes'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
//
}
}
database/seeds/FuncaoParticipanteSeeder.php
View file @
6afb8fb7
...
...
@@ -34,6 +34,11 @@ class FuncaoParticipanteSeeder extends Seeder
DB
::
table
(
'funcao_participantes'
)
->
insert
([
'nome'
=>
'Voluntário'
,
]);
DB
::
table
(
'funcao_participantes'
)
->
insert
([
'nome'
=>
'Pesquisador'
,
]);
}
}
resources/views/evento/submeterTrabalho.blade.php
View file @
6afb8fb7
This diff is collapsed.
Click to expand it.
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