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
56f62ac9
Commit
56f62ac9
authored
Jun 12, 2020
by
alinetenorio
Browse files
Merge branch 'master' into carlos
parents
d65577db
5af65369
Changes
22
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/Auth/RegisterController.php
View file @
56f62ac9
...
@@ -12,6 +12,7 @@ use Illuminate\Validation\Rule;
...
@@ -12,6 +12,7 @@ use Illuminate\Validation\Rule;
use
App\User
;
use
App\User
;
use
App\Participante
;
use
App\Participante
;
use
App\Proponente
;
use
App\Proponente
;
use
App\Rules\UrlValidacao
;
class
RegisterController
extends
Controller
class
RegisterController
extends
Controller
{
{
...
@@ -54,30 +55,31 @@ class RegisterController extends Controller
...
@@ -54,30 +55,31 @@ class RegisterController extends Controller
protected
function
validator
(
array
$data
)
protected
function
validator
(
array
$data
)
{
{
return
Validator
::
make
(
$data
,
[
return
Validator
::
make
(
$data
,
[
'name'
=>
[
'required'
,
'string'
,
'max:255'
],
'name'
=>
[
'required'
,
'string'
,
'max:255'
],
'email'
=>
[
'required'
,
'string'
,
'email'
,
'max:255'
,
'unique:users'
],
'email'
=>
[
'required'
,
'string'
,
'email'
,
'max:255'
,
'unique:users'
],
'password'
=>
[
'required'
,
'string'
,
'min:8'
,
'confirmed'
],
'password'
=>
[
'required'
,
'string'
,
'min:8'
,
'confirmed'
],
'cpf'
=>
[
'required'
,
'cpf'
],
'cpf'
=>
[
'required'
,
'cpf'
,
'unique:users'
],
'celular'
=>
[
'required'
,
'string'
],
'celular'
=>
[
'required'
,
'string'
],
'instituicao'
=>
[
'required'
,
'string'
,
'max:255'
],
'instituicao'
=>
[
'required_if:instituicaoSelect,Outra'
,
'max:255'
],
'instituicaoSelect'
=>
[
'required_without:instituicao'
],
'cargo'
=>
[
'required'
],
'cargo'
=>
[
'required'
],
'vinculo'
=>
[
'required'
],
'vinculo'
=>
[
'required'
],
'outro'
=>
[
'required_if:vinculo,Outro'
],
'outro'
=>
[
'required_if:vinculo,Outro'
],
'titulacaoMaxima'
=>
[
'required_with:anoTitulacao,areaFormacao,bolsistaProdutividade
,linkLattes
'
],
'titulacaoMaxima'
=>
[
'required_with:anoTitulacao,areaFormacao,bolsistaProdutividade'
],
'titulacaoMaxima'
=>
Rule
::
requiredIf
(
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'titulacaoMaxima'
=>
Rule
::
requiredIf
((
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'anoTitulacao'
=>
[
'required_with:titulacaoMaxima,areaFormacao,bolsistaProdutividade,linkLattes'
],
'anoTitulacao'
=>
[
'required_with:titulacaoMaxima,areaFormacao,bolsistaProdutividade,linkLattes'
],
'anoTitulacao'
=>
Rule
::
requiredIf
(
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'anoTitulacao'
=>
Rule
::
requiredIf
((
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'areaFormacao'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,bolsistaProdutividade,linkLattes'
],
'areaFormacao'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,bolsistaProdutividade,linkLattes'
],
'areaFormacao'
=>
Rule
::
requiredIf
(
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'areaFormacao'
=>
Rule
::
requiredIf
((
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'bolsistaProdutividade'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,linkLattes'
],
'bolsistaProdutividade'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,linkLattes'
],
'bolsistaProdutividade'
=>
Rule
::
requiredIf
(
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'bolsistaProdutividade'
=>
Rule
::
requiredIf
((
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'nivel'
=>
[
'required_if:bolsistaProdutividade,sim'
],
'nivel'
=>
[
'required_if:bolsistaProdutividade,sim'
],
'linkLattes'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'
],
'nivel'
=>
[(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)
?
'required'
:
''
],
'linkLattes'
=>
Rule
::
requiredIf
(
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)),
'linkLattes'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'
],
'linkLattes'
=>
[(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)
?
'required'
:
''
],
'linkLattes'
=>
[(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$data
[
'cargo'
])
&&
$data
[
'cargo'
]
===
'Estudante'
&&
isset
(
$data
[
'vinculo'
])
&&
$data
[
'vinculo'
]
===
'Pós-doutorando'
)
?
'link_lattes'
:
''
],
]);
]);
}
}
...
@@ -89,54 +91,59 @@ class RegisterController extends Controller
...
@@ -89,54 +91,59 @@ class RegisterController extends Controller
*/
*/
protected
function
create
(
array
$data
)
protected
function
create
(
array
$data
)
{
{
//dd($data);
//dd($data);
$user
=
new
User
();
$user
=
new
User
();
$user
->
name
=
$data
[
'name'
];
$user
->
name
=
$data
[
'name'
];
$user
->
email
=
$data
[
'email'
];
$user
->
email
=
$data
[
'email'
];
$user
->
password
=
bcrypt
(
$data
[
'password'
]);
$user
->
password
=
bcrypt
(
$data
[
'password'
]);
$user
->
cpf
=
$data
[
'cpf'
];
$user
->
cpf
=
$data
[
'cpf'
];
$user
->
celular
=
$data
[
'celular'
];
$user
->
celular
=
$data
[
'celular'
];
$user
->
instituicao
=
$data
[
'instituicao'
];
if
(
$data
[
'instituicao'
]
!=
null
)
{
$user
->
instituicao
=
$data
[
'instituicao'
];
}
else
if
(
isset
(
$data
[
'instituicaoSelect'
])
&&
$data
[
'instituicaoSelect'
]
!=
"Outra"
)
{
$user
->
instituicao
=
$data
[
'instituicaoSelect'
];
}
if
(
$data
[
'cargo'
]
===
"Estudante"
&&
$data
[
'vinculo'
]
!==
"Pós-doutorando"
){
if
(
$data
[
'cargo'
]
===
"Estudante"
&&
$data
[
'vinculo'
]
!==
"Pós-doutorando"
)
{
$user
->
tipo
=
'participante'
;
$user
->
tipo
=
'participante'
;
$user
->
save
();
$user
->
save
();
$participante
=
new
Participante
();
$participante
=
new
Participante
();
$user
->
participantes
()
->
save
(
$participante
);
$user
->
participantes
()
->
save
(
$participante
);
}
else
{
}
else
{
$user
->
tipo
=
'proponente'
;
$user
->
tipo
=
'proponente'
;
$user
->
save
();
$user
->
save
();
$proponente
=
new
Proponente
();
$proponente
=
new
Proponente
();
if
(
$data
[
'SIAPE'
]
!=
null
){
if
(
$data
[
'SIAPE'
]
!=
null
)
{
$proponente
->
SIAPE
=
$data
[
'SIAPE'
];
$proponente
->
SIAPE
=
$data
[
'SIAPE'
];
}
}
$proponente
->
cargo
=
$data
[
'cargo'
];
$proponente
->
cargo
=
$data
[
'cargo'
];
if
(
$data
[
'vinculo'
]
!=
'Outro'
){
if
(
$data
[
'vinculo'
]
!=
'Outro'
)
{
$proponente
->
vinculo
=
$data
[
'vinculo'
];
$proponente
->
vinculo
=
$data
[
'vinculo'
];
}
else
{
}
else
{
$proponente
->
vinculo
=
$data
[
'outro'
];
$proponente
->
vinculo
=
$data
[
'outro'
];
}
}
$proponente
->
titulacaoMaxima
=
$data
[
'titulacaoMaxima'
];
$proponente
->
titulacaoMaxima
=
$data
[
'titulacaoMaxima'
];
$proponente
->
anoTitulacao
=
$data
[
'anoTitulacao'
];
$proponente
->
anoTitulacao
=
$data
[
'anoTitulacao'
];
$proponente
->
areaFormacao
=
$data
[
'areaFormacao'
];
$proponente
->
areaFormacao
=
$data
[
'areaFormacao'
];
$proponente
->
bolsistaProdutividade
=
$data
[
'bolsistaProdutividade'
];
$proponente
->
bolsistaProdutividade
=
$data
[
'bolsistaProdutividade'
];
if
(
$data
[
'bolsistaProdutividade'
]
==
'sim'
){
if
(
$data
[
'bolsistaProdutividade'
]
==
'sim'
)
{
$proponente
->
nivel
=
$data
[
'nivel'
];
$proponente
->
nivel
=
$data
[
'nivel'
];
}
}
$proponente
->
linkLattes
=
$data
[
'linkLattes'
];
$proponente
->
linkLattes
=
$data
[
'linkLattes'
];
$user
->
proponentes
()
->
save
(
$proponente
);
$user
->
proponentes
()
->
save
(
$proponente
);
}
}
return
$user
;
return
$user
;
}
}
public
function
showRegistrationForm
(){
public
function
showRegistrationForm
()
{
return
view
(
'auth.register'
);
return
view
(
'auth.register'
);
}
}
}
}
app/Http/Controllers/ParticipanteController.php
View file @
56f62ac9
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
App\Evento
;
use
App\Trabalho
;
use
App\Participante
;
class
ParticipanteController
extends
Controller
class
ParticipanteController
extends
Controller
{
{
...
@@ -10,4 +13,16 @@ class ParticipanteController extends Controller
...
@@ -10,4 +13,16 @@ class ParticipanteController extends Controller
return
view
(
'participante.index'
);
return
view
(
'participante.index'
);
}
}
public
function
edital
(
$id
){
$edital
=
Evento
::
find
(
$id
);
$trabalhosId
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
select
(
'id'
)
->
get
();
$meusTrabalhosId
=
Participante
::
where
(
'user_id'
,
'='
,
Auth
()
->
user
()
->
id
)
->
whereIn
(
'trabalho_id'
,
$trabalhosId
)
->
select
(
'trabalho_id'
)
->
get
();
$projetos
=
Trabalho
::
whereIn
(
'id'
,
$meusTrabalhosId
)
->
get
();
//dd($projetos);
return
view
(
'participante.projetos'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
}
}
}
app/Http/Controllers/ProponenteController.php
View file @
56f62ac9
...
@@ -37,8 +37,10 @@ class ProponenteController extends Controller
...
@@ -37,8 +37,10 @@ class ProponenteController extends Controller
'bolsistaProdutividade'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,linkLattes'
],
'bolsistaProdutividade'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,linkLattes'
],
'bolsistaProdutividade'
=>
Rule
::
requiredIf
(
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
===
'Estudante'
&&
isset
(
$request
[
'vinculo'
])
&&
$request
[
'vinculo'
]
===
'Pós-doutorando'
)),
'bolsistaProdutividade'
=>
Rule
::
requiredIf
(
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
===
'Estudante'
&&
isset
(
$request
[
'vinculo'
])
&&
$request
[
'vinculo'
]
===
'Pós-doutorando'
)),
'nivel'
=>
[
'required_if:bolsistaProdutividade,sim'
],
'nivel'
=>
[
'required_if:bolsistaProdutividade,sim'
],
'nivel'
=>
[(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
===
'Estudante'
&&
isset
(
$request
[
'vinculo'
])
&&
$request
[
'vinculo'
]
===
'Pós-doutorando'
)
?
'required'
:
''
],
'linkLattes'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'
],
'linkLattes'
=>
[
'required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'
],
'linkLattes'
=>
Rule
::
requiredIf
(
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
===
'Estudante'
&&
isset
(
$request
[
'vinculo'
])
&&
$request
[
'vinculo'
]
===
'Pós-doutorando'
)),
'linkLattes'
=>
[(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
===
'Estudante'
&&
isset
(
$request
[
'vinculo'
])
&&
$request
[
'vinculo'
]
===
'Pós-doutorando'
)
?
'required'
:
''
],
'linkLattes'
=>
[(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
!==
'Estudante'
)
||
(
isset
(
$request
[
'cargo'
])
&&
$request
[
'cargo'
]
===
'Estudante'
&&
isset
(
$request
[
'vinculo'
])
&&
$request
[
'vinculo'
]
===
'Pós-doutorando'
)
?
'link_lattes'
:
''
],
]);
]);
if
(
$request
[
'cargo'
]
===
"Estudante"
&&
$request
[
'vinculo'
]
!==
"Pós-doutorando"
){
if
(
$request
[
'cargo'
]
===
"Estudante"
&&
$request
[
'vinculo'
]
!==
"Pós-doutorando"
){
...
...
app/Http/Controllers/TrabalhoController.php
View file @
56f62ac9
...
@@ -101,7 +101,9 @@ class TrabalhoController extends Controller
...
@@ -101,7 +101,9 @@ class TrabalhoController extends Controller
'nomePlanoTrabalho.*'
=>
[
'required'
,
'string'
],
'nomePlanoTrabalho.*'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoProjeto'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoCONSU'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoCONSU'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoComiteEtica'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'botao'
=>
[
'required'
],
'anexoComiteEtica'
=>
[
'required_without:justificativaAutorizacaoEtica'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'justificativaAutorizacaoEtica'
=>
[
'required_without:anexoComiteEtica'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLatterCoordenador'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLatterCoordenador'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
...
@@ -224,6 +226,7 @@ class TrabalhoController extends Controller
...
@@ -224,6 +226,7 @@ class TrabalhoController extends Controller
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
data
=
$mytime
;
...
@@ -268,21 +271,23 @@ class TrabalhoController extends Controller
...
@@ -268,21 +271,23 @@ class TrabalhoController extends Controller
*/
*/
public
function
show
(
$id
)
public
function
show
(
$id
)
{
{
//
$projeto
=
Trabalho
::
find
(
$id
);
$projeto
=
Trabalho
::
find
(
$id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$grandeAreas
=
GrandeArea
::
orderBy
(
'nome'
)
->
get
();
$grandeArea
=
GrandeArea
::
where
(
'id'
,
$projeto
->
grande_area_id
)
->
select
(
'nome'
)
->
first
();
$areas
=
Area
::
orderBy
(
'nome'
)
->
get
();
$area
=
Area
::
where
(
'id'
,
$projeto
->
area_id
)
->
select
(
'nome'
)
->
first
();
$subareas
=
Subarea
::
orderBy
(
'nome'
)
->
get
();
$subarea
=
Subarea
::
where
(
'id'
,
$projeto
->
sub_area_id
)
->
select
(
'nome'
)
->
first
();
$proponente
=
Proponente
::
find
(
$projeto
->
proponente_id
);
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
get
();
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
get
();
$participantesUsersIds
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
select
(
'user_id'
)
->
get
();
$participantesUsersIds
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
select
(
'user_id'
)
->
get
();
$users
=
User
::
whereIn
(
'id'
,
$participantesUsersIds
)
->
get
();
$users
=
User
::
whereIn
(
'id'
,
$participantesUsersIds
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
return
view
(
'projeto.visualizar'
)
->
with
([
'projeto'
=>
$projeto
,
return
view
(
'projeto.visualizar'
)
->
with
([
'projeto'
=>
$projeto
,
'grandeAreas'
=>
$grandeAreas
,
'grandeArea'
=>
$grandeArea
,
'areas'
=>
$areas
,
'area'
=>
$area
,
'subAreas'
=>
$subareas
,
'subArea'
=>
$subarea
,
'proponente'
=>
$proponente
,
'edital'
=>
$edital
,
'edital'
=>
$edital
,
'users'
=>
$users
,
'users'
=>
$users
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
...
@@ -454,6 +459,7 @@ class TrabalhoController extends Controller
...
@@ -454,6 +459,7 @@ class TrabalhoController extends Controller
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
data
=
$mytime
;
...
@@ -486,6 +492,7 @@ class TrabalhoController extends Controller
...
@@ -486,6 +492,7 @@ class TrabalhoController extends Controller
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
$arquivo
->
data
=
$mytime
;
...
@@ -528,6 +535,16 @@ class TrabalhoController extends Controller
...
@@ -528,6 +535,16 @@ class TrabalhoController extends Controller
return
redirect
()
->
back
();
return
redirect
()
->
back
();
}
}
public
function
excluirParticipante
(
$id
){
$participante
=
Participante
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
where
(
'trabalho_id'
,
$id
)
->
first
();
$participante
->
trabalhos
()
->
detach
(
$id
);
$participante
->
delete
();
return
redirect
()
->
back
();
}
public
function
novaVersao
(
Request
$request
){
public
function
novaVersao
(
Request
$request
){
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
$mytime
=
$mytime
->
toDateString
();
...
@@ -710,4 +727,9 @@ class TrabalhoController extends Controller
...
@@ -710,4 +727,9 @@ class TrabalhoController extends Controller
}
}
return
abort
(
404
);
return
abort
(
404
);
}
}
public
function
baixarAnexoJustificativa
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
justificativaAutorizacaoEtica
);
}
}
}
app/Participante.php
View file @
56f62ac9
...
@@ -3,9 +3,12 @@
...
@@ -3,9 +3,12 @@
namespace
App
;
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
class
Participante
extends
Model
class
Participante
extends
Model
{
{
use
SoftDeletes
;
protected
$fillable
=
[
'name'
,
'user_id'
,
'trabalho_id'
,
'participante_id'
];
protected
$fillable
=
[
'name'
,
'user_id'
,
'trabalho_id'
,
'participante_id'
];
public
function
user
(){
public
function
user
(){
...
...
app/Providers/AppServiceProvider.php
View file @
56f62ac9
...
@@ -24,6 +24,7 @@ class AppServiceProvider extends ServiceProvider
...
@@ -24,6 +24,7 @@ class AppServiceProvider extends ServiceProvider
*/
*/
public
function
boot
()
public
function
boot
()
{
{
Validator
::
extend
(
'cpf'
,
'\App\Utils\CpfValidation@validate'
);
Validator
::
extend
(
'cpf'
,
'\App\Utils\CpfValidation@validate'
);
Validator
::
extend
(
'link_lattes'
,
'\App\Utils\LattesValidation@validate'
,
'Link inválido'
);
}
}
}
}
app/Utils/LattesValidation.php
0 → 100644
View file @
56f62ac9
<?php
namespace
App\Utils
;
class
LattesValidation
{
public
function
validate
(
$attribute
,
$value
,
$parameters
,
$validator
)
{
return
$this
->
isValidUrl
(
$value
);
}
function
isValidUrl
(
$url
)
{
// first do some quick sanity checks:
if
(
!
$url
||
!
is_string
(
$url
))
{
return
false
;
}
$url
=
filter_var
(
$url
,
FILTER_SANITIZE_URL
);
// Validate url
if
(
!
filter_var
(
$url
,
FILTER_VALIDATE_URL
))
{
return
false
;
}
if
(
parse_url
(
$url
)[
'host'
]
!=
'buscatextual.cnpq.br'
&&
parse_url
(
$url
)[
'host'
]
!=
'lattes.cnpq.br'
){
return
false
;
}
if
(
$this
->
getHttpResponseCode_using_getheaders
(
$url
)
!=
200
){
return
false
;
}
return
true
;
}
function
getHttpResponseCode_using_getheaders
(
$url
,
$followredirects
=
true
)
{
if
(
!
$url
||
!
is_string
(
$url
))
{
return
false
;
}
$headers
=
@
get_headers
(
$url
);
if
(
$headers
&&
is_array
(
$headers
))
{
if
(
$followredirects
)
{
$headers
=
array_reverse
(
$headers
);
}
foreach
(
$headers
as
$hline
)
{
if
(
preg_match
(
'/^HTTP\/\S+\s+([1-9][0-9][0-9])\s+.*/'
,
$hline
,
$matches
))
{
$code
=
$matches
[
1
];
return
$code
;
}
}
return
false
;
}
return
false
;
}
}
\ No newline at end of file
config/mail.php
View file @
56f62ac9
...
@@ -57,7 +57,7 @@ return [
...
@@ -57,7 +57,7 @@ return [
'from'
=>
[
'from'
=>
[
'address'
=>
env
(
'MAIL_FROM_ADDRESS'
,
'hello@example.com'
),
'address'
=>
env
(
'MAIL_FROM_ADDRESS'
,
'hello@example.com'
),
'name'
=>
env
(
'MAIL_FROM_NAME'
,
'
Example
'
),
'name'
=>
env
(
'MAIL_FROM_NAME'
,
'
Submeta
'
),
],
],
/*
/*
...
...
database/migrations/2020_02_05_123115_create_arquivos_table.php
View file @
56f62ac9
...
@@ -17,6 +17,7 @@ class CreateArquivosTable extends Migration
...
@@ -17,6 +17,7 @@ class CreateArquivosTable extends Migration
$table
->
bigIncrements
(
'id'
);
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
timestamps
();
$table
->
string
(
'nome'
);
$table
->
string
(
'nome'
);
$table
->
string
(
'titulo'
);
$table
->
integer
(
'versao'
)
->
nullable
();
$table
->
integer
(
'versao'
)
->
nullable
();
$table
->
boolean
(
'versaoFinal'
)
->
nullable
();
$table
->
boolean
(
'versaoFinal'
)
->
nullable
();
$table
->
date
(
'data'
)
->
nullable
();
$table
->
date
(
'data'
)
->
nullable
();
...
...
database/migrations/2020_05_21_020029_create_plano_trabalhos_table.php
deleted
100644 → 0
View file @
d65577db
<?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
();
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'plano_trabalhos'
);
}
}
database/migrations/2020_05_23_054945_create_participantes_table.php
View file @
56f62ac9
...
@@ -25,6 +25,8 @@ class CreateParticipantesTable extends Migration
...
@@ -25,6 +25,8 @@ class CreateParticipantesTable extends Migration
$table
->
unsignedBigInteger
(
'funcao_participante_id'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'funcao_participante_id'
)
->
nullable
();
$table
->
foreign
(
'funcao_participante_id'
)
->
references
(
'id'
)
->
on
(
'funcao_participantes'
);
$table
->
foreign
(
'funcao_participante_id'
)
->
references
(
'id'
)
->
on
(
'funcao_participantes'
);
$table
->
softDeletes
();
});
});
}
}
...
...
resources/lang/en/validation.php
View file @
56f62ac9
...
@@ -61,7 +61,7 @@ return [
...
@@ -61,7 +61,7 @@ return [
'required_unless'
=>
'O :attribute é necessário a menos que :other esteja em :values.'
,
'required_unless'
=>
'O :attribute é necessário a menos que :other esteja em :values.'
,
'required_with'
=>
'O campo é obrigatório.'
,
'required_with'
=>
'O campo é obrigatório.'
,
'required_with_all'
=>
'O campo :attribute é obrigatório quando :values estão presentes.'
,
'required_with_all'
=>
'O campo :attribute é obrigatório quando :values estão presentes.'
,
'required_without'
=>
'O campo
:attribute
é obrigatório
quando :values não está presente
.'
,
'required_without'
=>
'O campo é obrigatório.'
,
'required_without_all'
=>
'O campo :attribute é obrigatório quando nenhum destes estão presentes: :values.'
,
'required_without_all'
=>
'O campo :attribute é obrigatório quando nenhum destes estão presentes: :values.'
,
'same'
=>
':Attribute e :other devem ser iguais.'
,
'same'
=>
':Attribute e :other devem ser iguais.'
,
'size'
=>
[
'size'
=>
[
...
...
resources/views/administrador/editais.blade.php
View file @
56f62ac9
...
@@ -167,8 +167,8 @@
...
@@ -167,8 +167,8 @@
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('p
rojetos
.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
"{{ route('p
articipante
.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Projetos
submetid
os
Meus
projet
os
</
a
>
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
resultado
Visualizar
resultado
...
...
resources/views/auth/register.blade.php
View file @
56f62ac9
...
@@ -43,14 +43,24 @@
...
@@ -43,14 +43,24 @@
<
div
class
=
"form-group row"
>
<
div
class
=
"form-group row"
>
<
div
class
=
"col-md-8"
>
<
div
class
=
"col-md-8"
>
<
label
for
=
"instituicao"
class
=
"col-form-label"
>
{{
__
(
'Instituição de Vínculo*'
)
}}
</
label
>
<
label
for
=
"instituicao"
class
=
"col-form-label"
>
{{
__
(
'Instituição de Vínculo*'
)
}}
</
label
>
<
input
id
=
"instituicao"
type
=
"text"
class
=
"form-control @error('instituicao') is-invalid @enderror"
name
=
"instituicao"
value
=
"{{ old('instituicao') }}"
required
autocomplete
=
"instituicao"
autofocus
>
<
input
style
=
"display: none;"
id
=
"instituicao"
type
=
"text"
class
=
"form-control @error('instituicao') is-invalid @enderror"
name
=
"instituicao"
value
=
"{{ old('instituicao') }}"
placeholder
=
"Digite o nome da Instituição"
autocomplete
=
"instituicao"
autofocus
>
<
select
style
=
"display: inline"
onchange
=
"showInstituicao()"
class
=
"form-control @error('instituicaoSelect') is-invalid @enderror"
name
=
"instituicaoSelect"
id
=
"instituicaoSelect"
>
<
option
value
=
""
disabled
selected
hidden
>--
Instituição
--</
option
>
<
option
value
=
"UFAPE"
>
Universidade
Federal
do
Agreste
de
Pernambuco
-
UFAPE
</
option
>
<
option
>
Outra
</
option
>
</
select
>
@
error
(
'instituicao'
)
@
error
(
'instituicao'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
</
span
>
@
enderror
@
enderror
</
div
>
@
error
(
'instituicaoSelect'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
<
div
class
=
"col-md-4"
>
<
div
class
=
"col-md-4"
>
<
label
for
=
"celular"
class
=
"col-form-label"
>
{{
__
(
'Celular*'
)
}}
</
label
>
<
label
for
=
"celular"
class
=
"col-form-label"
>
{{
__
(
'Celular*'
)
}}
</
label
>
<
input
id
=
"celular"
type
=
"text"
class
=
"form-control @error('celular') is-invalid @enderror"
name
=
"celular"
value
=
"{{ old('celular') }}"
required
autocomplete
=
"celular"
autofocus
>
<
input
id
=
"celular"
type
=
"text"
class
=
"form-control @error('celular') is-invalid @enderror"
name
=
"celular"
value
=
"{{ old('celular') }}"
required
autocomplete
=
"celular"
autofocus
>
...
@@ -226,12 +236,12 @@
...
@@ -226,12 +236,12 @@
<
div
class
=
"col-md-1"
id
=
"nivelInput"
style
=
"display: block;"
>
<
div
class
=
"col-md-1"
id
=
"nivelInput"
style
=
"display: block;"
>
<
label
for
=
"nivel"
class
=
"col-form-label"
>
{{
__
(
'Nível*'
)
}}
</
label
>
<
label
for
=
"nivel"
class
=
"col-form-label"
>
{{
__
(
'Nível*'
)
}}
</
label
>
<
select
name
=
"nivel"
id
=
"nivel"
class
=
"form-control @error('nivel') is-invalid @enderror"
>
<
select
name
=
"nivel"
id
=
"nivel"
class
=
"form-control @error('nivel') is-invalid @enderror"
>
<
option
value
=
""
disabled
selected
hidden
></
option
>
<
option
value
=
""
disabled
selected
hidden
></
option
>
<
option
value
=
"2"
>
2
</
option
>
<
option
value
=
"1A"
>
1
A
</
option
>
<
option
value
=
"1D"
>
1
D
</
option
>
<
option
value
=
"1B"
>
1
B
</
option
>
<
option
value
=
"1B"
>
1
B
</
option
>
<
option
value
=
"1C"
>
1
C
</
option
>
<
option
value
=
"1C"
>
1
C
</
option
>
<
option
value
=
"1A"
>
1
A
</
option
>
<
option
value
=
"1D"
>
1
D
</
option
>
<
option
value
=
"2"
>
2
</
option
>
</
select
>
</
select
>
@
error
(
'nivel'
)
@
error
(
'nivel'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
...
@@ -299,10 +309,6 @@
...
@@ -299,10 +309,6 @@
}
}
}
}
window
.
onload
=
mudarNivel
();
window
.
onload
=
outroVinculo
();
window
.
onload
=
mudar
();
function
mudarNivel
()
{
function
mudarNivel
()
{
var
bolsista
=
document
.
getElementById
(
'bolsistaProdutividade'
);
var
bolsista
=
document
.
getElementById
(
'bolsistaProdutividade'
);
var
nivel
=
document
.
getElementById
(
'nivelInput'
);
var
nivel
=
document
.
getElementById
(
'nivelInput'
);
...
@@ -313,5 +319,24 @@
...
@@ -313,5 +319,24 @@
nivel
.
style
.
display
=
"none"
;
nivel
.
style
.
display
=
"none"
;
}
}
}
}
function
showInstituicao
(){
var
instituicao
=
document
.
getElementById
(
'instituicao'
);
var
instituicaoSelect
=
document
.
getElementById
(
'instituicaoSelect'
);
if
(
instituicaoSelect
.
value
===
"Outra"
){
instituicaoSelect
.
style
.
display
=
"none"
;
instituicao
.
style
.
display
=
"inline"
;
}
}
function
onload
(){
mudarNivel
();
outroVinculo
();
mudar
();
showInstituicao
();
}
window
.
onload
=
onload
();
</
script
>
</
script
>
@
endsection
@
endsection
\ No newline at end of file
resources/views/evento/submeterTrabalho.blade.php
View file @
56f62ac9
...
@@ -177,19 +177,26 @@
...
@@ -177,19 +177,26 @@
<div class="
col
-
sm
-
6
">
<div class="
col
-
sm
-
6
">
<label for="
nomeTrabalh
o
" class="
col
-
form
-
label
">{{ __('Possui autorização do Comitê de Ética*:') }}</label>
<label for="
bota
o
" class="
col
-
form
-
label
@
error
(
'botao'
)
is
-
invalid
@
enderror
">{{ __('Possui autorização do Comitê de Ética*:') }}</label>
<button id="
buttonSim
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Sim</button>
<button id="
buttonSim
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Sim</button>
<button id="
buttonNao
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Não</button>
<button id="
buttonNao
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Não</button>
<
div class="
input
-
group
">
<
input type="
hidden
" id="
botao
" name="
botao
" value="
">
@error('botao')
<span id="
botao
" class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
inline
">
<strong>{{
$message
}}</strong>
</span>
@enderror
<div class="
input
-
group
">
<div class="
custom
-
file
">
<div class="
custom
-
file
">
<input type="
file
" class="
custom
-
file
-
input
@
error
(
'anexoComiteEtica'
)
is
-
invalid
@
enderror
" id="
inputEtica
" aria-describedby="
inputGroupFileAddon01
" name="
anexoComiteEtica
">
<input
disabled
type="
file
" class="
custom
-
file
-
input
@
error
(
'anexoComiteEtica'
)
is
-
invalid
@
enderror
" id="
inputEtica
" aria-describedby="
inputGroupFileAddon01
" name="
anexoComiteEtica
">
<label class="
custom
-
file
-
label
" id="
custom
-
file
-
label
" for="
inputGroupFile01
">O arquivo deve ser no formato PDF de até 2mb.</label>
<label class="
custom
-
file
-
label
" id="
custom
-
file
-
label
" for="
inputGroupFile01
">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
</div>
</div>
@error('anexoComiteEtica')
@error('anexoComiteEtica')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<span
id="
comiteErro
"
class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
none
">
<strong>{{
$message
}}</strong>
<strong>{{
$message
}}</strong>
</span>
</span>
@enderror
@enderror
...
@@ -219,12 +226,12 @@
...
@@ -219,12 +226,12 @@
<div class="
custom
-
file
">
<div class="
custom
-
file
">
<input type="
file
" class="
custom
-
file
-
input
@
error
(
'justificativaAutorizacaoEtica'
)
is
-
invalid
@
enderror
" id="
inputJustificativa
" aria-describedby="
inputGroupFileAddon01
" disabled
="
disabled
"
name="
justificativaAutorizacaoEtica
">
<input type="
file
" class="
custom
-
file
-
input
@
error
(
'justificativaAutorizacaoEtica'
)
is
-
invalid
@
enderror
" id="
inputJustificativa
" aria-describedby="
inputGroupFileAddon01
" disabled name="
justificativaAutorizacaoEtica
">
<label class="
custom
-
file
-
label
" id="
custom
-
file
-
label
" for="
inputGroupFile01
">O arquivo deve ser no formato PDF de até 2mb.</label>
<label class="
custom
-
file
-
label
" id="
custom
-
file
-
label
" for="
inputGroupFile01
">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
</div>
</div>
@error('justificativaAutorizacaoEtica')
@error('justificativaAutorizacaoEtica')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<span
id="
justificativaErro
"
class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
none
">
<strong>{{
$message
}}</strong>
<strong>{{
$message
}}</strong>
</span>
</span>
@enderror
@enderror
...
@@ -424,14 +431,32 @@
...
@@ -424,14 +431,32 @@
e
.
preventDefault
();
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
false
);
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
false
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
true
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
true
);
exibirErro
(
'comite'
);
});
});
$
(
'#buttonNao'
)
.
on
(
'click'
,
function
(
e
)
{
$
(
'#buttonNao'
)
.
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
true
);
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
true
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
false
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
false
);
console
.
log
(
'button nao'
);
console
.
log
(
'button nao'
);
exibirErro
(
'justificativa'
);
});
});
});
});
function
exibirErro
(
campo
){
console
.
log
(
"o campo "
+
campo
);
var
botao
=
document
.
getElementById
(
'botao'
);
botao
.
value
=
"sim"
;
var
comiteErro
=
document
.
getElementById
(
'comiteErro'
);
var
justificativaErro
=
document
.
getElementById
(
'justificativaErro'
);
if
(
campo
===
'comite'
){
comiteErro
.
style
.
display
=
"block"
;
justificativaErro
.
style
.
display
=
"none"
;
}
else
if
(
campo
===
'justificativa'
){
comiteErro
.
style
.
display
=
"none"
;
justificativaErro
.
style
.
display
=
"block"
;
}
}
// Remover Coautor
// Remover Coautor
// function addModalidade(areaId) {
// function addModalidade(areaId) {
...
...
resources/views/layouts/app.blade.php
View file @
56f62ac9
...
@@ -115,24 +115,25 @@
...
@@ -115,24 +115,25 @@
{{ __('Perfil Coordenador') }}
{{ __('Perfil Coordenador') }}
</a>
</a>
@endif
@endif
@if(Auth::user()->avaliadors != null)
<a
class=
"dropdown-item"
href=
"{{ route('avaliador.index') }}"
>
@if(Auth::user()->avaliadors != null)
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
<a
class=
"dropdown-item"
href=
"{{ route('avaliador.index') }}"
>
{{ __('Perfil Avaliador') }}
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
</a>
{{ __('Perfil Avaliador') }}
@endif
</a>
@if(Auth::user()->proponentes != null)
@endif
<a
class=
"dropdown-item"
href=
"{{ route('proponente.index') }}"
>
@if(Auth::user()->proponentes != null)
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
<a
class=
"dropdown-item"
href=
"{{ route('proponente.index') }}"
>
{{ __('Perfil Proponente') }}
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
</a>
{{ __('Perfil Proponente') }}
@endif
</a>
@if(Auth::user()->participantes->where('user_id', Auth::user()->id)->count() != 0)
@endif
<a
class=
"dropdown-item"
href=
"{{ route('participante.index') }}"
>
@if(Auth::user()->participantes->where('user_id', Auth::user()->id)->count() != 0)
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
<a
class=
"dropdown-item"
href=
"{{ route('participante.index') }}"
>
{{ __('Perfil Participante') }}
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
</a>
{{ __('Perfil Participante') }}
@endif
</a>
@endif
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
onclick=
"event.preventDefault();
...
...
resources/views/participante/editais.blade.php
deleted
100644 → 0
View file @
d65577db
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Meus
Editais
</
h3
>
</
div
>
</
div
>
</
div
>
<
hr
>
@
if
(
auth
()
->
user
()
->
tipo
===
"participante"
)
<
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
>
</
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"
>
Resultado
preeliminar
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
final
</
a
>
--
}}
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
@
endif
</
div
>
\ No newline at end of file
resources/views/participante/projetos.blade.php
0 → 100644
View file @
56f62ac9
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Projetos
do
edital
{{
$edital
->
nome
}}
</
h3
>
<
h6
style
=
"color: rgb(4, 78, 4);"
>
Submissão
irá
até
o
dia
{{
date
(
'd-m-Y'
,
strtotime
(
$edital
->
fimSubmissao
))
}}
</
h6
>
</
div
>
<
div
class
=
"col-sm-2"
>
<!--
Se
usuário
não
é
proponente
,
redirecionar
para
view
de
cadastro
-->
@
if
(
Auth
::
user
()
->
proponentes
==
null
)
<
a
href
=
"{{ route('proponente.create' )}}"
class
=
"btn btn-primary"
>
Criar
projeto
</
a
>
@
else
<
a
href
=
"{{ route('trabalho.index', ['id' =>
$edital->id
] )}}"
class
=
"btn btn-primary"
>
Criar
projeto
</
a
>
@
endif
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
projeto
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$projetos
as
$projeto
)
<
tr
>
<
td
>
{{
$projeto
->
titulo
}}
</
td
>
@
if
(
$projeto
->
status
==
'Avaliado'
)
<
td
style
=
"color: rgb(6, 85, 6)"
>
Avaliado
</
td
>
@
elseif
(
$projeto
->
status
==
'Submetido'
)
<
td
style
=
"color: rgb(0, 0, 0)"
>
Submetido
</
td
>
@
endif
<
td
>
{{
date
(
'd-m-Y'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
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('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Visualizar
projeto
</
a
>
@
if
(
$projeto
->
status
==
'Submetido'
)
<
a
href
=
"{{ route('trabalho.excluirParticipante', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Sair
do
projeto
</
a
>
@
endif
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
\ No newline at end of file
resources/views/projeto/visualizar.blade.php
View file @
56f62ac9
...
@@ -3,252 +3,205 @@
...
@@ -3,252 +3,205 @@
@
section
(
'content'
)
@
section
(
'content'
)
<
div
class
=
"container content"
>
<
div
class
=
"container content"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"card"
style
=
"margin-top:50px"
>
<
div
class
=
"card"
style
=
"margin-top:50px"
>
<
div
class
=
"card-body"
>
<
div
class
=
"card-body"
>
<
h3
class
=
"card-title"
>
Dados
do
Projeto
</
h3
>
<
h5
class
=
"card-title"
>
Visualizar
Projeto
</
h5
>
<
p
class
=
"card-text"
>
<
p
class
=
"card-text"
>
<
input
type
=
"hidden"
name
=
"editalId"
value
=
"{{
$edital->id
}}"
>
<
input
type
=
"hidden"
name
=
"editalId"
value
=
"{{
$edital->id
}}"
>
{{
--
Nome
do
Projeto
--
}}
{{
--
Nome
do
Projeto
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Nome do Projeto:'
)
}}
</
label
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Nome do Projeto:'
)
}}
</
label
>
<
input
id
=
"nomeTrabalho"
value
=
"{{
$projeto->titulo
}}"
type
=
"text"
class
=
"form-control @error('nomeTrabalho') is-invalid @enderror"
name
=
"nomeProjeto"
value
=
"{{ old('nomeTrabalho') }}"
required
autocomplete
=
"nomeTrabalho"
autofocus
disabled
>
<
span
id
=
"nomeTrabalho"
class
=
"form-control"
name
=
"nomeProjeto"
>
{{
$projeto
->
titulo
}}
</
span
>
</
div
>
@
error
(
'nomeTrabalho'
)
</
div
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
</
div
>
{{
--
Grande
Area
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"grandeArea"
class
=
"col-form-label"
>
{{
__
(
'Grande Área:'
)
}}
</
label
>
<
select
class
=
"form-control @error('grandeArea') is-invalid @enderror"
id
=
"grandeArea"
name
=
"grandeArea"
disabled
>
<
option
value
=
""
disabled
selected
hidden
>--
Grande
Área
--</
option
>
@
foreach
(
$grandeAreas
as
$grandeArea
)
@
if
(
$grandeArea
->
id
===
$projeto
->
grande_area_id
)
<
option
value
=
"
{
{$grandeArea->id}
}
"
selected
>
{{
$grandeArea
->
nome
}}
</
option
>
@
else
<
option
value
=
"
{
{$grandeArea->id}}">{{$grandeArea->nome}
}
</option>
@endif
@endforeach
</select>
@error('grandeArea')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
<div class="
col
-
sm
-
4
">
<label for="
area
" class="
col
-
form
-
label
">{{ __('Área:') }}</label>
<select class="
form
-
control
@
error
(
'area'
)
is
-
invalid
@
enderror
" id="
area
" name="
area
" disabled>
<option value="" disabled selected hidden>-- Área --</option>
@foreach(
$areas
as
$area
)
@if(
$area->id
===
$projeto->area_id
)
<option value="
{{
$area
->
id
}}
" selected>
{
{$area->nome}
}
</option>
@else
<option value="
{{
$area
->
id
}}
">
{
{$area->nome}
}
</option>
@endif
@endforeach
</select>
@error('area')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
<div class="
col
-
sm
-
4
">
<label for="
subArea
" class="
col
-
form
-
label
">{{ __('Sub Área:') }}</label>
<select class="
form
-
control
@
error
(
'subArea'
)
is
-
invalid
@
enderror
" id="
subArea
" name="
subArea
" disabled>
<option value="" disabled selected hidden>-- Sub Área --</option>
@foreach(
$subAreas
as
$subArea
)
@if(
$subArea->id
===
$projeto->sub_area_id
)
<option value="
{{
$subArea
->
id
}}
" selected>
{
{$subArea->nome}
}
</option>
@else
<option value="
{{
$subArea
->
id
}}
">
{
{$subArea->nome}
}
</option>
@endif
@endforeach
</select>
@error('subArea')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
{{
--
Grande
Area
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"grandeArea"
class
=
"col-form-label"
>
{{
__
(
'Grande Área:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"grandeArea"
name
=
"grandeArea"
>
{{
$grandeArea
->
nome
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"area"
class
=
"col-form-label"
>
{{
__
(
'Área:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"area"
name
=
"area"
>
{{
$area
->
nome
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"subArea"
class
=
"col-form-label"
>
{{
__
(
'Sub Área:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"subArea"
name
=
"subArea"
>
{{
$subArea
->
nome
}}
</
span
>
</
div
>
</
div
>
<
hr
>
<
h3
>
Coordenador
</
h3
>
{{
--
Coordenador
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeCoordenador"
class
=
"col-form-label"
>
{{
__
(
'Coordenador:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"nomeCoordenador"
name
=
"nomeCoordenador"
disabled
>
{{
$proponente
->
user
->
name
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
Link
Lattes
do
Proponente
</
label
>
<
span
class
=
"form-control"
name
=
"linkLattesEstudante"
>
@
if
(
$proponente
->
linkLattes
!=
null
)
{{
$proponente
->
linkLattes
}}
@
endif
</
span
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Pontuação da Planilha de Pontuação :'
)
}}
</
label
>
<
span
class
=
"form-control"
name
=
"pontuacaoPlanilha"
>
{{
$projeto
->
pontuacaoPlanilha
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Link do grupo de pesquisa:'
)
}}
</
label
>
<
span
class
=
"form-control"
name
=
"linkGrupo"
>
{{
$projeto
->
linkGrupoPesquisa
}}
</
span
>
</
div
>
</
div
>
<hr>
<
hr
>
<h3>Coordenador
</h3>
<
h3
>
Anexos
</
h3
>
{{-- Coordenador --}}
{{
--
Anexo
do
Projeto
--
}}
<div class="
row
justify
-
content
-
center
">
<
div
class
=
"row justify-content-center"
>
{{
--
Arquivo
--
}}
<
div
class
=
"col-sm-6"
>
<
label
for
=
"anexoProjeto"
class
=
"col-form-label"
>
{{
__
(
'Anexo Projeto: '
)
}}
</
label
>
<
a
href
=
"{{ route('baixar.anexo.projeto', ['id' =>
$projeto->id
])}}"
>
Arquivo
atual
</
a
>
</
div
>
<div class="
col
-
sm
-
6
">
<
div
class
=
"col-sm-6"
>
<label for="
nomeCoordenador
" class="
col
-
form
-
label
">{{ __('Coordenador:') }}</label>
<
label
for
=
"anexoLatterCoordenador"
class
=
"col-form-label"
>
{{
__
(
'Anexo do Lattes do Coordenador: '
)
}}
</
label
>
<input class="
form
-
control
" value="
{{
auth
()
->
user
()
->
name
}}
" type="
text
" id="
nomeCoordenador
" name="
nomeCoordenador
" disabled="
disabled
" value="
{{
Auth
()
->
user
()
->
name
}}
">
<
a
href
=
"{{ route('baixar.anexo.lattes', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
</div>
</
div
>
<div class="
col
-
sm
-
6
">
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">Link Lattes do Proponente</label>
<input class="
form
-
control
@
error
(
'linkLattesEstudante'
)
is
-
invalid
@
enderror
" type="
text
" name="
linkLattesEstudante
"
@if(Auth()->user()->proponentes->linkLattes != null)
value="
{{
Auth
()
->
user
()
->
proponentes
->
linkLattes
}}
"
@else
value=""
@endif disabled>
@error('linkLattesEstudante')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">{{ __('Pontuação da Planilha de Pontuação :') }}</label>
<input value="
{{
$projeto
->
pontuacaoPlanilha
}}
" class="
form
-
control
@
error
(
'pontuacaoPlanilha'
)
is
-
invalid
@
enderror
" type="
text
" name="
pontuacaoPlanilha
" disabled>
@error('pontuacaoPlanilha')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">{{ __('Link do grupo de pesquisa:') }}</label>
<input value="
{{
$projeto
->
linkGrupoPesquisa
}}
" class="
form
-
control
@
error
(
'linkGrupo'
)
is
-
invalid
@
enderror
" type="
text
" name="
linkGrupo
" disabled>
@error('linkGrupo')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
</div>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Autorização do Comitê de Ética: '
)
}}
</
label
>
<hr>
@
if
(
$projeto
->
anexoAutorizacaoComiteEtica
!=
null
)
<h3>Anexos</h3>
<
a
href
=
"{{ route('baixar.anexo.comite', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
@
else
{{-- Anexo do Projeto --}}
-
<div class="
row
">
@
endif
{{-- Arquivo --}}
</
div
>
<ul>
<li>
<a href="
{{
route
(
'baixar.anexo.projeto'
,
[
'id'
=>
$projeto
->
id
])}}
">{{ __('Projeto') }}</a>
</li>
<li>
<a href="
{{
route
(
'baixar.anexo.lattes'
,
[
'id'
=>
$projeto
->
id
])
}}
">{{ __('Lattes do Coordenador') }}</a>
</li>
<li>
@if (!(is_null(
$projeto->anexoAutorizacaoComiteEdica
)))
<a href="
{{
route
(
'baixar.anexo.comite'
,
[
'id'
=>
$projeto
->
id
])
}}
">{{ __('Autorização do Comitê de Ética') }}</a>
@else
<a href="
#">{{ __('Justificativa do Comitê de Ética') }}</a>
@
endif
</
li
>
<
li
>
<
a
href
=
"{{ route('baixar.anexo.planilha', ['id' =>
$projeto->id
]) }}"
>
{{
__
(
'Planilha de Pontuação'
)
}}
</
a
>
</
li
>
@
if
(
$edital
->
tipo
==
'PIBIC'
||
$edital
->
tipo
==
'PIBIC-EM'
)
<
li
>
<
a
href
=
"{{ route('baixar.anexo.consu', ['id' =>
$projeto->id
]) }}"
>
{{
__
(
'Decisão do CONSU'
)}}
</
a
>
</
li
>
@
endif
</
ul
>
</
div
>
<
hr
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"anexoPlanilha"
class
=
"col-form-label"
>
{{
__
(
'Anexo do Planilha de Pontuação: '
)
}}
</
label
>
<
h3
>
Participantes
</
h3
>
<
a
href
=
"{{ route('baixar.anexo.planilha', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
</
div
>
{{
--
Participantes
--
}}
<
div
class
=
"row"
style
=
"margin-top:20px"
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Justificativa: '
)
}}
</
label
>
<
div
id
=
"participantes"
>
@
if
(
$projeto
->
justificativaAutorizacaoEtica
!=
null
)
@
foreach
(
$participantes
as
$participante
)
<
a
href
=
"{{ route('baixar.anexo.justificativa', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
@
foreach
(
$users
as
$user
)
@
else
@
if
(
$participante
->
user_id
===
$user
->
id
)
-
<
div
id
=
"novoParticipante"
>
@
endif
<
br
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-5"
>
@
if
(
$edital
->
tipo
==
'PIBIC'
||
$edital
->
tipo
==
'PIBIC-EM'
)
<
label
>
Nome
Completo
</
label
>
{{
--
Decisão
do
CONSU
--
}}
<
input
value
=
"{{
$user->name
}}"
type
=
"text"
style
=
"margin-bottom:10px"
class
=
"form-control @error('nomeParticipante') is-invalid @enderror"
name
=
"nomeParticipante[]"
placeholder
=
"Nome"
required
disabled
>
<
div
class
=
"col-sm-6"
>
@
error
(
'nomeParticipante'
)
<
label
for
=
"anexoCONSU"
class
=
"col-form-label"
>
{{
__
(
'Decisão do CONSU: '
)
}}
</
label
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
<
a
href
=
"{{ route('baixar.anexo.consu', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
>
E
-
mail
</
label
>
<
input
value
=
"{{
$user->email
}}"
type
=
"email"
style
=
"margin-bottom:10px"
class
=
"form-control @error('emailParticipante') is-invalid @enderror"
name
=
"emailParticipante[]"
placeholder
=
"email"
required
disabled
>
@
error
(
'emailParticipante'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
<
div
class
=
"col-sm-3"
>
<
label
>
Função
:</
label
>
<
select
class
=
"form-control @error('funcaoParticipante') is-invalid @enderror"
name
=
"funcaoParticipante[]"
id
=
"funcaoParticipante"
disabled
>
<
option
value
=
""
disabled
selected
hidden
>--
Função
--</
option
>
@
foreach
(
$funcaoParticipantes
as
$funcaoParticipante
)
@
if
(
$funcaoParticipante
->
id
===
$participante
->
funcao_participante_id
)
<
option
value
=
"
{
{$funcaoParticipante->id}
}
"
selected
>
{{
$funcaoParticipante
->
nome
}}
</
option
>
@
else
<
option
value
=
"
{
{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}
}
</option>
@endif
@endforeach
@error('funcaoParticipante')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</select>
</div>
</
div
>
</
div
>
@foreach (
$arquivos
as
$arquivo
)
@if(
$arquivo->participanteId
===
$participante->id
)
<a href="
{{
route
(
'baixar.plano'
,
[
'id'
=>
$arquivo
->
id
])
}}
">Plano de trabalho atual</a>
@
endif
@
endif
@endforeach
</div>
@endif
@endforeach
@endforeach
</div>
</div>
</div>
</p>
</
div
>
<
hr
>
<
h4
>
Participantes
</
h4
>
{{
--
Participantes
--
}}
<
div
class
=
"row"
style
=
"margin-top:20px"
>
<
div
class
=
"col-sm-12"
>
<
div
id
=
"participantes"
>
@
foreach
(
$participantes
as
$participante
)
@
foreach
(
$users
as
$user
)
@
if
(
$participante
->
user_id
===
$user
->
id
)
<
div
id
=
"novoParticipante"
>
<
br
>
<
h5
>
Dados
do
participante
</
h5
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-5"
>
<
label
>
Nome
Completo
</
label
>
<
span
style
=
"margin-bottom:10px"
class
=
"form-control"
name
=
"nomeParticipante[]"
>
{{
$user
->
name
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
>
E
-
mail
</
label
>
<
span
style
=
"margin-bottom:10px"
class
=
"form-control"
name
=
"emailParticipante[]"
>
{{
$user
->
email
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-3"
>
<
label
>
Função
:</
label
>
<
select
disabled
class
=
"form-control"
name
=
"funcaoParticipante[]"
id
=
"funcaoParticipante"
>
<
option
value
=
""
disabled
selected
hidden
>--
Função
--</
option
>
@
foreach
(
$funcaoParticipantes
as
$funcaoParticipante
)
@
if
(
$funcaoParticipante
->
id
===
$participante
->
funcao_participante_id
)
<
option
value
=
"
{
{$funcaoParticipante->id}
}
"
selected
>
{{
$funcaoParticipante
->
nome
}}
</
option
>
@
else
<
option
value
=
"
{
{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}
}
</option>
@endif
@endforeach
</select>
</div>
</div>
<h5>Dados do plano de trabalho</h5>
@foreach(
$arquivos
as
$arquivo
)
@if(
$arquivo->participanteId
===
$participante->id
)
<div class="
row
">
<div class="
col
-
sm
-
12
">
<div id="
planoTrabalho
">
<div class="
row
">
<div class="
col
-
sm
-
4
">
<label>Titulo </label>
<span style="
margin
-
bottom
:
10
px
" class="
form
-
control
" name="
nomePlanoTrabalho
[]
">
{
{$arquivo->titulo}
}
</span>
</div>
{{-- Arquivo --}}
<div class="
col
-
sm
-
7
">
<label for="
nomeTrabalho
">Anexo</label>
<p>
<a href="
{{
route
(
'baixar.plano'
,
[
'id'
=>
$arquivo
->
id
])
}}
">Plano de trabalho atual</a>
</p>
</div>
</div>
</div>
</div>
</div>
@endif
@endforeach
</div>
@endif
@endforeach
@endforeach
</div>
</div>
</div>
</p>
<div class="
row
justify
-
content
-
center
">
<div class="
col
-
md
-
12
">
<a href="
{{
route
(
'participante.edital'
,[
'id'
=>
$edital
->
id
])}}
" class="
btn
btn
-
secondary
" style="
width
:
100
%
">Voltar</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@endsection
@section('javascript')
<script>
</script>
@endsection
\ No newline at end of file
resources/views/proponente/cadastro.blade.php
View file @
56f62ac9
...
@@ -154,11 +154,11 @@
...
@@ -154,11 +154,11 @@
<
label
for
=
"nivel"
class
=
"col-form-label"
>
{{
__
(
'Nível*'
)
}}
</
label
>
<
label
for
=
"nivel"
class
=
"col-form-label"
>
{{
__
(
'Nível*'
)
}}
</
label
>
<
select
name
=
"nivel"
id
=
"nivel"
class
=
"form-control @error('nivel') is-invalid @enderror"
>
<
select
name
=
"nivel"
id
=
"nivel"
class
=
"form-control @error('nivel') is-invalid @enderror"
>
<
option
value
=
""
disabled
selected
hidden
></
option
>
<
option
value
=
""
disabled
selected
hidden
></
option
>
<
option
value
=
"2"
>
2
</
option
>
<
option
value
=
"1A"
>
1
A
</
option
>
<
option
value
=
"1D"
>
1
D
</
option
>
<
option
value
=
"1B"
>
1
B
</
option
>
<
option
value
=
"1B"
>
1
B
</
option
>
<
option
value
=
"1C"
>
1
C
</
option
>
<
option
value
=
"1C"
>
1
C
</
option
>
<
option
value
=
"1A"
>
1
A
</
option
>
<
option
value
=
"1D"
>
1
D
</
option
>
<
option
value
=
"2"
>
2
</
option
>
</
select
>
</
select
>
@
error
(
'nivel'
)
@
error
(
'nivel'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
...
@@ -235,11 +235,14 @@
...
@@ -235,11 +235,14 @@
nivel
.
style
.
display
=
"block"
;
nivel
.
style
.
display
=
"block"
;
}
else
{
}
else
{
nivel
.
style
.
display
=
"none"
;
nivel
.
style
.
display
=
"none"
;
}
}
console
.
log
(
"a"
);
}
function
onload
(){
mudarNivel
();
outroVinculo
();
}
}
window
.
onload
=
mudarNivel
();
window
.
onload
=
onload
();
window
.
onload
=
outroVinculo
();
</
script
>
</
script
>
@
endsection
@
endsection
\ No newline at end of file
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