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
150c75ee
Commit
150c75ee
authored
Jul 29, 2021
by
Gabriel-31415
Browse files
ajuste em submeter proposta
parent
1b9d6342
Changes
10
Hide whitespace changes
Inline
Side-by-side
.env.example
100644 → 100755
View file @
150c75ee
File mode changed from 100644 to 100755
.gitignore
100644 → 100755
View file @
150c75ee
File mode changed from 100644 to 100755
app/Http/Controllers/TrabalhoController.php
View file @
150c75ee
...
@@ -822,14 +822,12 @@ class TrabalhoController extends Controller
...
@@ -822,14 +822,12 @@ class TrabalhoController extends Controller
$data
[
'media_do_curso'
]
=
$request
->
media_do_curso
[
$part
];
$data
[
'media_do_curso'
]
=
$request
->
media_do_curso
[
$part
];
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
[
$part
];
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
[
$part
];
$participante
=
Participante
::
find
(
$request
->
participante_id
[
$part
]);
// $participante = Participante::find($request->participante_id[$part]);
$user
=
User
::
where
(
'email'
,
$data
[
'email'
])
->
first
();
if
(
!
$participante
){
if
(
$user
==
null
){
$data
[
'usuarioTemp'
]
=
true
;
$data
[
'usuarioTemp'
]
=
true
;
$user
=
User
::
updateOrCreate
(
$user
=
User
::
create
(
$data
);
[
'email'
=>
$data
[
'email'
]],
$data
);
$endereco
=
Endereco
::
create
(
$data
);
$endereco
=
Endereco
::
create
(
$data
);
$endereco
->
user
()
->
save
(
$user
);
$endereco
->
user
()
->
save
(
$user
);
$participante
=
Participante
::
create
(
$data
);
$participante
=
Participante
::
create
(
$data
);
...
@@ -837,16 +835,19 @@ class TrabalhoController extends Controller
...
@@ -837,16 +835,19 @@ class TrabalhoController extends Controller
$trabalho
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
}
else
{
}
else
{
$user
=
$participante
->
user
;
//
$user = $participante->user;
$user
->
update
(
$data
);
$user
->
update
(
$data
);
$endereco
=
$user
->
endereco
;
$endereco
=
$user
->
endereco
;
$endereco
->
update
(
$data
);
$endereco
->
update
(
$data
);
$participante
=
$user
->
participantes
->
where
(
'trabalho_id'
,
$trabalho
->
id
)
->
first
();
$participante
=
$user
->
participantes
->
where
(
'trabalho_id'
,
$trabalho
->
id
)
->
where
(
'id'
,
$request
->
participante_id
[
$part
])
->
first
();
if
(
!
$participante
){
// dd($participante);
if
(
$participante
==
null
){
// dd('part null');
$participante
=
Participante
::
create
(
$data
);
$participante
=
Participante
::
create
(
$data
);
$user
->
participantes
()
->
save
(
$participante
);
$user
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
}
else
{
}
else
{
// dd('part update');
$participante
->
update
(
$data
);
$participante
->
update
(
$data
);
}
}
...
@@ -970,20 +971,22 @@ class TrabalhoController extends Controller
...
@@ -970,20 +971,22 @@ class TrabalhoController extends Controller
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
[
$part
];
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
[
$part
];
$user
=
User
::
where
(
'email'
,
$data
[
'email'
])
->
first
();
$user
=
User
::
where
(
'email'
,
$data
[
'email'
])
->
first
();
if
(
!
$user
){
if
(
$user
==
null
){
$data
[
'usuarioTemp'
]
=
true
;
$data
[
'usuarioTemp'
]
=
true
;
$user
=
User
::
create
(
$data
);
$user
=
User
::
create
(
$data
);
$endereco
=
Endereco
::
create
(
$data
);
$endereco
=
Endereco
::
create
(
$data
);
$endereco
->
user
()
->
save
(
$user
);
$endereco
->
user
()
->
save
(
$user
);
}
}
$participante
=
$user
->
participantes
->
where
(
'trabalho_id'
,
$trabalho
->
id
)
->
first
();
//
$participante = $user->participantes->where('trabalho_id', $trabalho->id)->first();
if
(
!
$participante
){
//
if ($participante
== null
){
$participante
=
Participante
::
create
(
$data
);
//
$participante = Participante::create($data);
}
//
}
$participante
=
Participante
::
create
(
$data
);
$user
->
participantes
()
->
save
(
$participante
);
$user
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
$participante
->
trabalho_id
=
$trabalho
->
id
;
$participante
->
save
();
if
(
$request
->
has
(
'anexoPlanoTrabalho'
)
)
{
if
(
$request
->
has
(
'anexoPlanoTrabalho'
)
)
{
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$data
[
'nomePlanoTrabalho'
]
.
".pdf"
;
$nome
=
$data
[
'nomePlanoTrabalho'
]
.
".pdf"
;
...
...
app/Http/Requests/StoreTrabalho.php
View file @
150c75ee
...
@@ -27,26 +27,7 @@ class StoreTrabalho extends FormRequest
...
@@ -27,26 +27,7 @@ class StoreTrabalho extends FormRequest
public
function
rules
()
public
function
rules
()
{
{
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
$rules
=
[
'editalId'
=>
[
'required'
,
'string'
],
'marcado.*'
=>
[
'required'
],
'titulo'
=>
[
'required'
,
'string'
],
'grande_area_id'
=>
[
'required'
,
'string'
],
'area_id'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupoPesquisa'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[
'required'
,
'mimes:pdf'
],
'anexoDecisaoCONSU'
=>
[
Rule
::
requiredIf
(
$evento
->
consu
),
'mimes:pdf'
],
'anexoPlanilhaPontuacao'
=>
[
'required'
],
'anexoLattesCoordenador'
=>
[
'required'
,
'mimes:pdf'
],
'anexoGrupoPesquisa'
=>
[
'required'
,
'mimes:pdf'
],
'anexoAutorizacaoComiteEtica'
=>
[
Rule
::
requiredIf
(
$this
->
justificativaAutorizacaoEtica
==
null
)],
'justificativaAutorizacaoEtica'
=>
[
Rule
::
requiredIf
(
$this
->
anexoAutorizacaoComiteEtica
==
null
)],
];
if
(
$this
->
has
(
'marcado'
)){
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
if
(
intval
(
$value
)
==
$key
){
...
@@ -81,10 +62,25 @@ class StoreTrabalho extends FormRequest
...
@@ -81,10 +62,25 @@ class StoreTrabalho extends FormRequest
}
}
if
(
$this
->
has
(
'rascunho'
))
{
if
(
$this
->
has
(
'rascunho'
))
{
return
[
return
$rules
;
];
}
else
{
}
else
{
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
[
'editalId'
]
=
[
'required'
,
'string'
];
$rules
[
'marcado.*'
]
=
[
'required'
];
$rules
[
'titulo'
]
=
[
'required'
,
'string'
];
$rules
[
'grande_area_id'
]
=
[
'required'
,
'string'
];
$rules
[
'area_id'
]
=
[
'required'
,
'string'
];
$rules
[
'linkLattesEstudante'
]
=
[
'required'
,
'string'
];
$rules
[
'pontuacaoPlanilha'
]
=
[
'required'
,
'string'
];
$rules
[
'linkGrupoPesquisa'
]
=
[
'required'
,
'string'
];
$rules
[
'anexoProjeto'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoDecisaoCONSU'
]
=
[
Rule
::
requiredIf
(
$evento
->
consu
),
'mimes:pdf'
];
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
'required'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoGrupoPesquisa'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoAutorizacaoComiteEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
justificativaAutorizacaoEtica
==
null
)];
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
anexoAutorizacaoComiteEtica
==
null
)];
return
$rules
;
return
$rules
;
}
}
...
...
app/Http/Requests/UpdateTrabalho.php
View file @
150c75ee
...
@@ -29,28 +29,7 @@ class UpdateTrabalho extends FormRequest
...
@@ -29,28 +29,7 @@ class UpdateTrabalho extends FormRequest
{
{
$projeto
=
Trabalho
::
find
(
$this
->
id
);
$projeto
=
Trabalho
::
find
(
$this
->
id
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[
'editalId'
=>
[
'required'
,
'string'
],
'marcado.*'
=>
[
'required'
],
'titulo'
=>
[
'required'
,
'string'
],
'grande_area_id'
=>
[
'required'
,
'string'
],
'area_id'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupoPesquisa'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoProjeto
==
null
)],
'mimes:pdf'
],
'anexoDecisaoCONSU'
=>
[
Rule
::
requiredIf
(
$evento
->
consu
&&
$projeto
->
anexoDecisaoCONSU
==
null
),
'mimes:pdf'
],
'anexoPlanilhaPontuacao'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoPlanilhaPontuacao
==
null
)]],
'anexoLattesCoordenador'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoLattesCoordenador
==
null
)],
'mimes:pdf'
],
'anexoGrupoPesquisa'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoGrupoPesquisa
==
null
)],
'mimes:pdf'
],
'anexoAutorizacaoComiteEtica'
=>
[
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)
)
],
'justificativaAutorizacaoEtica'
=>
[
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
))
],
];
if
(
$this
->
has
(
'marcado'
)){
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
if
(
intval
(
$value
)
==
$key
){
...
@@ -84,10 +63,31 @@ class UpdateTrabalho extends FormRequest
...
@@ -84,10 +63,31 @@ class UpdateTrabalho extends FormRequest
}
}
// dd($this->all());
// dd($this->all());
if
(
$this
->
has
(
'rascunho'
))
{
if
(
$this
->
has
(
'rascunho'
))
{
return
[
$rules
=
[];
return
$rules
;
}
else
{
$rules
=
[
'editalId'
=>
[
'required'
,
'string'
],
'marcado.*'
=>
[
'required'
],
'titulo'
=>
[
'required'
,
'string'
],
'grande_area_id'
=>
[
'required'
,
'string'
],
'area_id'
=>
[
'required'
,
'string'
],
'linkLattesEstudante'
=>
[
'required'
,
'string'
],
'pontuacaoPlanilha'
=>
[
'required'
,
'string'
],
'linkGrupoPesquisa'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoProjeto
==
null
)],
'mimes:pdf'
],
'anexoDecisaoCONSU'
=>
[
Rule
::
requiredIf
(
$evento
->
consu
&&
$projeto
->
anexoDecisaoCONSU
==
null
),
'mimes:pdf'
],
'anexoPlanilhaPontuacao'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoPlanilhaPontuacao
==
null
)]],
'anexoLattesCoordenador'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoLattesCoordenador
==
null
)],
'mimes:pdf'
],
'anexoGrupoPesquisa'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoGrupoPesquisa
==
null
)],
'mimes:pdf'
],
'anexoAutorizacaoComiteEtica'
=>
[
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)
)
],
'justificativaAutorizacaoEtica'
=>
[
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
))
],
];
];
}
else
{
return
$rules
;
return
$rules
;
}
}
}
}
...
...
resources/views/administrador/editais.blade.php
View file @
150c75ee
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
{{
$evento
->
nome
}}
{{
$evento
->
nome
}}
</
a
>
</
a
>
</
td
>
</
td
>
<
td
>
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
created_at
))
}}
</
td
>
<
td
>
{{
date
(
'd/m/Y
\à\s H:i\h
'
,
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"
>
...
...
resources/views/administrador/listaProjetos.blade.php
View file @
150c75ee
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</
td
>
</
td
>
<
td
>
{{
$projeto
->
proponente
->
user
->
name
}}
</
td
>
<
td
>
{{
$projeto
->
proponente
->
user
->
name
}}
</
td
>
<
td
>
{{
$projeto
->
proponente
->
user
->
email
}}
</
td
>
<
td
>
{{
$projeto
->
proponente
->
user
->
email
}}
</
td
>
<
td
>
{{
date
(
'd/m/Y'
,
strtotime
(
$projeto
->
created_at
))
}}
</
td
>
<
td
>
{{
date
(
'd/m/Y
\à\s H:i\h
'
,
strtotime
(
$projeto
->
created_at
))
}}
</
td
>
<
td
>
{{
$projeto
->
status
}}
</
td
>
<
td
>
{{
$projeto
->
status
}}
</
td
>
<
td
>
<
td
>
...
...
resources/views/coordenadorComissao/editais.blade.php
View file @
150c75ee
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
{{
$evento
->
nome
}}
{{
$evento
->
nome
}}
</
a
>
</
a
>
</
td
>
</
td
>
<
td
>
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
created_at
))
}}
</
td
>
<
td
>
{{
date
(
'd/m/Y
\à\s H:i\h
'
,
strtotime
(
$evento
->
created_at
))
}}
</
td
>
<
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
...
...
resources/views/participante/projetos.blade.php
View file @
150c75ee
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
@
elseif
(
$projeto
->
status
==
'Submetido'
)
@
elseif
(
$projeto
->
status
==
'Submetido'
)
<
td
style
=
"color: rgb(0, 0, 0)"
>
Submetido
</
td
>
<
td
style
=
"color: rgb(0, 0, 0)"
>
Submetido
</
td
>
@
endif
@
endif
<
td
>
{{
date
(
'd-m-Y'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
<
td
>
{{
date
(
'd-m-Y
\à\s H:i\h
'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
<
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
...
...
resources/views/proponente/projetos.blade.php
View file @
150c75ee
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
{{
$projeto
->
titulo
}}
{{
$projeto
->
titulo
}}
</
td
>
</
td
>
<
td
style
=
"text-align: center"
>
{{
date
(
'd-m-Y'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
<
td
style
=
"text-align: center"
>
{{
date
(
'd-m-Y
\à\s H:i\h
'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
@
if
(
$projeto
->
status
==
'avaliado'
)
@
if
(
$projeto
->
status
==
'avaliado'
)
<
td
style
=
"color: rgb(6, 85, 6); text-align: center"
>
Avaliado
</
td
>
<
td
style
=
"color: rgb(6, 85, 6); text-align: center"
>
Avaliado
</
td
>
@
elseif
(
$projeto
->
status
==
'submetido'
||
$projeto
->
status
==
'submetido'
)
@
elseif
(
$projeto
->
status
==
'submetido'
||
$projeto
->
status
==
'submetido'
)
...
...
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