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
36633b0b
Commit
36633b0b
authored
Jan 30, 2022
by
Guilherme Silva
Browse files
Criada página de notificação e ajuste visual para seu acesso
parent
435979b0
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
36633b0b
...
@@ -982,6 +982,16 @@ class TrabalhoController extends Controller
...
@@ -982,6 +982,16 @@ class TrabalhoController extends Controller
}
}
}
}
$notificacao
=
App\Notificacao
::
create
([
'remetente_id'
=>
Auth
::
user
()
->
id
,
'destinatario_id'
=>
$evento
->
coordenadorComissao
->
user_id
,
'trabalho_id'
=>
$trabalho
->
id
,
'lido'
=>
false
,
'tipo'
=>
1
,
]);
$notificacao
->
save
();
$evento
->
trabalhos
()
->
save
(
$trabalho
);
$evento
->
trabalhos
()
->
save
(
$trabalho
);
$pasta
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
;
$pasta
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
;
...
@@ -1534,6 +1544,15 @@ class TrabalhoController extends Controller
...
@@ -1534,6 +1544,15 @@ class TrabalhoController extends Controller
$evento
->
trabalhos
()
->
save
(
$trabalho
);
$evento
->
trabalhos
()
->
save
(
$trabalho
);
$trabalho
->
save
();
$trabalho
->
save
();
$notificacao
=
App\Notificacao
::
create
([
'remetente_id'
=>
Auth
::
user
()
->
id
,
'destinatario_id'
=>
$evento
->
coordenadorComissao
->
user_id
,
'trabalho_id'
=>
$trabalho
->
id
,
'lido'
=>
false
,
'tipo'
=>
2
,
]);
$notificacao
->
save
();
DB
::
commit
();
DB
::
commit
();
Mail
::
to
(
$evento
->
coordenadorComissao
->
user
->
email
)
->
send
(
new
SolicitacaoSubstituicao
(
$evento
,
$trabalho
));
Mail
::
to
(
$evento
->
coordenadorComissao
->
user
->
email
)
->
send
(
new
SolicitacaoSubstituicao
(
$evento
,
$trabalho
));
...
@@ -1643,4 +1662,9 @@ class TrabalhoController extends Controller
...
@@ -1643,4 +1662,9 @@ class TrabalhoController extends Controller
}
}
}
public
function
aprovarProposta
(
Request
$request
,
$id
){
\ No newline at end of file
$trabalho
=
Trabalho
::
find
(
$id
);
$trabalho
->
status
=
$request
->
statusProb
;
$trabalho
->
save
();
}}
\ No newline at end of file
resources/views/layouts/app.blade.php
View file @
36633b0b
...
@@ -182,7 +182,9 @@
...
@@ -182,7 +182,9 @@
@if(Auth::user()->administradors != null)
@if(Auth::user()->administradors != null)
<a
href=
"{{route('admin.editais')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Editais
</a>
<a
href=
"{{route('admin.editais')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Editais
</a>
<a
href=
"{{route('admin.showProjetos')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Projetos
</a>
<a
href=
"{{route('admin.showProjetos')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Projetos
</a>
<a
href=
"{{route('notificacao.listar')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Notificações
</a>
@else
@else
<a
href=
"{{route('notificacao.listarTrab')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Notificações
</a>
<a
href=
"{{route('coord.home')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Editais
</a>
<a
href=
"{{route('coord.home')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Editais
</a>
@endif
@endif
<a
id=
"navbarDropdown"
class=
"btn navbar-text negrito dropdown-toggle"
style=
"color: rgb(0, 140, 255);"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
<a
id=
"navbarDropdown"
class=
"btn navbar-text negrito dropdown-toggle"
style=
"color: rgb(0, 140, 255);"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
...
...
resources/views/notificacao/listar.blade.php
0 → 100644
View file @
36633b0b
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"row justify-content-center"
style
=
"margin-top: 100px;"
>
<
div
class
=
"col-md-8"
>
<
h3
style
=
"color: #1492E6;"
>
Todas
as
Notificações
</
h3
>
</
div
>
<!--
Titulos
-->
@
foreach
(
$notificacoes
as
$notificacao
)
<
div
class
=
"col-md-8"
>
<
div
class
=
"card"
style
=
"border-radius: 5px"
>
<
div
class
=
"card-body"
style
=
"padding-top: 0.2rem;"
>
<
div
class
=
"container"
>
<
div
class
=
"form-row mt-3"
>
<
div
class
=
"col-md-12"
>
<!--
Criação
de
proposta
-->
@
if
(
$notificacao
->
tipo
==
1
)
@
if
(
$notificacao
->
destinatario_id
==
Auth
::
user
()
->
id
||
Auth
::
user
()
->
administradors
!=
null
)
<
h6
style
=
"font-size: 18px"
>
Nova
proposta
para
{{
$notificacao
->
trabalho
->
evento
->
nome
}}
</
h6
>
<
p
style
=
"font-size: 14px; margin-bottom: 0;"
>
Projeto
:
{{
$notificacao
->
trabalho
->
titulo
}}
</
p
>
<
div
style
=
"text-align: right"
>
<
a
href
=
"
{
{route('admin.analisarProposta',['id'=>$notificacao->trabalho->id])}
}
"
>
Visualizar
</
a
>
</
div
>
@
else
<
h6
style
=
"font-size: 18px"
>
Proposta
enviada
para
{{
$notificacao
->
trabalho
->
evento
->
nome
}}
</
h6
>
<
p
style
=
"font-size: 14px; margin-bottom: 0;"
>
Projeto
:
{{
$notificacao
->
trabalho
->
titulo
}}
</
p
>
<
div
style
=
"text-align: right"
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$notificacao->trabalho
->id]) }}"
>
Visualizar
</
a
>
</
div
>
@
endif
<!--
Substituição
de
participante
-->
@
elseif
(
$notificacao
->
tipo
==
2
)
@
if
(
$notificacao
->
destinatario_id
==
Auth
::
user
()
->
id
||
Auth
::
user
()
->
administradors
!=
null
)
<
h6
style
=
"font-size: 18px"
>
Substituição
de
discente
para
{{
$notificacao
->
trabalho
->
evento
->
nome
}}
</
h6
>
<
p
style
=
"font-size: 14px; margin-bottom: 0;"
>
Projeto
:
{{
$notificacao
->
trabalho
->
titulo
}}
</
p
>
<
div
style
=
"text-align: right"
>
<
a
href
=
"
{
{route('admin.analisarProposta',['id'=>$notificacao->trabalho->id])}
}
"
>
Visualizar
</
a
>
</
div
>
@
else
<
h6
style
=
"font-size: 18px"
>
Pedido
de
substituição
de
discente
para
{{
$notificacao
->
trabalho
->
evento
->
nome
}}
</
h6
>
<
p
style
=
"font-size: 14px; margin-bottom: 0;"
>
Projeto
:
{{
$notificacao
->
trabalho
->
titulo
}}
</
p
>
<
div
style
=
"text-align: right"
>
<
a
href
=
"{{route('trabalho.trocaParticipante', ['evento_id' =>
$notificacao->trabalho
->evento->id, 'projeto_id' =>
$notificacao->trabalho
->id])}}"
>
Visualizar
</
a
>
</
div
>
@
endif
@
endif
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
@
endsection
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