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
22127580
"git@sites.upe.br:walter.felipe/submeta.git" did not exist on "87436d8487d274f4da1d1cd8e7c672b2b6314455"
Commit
22127580
authored
Nov 02, 2021
by
Guilherme Silva
Browse files
Alteração da tela listagem de relatórios
parent
7d244145
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/ArquivoController.php
View file @
22127580
...
@@ -6,6 +6,7 @@ use App\Arquivo;
...
@@ -6,6 +6,7 @@ use App\Arquivo;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
mysql_xdevapi
\
Exception
;
use
mysql_xdevapi
\
Exception
;
use
Carbon\Carbon
;
class
ArquivoController
extends
Controller
class
ArquivoController
extends
Controller
{
{
...
@@ -97,7 +98,9 @@ class ArquivoController extends Controller
...
@@ -97,7 +98,9 @@ class ArquivoController extends Controller
public
function
listar
(
$id
){
public
function
listar
(
$id
){
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
return
view
(
'planosTrabalho.listar'
)
->
with
([
'arquivos'
=>
$arquivos
]);
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'planosTrabalho.listar'
)
->
with
([
'arquivos'
=>
$arquivos
,
'hoje'
=>
$hoje
]);
}
}
public
function
anexarRelatorio
(
Request
$request
){
public
function
anexarRelatorio
(
Request
$request
){
...
...
resources/views/planosTrabalho/listar.blade.php
View file @
22127580
...
@@ -7,39 +7,51 @@
...
@@ -7,39 +7,51 @@
<
div
class
=
"row justify-content-center titulo-menu mb-0"
>
<
div
class
=
"row justify-content-center titulo-menu mb-0"
>
<
h4
>
Planos
de
Trabalho
</
h4
>
<
h4
>
Planos
de
Trabalho
</
h4
>
</
div
>
</
div
>
<
div
class
=
"card-body"
>
<
div
class
=
"card-body"
style
=
"width: 75% !important;margin: auto;"
>
<
table
class
=
"table table-bordered table-hover"
style
=
"display: block; overflow-x: visible; white-space: nowrap; border-radius:10px; margin-bottom:0px"
>
<
table
class
=
"table table-bordered table-hover"
style
=
"display: block; overflow-x: visible; white-space: nowrap; border-radius:10px; margin-bottom:0px"
>
<
thead
>
<
thead
>
<
tr
>
<
tr
>
<
th
scope
=
"col"
style
=
"width:200px;"
>
Plano
de
Trabalho
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Título
</
th
>
<
th
scope
=
"col"
style
=
"width:200px;"
>
Projeto
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Discente
</
th
>
<
th
scope
=
"col"
style
=
"width:200px;"
>
Discente
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Parcial
</
th
>
<
th
scope
=
"col"
style
=
"width:200px;"
>
Data
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Final
</
th
>
<
th
scope
=
"col"
style
=
"width:200px;"
>
Relatório
Parcial
</
th
>
<
th
scope
=
"col"
style
=
"width:200px;"
>
Relatório
Final
</
th
>
</
tr
>
</
tr
>
</
thead
>
</
thead
>
@
foreach
(
$arquivos
as
$arquivo
)
@
foreach
(
$arquivos
as
$arquivo
)
<
tbody
>
<
tbody
>
<
td
>
{{
$arquivo
->
trabalho
->
titulo
}}
</
td
>
<
td
>
{{
$arquivo
->
titulo
}}
</
td
>
<
td
style
=
"text-align: center;"
>
{{
$arquivo
->
titulo
}}
</
td
>
<
td
>
{{
$arquivo
->
participante
->
user
->
name
}}
</
td
>
<
td
style
=
"text-align: center;"
>
{{
$arquivo
->
participante
->
user
->
name
}}
{{
$arquivo
->
trabalho
->
evento
->
nome
}}
</
td
>
<
td
>
{{
$arquivo
->
data
}}
</
td
>
<
td
style
=
"text-align: center;"
>
<
td
>
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
relatorioParcial
==
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioParcial
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioParcial
))
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Enviar
</
button
>
@
else
<!--
Button
trigger
modal
-->
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Visualizar
Visualizar
</
button
>
</
button
>
@
endif
</
td
>
</
td
>
<
td
>
<
td
style
=
"text-align: center;"
>
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
relatorioFinal
==
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioFinal
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioFinal
))
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Enviar
</
button
>
@
else
<!--
Button
trigger
modal
-->
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Visualizar
Visualizar
</
button
>
</
button
>
@
endif
</
td
>
</
td
>
<!--
Modal
Relatorio
Parcial
-->
<!--
Modal
Relatorio
Parcial
-->
...
@@ -52,6 +64,21 @@
...
@@ -52,6 +64,21 @@
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
class
=
"col-12"
>
<
div
class
=
"row"
>
<
div
class
=
"col-6"
>
<
label
for
=
"dt_inicioRelatorioParcial"
class
=
"col-form-label"
>
{{
__
(
'Início do Relatório Parcial:'
)
}}
</
label
>
<
input
id
=
"dt_inicioRelatorioParcial"
type
=
"date"
class
=
"form-control"
name
=
"dt_inicioRelatorioParcial"
value
=
"
{
{$arquivo->trabalho->evento->dt_inicioRelatorioParcial}
}
"
required
autocomplete
=
"dt_inicioRelatorioParcial"
disabled
autofocus
>
</
div
>
<
div
class
=
"col-6"
>
<
label
for
=
"dt_fimRelatorioParcial"
class
=
"col-form-label"
>
{{
__
(
'Fim do Relatório Parcial:'
)
}}
</
label
>
<
input
id
=
"dt_fimRelatorioParcial"
type
=
"date"
class
=
"form-control"
name
=
"dt_fimRelatorioParcial"
value
=
"
{
{$arquivo->trabalho->evento->dt_fimRelatorioParcial}
}
"
required
autocomplete
=
"dt_fimRelatorioParcial"
disabled
autofocus
>
</
div
>
</
div
>
</
div
>
<
br
>
<
form
id
=
"formRelatParcial"
method
=
"post"
action
=
"
{
{route('planos.anexar.relatorio')}
}
"
enctype
=
"multipart/form-data"
>
<
form
id
=
"formRelatParcial"
method
=
"post"
action
=
"
{
{route('planos.anexar.relatorio')}
}
"
enctype
=
"multipart/form-data"
>
@
csrf
@
csrf
<
input
type
=
"hidden"
value
=
"{{
$arquivo->id
}}"
name
=
"arqId"
>
<
input
type
=
"hidden"
value
=
"{{
$arquivo->id
}}"
name
=
"arqId"
>
...
@@ -69,7 +96,8 @@
...
@@ -69,7 +96,8 @@
</
div
>
</
div
>
<
br
>
<
br
>
@
if
(
Auth
::
user
()
->
proponentes
!=
null
)
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioParcial
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioParcial
))
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"relatorioParcial"
accept
=
".pdf"
placeholder
=
"Relatorio Parcial"
id
=
"relatorioParcial
{
{$arquivo->id}
}
"
required
/>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"relatorioParcial"
accept
=
".pdf"
placeholder
=
"Relatorio Parcial"
id
=
"relatorioParcial
{
{$arquivo->id}
}
"
required
/>
@
error
(
'relatorioParcial'
)
@
error
(
'relatorioParcial'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
...
@@ -81,7 +109,8 @@
...
@@ -81,7 +109,8 @@
<
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
>
@
if
(
Auth
::
user
()
->
proponentes
!=
null
)
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioParcial
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioParcial
))
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Salvar
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Salvar
</
button
>
@
endif
@
endif
</
div
>
</
div
>
...
@@ -101,6 +130,21 @@
...
@@ -101,6 +130,21 @@
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
class
=
"col-12"
>
<
div
class
=
"row"
>
<
div
class
=
"col-6"
>
<
label
for
=
"dt_inicioRelatorioFinal"
class
=
"col-form-label"
>
{{
__
(
'Início do Relatório Final:'
)
}}
</
label
>
<
input
id
=
"dt_inicioRelatorioFinal"
type
=
"date"
class
=
"form-control"
name
=
"dt_inicioRelatorioFinal"
value
=
"
{
{$arquivo->trabalho->evento->dt_inicioRelatorioFinal}
}
"
required
autocomplete
=
"dt_inicioRelatorioFinal"
disabled
autofocus
>
</
div
>
<
div
class
=
"col-6"
>
<
label
for
=
"dt_fimRelatorioFinal"
class
=
"col-form-label"
>
{{
__
(
'Fim do Relatório Final:'
)
}}
</
label
>
<
input
id
=
"dt_fimRelatorioFinal"
type
=
"date"
class
=
"form-control"
name
=
"dt_fimRelatorioFinal"
value
=
"
{
{$arquivo->trabalho->evento->dt_fimRelatorioFinal}
}
"
required
autocomplete
=
"dt_fimRelatorioFinal"
disabled
autofocus
>
</
div
>
</
div
>
</
div
>
<
br
>
<
form
id
=
"formRelatFinal"
method
=
"post"
action
=
"
{
{route('planos.anexar.relatorio')}
}
"
enctype
=
"multipart/form-data"
>
<
form
id
=
"formRelatFinal"
method
=
"post"
action
=
"
{
{route('planos.anexar.relatorio')}
}
"
enctype
=
"multipart/form-data"
>
@
csrf
@
csrf
<
input
type
=
"hidden"
value
=
"{{
$arquivo->id
}}"
name
=
"arqId"
>
<
input
type
=
"hidden"
value
=
"{{
$arquivo->id
}}"
name
=
"arqId"
>
...
@@ -117,7 +161,8 @@
...
@@ -117,7 +161,8 @@
@
endif
@
endif
</
div
>
</
div
>
<
br
>
<
br
>
@
if
(
Auth
::
user
()
->
proponentes
!=
null
)
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioFinal
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioFinal
))
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"relatorioFinal"
accept
=
".pdf"
placeholder
=
"Relatorio Final"
id
=
"relatorioFinal
{
{$arquivo->id}
}
"
required
/>
<
input
type
=
"file"
class
=
"input-group-text"
value
=
""
name
=
"relatorioFinal"
accept
=
".pdf"
placeholder
=
"Relatorio Final"
id
=
"relatorioFinal
{
{$arquivo->id}
}
"
required
/>
@
error
(
'relatorioFinal'
)
@
error
(
'relatorioFinal'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
<
span
class
=
"invalid-feedback"
role
=
"alert"
style
=
"overflow: visible; display:block"
>
...
@@ -129,7 +174,8 @@
...
@@ -129,7 +174,8 @@
<
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
>
@
if
(
Auth
::
user
()
->
proponentes
!=
null
)
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioFinal
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioFinal
))
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Salvar
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Salvar
</
button
>
@
endif
@
endif
</
div
>
</
div
>
...
...
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