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
b15e0c0b
Commit
b15e0c0b
authored
Jun 28, 2020
by
Gabriel-31415
Browse files
ajuste da data e rm do botao de participante
parent
3fd8801b
Changes
8
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
b15e0c0b
...
...
@@ -110,6 +110,8 @@ class EventoController extends Controller
'fimSubmissao'
=>
[
'required'
,
'date'
],
'inicioRevisao'
=>
[
'required'
,
'date'
],
'fimRevisao'
=>
[
'required'
,
'date'
],
'inicio_recurso'
=>
[
'required'
,
'date'
],
'fim_recurso'
=>
[
'required'
,
'date'
],
'resultado_final'
=>
[
'required'
,
'date'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
],
'pdfEdital'
=>
[(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
...
...
@@ -118,7 +120,8 @@ class EventoController extends Controller
}
// validacao normal
//after = depois
//before = antes
$validatedData
=
$request
->
validate
([
'nome'
=>
[
'required'
,
'string'
],
'descricao'
=>
[
'required'
,
'string'
],
...
...
@@ -126,12 +129,15 @@ class EventoController extends Controller
'natureza'
=>
[
'required'
],
'descricao'
=>
[
'required'
],
'coordenador_id'
=>
[
'required'
],
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after:'
.
$request
->
inicioSubmissao
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:'
.
$request
->
inicioRevisao
],
'resultado_final'
=>
[
'required'
,
'date'
,
'after:'
.
$yesterday
],
'resultado_preliminar'
=>
[
'required'
,
'date'
],
#----------------------------------------------
'inicioSubmissao'
=>
[
'required'
,
'date'
,
'after:yesterday'
],
'fimSubmissao'
=>
[
'required'
,
'date'
,
'after:fim_recurso'
,
'after:resultado_final'
],
'inicioRevisao'
=>
[
'required'
,
'date'
,
'after:yesterday'
],
'fimRevisao'
=>
[
'required'
,
'date'
,
'after:inicioRevisao'
,
'before:fimSubmissao'
],
'inicio_recurso'
=>
[
'required'
,
'date'
,
'after:inicioRevisao'
],
'fim_recurso'
=>
[
'required'
,
'date'
,
'after:fim_recurso'
],
'resultado_preliminar'
=>
[
'required'
,
'date'
,
'after:inicio_recurso'
],
'resultado_final'
=>
[
'required'
,
'date'
,
'after:resultado_preliminar'
],
'pdfEdital'
=>
[(
$request
->
pdfEditalPreenchido
!==
'sim'
?
'required'
:
''
),
'file'
,
'mimes:pdf'
,
'max:2048'
],
//'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
]);
...
...
@@ -145,8 +151,10 @@ class EventoController extends Controller
$evento
[
'fimSubmissao'
]
=
$request
->
fimSubmissao
;
$evento
[
'inicioRevisao'
]
=
$request
->
inicioRevisao
;
$evento
[
'fimRevisao'
]
=
$request
->
fimRevisao
;
$evento
[
'resultado_final'
]
=
$request
->
resultado_final
;
$evento
[
'inicio_recurso'
]
=
$request
->
inicio_recurso
;
$evento
[
'fim_recurso'
]
=
$request
->
fim_recurso
;
$evento
[
'resultado_preliminar'
]
=
$request
->
resultado_preliminar
;
$evento
[
'resultado_final'
]
=
$request
->
resultado_final
;
$evento
[
'coordenadorId'
]
=
$request
->
coordenador_id
;
$evento
[
'criador_id'
]
=
$user_id
;
$evento
[
'anexosStatus'
]
=
'final'
;
...
...
app/Http/Controllers/ProponenteController.php
View file @
b15e0c0b
...
...
@@ -86,4 +86,10 @@ class ProponenteController extends Controller
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
]);
}
public
function
projetosEdital
(
$id
)
{
$edital
=
Evento
::
find
(
$id
);
$projetos
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
get
();
return
view
(
'proponente.projetosEdital'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
}
}
database/migrations/2020_02_05_123153_create_eventos_table.php
View file @
b15e0c0b
...
...
@@ -26,6 +26,8 @@ class CreateEventosTable extends Migration
$table
->
date
(
'fimRevisao'
)
->
nullable
();
$table
->
date
(
'resultado_final'
)
->
nullable
();
$table
->
date
(
'resultado_preliminar'
)
->
nullable
();
$table
->
date
(
'inicio_recurso'
)
->
nullable
();
$table
->
date
(
'fim_recurso'
)
->
nullable
();
$table
->
integer
(
'numMaxTrabalhos'
)
->
nullable
();
$table
->
integer
(
'numMaxCoautores'
)
->
nullable
();
$table
->
boolean
(
'hasResumo'
)
->
nullable
();
...
...
resources/views/evento/criarEvento.blade.php
View file @
b15e0c0b
...
...
@@ -141,6 +141,28 @@
</div>
</div>
<div class="
row
justify
-
content
-
left
">
<div class="
col
-
sm
-
6
">
<label for="
inicio_recurso
" class="
col
-
form
-
label
">{{ __('Início do recurso*:') }}</label>
<input id="
inicio_recurso
" type="
date
" class="
form
-
control
@
error
(
'inicio_recurso'
)
is
-
invalid
@
enderror
" name="
inicio_recurso
" value="
{{
old
(
'inicio_recurso'
)
}}
" required autocomplete="
inicio_recurso
" autofocus>
@error('inicio_recurso')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
. date('d/m/Y', strtotime(
$ontem
?? '')) . '.' }}</strong>
</span>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label for="
fim_recurso
" class="
col
-
form
-
label
">{{ __('Fim do recurso*:') }}</label>
<input id="
fim_recurso
" type="
date
" class="
form
-
control
@
error
(
'fim_recurso'
)
is
-
invalid
@
enderror
" name="
fim_recurso
" value="
{{
old
(
'fim_recurso'
)
}}
" required autocomplete="
resultado
" autofocus>
@error('fim_recurso')
<span class="
invalid
-
feedback
" role="
alert
">
<strong>{{
$message
. date('d/m/Y', strtotime(
$ontem
?? '')) . '.' }}</strong>
</span>
@enderror
</div>
</div>
<div class="
row
justify
-
content
-
left
">
<div class="
col
-
sm
-
6
">
<label for="
resultado_preliminar
" class="
col
-
form
-
label
">{{ __('Data do Resultado preliminar*:') }}</label>
...
...
resources/views/projeto/index.blade.php
View file @
b15e0c0b
...
...
@@ -71,12 +71,6 @@
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
projeto
</
a
>
{{
--
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Recorrer
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
</
a
>
--
}}
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"dropdown-item"
data
-
toggle
=
"modal"
data
-
target
=
"#modal
{
{$projeto->id}
}
"
style
=
"text-align: center"
>
Excluir
projeto
...
...
resources/views/proponente/editais.blade.php
View file @
b15e0c0b
...
...
@@ -46,9 +46,12 @@
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('projetos
.e
dital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
"{{ route('
proponente.
projetos
E
dital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Projetos
submetidos
</
a
>
<
a
href
=
"{{ route('trabalho.index', ['id' =>
$evento->id
] )}}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Criar
projeto
</
a
>
{{
--
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
resultado
</
a
>
--
}}
...
...
resources/views/proponente/projetosEdital.blade.php
0 → 100644
View file @
b15e0c0b
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
@
if
(
isset
(
$mensagem
))
<
div
class
=
"col-sm-12"
>
<
br
>
<
div
class
=
"alert alert-success"
>
<
p
>
{{
$mensagem
}}
</
p
>
</
div
>
</
div
>
@
endif
@
if
(
session
(
'mensagem'
))
<
div
class
=
"col-sm-12"
>
<
br
>
<
div
class
=
"alert alert-success"
>
<
p
>
{{
session
(
'mensagem'
)}}
</
p
>
</
div
>
</
div
>
@
endif
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-9"
>
<
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-3"
>
<
a
href
=
"{{ route('proponente.create' )}}"
class
=
"btn btn-primary"
style
=
"position:relative; float: right;"
>
Criar
projeto
</
a
>
</
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
)
@
if
(
$projeto
->
status
!=
'Rascunho'
&&
$projeto
->
proponente_id
===
Auth
()
->
user
()
->
proponentes
->
id
)
<
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.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Editar
projeto
</
a
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
projeto
</
a
>
{{
--
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Recorrer
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
</
a
>
--
}}
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"dropdown-item"
data
-
toggle
=
"modal"
data
-
target
=
"#modal
{
{$projeto->id}
}
"
style
=
"text-align: center"
>
Excluir
projeto
</
button
>
</
div
>
</
div
>
</
td
>
</
tr
>
@
endif
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"modal
{
{$projeto->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
projeto
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
projeto
:
{{
$projeto
->
titulo
}}
?</
p
>
</
div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
<
a
href
=
"{{ route('trabalho.destroy', ['id' =>
$projeto->id
]) }}"
class
=
"btn btn-primary"
style
=
"text-align: center"
>
Deletar
</
a
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
\ No newline at end of file
routes/web.php
View file @
b15e0c0b
...
...
@@ -24,10 +24,12 @@ Auth::routes(['verify' => true]);
//######### Proponente ########################################
Route
::
get
(
'/proponente/index'
,
'ProponenteController@index'
)
->
name
(
'proponente.index'
);
Route
::
get
(
'/proponente/cadastro'
,
'ProponenteController@create'
)
->
name
(
'proponente.create'
);
Route
::
get
(
'/proponente/index'
,
'ProponenteController@index'
)
->
name
(
'proponente.index'
);
Route
::
get
(
'/proponente/cadastro'
,
'ProponenteController@create'
)
->
name
(
'proponente.create'
);
Route
::
post
(
'/proponente/cadastro'
,
'ProponenteController@store'
)
->
name
(
'proponente.store'
);
Route
::
get
(
'/proponente/editais'
,
'ProponenteController@editais'
)
->
name
(
'proponente.editais'
);
Route
::
get
(
'/projetos-submetidos'
,
'ProponenteController@projetosDoProponente'
)
->
name
(
'proponente.projetos'
);
Route
::
get
(
'/projetos-edital/{id}'
,
'ProponenteController@projetosEdital'
)
->
name
(
'proponente.projetosEdital'
);
//######### Rotas Administrador #################################
...
...
@@ -103,7 +105,7 @@ Route::prefix('avaliador')->name('avaliador.')->group(function(){
Route
::
post
(
'/projeto/{id}/atualizar'
,
'TrabalhoController@update'
)
->
name
(
'trabalho.update'
);
Route
::
get
(
'/projeto/{id}/excluir'
,
'TrabalhoController@destroy'
)
->
name
(
'trabalho.destroy'
);
Route
::
get
(
'/projeto/{id}/excluirParticipante'
,
'TrabalhoController@excluirParticipante'
)
->
name
(
'trabalho.excluirParticipante'
);
Route
::
get
(
'/projetos-submetidos'
,
'ProponenteController@projetosDoProponente'
)
->
name
(
'proponente.projetos'
);
//######### Atribuição #######################################
Route
::
get
(
'/atribuir'
,
'AtribuicaoController@distribuicaoAutomatica'
)
->
name
(
'distribuicao'
);
...
...
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