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
2b4b2c0e
"vscode:/vscode.git/clone" did not exist on "218cc8515cb0e658af74766a98cc7293d8eb71e1"
Commit
2b4b2c0e
authored
Aug 15, 2022
by
unknown
Browse files
Restrições para impedir que um discente seja desligado e substituido ao mesmo tempo
parent
2edd10f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
2b4b2c0e
...
...
@@ -52,6 +52,7 @@ use App\SolicitacaoCertificado;
use
App\SolicitacaoParticipante
;
use
App\Substituicao
;
use
Illuminate\Support\Facades\Notification
;
use
App\Desligamento
;
class
TrabalhoController
extends
Controller
{
...
...
@@ -1565,6 +1566,7 @@ class TrabalhoController extends Controller
$participantes
=
$projeto
->
participantes
;
$substituicoesProjeto
=
Substituicao
::
where
(
'trabalho_id'
,
$projeto
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
get
();
$desligamentosProjeto
=
Desligamento
::
where
(
'trabalho_id'
,
$projeto
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
get
();
return
view
(
'administrador.substituirParticipante'
)
->
with
([
'projeto'
=>
$projeto
,
'edital'
=>
$edital
,
...
...
@@ -1572,6 +1574,7 @@ class TrabalhoController extends Controller
'substituicoesProjeto'
=>
$substituicoesProjeto
,
'estados'
=>
$this
->
estados
,
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
'desligamentosProjeto'
=>
$desligamentosProjeto
,
]);
}
...
...
resources/views/administrador/substituirParticipante.blade.php
View file @
2b4b2c0e
...
...
@@ -39,13 +39,14 @@
<
div
class
=
"col-2 align-self-center"
>
<
div
class
=
"row justify-content-around"
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalTestSubParticipante
{
{$participante->id}
}
"
class
=
"button"
@
if
((
$substituicoesProjeto
->
first
()
!=
null
)
&&
(
$substituicoesProjeto
->
first
()
->
status
==
'Em Aguardo'
))
style
=
"pointer-events: none; cursor: default;"
@
endif
>
@
if
((
$substituicoesProjeto
->
first
()
!=
null
)
&&
(
(
$substituicoesProjeto
->
first
()
->
status
==
'Em Aguardo'
)
||
(
$desligamentosProjeto
->
first
()
->
status
==
1
))
)
style
=
"pointer-events: none; cursor: default;"
@
endif
>
<
i
class
=
"fas fa-exchange-alt fa-2x"
></
i
></
a
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalVizuParticipante
{
{$participante->id}
}
"
class
=
"button"
><
i
class
=
"far fa-eye fa-2x"
></
i
></
a
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalSolicitarDesligamentoParticipante
{
{$participante->id}
}
"
class
=
"button"
>
Solicitar
desligamento
</
a
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalSolicitarDesligamentoParticipante
{
{$participante->id}
}
"
class
=
"button"
@
if
((
$substituicoesProjeto
->
first
()
!=
null
)
&&
((
$substituicoesProjeto
->
first
()
->
status
==
'Em Aguardo'
)
||
(
$desligamentosProjeto
->
first
()
->
status
==
1
)))
style
=
"pointer-events: none; cursor: default;"
@
endif
>
Solicitar
desligamento
</
a
>
</
div
>
</
div
>
</
div
>
<!--
Modal
TESTE
substituir
participante
-->
...
...
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