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
d797e153
Commit
d797e153
authored
3 years ago
by
unknown
Browse files
Options
Download
Email Patches
Plain Diff
Bloquear envio de relatórios para propostas que foram reprovadas
parent
85c655f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Http/Controllers/ArquivoController.php
+1
-1
app/Http/Controllers/ArquivoController.php
resources/views/planosTrabalho/listar.blade.php
+26
-13
resources/views/planosTrabalho/listar.blade.php
with
27 additions
and
14 deletions
+27
-14
app/Http/Controllers/ArquivoController.php
View file @
d797e153
...
...
@@ -128,7 +128,7 @@ class ArquivoController extends Controller
}
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'planosTrabalho.listar'
)
->
with
([
'arquivos'
=>
$arquivos
,
'hoje'
=>
$hoje
]);
return
view
(
'planosTrabalho.listar'
)
->
with
([
'arquivos'
=>
$arquivos
,
'hoje'
=>
$hoje
,
'trabalho'
=>
$trabalho
]);
}
public
function
anexarRelatorio
(
Request
$request
){
...
...
This diff is collapsed.
Click to expand it.
resources/views/planosTrabalho/listar.blade.php
View file @
d797e153
...
...
@@ -24,7 +24,7 @@
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Final
</
th
>
</
tr
>
</
thead
>
@
foreach
(
$arquivos
as
$arquivo
)
<
tbody
>
...
...
@@ -34,36 +34,49 @@
@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 }}">
@
if
(
$arquivo
->
arquivado
)
Arquivado
@
else
Enviar
@
endif
</
button
>
@if(
$arquivo->arquivado
)
<button type="
button
" class="
btn
btn
-
secondary
" data-toggle="
modal
" data-target="
#modalRelatorioParcial{{ $arquivo->id }}">Arquivado</button>
@
elseif
(
$trabalho
->
status
==
"reprovado"
)
<
button
type
=
"button"
class
=
"btn btn-danger"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Reprovado
</
button
>
@
else
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Enviar
</
button
>
@
endif
@
else
<!--
Button
trigger
modal
-->
@
if
(
$arquivo
->
relatorioParcial
!=
null
)
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Visualizar
</
button
>
@
elseif
(
$arquivo
->
arquivado
)
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Arquivado
</
button
>
@
elseif
(
$trabalho
->
status
==
"reprovado"
)
<
button
type
=
"button"
class
=
"btn btn-danger"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Reprovado
</
button
>
@
else
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Pendente
</
button
>
@
endif
@
endif
</
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
}}"
>
@
if
(
$arquivo
->
arquivado
)
Arquivado
@
else
Enviar
@
endif
</
button
>
@
if
(
$arquivo
->
arquivado
)
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Arquivado
</
button
>
@
elseif
(
$trabalho
->
status
==
"reprovado"
)
<
button
type
=
"button"
class
=
"btn btn-danger"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Reprovado
</
button
>
@
else
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Enviar
</
button
>
@
endif
@
else
<!--
Button
trigger
modal
-->
@
if
(
$arquivo
->
relatorio
Parci
al
!=
null
)
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorio
Parci
al{{
$arquivo->id
}}"
>
Visualizar
</
button
>
@
if
(
$arquivo
->
relatorio
Fin
al
!=
null
)
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
d
data
-
target
=
"#modalRelatorio
Fin
al{{
$arquivo->id
}}"
>
Visualizar
</
button
>
@
elseif
(
$arquivo
->
arquivado
)
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioParcial{{
$arquivo->id
}}"
>
Arquivado
</
button
>
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Arquivado
</
button
>
@
elseif
(
$trabalho
->
status
==
"reprovado"
)
<
button
type
=
"button"
class
=
"btn btn-danger"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorioFinal{{
$arquivo->id
}}"
>
Reprovado
</
button
>
@
else
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorio
Parci
al{{
$arquivo->id
}}"
>
Pendente
</
button
>
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
toggle
=
"modal"
data
-
target
=
"#modalRelatorio
Fin
al{{
$arquivo->id
}}"
>
Pendente
</
button
>
@
endif
@
endif
</
td
>
...
...
@@ -125,7 +138,7 @@
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
@
if
((
Auth
::
user
()
->
proponentes
!=
null
)
&&
(
$arquivo
->
trabalho
->
evento
->
dt_inicioRelatorioParcial
<=
$hoje
)
&&
(
$hoje
<=
$arquivo
->
trabalho
->
evento
->
dt_fimRelatorioParcial
))
<
button
type
=
"submit"
class
=
"btn btn-success"
@
if
(
$arquivo
->
arquivado
)
disabled
@
endif
>
Salvar
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-success"
@
if
(
$arquivo
->
arquivado
||
$trabalho
->
status
==
"reprovado"
)
disabled
@
endif
>
Salvar
</
button
>
@
endif
</
div
>
...
...
This diff is collapsed.
Click to expand it.
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