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
a3c69756
Commit
a3c69756
authored
Aug 19, 2022
by
S-Nathalia
Browse files
merge
parents
deee6a98
66496d7f
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
a3c69756
...
@@ -10,3 +10,4 @@ Homestead.json
...
@@ -10,3 +10,4 @@ Homestead.json
Homestead.yaml
Homestead.yaml
npm-debug.log
npm-debug.log
yarn-error.log
yarn-error.log
submeta.code-workspace
app/Http/Controllers/TrabalhoController.php
View file @
a3c69756
...
@@ -52,6 +52,7 @@ use App\SolicitacaoCertificado;
...
@@ -52,6 +52,7 @@ use App\SolicitacaoCertificado;
use
App\SolicitacaoParticipante
;
use
App\SolicitacaoParticipante
;
use
App\Substituicao
;
use
App\Substituicao
;
use
Illuminate\Support\Facades\Notification
;
use
Illuminate\Support\Facades\Notification
;
use
App\Desligamento
;
class
TrabalhoController
extends
Controller
class
TrabalhoController
extends
Controller
{
{
...
@@ -1559,6 +1560,7 @@ class TrabalhoController extends Controller
...
@@ -1559,6 +1560,7 @@ class TrabalhoController extends Controller
$participantes
=
$projeto
->
participantes
;
$participantes
=
$projeto
->
participantes
;
$substituicoesProjeto
=
Substituicao
::
where
(
'trabalho_id'
,
$projeto
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
get
();
$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
,
return
view
(
'administrador.substituirParticipante'
)
->
with
([
'projeto'
=>
$projeto
,
'edital'
=>
$edital
,
'edital'
=>
$edital
,
...
@@ -1566,6 +1568,7 @@ class TrabalhoController extends Controller
...
@@ -1566,6 +1568,7 @@ class TrabalhoController extends Controller
'substituicoesProjeto'
=>
$substituicoesProjeto
,
'substituicoesProjeto'
=>
$substituicoesProjeto
,
'estados'
=>
$this
->
estados
,
'estados'
=>
$this
->
estados
,
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
'desligamentosProjeto'
=>
$desligamentosProjeto
,
]);
]);
}
}
...
@@ -1773,7 +1776,9 @@ class TrabalhoController extends Controller
...
@@ -1773,7 +1776,9 @@ class TrabalhoController extends Controller
if
(
$request
->
aprovar
==
'true'
)
{
if
(
$request
->
aprovar
==
'true'
)
{
try
{
try
{
if
(
$substituicao
->
tipo
==
'TrocarPlano'
)
{
if
(
$substituicao
->
tipo
==
'TrocarPlano'
)
{
$substituicao
->
participanteSubstituido
->
planoTrabalho
()
->
where
(
'id'
,
'!='
,
$substituicao
->
planoSubstituto
->
id
)
->
delete
();
if
(
!
empty
(
$substituicao
->
participanteSubstituido
)){
$substituicao
->
participanteSubstituido
->
planoTrabalho
()
->
where
(
'id'
,
'!='
,
$substituicao
->
planoSubstituto
->
id
)
->
delete
();
}
$substituicao
->
status
=
'Finalizada'
;
$substituicao
->
status
=
'Finalizada'
;
$substituicao
->
justificativa
=
$request
->
textJustificativa
;
$substituicao
->
justificativa
=
$request
->
textJustificativa
;
$substituicao
->
causa
=
$request
->
selectJustificativa
;
$substituicao
->
causa
=
$request
->
selectJustificativa
;
...
@@ -1782,7 +1787,10 @@ class TrabalhoController extends Controller
...
@@ -1782,7 +1787,10 @@ class TrabalhoController extends Controller
$substituicao
->
save
();
$substituicao
->
save
();
}
else
{
}
else
{
$substituicao
->
participanteSubstituido
->
delete
();
if
(
!
empty
(
$substituicao
->
participanteSubstituido
)){
$substituicao
->
participanteSubstituido
->
delete
();
}
$trabalho
->
participantes
()
->
save
(
$substituicao
->
participanteSubstituto
);
$trabalho
->
participantes
()
->
save
(
$substituicao
->
participanteSubstituto
);
$substituicao
->
status
=
'Finalizada'
;
$substituicao
->
status
=
'Finalizada'
;
...
...
app/Http/Requests/UpdateTrabalho.php
View file @
a3c69756
...
@@ -2,8 +2,11 @@
...
@@ -2,8 +2,11 @@
namespace
App\Http\Requests
;
namespace
App\Http\Requests
;
use
App\Arquivo
;
use
App\Evento
;
use
App\Evento
;
use
App\Participante
;
use
App\Trabalho
;
use
App\Trabalho
;
use
App\User
;
use
Illuminate\Validation\Rule
;
use
Illuminate\Validation\Rule
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Foundation\Http\FormRequest
;
use
Illuminate\Foundation\Http\FormRequest
;
...
@@ -33,6 +36,14 @@ class UpdateTrabalho extends FormRequest
...
@@ -33,6 +36,14 @@ class UpdateTrabalho extends FormRequest
if
(
$this
->
has
(
'marcado'
)){
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
if
(
intval
(
$value
)
==
$key
){
$usuario
=
User
::
where
(
'email'
,
$this
->
email
[
$value
])
->
first
();
// if(isset($usuario)){
// $participante = Participante::where('user_id', $usuario->id)->where('trabalho_id', $projeto->id)->first();
// $arquivo = Arquivo::where('trabalhoId', $projeto->id)->where('participanteId', $participante->id)->first();
// }
//user
//user
$rules
[
'name.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'name.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'email.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'email.'
.
$value
]
=
[
'required'
,
'string'
];
...
@@ -58,8 +69,14 @@ class UpdateTrabalho extends FormRequest
...
@@ -58,8 +69,14 @@ class UpdateTrabalho extends FormRequest
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'media_do_curso.'
.
$value
]
=
[
'required'
,
'string'
];
}
}
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'nomePlanoTrabalho.'
.
$value
]
=
[
'required'
,
'string'
];
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
if
(
isset
(
$usuario
)){
$participante
=
Participante
::
where
(
'user_id'
,
$usuario
->
id
)
->
where
(
'trabalho_id'
,
$projeto
->
id
)
->
first
();
$arquivo
=
Arquivo
::
where
(
'trabalhoId'
,
$projeto
->
id
)
->
where
(
'participanteId'
,
$participante
->
id
)
->
first
();
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
Rule
::
requiredIf
(
$arquivo
==
null
),
'mimes:pdf'
];
}
else
{
$rules
[
'anexoPlanoTrabalho.'
.
$value
]
=
[
'required'
,
'mimes:pdf'
];
}
}
}
}
}
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
a3c69756
...
@@ -276,113 +276,111 @@
...
@@ -276,113 +276,111 @@
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
@
endforeach
@
endforeach
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<!--
Modal
reprova
r
substituição
--
>
{{
--
Janelas
para
aprovação
ou
reprova
ção
de
substituição
--
}}
<
div
class
=
"modal fade"
id
=
"modalCancelarSubst"
tabindex
=
"-1"
role
=
"dialog"
<
div
class
=
"modal fade"
id
=
"modalCancelarSubst"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
Cancelar
Substituição
</
h5
>
Cancelar
Substituição
</
h5
>
<
button
type
=
"button"
class
=
"close"
id
=
"closeCancel"
aria
-
label
=
"Close"
<
button
type
=
"button"
class
=
"close"
id
=
"closeCancel"
aria
-
label
=
"Close"
style
=
"padding-top: 8px; color:#1492E6"
>
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
class
=
"modal-body"
>
<
div
class
=
"modal-body"
>
<
form
method
=
"POST"
id
=
"CancelarSubParticForm"
<
form
method
=
"POST"
id
=
"CancelarSubParticForm"
action
=
"
{
{route('trabalho.aprovarSubstituicao')}
}
"
>
action
=
"
{
{route('trabalho.aprovarSubstituicao')}
}
"
>
@
csrf
@
csrf
<
input
type
=
"hidden"
name
=
"substituicaoID"
id
=
"negaId"
value
=
""
>
<
input
type
=
"hidden"
name
=
"substituicaoID"
id
=
"negaId"
value
=
""
>
<
input
type
=
"hidden"
name
=
"aprovar"
value
=
"false"
>
<
input
type
=
"hidden"
name
=
"aprovar"
value
=
"false"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
div
class
=
"col-12"
>
<
div
class
=
"col-12"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"justificativaTextArea"
>
Justificativa
:</
label
>
<
label
for
=
"justificativaTextArea"
>
Justificativa
:</
label
>
<
textarea
class
=
"form-control"
<
textarea
class
=
"form-control"
id
=
"justificativaTextArea"
rows
=
"3"
id
=
"justificativaTextArea"
rows
=
"3"
name
=
"textJustificativa"
minlength
=
"20"
name
=
"textJustificativa"
minlength
=
"20"
required
></
textarea
>
required
></
textarea
>
</
div
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
</
select
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-end mt-4"
>
<
div
class
=
"col-md-auto"
>
<
div
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Cancelar
Substituição
</
button
>
</
div
>
</
div
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
</
select
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-end mt-4"
>
<
div
class
=
"col-md-auto"
>
<
div
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Cancelar
Substituição
</
button
>
</
div
>
</
div
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
<!--
Modal
aprovar
substituição
-->
<!--
Modal
aprovar
substituição
-->
<
div
class
=
"modal fade"
id
=
"modalResultadoSubst"
tabindex
=
"-1"
role
=
"dialog"
<
div
class
=
"modal fade"
id
=
"modalResultadoSubst"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
Proceder
Com
Substituição
</
h5
>
Proceder
Com
Substituição
</
h5
>
<
button
id
=
"closeAcept"
type
=
"button"
class
=
"close"
aria
-
label
=
"Close"
<
button
id
=
"closeAcept"
type
=
"button"
class
=
"close"
aria
-
label
=
"Close"
style
=
"padding-top: 8px; color:#1492E6"
>
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
class
=
"modal-body"
>
<
div
class
=
"modal-body"
>
<
form
method
=
"POST"
id
=
"AprovarSubParticForm"
<
form
method
=
"POST"
id
=
"AprovarSubParticForm"
action
=
"
{
{route('trabalho.aprovarSubstituicao')}
}
"
>
action
=
"
{
{route('trabalho.aprovarSubstituicao')}
}
"
>
@
csrf
@
csrf
<
input
type
=
"hidden"
name
=
"substituicaoID"
id
=
"aprovaId"
value
=
""
>
<
input
type
=
"hidden"
name
=
"substituicaoID"
id
=
"aprovaId"
value
=
""
>
<
input
type
=
"hidden"
name
=
"aprovar"
value
=
"true"
>
<
input
type
=
"hidden"
name
=
"aprovar"
value
=
"true"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
div
class
=
"col-12"
>
<
div
class
=
"col-12"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"justificativaTextArea"
>
Justificativa
:</
label
>
<
label
for
=
"justificativaTextArea"
>
Justificativa
:</
label
>
<
textarea
class
=
"form-control"
<
textarea
class
=
"form-control"
id
=
"justificativaTextArea"
rows
=
"3"
id
=
"justificativaTextArea"
rows
=
"3"
name
=
"textJustificativa"
minlength
=
"20"
name
=
"textJustificativa"
minlength
=
"20"
required
>
Substituição
cumpre
com
todos
os
requisitos
</
textarea
>
required
>
Substituição
cumpre
com
todos
os
requisitos
</
textarea
>
</
div
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
</
select
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-end mt-4"
>
<
div
class
=
"col-md-auto"
>
<
div
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Aprovar
Substituição
</
button
>
</
div
>
</
div
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
</
select
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-end mt-4"
>
<
div
class
=
"col-md-auto"
>
<
div
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Aprovar
Substituição
</
button
>
</
div
>
</
div
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -1189,6 +1187,7 @@
...
@@ -1189,6 +1187,7 @@
Submeter
Submeter
</
button
>
</
button
>
</
form
>
</
form
>
{{
--
fsasfafsasaffafsafas
--
}}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
resources/views/administrador/substituirParticipante.blade.php
View file @
a3c69756
...
@@ -39,13 +39,14 @@
...
@@ -39,13 +39,14 @@
<
div
class
=
"col-2 align-self-center"
>
<
div
class
=
"col-2 align-self-center"
>
<
div
class
=
"row justify-content-around"
>
<
div
class
=
"row justify-content-around"
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalTestSubParticipante
{
{$participante->id}
}
"
class
=
"button"
<
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
>
<
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
=
"#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
>
</
div
>
</
div
>
</
div
>
<!--
Modal
TESTE
substituir
participante
-->
<!--
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