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
84e7a9f0
Commit
84e7a9f0
authored
Apr 18, 2023
by
alissonalbuquerque
Browse files
correções de avaliação to tipo gestão
parent
d6c28c95
Changes
11
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
use
App\Http\Controllers\Controller
;
use
App\Models\Avaliacao
;
use
App\Models\AvaliadorPad
;
use
App\Models\AvaliadorPadDimensao
;
use
Illuminate\Http\Request
;
...
...
@@ -311,7 +312,7 @@ class PadController extends Controller
}
public
function
professor_atividades
(
$id
,
$professor_id
)
{
{
$pad
=
Pad
::
find
(
$id
);
$user
=
Auth
::
user
();
$index_menu
=
MenuItemsAvaliador
::
HOME
;
...
...
@@ -340,7 +341,7 @@ class PadController extends Controller
$ensino
=
[];
$pesquisa
=
[];
$extensao
=
[];
$gestao
=
[];
$
avaliacoes_
gestao
=
[];
if
(
in_array
(
Dimensao
::
ENSINO
,
$dimensoes
))
{
$ensino
=
array_merge
(
$ensino
,
self
::
add_tipo_atividade
(
EnsinoAtendimentoDiscente
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
ENSINO_ATENDIMENTO_DISCENTE
)
->
toArray
());
...
...
@@ -368,17 +369,54 @@ class PadController extends Controller
}
if
(
in_array
(
Dimensao
::
GESTAO
,
$dimensoes
))
{
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoCoordenacaoLaboratoriosDidaticos
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_COORDENACAO_LABORATORIOS_DIDATICOS
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoCoordenacaoProgramaInstitucional
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_COORDENACAO_PROGRAMA_INSTITUCIONAL
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoMembroCamaras
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_MEMBRO_CAMARAS
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoMembroComissao
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_MEMBRO_COMISSAO
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoMembroConselho
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_MEMBRO_CONSELHO
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoMembroTitularConselho
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_MEMBRO_TITULAR_CONSELHO
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoOutros
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_OUTROS
)
->
toArray
());
$gestao
=
array_merge
(
$gestao
,
self
::
add_tipo_atividade
(
GestaoRepresentanteUnidadeEducacao
::
where
(
'user_pad_id'
,
'='
,
$user_pad
->
id
)
->
get
(),
AvaliacaoUtil
::
GESTAO_REPRESENTANTE_UNIDADE_EDUCACAO
)
->
toArray
());
$gestao_grouped_ids
=
[
[
'ids'
=>
GestaoCoordenacaoLaboratoriosDidaticos
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_COORDENACAO_LABORATORIOS_DIDATICOS
,
],
[
'ids'
=>
GestaoCoordenacaoProgramaInstitucional
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_COORDENACAO_PROGRAMA_INSTITUCIONAL
],
[
'ids'
=>
GestaoMembroCamaras
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_MEMBRO_CAMARAS
],
[
'ids'
=>
GestaoMembroComissao
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_MEMBRO_COMISSAO
],
[
'ids'
=>
GestaoMembroConselho
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_MEMBRO_CONSELHO
],
[
'ids'
=>
GestaoMembroTitularConselho
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_MEMBRO_TITULAR_CONSELHO
],
[
'ids'
=>
GestaoOutros
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_OUTROS
],
[
'ids'
=>
GestaoRepresentanteUnidadeEducacao
::
whereUserPadId
(
$user_pad
->
id
)
->
pluck
(
'id'
)
->
toArray
(),
'type'
=>
AvaliacaoUtil
::
GESTAO_REPRESENTANTE_UNIDADE_EDUCACAO
]
];
$avaliacoes_gestao_ids
=
[];
foreach
(
$gestao_grouped_ids
as
$gestao_group
)
{
$avaliacao_ids
=
Avaliacao
::
whereIn
(
'tarefa_id'
,
$gestao_group
[
'ids'
])
->
whereType
(
$gestao_group
[
'type'
])
->
pluck
(
'id'
)
->
toArray
();
$avaliacoes_gestao_ids
=
array_merge
(
$avaliacoes_gestao_ids
,
$avaliacao_ids
);
}
$avaliacoes_gestao
=
Avaliacao
::
whereIn
(
'id'
,
$avaliacoes_gestao_ids
)
->
get
();
}
return
view
(
'pad.avaliacao.taferas_professor'
,
compact
(
'pad'
,
'index_menu'
,
'professor'
,
'ensino'
,
'pesquisa'
,
'extensao'
,
'gestao'
,
'niveis'
,
'modalidades'
));
return
view
(
'pad.avaliacao.taferas_professor'
,
compact
(
'pad'
,
'index_menu'
,
'professor'
,
'ensino'
,
'pesquisa'
,
'extensao'
,
'
avaliacoes_
gestao'
,
'niveis'
,
'modalidades'
));
}
private
function
add_tipo_atividade
(
$query
,
$type
)
...
...
app/Models/Avaliacao.php
View file @
84e7a9f0
...
...
@@ -4,6 +4,32 @@ namespace App\Models;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
use
App\Models\Util\Avaliacao
as
UtilAvaliacao
;
use
App\Models\Tabelas\Ensino\EnsinoAtendimentoDiscente
;
use
App\Models\Tabelas\Ensino\EnsinoAula
;
use
App\Models\Tabelas\Ensino\EnsinoCoordenacaoRegencia
;
use
App\Models\Tabelas\Ensino\EnsinoMembroDocente
;
use
App\Models\Tabelas\Ensino\EnsinoOrientacao
;
use
App\Models\Tabelas\Ensino\EnsinoOutros
;
use
App\Models\Tabelas\Ensino\EnsinoParticipacao
;
use
App\Models\Tabelas\Ensino\EnsinoProjeto
;
use
App\Models\Tabelas\Ensino\EnsinoSupervisao
;
use
App\Models\Tabelas\Pesquisa\PesquisaCoordenacao
;
use
App\Models\Tabelas\Pesquisa\PesquisaLideranca
;
use
App\Models\Tabelas\Pesquisa\PesquisaOrientacao
;
use
App\Models\Tabelas\Pesquisa\PesquisaOutros
;
use
App\Models\Tabelas\Extensao\ExtensaoCoordenacao
;
use
App\Models\Tabelas\Extensao\ExtensaoOrientacao
;
use
App\Models\Tabelas\Extensao\ExtensaoOutros
;
use
App\Models\Tabelas\Gestao\GestaoCoordenacaoLaboratoriosDidaticos
;
use
App\Models\Tabelas\Gestao\GestaoCoordenacaoProgramaInstitucional
;
use
App\Models\Tabelas\Gestao\GestaoMembroCamaras
;
use
App\Models\Tabelas\Gestao\GestaoMembroComissao
;
use
App\Models\Tabelas\Gestao\GestaoMembroConselho
;
use
App\Models\Tabelas\Gestao\GestaoMembroTitularConselho
;
use
App\Models\Tabelas\Gestao\GestaoOutros
;
use
App\Models\Tabelas\Gestao\GestaoRepresentanteUnidadeEducacao
;
use
App\Models\Util\Status
;
class
Avaliacao
extends
Model
{
...
...
@@ -13,12 +39,134 @@ class Avaliacao extends Model
protected
$fillable
=
[
'tarefa_id'
,
'avaliador_id'
,
'type'
,
'status'
,
'descricao'
,
'ch_semanal'
,
'hora_reajuste'
];
public
function
tarefa
()
{
// Return Ensino Models
// - - - - - - - - - -
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_ATENDIMENTO_DISCENTE
)
{
return
$this
->
hasOne
(
EnsinoAtendimentoDiscente
::
class
,
'id'
,
'tarefa_id'
);
}
public
function
tarefa
()
{
//return $this->belongsTo(Pad::class);
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_AULA
)
{
return
$this
->
hasOne
(
EnsinoAula
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_COORDENACAO_REGENCIA
)
{
return
$this
->
hasOne
(
EnsinoCoordenacaoRegencia
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_MEMBRO_DOCENTE
)
{
return
$this
->
hasOne
(
EnsinoMembroDocente
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_ORIENTACAO
)
{
return
$this
->
hasOne
(
EnsinoOrientacao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_OUTROS
)
{
return
$this
->
hasOne
(
EnsinoOutros
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_PARTICIPACAO
)
{
return
$this
->
hasOne
(
EnsinoParticipacao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_PROJETO
)
{
return
$this
->
hasOne
(
EnsinoProjeto
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
ENSINO_SUPERVISAO
)
{
return
$this
->
hasOne
(
EnsinoSupervisao
::
class
,
'id'
,
'tarefa_id'
);
}
// - - - - - - - - - -
// Return Pesquisa Models
// - - - - - - - - - -
if
(
$this
->
type
===
UtilAvaliacao
::
PESQUISA_COORDENACAO
)
{
return
$this
->
hasOne
(
PesquisaCoordenacao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
PESQUISA_LIDERANCA
)
{
return
$this
->
hasOne
(
PesquisaLideranca
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
PESQUISA_ORIENTACAO
)
{
return
$this
->
hasOne
(
PesquisaOrientacao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
PESQUISA_OUTROS
)
{
return
$this
->
hasOne
(
PesquisaOutros
::
class
,
'id'
,
'tarefa_id'
);
}
// - - - - - - - - - -
// Return Extensao Models
// - - - - - - - - - -
if
(
$this
->
type
===
UtilAvaliacao
::
EXTENSAO_COORDENACAO
)
{
return
$this
->
hasOne
(
ExtensaoCoordenacao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
EXTENSAO_ORIENTACAO
)
{
return
$this
->
hasOne
(
ExtensaoOrientacao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
EXTENSAO_OUTROS
)
{
return
$this
->
hasOne
(
ExtensaoOutros
::
class
,
'id'
,
'tarefa_id'
);
}
// - - - - - - - - - -
// Return Gestao Models
// - - - - - - - - - -
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_COORDENACAO_LABORATORIOS_DIDATICOS
)
{
return
$this
->
hasOne
(
GestaoCoordenacaoLaboratoriosDidaticos
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_COORDENACAO_PROGRAMA_INSTITUCIONAL
)
{
return
$this
->
hasOne
(
GestaoCoordenacaoProgramaInstitucional
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_MEMBRO_CAMARAS
)
{
return
$this
->
hasOne
(
GestaoMembroCamaras
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_MEMBRO_COMISSAO
)
{
return
$this
->
hasOne
(
GestaoMembroComissao
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_MEMBRO_CONSELHO
)
{
return
$this
->
hasOne
(
GestaoMembroConselho
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_MEMBRO_TITULAR_CONSELHO
)
{
return
$this
->
hasOne
(
GestaoMembroTitularConselho
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_OUTROS
)
{
return
$this
->
hasOne
(
GestaoOutros
::
class
,
'id'
,
'tarefa_id'
);
}
if
(
$this
->
type
===
UtilAvaliacao
::
GESTAO_REPRESENTANTE_UNIDADE_EDUCACAO
)
{
return
$this
->
hasOne
(
GestaoRepresentanteUnidadeEducacao
::
class
,
'id'
,
'tarefa_id'
);
}
// - - - - - - - - - -
}
public
function
avaliadorPad
()
{
return
$this
->
belongsTo
(
AvaliadorPad
::
class
);
}
public
function
getStatusAsText
()
{
return
Status
::
listStatus
(
$this
->
status
);
}
}
/**
*
*
*
*
*
*
*
*
*/
\ No newline at end of file
app/Models/Tabelas/Gestao/GestaoCoordenacaoLaboratoriosDidaticos.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoCoordenacaoLaboratoriosDidaticosQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoCoordenacaoLaboratoriosDidaticos extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
,];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,6 +57,9 @@ class GestaoCoordenacaoLaboratoriosDidaticos extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
...
...
app/Models/Tabelas/Gestao/GestaoCoordenacaoProgramaInstitucional.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoCoordenacaoProgramaInstitucionalQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoCoordenacaoProgramaInstitucional extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
,];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,7 +57,10 @@ class GestaoCoordenacaoProgramaInstitucional extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
return
new
GestaoCoordenacaoProgramaInstitucionalQuery
(
get_called_class
());
...
...
app/Models/Tabelas/Gestao/GestaoMembroCamaras.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoMembroCamarasQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoMembroCamaras extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
,];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,6 +57,9 @@ class GestaoMembroCamaras extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
...
...
app/Models/Tabelas/Gestao/GestaoMembroComissao.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoMembroComissaoQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -12,6 +13,9 @@ class GestaoMembroComissao extends Model
protected
$fillable
=
[
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
getPlanejamentos
()
{
$codes
=
[
'G-1'
];
...
...
@@ -41,6 +45,10 @@ class GestaoMembroComissao extends Model
];
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
return
new
GestaoMembroComissaoQuery
(
get_called_class
());
...
...
app/Models/Tabelas/Gestao/GestaoMembroConselho.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoMembroConselhoQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoMembroConselho extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
,];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,6 +57,9 @@ class GestaoMembroConselho extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
...
...
app/Models/Tabelas/Gestao/GestaoMembroTitularConselho.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoMembroTitularConselhoQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoMembroTitularConselho extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
,];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,6 +57,9 @@ class GestaoMembroTitularConselho extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
...
...
app/Models/Tabelas/Gestao/GestaoOutros.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoOutrosQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoOutros extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'atividade'
,
'descricao'
,
'ch_semanal'
];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,6 +57,9 @@ class GestaoOutros extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
...
...
app/Models/Tabelas/Gestao/GestaoRepresentanteUnidadeEducacao.php
View file @
84e7a9f0
...
...
@@ -3,6 +3,7 @@
namespace
App\Models\Tabelas\Gestao
;
use
App\Models\Planejamento
;
use
App\Models\UserPad
;
use
App\Queries\Tabelas\Gestao\GestaoRepresentanteUnidadeEducacaoQuery
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -22,6 +23,9 @@ class GestaoRepresentanteUnidadeEducacao extends Model
*/
protected
$fillable
=
[
'orientacao_id'
,
'user_pad_id'
,
'dimensao'
,
'cod_atividade'
,
'nome'
,
'documento'
,
'ch_semanal'
,];
// Array de strings para preenchimento de campos de avaliação
public
$avaliable_attributes
=
[
'nome'
,
'documento'
,
'ch_semanal'
];
public
static
function
rules
()
{
return
[
...
...
@@ -53,6 +57,9 @@ class GestaoRepresentanteUnidadeEducacao extends Model
return
Planejamento
::
initQuery
()
->
whereInCodDimensao
(
$codes
)
->
get
();
}
public
function
userPad
()
{
return
$this
->
belongsTo
(
UserPad
::
class
);
}
public
static
function
initQuery
()
{
...
...
resources/views/pad/avaliacao/taferas_professor.blade.php
View file @
84e7a9f0
...
...
@@ -131,41 +131,51 @@
@
endif
@
if
(
isset
(
$gestao
)
&&
!
empty
(
$gestao
))
<
h4
><
strong
>
Gestão
</
strong
></
h4
>
@
foreach
(
$gestao
as
$tarefa
)
<
div
class
=
"card"
>
<
h5
class
=
"card-header"
>
Cód
.
Atividade
-
{{
$tarefa
[
"cod_atividade"
]}}
</
h5
>
<
div
class
=
"card-body"
>
<
span
class
=
"fw-bold "
>
Título
do
Projeto
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"titulo_projeto"
])
?
$tarefa
[
"titulo_projeto"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
Componente
Curricular
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"componente_curricular"
])
?
$tarefa
[
"componente_curricular"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
Curso
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"curso"
])
?
$tarefa
[
"curso"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
Nível
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"nivel"
])
?
$niveis
[
$tarefa
[
"nivel"
]]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
Modalidade
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"modalidade"
])
?
$modalidades
[
$tarefa
[
"modalidade"
]]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
Resolução
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"resolucao"
])
?
$tarefa
[
"resolucao"
]
:
"--"
}}
</
span
><
br
>
<
span
class
=
"fw-bold "
>
CH
.
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
isset
(
$tarefa
[
"ch_semanal"
])
?
$tarefa
[
"ch_semanal"
]
:
"--"
}}
</
span
><
br
>
<
div
style
=
"width: 100%; "
class
=
"btns-avaliar mt-5 d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
'setaDadosModalAvaliacao("{{$tarefa["id"]}}", "{{$professor["id"]}}", "6", "{{$tarefa["tipo_atividade"]}}")'
>
Reprovar
</
button
>
@
if
(
isset
(
$avaliacoes_gestao
)
&&
!
empty
(
$avaliacoes_gestao
))
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
h4
><
strong
>
Gestão
</
strong
></
h4
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$tarefa["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$professor["id"]}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$tarefa["tipo_atividade"]}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
@
foreach
(
$avaliacoes_gestao
as
$avaliacao
)
<
div
class
=
"mb-4"
>
<
div
class
=
"card"
>
<
h5
class
=
"card-header"
>
Cód
.
Atividade
-
{{
$avaliacao
->
tarefa
->
cod_atividade
}}
</
h5
>
<
div
class
=
"card-body"
>
<
ul
>
<
li
>
<
span
class
=
"fw-bold "
>
Nome
:
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
nome
}}
</
span
><
br
>
</
li
>
<
li
>
<
span
class
=
"fw-bold "
>
Documento
:
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
documento
}}
</
span
><
br
>
</
li
>
<
li
>
<
span
class
=
"fw-bold "
>
Status
:
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
getStatusAsText
()
}}
</
span
><
br
>
</
li
>
<
li
>
<
span
class
=
"fw-bold "
>
Carga
Horária
Semanal
:
</
span
><
span
class
=
"card-text"
>
{{
$avaliacao
->
tarefa
->
ch_semanal
}}
Hora
(
s
)
</
span
><
br
>
</
li
>
</
ul
>
<
div
class
=
"btns-avaliar mt-4 d-flex justify-content-end"
>
<
button
type
=
"button"
class
=
"btn btn-outline-danger"
data
-
bs
-
toggle
=
"modal"
data
-
bs
-
target
=
"#modal_avaliacao"
onclick
=
" setaDadosModalAvaliacao('
{
{$avaliacao->tarefa->id}
}
', '
{
{$avaliacao->tarefa->userPad->user->id}
}
', '6', '
{
{$avaliacao->type}
}
') "
>
Reprovar
</
button
>
<
span
>&
nbsp
;
&
nbsp
;
</
span
>
<
form
action
=
"
{
{route('avaliador_avaliar')}
}
"
method
=
"POST"
>
@
csrf
@
method
(
"PUT"
)
<
input
type
=
"hidden"
name
=
"tarefa_id"
id
=
"tarefa_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->id}
}
"
>
<
input
type
=
"hidden"
name
=
"professor_id"
id
=
"professor_id_aprovar"
value
=
"
{
{$avaliacao->tarefa->userPad->user->id}
}
"
>
<
input
type
=
"hidden"
name
=
"status"
id
=
"status_aprovar"
value
=
'7'
>
<
input
type
=
"hidden"
name
=
"atividade_type"
id
=
"atividade_type_aprovar"
value
=
"
{
{$avaliacao->type}
}
"
>
<
input
type
=
"submit"
class
=
"btn btn-primary"
value
=
"Aprovar"
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
<
br
>
</
div
>
@
endforeach
@
endif
...
...
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