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
45a10d53
Commit
45a10d53
authored
May 30, 2021
by
Danillo Bion
Browse files
modificacoes na tela - minhas propostas
parent
92d55931
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/ProponenteController.php
View file @
45a10d53
...
@@ -82,15 +82,26 @@ class ProponenteController extends Controller
...
@@ -82,15 +82,26 @@ class ProponenteController extends Controller
}
}
public
function
projetosDoProponente
()
{
public
function
projetosDoProponente
(
Request
$request
)
{
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
if
(
$request
->
buscar
==
null
){
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
$projetos
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
$projetos
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
,
'hoje'
=>
$hoje
]);
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
,
'hoje'
=>
$hoje
,
'busca'
=>
$request
->
buscar
,
'flag'
=>
'false'
]);
}
else
{
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
$projetos
=
Trabalho
::
where
(
'proponente_id'
,
'='
,
$proponente
->
id
)
->
where
(
'titulo'
,
'ilike'
,
'%'
.
$request
->
buscar
.
'%'
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
,
'hoje'
=>
$hoje
,
'busca'
=>
$request
->
buscar
,
'flag'
=>
'true'
]);
}
}
}
public
function
projetosEdital
(
$id
)
{
public
function
projetosEdital
(
$id
)
{
$edital
=
Evento
::
find
(
$id
);
$edital
=
Evento
::
find
(
$id
);
...
...
resources/views/proponente/projetos.blade.php
View file @
45a10d53
@
extends
(
'layouts.app'
)
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
{{
--
@
if
(
isset
(
$mensagem
))
<
div
class
=
"container"
>
<
div
class
=
"col-sm-12"
>
@
if
(
isset
(
$mensagem
))
<
br
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"alert alert-success"
>
<
br
>
<
p
>
{{
$mensagem
}}
</
p
>
<
div
class
=
"alert alert-success"
>
</
div
>
<
p
>
{{
$mensagem
}}
</
p
>
</
div
>
</
div
>
@
endif
--
}}
</
div
>
@
endif
<
div
class
=
"container"
>
@
if
(
session
(
'mensagem'
))
<
div
class
=
"row"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-1"
>
<
br
>
<
a
href
=
"{{ route('proponente.index') }}"
class
=
"btn btn-secondary"
style
=
"position:relative; float: right;"
>
Voltar
</
a
>
<
div
class
=
"alert alert-success"
>
</
div
>
<
p
>
{{
session
(
'mensagem'
)}}
</
p
>
<
div
class
=
"col-sm-7"
style
=
"text-align: center"
>
</
div
>
<
div
class
=
"row"
>
</
div
>
<
div
class
=
"col-md-4"
>
@
endif
</
div
>
<
div
class
=
"row justify-content-center"
style
=
"margin-top: 3rem;"
>
<
div
class
=
"col-md-8"
>
<
div
class
=
"col-md-11"
style
=
"margin-bottom: -3rem"
>
<
h4
class
=
"titulo-table"
>
Meus
Projetos
</
h4
>
<
div
class
=
"card card_conteudo shadow bg-white"
style
=
"border-radius:12px; border-width:0px;"
>
<
div
class
=
"card-header"
style
=
"border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff"
>
<
div
class
=
"d-flex justify-content-between align-items-center"
style
=
"margin-top: 9px; margin-bottom:-1rem"
>
<
div
class
=
"bottomVoltar"
style
=
"margin-top: -20px"
>
<
a
href
=
"{{ route('proponente.index') }}"
class
=
"btn btn-secondary"
style
=
""
><
img
src
=
"
{
{asset('img/icons/logo_esquerda.png')}
}
"
alt
=
""
width
=
"15px"
></
a
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"form-group"
>
</
div
>
@
if
(
$flag
==
'false'
)
<
div
class
=
"col-sm-4"
>
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Minhas
propostas
</
h5
>
<
div
class
=
"row"
>
@
else
<
div
class
=
"col-sm-2"
>
<
div
class
=
"form-group"
style
=
"margin-bottom: 1px"
>
<
button
class
=
"btn"
onclick
=
"buscarEdital(this.parentElement.parentElement.children[1].children[0])"
>
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Minhas
propostas
</
h5
>
<
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
>
<
h5
class
=
"card-title mb-0"
style
=
"font-size:15px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Resultado
da
busca
por
:
<
span
style
=
"font-style: italic; font-weight:bold"
>
{{
$busca
}}
</
span
></
h5
>
</
button
>
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"col-sm-10"
>
<
div
style
=
"margin-top: -2rem"
>
<
input
type
=
"text"
class
=
"form-control form-control-edit"
placeholder
=
"Digite o nome do edital"
onkeyup
=
"buscarEdital(this)"
>
<
div
class
=
"form-group"
>
<
div
style
=
"margin-top:30px;"
>
<
form
action
=
"
{
{route('proponente.projetos')}
}
"
method
=
"get"
>
@
csrf
<
div
class
=
"btn-group"
>
<
input
type
=
"text"
class
=
"form-control"
name
=
"buscar"
placeholder
=
"Digite o nome do edital"
value
=
"
{
{$busca}
}
"
style
=
"margin-right: 5px;border-radius:8px; border-color:#dcdcdc;"
>
<
button
type
=
"submit"
class
=
"btn btn-light shadow-sm"
style
=
"border-radius: 8px; margin-right:3px"
><
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
width
=
"20px"
></
button
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"card-body"
>
@
if
(
session
(
'mensagem'
))
@
if
(
count
(
$projetos
)
>
0
)
<
div
class
=
"row"
>
<
table
class
=
"table table-bordered table-hover"
style
=
"display: block; overflow-x: auto; white-space: nowrap; border-radius:10px; margin-bottom:0px"
>
<
div
class
=
"col-sm-12"
>
<
thead
>
<
br
>
<
div
class
=
"alert alert-success"
>
<
p
>
{{
session
(
'mensagem'
)}}
</
p
>
</
div
>
</
div
>
</
div
>
@
endif
<
hr
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
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
>
<
tr
>
<
t
d
>
<
t
h
scope
=
"col"
>
Edital
</
th
>
{{
$projeto
->
titulo
}}
<
th
scope
=
"col"
style
=
"width:100%"
>
Projeto
</
th
>
<
/
td
>
<
th
scope
=
"col"
style
=
"text-align: center"
>
Data
de
Criação
</
th
>
@
if
(
$projeto
->
status
==
'Avaliado'
)
<
th
scope
=
"col"
style
=
"text-align: center"
>
Status
</
th
>
<
t
d
s
tyl
e
=
"col
or: rgb(6, 85, 6)"
>
Avaliad
o
</
t
d
>
<
t
h
s
cop
e
=
"col
"
>
Opçã
o
</
t
h
>
@
elseif
(
$projeto
->
status
==
'Submetido'
)
</
tr
>
<
td
style
=
"color: rgb(0, 0, 0)"
>
Submetido
</
td
>
</
t
hea
d
>
@
elseif
(
$projeto
->
status
==
'Rascunho'
)
<
tbody
id
=
"projetos"
>
<
td
style
=
"color: rgb(0, 0, 0)"
>
Rascunho
</
td
>
@
foreach
(
$projetos
as
$projeto
)
@
endif
@
if
(
$projeto
->
proponente_id
===
Auth
()
->
user
()
->
proponentes
->
id
)
<
td
>
{{
date
(
'd/m/Y'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
<
tr
>
<
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
{{
$projeto
->
evento
->
nome
}}
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
</
td
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
<
td
>
</
a
>
{{
$projeto
->
titulo
}}
<
div
class
=
"dropdown-menu"
>
</
td
>
@
if
(
$projeto
->
evento
->
inicioSubmissao
<=
$hoje
&&
$hoje
<=
$projeto
->
evento
->
fimSubmissao
)
<
td
style
=
"text-align: center"
>
{{
date
(
'd-m-Y'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
@
if
(
$projeto
->
status
==
'Avaliado'
)
Editar
<
td
style
=
"color: rgb(6, 85, 6); text-align: center"
>
Avaliado
</
td
>
</
a
>
@
elseif
(
$projeto
->
status
==
'Submetido'
||
$projeto
->
status
==
'submetido'
)
<
hr
class
=
"dropdown-hr"
>
<
td
style
=
"color: rgb(0, 0, 0); text-align: center"
>
Submetido
</
td
>
@
else
@
else
if
(
$projeto
->
status
==
'Rascunho'
)
@
endif
<
td
style
=
"color: rgb(0, 0, 0); text-align: center"
>
Rascunho
</
td
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
@
endif
Visualizar
<
td
>
</
a
>
<
div
class
=
"dropright dropdown-options"
style
=
"width: 100%; text-align:center; float:none"
>
{{
--
<
a
href
=
"
"
class
=
"dropdown-
item"
style
=
"text-align: center
"
>
<
a
id
=
"options
"
class
=
"dropdown-
toggle btn btn-light"
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false
"
>
Recorrer
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
div
class
=
"dropdown-menu"
>
Resultado
@
if
(
$projeto
->
evento
->
inicioSubmissao
<=
$hoje
&&
$hoje
<=
$projeto
->
evento
->
fimSubmissao
)
</
a
>
--
}}
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
@
if
(
$projeto
->
status
==
'Submetido'
)
Editar
<
hr
class
=
"dropdown-hr"
>
</
a
>
<!--
Button
trigger
modal
-->
<
hr
class
=
"dropdown-hr"
>
<
button
type
=
"button"
class
=
"dropdown-item dropdown-item-delete"
style
=
"text-align: center"
data
-
toggle
=
"modal"
data
-
target
=
"#modal
{
{$projeto->id}
}
"
>
@
else
<
img
src
=
"
{
{asset('img/icons/logo_lixeira.png')}
}
"
alt
=
""
>
Deletar
@
endif
</
button
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
@
endif
Visualizar
</
a
>
<
hr
class
=
"dropdown-hr"
>
{{
--
<
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 dropdown-item-delete"
data
-
toggle
=
"modal"
data
-
target
=
"#modal
{
{$projeto->id}
}
"
style
=
"text-align: center"
>
<
img
src
=
"
{
{asset('img/icons/logo_lixeira.png')}
}
"
alt
=
""
>
Deletar
</
button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
td
>
</
td
>
</
tr
>
</
tr
>
@
endif
<!--
Modal
-->
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"modal
{
{$projeto->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
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-dialog"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
projeto
</
h5
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
o
projeto
:
{{
$projeto
->
titulo
}}
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
class
=
"modal-body"
>
<
div
class
=
"modal-body"
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
projeto
:
{{
$projeto
->
titulo
}}
?</
p
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
projeto
:
{{
$projeto
->
titulo
}}
?</
p
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
<
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"
>
<
a
href
=
"{{ route('trabalho.destroy', ['id' =>
$projeto->id
]) }}"
class
=
"btn btn-primary"
>
Deletar
Deletar
</
a
>
</
a
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
</
tbody
>
</
table
>
@
else
@
if
(
$flag
==
"true"
)
<
div
class
=
"form-row justify-content-center"
style
=
"margin-top: 5rem; margin-bottom:9rem;"
>
<
div
class
=
"col-md-12"
style
=
"text-align: center; margin-bottom:20px"
>
<
img
src
=
"
{
{asset('img/icons/logo_projeto.png')}
}
"
style
=
"width:200px"
>
</
div
>
<
div
class
=
"col-md-12"
style
=
"text-align: center; color:#909090"
>
<
h5
>
Nenhuma
proposta
encontrada
!</
h5
>
</
div
>
<
div
class
=
"col-md-12"
style
=
"text-align: center;"
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
@
else
</
tbody
>
<
div
class
=
"form-row justify-content-center"
style
=
"margin-top: 5rem; margin-bottom:9rem;"
>
</
table
>
<
div
class
=
"col-md-12"
style
=
"text-align: center; margin-bottom:20px"
>
<
img
src
=
"
{
{asset('img/icons/logo_projeto.png')}
}
"
style
=
"width:200px"
>
</
div
>
<
div
class
=
"col-md-12"
style
=
"text-align: center; color:#909090"
>
<
h5
>
Nenhuma
proposta
submetida
!</
h5
>
</
div
>
<
div
class
=
"col-md-12"
style
=
"text-align: center;"
>
</
div
>
</
div
>
@
endif
@
endif
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
endsection
...
@@ -146,4 +176,4 @@
...
@@ -146,4 +176,4 @@
<
script
>
<
script
>
</
script
>
</
script
>
@
endsection
@
endsection
\ No newline at end of file
resources/views/proponente/projetosEdital.blade.php
View file @
45a10d53
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
@
if
(
$projeto
->
proponente_id
===
Auth
()
->
user
()
->
proponentes
->
id
)
@
if
(
$projeto
->
proponente_id
===
Auth
()
->
user
()
->
proponentes
->
id
)
<
tr
>
<
tr
>
<
td
>
<
td
>
{{
$projeto
->
titulo
}}
{{
$projeto
->
status
}}
{{
$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'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
@
if
(
$projeto
->
status
==
'Avaliado'
)
@
if
(
$projeto
->
status
==
'Avaliado'
)
...
...
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