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
9c36f0bd
Commit
9c36f0bd
authored
Sep 21, 2022
by
unknown
Browse files
Merge branch 'master' of
https://github.com/antonioDurval/submeta
parents
a5249563
38002713
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
9c36f0bd
This diff is collapsed.
Click to expand it.
app/Http/Controllers/TrabalhoController.php
View file @
9c36f0bd
...
@@ -840,7 +840,6 @@ class TrabalhoController extends Controller
...
@@ -840,7 +840,6 @@ class TrabalhoController extends Controller
$request
->
merge
([
$request
->
merge
([
'coordenador_id'
=>
$evento
->
coordenadorComissao
->
id
'coordenador_id'
=>
$evento
->
coordenadorComissao
->
id
]);
]);
$trabalho
=
Trabalho
::
find
(
$id
);
$trabalho
=
Trabalho
::
find
(
$id
);
DB
::
beginTransaction
();
DB
::
beginTransaction
();
...
@@ -865,7 +864,6 @@ class TrabalhoController extends Controller
...
@@ -865,7 +864,6 @@ class TrabalhoController extends Controller
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$trabalho
=
$this
->
armazenarAnexosFinais
(
$request
,
$pasta
,
$trabalho
,
$evento
);
$trabalho
->
save
();
$trabalho
->
save
();
if
(
$request
->
marcado
==
null
)
{
if
(
$request
->
marcado
==
null
)
{
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
$idExcluido
=
$trabalho
->
participantes
->
pluck
(
'id'
);
...
@@ -880,10 +878,12 @@ class TrabalhoController extends Controller
...
@@ -880,10 +878,12 @@ class TrabalhoController extends Controller
}
}
}
}
foreach
(
$idExcluido
as
$key
=>
$value
)
{
foreach
(
$idExcluido
as
$key
=>
$value
)
{
$trabalho
->
participantes
()
->
find
(
$value
)
->
delete
();
$trabalho
->
participantes
()
->
find
(
$value
)
->
delete
();
}
}
$trabalho
->
refresh
();
$trabalho
->
refresh
();
if
(
$request
->
has
(
'marcado'
))
{
if
(
$request
->
has
(
'marcado'
))
{
foreach
(
$request
->
marcado
as
$key
=>
$part
)
{
foreach
(
$request
->
marcado
as
$key
=>
$part
)
{
$part
=
intval
(
$part
);
$part
=
intval
(
$part
);
...
@@ -1015,8 +1015,9 @@ class TrabalhoController extends Controller
...
@@ -1015,8 +1015,9 @@ class TrabalhoController extends Controller
}
}
if
(
!
$request
->
has
(
'rascunho'
))
{
if
(
!
$request
->
has
(
'rascunho'
))
{
Notification
::
send
(
$trabalho
->
proponente
->
user
,
new
SubmissaoNotification
(
$
id
,
$
trabalho
->
titulo
));
Notification
::
send
(
$trabalho
->
proponente
->
user
,
new
SubmissaoNotification
(
$trabalho
));
}
}
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta atualizada!'
]);
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta atualizada!'
]);
}
catch
(
\
Throwable
$th
)
{
}
catch
(
\
Throwable
$th
)
{
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
9c36f0bd
...
@@ -320,6 +320,7 @@
...
@@ -320,6 +320,7 @@
</
div
>
</
div
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
<
option
value
=
"OUTRAS"
>
OUTRAS
</
option
>
</
select
>
</
select
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -370,6 +371,7 @@
...
@@ -370,6 +371,7 @@
</
div
>
</
div
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
select
class
=
"custom-select"
name
=
"selectJustificativa"
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
<
option
value
=
"DESISTENCIA"
>
DESISTÊNCIA
</
option
>
<
option
value
=
"OUTRAS"
>
OUTRAS
</
option
>
</
select
>
</
select
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -1610,7 +1612,7 @@
...
@@ -1610,7 +1612,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
<style>
body {
body {
...
...
resources/views/administrador/selecionarProjetos.blade.php
View file @
9c36f0bd
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<
h5
class
=
"modal-title titulo-table"
id
=
"exampleModalLongTitle"
>
Selecione
o
(
s
)
avaliador
(
es
)
</
h5
>
<
h5
class
=
"modal-title titulo-table"
id
=
"exampleModalLongTitle"
>
Selecione
o
(
s
)
avaliador
(
es
)
</
h5
>
<
div
class
=
"col-md-4"
style
=
"text-align: right"
>
<
div
class
=
"col-md-4"
style
=
"text-align: right"
>
<
button
type
=
"button"
id
=
"enviarConviteButton"
class
=
"btn btn-info"
<
button
type
=
"button"
id
=
"enviarConviteButton"
class
=
"btn btn-info"
data
-
toggle
=
"modal"
onclick
=
"abrirModalConviteAval()"
>
data
-
toggle
=
"modal"
onclick
=
"abrirModalConviteAval(
{{
$trabalho->id
}}
)"
>
Enviar
Convites
Enviar
Convites
</
button
>
</
button
>
...
@@ -219,6 +219,7 @@
...
@@ -219,6 +219,7 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
@foreach(
$trabalhos
as
$trabalho
)
@foreach(
$trabalho->avaliadors
as
$avaliador
)
@foreach(
$trabalho->avaliadors
as
$avaliador
)
{{-- Avaliação Interna --}}
{{-- Avaliação Interna --}}
@if((
$avaliador->tipo
== 'Interno' && (
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == null ||
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso != 1))
@if((
$avaliador->tipo
== 'Interno' && (
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == null ||
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso != 1))
...
@@ -285,10 +286,105 @@
...
@@ -285,10 +286,105 @@
@endforeach
@endforeach
@endforeach
</tbody>
</tbody>
</table>
</table>
<!-- Modal enviar convite e atribuir -->
<div class="
modal
fade
" id="
modalConviteAval
" tabindex="
-
1
" role="
dialog
"
aria-labelledby="
exampleModalCenterTitle
" aria-hidden="
true
">
<div class="
modal
-
dialog
modal
-
dialog
-
centered
" role="
document
">
<div class="
modal
-
content
modal
-
submeta
">
<div class="
modal
-
header
modal
-
header
-
submeta
">
<h5 class="
modal
-
title
titulo
-
table
" id="
exampleModalLongTitle
" style="
font
-
size
:
20
px
;
">Enviar
Convite</h5>
<button type="
button
" class="
close
" onclick="
fecharModalConvite
()
" aria-label="
Close
"
style="
color
:
rgb
(
182
,
182
,
182
)
">
<span aria-hidden="
true
">×</span>
</button>
</div>
<div class="
modal
-
body
" style="
margin
-
left
:
20
px
;
margin
-
right
:
20
px
;
">
<form action="
{{
route
(
'admin.convite.atribuicao.projeto'
)
}}
" method="
POST
" class="
labels
-
blue
" id="
formConvite
">
@csrf
<input type="
hidden
" name="
evento_id
" value="
{{
$evento
->
id
}}
">
<input type="
hidden
" id="
trabalho_id
" name="
trabalho_id
" value="
{{
$trabalho
->
id
}}
">
<div class="
form
-
group
">
<label for="
exampleInputEmail1
">Nome Completo <span style="
color
:
red
;
">*</span></label>
<input type="
text
" class="
form
-
control
" name="
nomeAvaliador
" id="
exampleInputNome1
"
required>
</div>
<div class="
form
-
group
">
<label for="
exampleInputEmail1
">Email <span style="
color
:
red
;
">*</span></label>
<input type="
email
" class="
form
-
control
" name="
emailAvaliador
" id="
exampleInputEmail1
"
required>
</div>
<div class="
form
-
group
">
<label for="
grandeArea
" class="
col
-
form
-
label
">{{ __('Grande Área') }} <span
style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
<select class="
form
-
control
" id="
grandeAreaConvite
" name="
grande_area_id
" onchange="
areas
()
"
required>
<option value="" disabled selected hidden>-- Grande Área --</option>
@foreach(
$grandesAreas
as
$grandeArea
)
<option value="
{{
$grandeArea
->
id
}}
">
{
{$grandeArea->nome}
}
</option>
@endforeach
</select>
<label for="
area
" class="
col
-
form
-
label
">{{ __('Área') }} <span
style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
<select class="
form
-
control
@
error
(
'area'
)
is
-
invalid
@
enderror
" id="
areaConvite
"
name="
area_id
" required>
<option value="" disabled selected hidden>-- Área --</option>
</select>
</div>
<div class="
form
-
group
">
<label for="
exampleFormControlSelect1
">Tipo</label>
<select class="
form
-
control
" name="
tipo
" id="
exampleFormControlSelect1
" disabled>
<option value="
avaliador
">Avaliador</option>
</select>
</div>
<div class="
form
-
group
">
<label for="
exampleFormControlSelect1
">Instituição <span
style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
<select class="
form
-
control
" name="
instituicao
" id="
membro
" required
onchange="
mostrarDiv
(
this
)
">
<option value="" disabled>-- Selecione a instituição --</option>
<option value="
ufape
">Universidade Federal do Agreste de Pernambuco</option>
<option value="
outra
">Outra</option>
</select>
</div>
<div class="
form
-
group
" id="
div
-
outra
"
style="
@
if
(
old
(
'instituicao'
)
!=
null
&&
old
(
'instituicao'
)
==
"outra"
)
display
:
block
;
@
else
display
:
none
;
@
endif
">
<label for="
outra
">{{ __('Digite o nome da instituição') }}<span
style="
color
:
red
;
font
-
weight
:
bold
;
"> *</span></label>
<input id="
outra
" class="
form
-
control
@
error
(
'outra'
)
is
-
invalid
@
enderror
" type="
text
"
name="
outra
" value="
{{
old
(
'outra'
)}}
" autocomplete="
outra
"
placeholder="
Universidade
Federal
...
">
@error('outra')
<div id="
validationServer03Feedback
" class="
invalid
-
feedback
">
{{
$message
}}
</div>
@enderror
</div>
<div class="
form
-
group
" style="
margin
-
top
:
40
px
;
margin
-
bottom
:
40
px
;
">
<button type="
submit
" class="
btn
btn
-
info
" style="
width
:
100
%
">Enviar</button>
</div>
<div class="
form
-
group
texto
-
info
">
O convite será enviador por e-mail e o preenchimento dos dados será de inteira
responsabilidade do usuário convidado.
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@endsection
...
@@ -316,9 +412,67 @@
...
@@ -316,9 +412,67 @@
}
}
}
}
function abrirModalConviteAval() {
function abrirModalConviteAval(id) {
dd("
DEVE
SER
ABERTO
AQUI
O
FORM
DE
CONVITE
");
// fechar modeal e abrir 2o modal
console.log(id);
$("
#exampleModalCenter"+id).modal('toggle');
$
(
"#trabalho_id"
)
.
val
(
id
);
setTimeout
(()
=>
{
$
(
"#modalConviteAval"
)
.
modal
();
},
500
);
$
(
'#modalConviteAval'
)
.
focus
();
}
function
fecharModalConvite
(){
$
(
"#modalConviteAval"
)
.
modal
(
'toggle'
);
}
}
function
areas
()
{
var
grandeArea
=
$
(
'#grandeAreaConvite'
)
.
val
();
$
.
ajax
({
type
:
'POST'
,
url
:
'{{ route('
area
.
consulta
') }}'
,
data
:
'id='
+
grandeArea
,
headers
:
{
'X-CSRF-TOKEN'
:
$
(
'meta[name="csrf-token"]'
)
.
attr
(
'content'
)
},
success
:
(
dados
)
=>
{
if
(
dados
.
length
>
0
)
{
if
(
$
(
'#oldArea'
)
.
val
()
==
null
||
$
(
'#oldArea'
)
.
val
()
==
""
)
{
var
option
=
'<option selected disabled>-- Área --</option>'
;
}
$
.
each
(
dados
,
function
(
i
,
obj
)
{
if
(
$
(
'#oldArea'
)
.
val
()
!=
null
&&
$
(
'#oldArea'
)
.
val
()
==
obj
.
id
)
{
option
+=
'<option selected value="'
+
obj
.
id
+
'">'
+
obj
.
nome
+
'</option>'
;
}
else
{
option
+=
'<option value="'
+
obj
.
id
+
'">'
+
obj
.
nome
+
'</option>'
;
}
})
}
else
{
var
option
=
"<option selected disabled>-- Área --</option>"
;
}
$
(
'#areaConvite'
)
.
html
(
option
)
.
show
();
},
error
:
(
data
)
=>
{
console
.
log
(
data
);
}
})
}
function
mostrarDiv
(
select
)
{
if
(
select
.
value
==
"outra"
)
{
document
.
getElementById
(
'div-outra'
)
.
style
.
display
=
"block"
;
$
(
"#outra"
)
.
prop
(
'required'
,
true
);
}
else
if
(
select
.
value
==
"ufape"
)
{
document
.
getElementById
(
'div-outra'
)
.
style
.
display
=
"none"
;
$
(
"#outra"
)
.
prop
(
'required'
,
false
);
}
}
</
script
>
</
script
>
@
endsection
@
endsection
resources/views/administrador/substituirParticipante.blade.php
View file @
9c36f0bd
...
@@ -39,14 +39,37 @@
...
@@ -39,14 +39,37 @@
<
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
title
=
"Substituição"
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalTestSubParticipante
{
{$participante->id}
}
"
class
=
"button"
@
if
((
$substituicoesProjeto
->
first
()
!=
null
)
&&
((
$substituicoesProjeto
->
first
()
->
status
==
'Em Aguardo'
)
||
(
$desligamentosProjeto
->
first
()
!=
null
&&
$desligamentosProjeto
->
first
()
->
status
==
1
)))
style
=
"pointer-events: none; cursor: default; color:gray;"
@
endif
>
@
if
((
count
(
$substituicoesProjeto
->
where
(
'participanteSubstituido_id'
,
$participante
->
id
)
->
where
(
'status'
,
'Em Aguardo'
))
>
0
)
<
i
class
=
"fas fa-exchange-alt fa-2x"
></
i
></
a
>
||
(
count
(
$desligamentosProjeto
->
where
(
'participante_id'
,
$participante
->
id
)
->
where
(
'status'
,
1
))
>
0
))
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalVizuParticipante
{
{$participante->id}
}
"
class
=
"button"
><
i
class
=
"far fa-eye fa-2x"
></
i
></
a
>
style
=
"pointer-events: none; cursor: default; color:gray;"
@
endif
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalSolicitarDesligamentoParticipante
{
{$participante->id}
}
"
class
=
"button"
@
if
(((
$substituicoesProjeto
->
first
()
!=
null
)
&&
((
$substituicoesProjeto
->
first
()
->
status
==
'Em Aguardo'
)
||
(
$desligamentosProjeto
->
first
()
!=
null
&&
$desligamentosProjeto
->
first
()
->
status
==
1
))
||
count
(
$participantes
)
<=
1
))
style
=
"pointer-events: none; cursor: default; color: gray;"
@
endif
>
Solicitar
desligamento
</
a
>
<
i
class
=
"fas fa-exchange-alt fa-2x"
></
i
>
</
a
>
@
if
((
count
(
$substituicoesProjeto
->
where
(
'participanteSubstituido_id'
,
$participante
->
id
)
->
where
(
'status'
,
'Em Aguardo'
))
>
0
)
||
(
count
(
$desligamentosProjeto
->
where
(
'participante_id'
,
$participante
->
id
)
->
where
(
'status'
,
1
))
>
0
))
<
a
title
=
"Desligamento"
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalSolicitarDesligamentoParticipante
{
{$participante->id}
}
"
class
=
"button"
style
=
"pointer-events: none; cursor: default;"
>
<
svg
xmlns
=
"http://www.w3.org/2000/svg"
viewBox
=
"0 0 640 512"
style
=
"width:30px;"
>
<
path
fill
=
"#808080"
d
=
"M352 128c0 70.7-57.3 128-128 128s-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM471 143c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"
/>
</
svg
>
</
a
>
@
else
<
a
title
=
"Desligamento"
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalSolicitarDesligamentoParticipante
{
{$participante->id}
}
"
class
=
"button"
>
<
svg
xmlns
=
"http://www.w3.org/2000/svg"
viewBox
=
"0 0 640 512"
style
=
"width:30px;"
>
<
path
fill
=
"#3490dc"
d
=
"M352 128c0 70.7-57.3 128-128 128s-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM471 143c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"
/>
</
svg
>
</
a
>
@
endif
<
a
title
=
"Visualizar"
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalVizuParticipante
{
{$participante->id}
}
"
class
=
"button"
><
i
class
=
"far fa-eye fa-2x"
></
i
></
a
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
resources/views/notificacao/listar.blade.php
View file @
9c36f0bd
...
@@ -143,6 +143,8 @@
...
@@ -143,6 +143,8 @@
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
@
endforeach
<
style
>
<
style
>
.
circulo
{
.
circulo
{
...
...
resources/views/proponente/projetos.blade.php
View file @
9c36f0bd
...
@@ -109,11 +109,6 @@
...
@@ -109,11 +109,6 @@
Solicitar
Substituições
Solicitar
Substituições
</
a
>
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
hr
class
=
"dropdown-hr"
>
{{
--<
hr
class
=
"dropdown-hr"
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Solicitar
Certificado
</
a
>--
}}
@
endif
@
endif
<
a
href
=
"{{route('docComplementar.listar', ['projeto_id' =>
$projeto->id
])}}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
"{{route('docComplementar.listar', ['projeto_id' =>
$projeto->id
])}}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Documentos
Complementares
Documentos
Complementares
...
...
routes/web.php
View file @
9c36f0bd
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