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
pad-upe
Commits
4f3b5fc0
Commit
4f3b5fc0
authored
May 15, 2023
by
alissonalbuquerque
Browse files
fix: correcao de duplicacao de avaliacoes
parent
91bb9b73
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/Dimensao/Tabelas/Gestao/GestaoMembroComissaoController.php
View file @
4f3b5fc0
...
...
@@ -36,7 +36,7 @@ class GestaoMembroComissaoController extends Controller
}
public
function
create
(
Request
$request
)
{
{
$planejamento
=
Planejamento
::
initQuery
()
->
whereCodDimensao
(
'G-1'
)
->
first
();
$ch_min
=
$planejamento
->
ch_semanal
;
...
...
@@ -67,7 +67,7 @@ class GestaoMembroComissaoController extends Controller
{
$avaliacao
=
new
Avaliacao
([
'tarefa_id'
=>
$model
->
id
,
'type'
=>
UtilAvaliacao
::
ENSINO_AULA
,
'type'
=>
UtilAvaliacao
::
GESTAO_MEMBRO_COMISSAO
,
'status'
=>
Status
::
PENDENTE
,
]);
...
...
app/Http/Controllers/PadController.php
View file @
4f3b5fc0
...
...
@@ -463,6 +463,23 @@ class PadController extends Controller
$avaliacoes_ensino
=
Avaliacao
::
whereIn
(
'id'
,
$avaliacoes_ensino_ids
)
->
orderBy
(
'status'
);
//
//- - - Correção - - -
$tarefaIds
=
Avaliacao
::
whereType
(
AvaliacaoUtil
::
ENSINO_AULA
)
->
get
()
->
map
(
function
(
$model
)
{
return
$model
->
tarefa_id
;
});
foreach
(
$tarefaIds
as
$tarefaId
)
{
$avas
=
Avaliacao
::
whereType
(
AvaliacaoUtil
::
ENSINO_AULA
)
->
whereTarefaId
(
$tarefaId
)
->
get
();
if
(
count
(
$avas
)
==
2
)
{
$ava
=
Avaliacao
::
whereType
(
AvaliacaoUtil
::
ENSINO_AULA
)
->
whereTarefaId
(
$tarefaId
)
->
first
();
$ava
->
type
=
23
;
$ava
->
save
();
}
}
//- - - Correção - - -
}
if
(
in_array
(
Dimensao
::
PESQUISA
,
$dimensoes
))
{
...
...
app/Models/Avaliacao.php
View file @
4f3b5fc0
...
...
@@ -158,15 +158,3 @@ class Avaliacao extends Model
return
Status
::
listStatus
(
$this
->
status
);
}
}
/**
*
*
*
*
*
*
*
*
*/
\ No newline at end of file
app/Models/Util/Avaliacao.php
View file @
4f3b5fc0
...
...
@@ -32,5 +32,4 @@ class Avaliacao
CONST
GESTAO_REPRESENTANTE_UNIDADE_EDUCACAO
=
22
;
CONST
GESTAO_MEMBRO_COMISSAO
=
23
;
CONST
GESTAO_OUTROS
=
24
;
}
\ No newline at end of file
}
database/migrations/2023_05_11_231805_alter_anexo_remake_table.php
0 → 100644
View file @
4f3b5fc0
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AlterAnexoRemakeTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
dropIfExists
(
'anexo_b'
);
Schema
::
create
(
'anexo_b'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
foreignId
(
'user_pad_id'
);
$table
->
foreignId
(
'campus_id'
)
->
nullable
();
$table
->
foreignId
(
'curso_id'
)
->
nullable
();
$table
->
tinyInteger
(
'semestre'
)
->
nullable
();
$table
->
string
(
'matricula'
)
->
nullable
();
$table
->
time
(
'carga_horaria'
)
->
nullable
();
$table
->
tinyInteger
(
'categoria_nivel'
)
->
nullable
();
$table
->
boolean
(
'afastamento_total'
)
->
nullable
();
$table
->
string
(
'afastamento_total_desc'
)
->
nullable
();
$table
->
boolean
(
'afastamento_parcial'
)
->
nullable
();
$table
->
string
(
'afastamento_parcial_desc'
)
->
nullable
();
$table
->
boolean
(
'direcao_sindical'
)
->
nullable
();
$table
->
string
(
'licenca'
)
->
nullable
();
$table
->
timestamps
();
$table
->
softDeletes
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'anexo_b'
);
}
}
resources/views/layouts/user-dashboard/dashboard_teacher.blade.php
View file @
4f3b5fc0
...
...
@@ -13,7 +13,7 @@
</
h3
>
</
div
>
<
div
class
=
"d-flex"
>
@
foreach
(
$userPads
as
$userPad
)
@
foreach
(
$userPads
as
$userPad
)
@
if
(
$userPad
->
pad
->
status
===
Status
::
ATIVO
)
<
div
class
=
"card mx-2"
style
=
"width: 12rem;"
>
...
...
resources/views/pad/anexo/_form.blade.php
View file @
4f3b5fc0
...
...
@@ -47,7 +47,7 @@
<div
class=
"col-sm-4"
>
<div
class=
"mb-3"
>
<label
for=
"matricula"
>
MATRÍCULA
</label>
<input
type=
"text"
id=
"matricula"
name=
"matricula"
class=
"form-control"
value=
""
>
<input
type=
"text"
id=
"matricula"
name=
"matricula"
class=
"form-control"
value=
""
disabled
>
</div>
</div>
...
...
@@ -145,21 +145,20 @@
$
(
'
#document
'
).
mask
(
'
###.###.###-##
'
)
$
(
'
#carga_horaria
'
).
mask
(
''
)
$
(
'
#carga_horaria
'
).
keypress
(()
=>
{
$
(
'
#carga_horaria
'
).
mask
(
''
)
})
$
(
'
#carga_horaria
'
).
mask
(
'
000:00
'
);
//Config : select2
$
(
'
#campus_id
'
).
select2
(
{
{
placeholder
:
'
Unidade - Campus
'
,
allowClear
:
true
,
ajax
:
{
url
:
'
{{ route("campus_search") }}
'
,
dataType
:
'
json
'
}
}).
on
(
'
change
'
,
()
=>
{
$
(
'
#curso_id
'
).
empty
()
});
$
(
'
#curso_id
'
).
select2
(
...
...
resources/views/pad/teacher/view.blade.php
View file @
4f3b5fc0
...
...
@@ -67,23 +67,14 @@
</
div
>
</
div
>
</
div
>
<
div
class
=
"mx-2"
>
<
div
class
=
"mb-3"
>
<!--
<
h3
class
=
"h3"
>
ANEXOS
</
h3
>
-->
</
div
>
</
div
>
<
div
class
=
"d-flex my-2"
>
<!--
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
{{
--
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
<
div
class
=
"card-body"
>
<
h2
class
=
"text-center"
>
<
i
class
=
"bi bi-file-earmark-text-fill"
></
i
>
</
h2
>
<
h3
class
=
"text-center"
>
Anexo
B
</
h3
>
<
a
class
=
"stretched-link"
href
=
"{{
--
route('
') --
}}"
class
=
"btn-pad-dimensao"
></
a
>
<
a
class
=
"stretched-link"
href
=
"{{ route('
edit_anexo', ['user_pad_id' =>
$user_pad_id
])
}}"
class
=
"btn-pad-dimensao"
></
a
>
</
div
>
</
div
>
--
>
</
div
>
--
}}
</
div
>
@
endsection
scripts/pad.sql
deleted
100644 → 0
View file @
91bb9b73
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