From 3ab8484b9de587930a854cb95b309e1402fe849d Mon Sep 17 00:00:00 2001 From: alissonalbuquerque Date: Sat, 17 Sep 2022 23:42:00 -0300 Subject: [PATCH] =?UTF-8?q?Add=20corre=C3=A7=C3=B5es=20de=20valida=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20EnsinoOrienta=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnsinoAtendimentoDiscenteController.php | 18 +-- .../Ensino/EnsinoOrientacaoController.php | 42 ++++-- .../Ensino/EnsinoParticipacaoController.php | 2 - .../Ensino/EnsinoProjetoController.php | 23 +-- .../Ensino/EnsinoAtendimentoDiscente.php | 5 + .../Tabelas/Ensino/EnsinoOrientacao.php | 26 +++- .../Tabelas/Ensino/EnsinoParticipacao.php | 15 +- app/Models/Tabelas/Ensino/EnsinoProjeto.php | 14 +- app/Models/Util/CargaHorariaValidation.php | 11 +- app/Models/Util/Orientacao.php | 1 - .../form_create.blade.php | 54 ++++++- .../form_update.blade.php | 45 ++++++ .../ensino/orientacao/form_create.blade.php | 22 ++- .../ensino/orientacao/form_update.blade.php | 133 ++++++++++++++++++ .../orientacao/numero_orientandos.blade.php | 28 ++++ .../ensino/participacao/form_create.blade.php | 46 +++++- .../ensino/participacao/form_update.blade.php | 35 +++++ .../ensino/projeto/form_create.blade.php | 78 +++++++++- .../ensino/projeto/form_update.blade.php | 63 +++++++++ 19 files changed, 607 insertions(+), 54 deletions(-) create mode 100644 resources/views/pad/components/templates/dimensao/ensino/orientacao/numero_orientandos.blade.php diff --git a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoAtendimentoDiscenteController.php b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoAtendimentoDiscenteController.php index 731fc47..4b55782 100644 --- a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoAtendimentoDiscenteController.php +++ b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoAtendimentoDiscenteController.php @@ -88,7 +88,7 @@ class EnsinoAtendimentoDiscenteController extends Controller if($validator->fails()) { return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $request->user_pad_id,]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $request->user_pad_id,]) ->withErrors($validator) ->withInput(); } @@ -109,16 +109,16 @@ class EnsinoAtendimentoDiscenteController extends Controller if(!$avaliacao->save()) { return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('fail', 'Erro ao cadastrar Atividade!'); } return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('success', 'Cadastro realizado com sucesso!'); } else { return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('fail', 'Erro ao cadastrar Atividade!'); } @@ -147,15 +147,15 @@ class EnsinoAtendimentoDiscenteController extends Controller if($validator->fails()) { return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('fail', 'Erro ao atualizar Atividade!'); } if($model->save()) { - return redirect()->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + return redirect()->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('success', 'Atualizado com sucesso!'); } else { - return redirect()->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + return redirect()->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('fail', 'Erro ao atualizar a Atividade!'); } } @@ -168,11 +168,11 @@ class EnsinoAtendimentoDiscenteController extends Controller if($model->delete()) { return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('success', 'Atividade removida com Sucesso!'); } else { return redirect() - ->route('atendimento_discente_index', ['user_pad_id' => $user_pad_id]) + ->route('ensino_atendimento_discente_index', ['user_pad_id' => $user_pad_id]) ->with('fail', 'Erro ao remover atividade!'); } } diff --git a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoOrientacaoController.php b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoOrientacaoController.php index 24be859..9244b73 100644 --- a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoOrientacaoController.php +++ b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoOrientacaoController.php @@ -54,7 +54,7 @@ class EnsinoOrientacaoController extends Controller $orientacoes = Orientacao::listOrientacao(); $planejamentos = EnsinoOrientacao::listPlanejamentos(); - return view('pad.components.templates.dimensao.ensino.aulas.form_update', [ + return view('pad.components.templates.dimensao.ensino.orientacao.form_update', [ 'model' => $model, 'niveis' => $niveis, 'orientacoes' => $orientacoes, @@ -75,6 +75,8 @@ class EnsinoOrientacaoController extends Controller */ public function create(Request $request) { + $ch_semanal_temp = $request->ch_semanal; + if($request->cod_dimensao) { $planejamento = Planejamento::initQuery()->whereCodDimensao($request->cod_dimensao)->first(); @@ -82,10 +84,12 @@ class EnsinoOrientacaoController extends Controller $ch_min = $planejamento->ch_semanal; $ch_max = $planejamento->ch_maxima; - $cargaHoraria = new CargaHorariaValidation($ch_min, $ch_max); + $cargaHoraria = new CargaHorariaValidation($ch_min, $ch_max, ['field' => 'Qtd. Participantes', 'value' => $request->numero_orientandos]); + + $request->merge(['ch_semanal' => $request->ch_semanal * ($request->numero_orientandos?? 1)]); $validator = Validator::make( - $request->all(), + $request->all(), array_merge(EnsinoOrientacao::rules(), $cargaHoraria->rules()), array_merge(EnsinoOrientacao::messages(), $cargaHoraria->messages()) ); @@ -99,6 +103,7 @@ class EnsinoOrientacaoController extends Controller if($validator->fails()) { + $request->merge(['ch_semanal' => $ch_semanal_temp]); return redirect() ->route('ensino_orientacao_index', ['user_pad_id' => $request->user_pad_id,]) ->withErrors($validator) @@ -106,12 +111,13 @@ class EnsinoOrientacaoController extends Controller } $user_pad_id = $request->user_pad_id; + $request->merge(['ch_semanal' => $ch_semanal_temp]); $model = new EnsinoOrientacao($request->all()); $model->dimensao = Dimensao::ENSINO; if($model->save()) - { + { $avaliacao = new Avaliacao([ 'tarefa_id' => $model->id, 'type' => UtilAvaliacao::ENSINO_ORIENTACAO, @@ -137,7 +143,11 @@ class EnsinoOrientacaoController extends Controller } public function update($id, Request $request) - { + { + $model = EnsinoOrientacao::find($id); + + $ch_semanal_temp = $request->ch_semanal; + if($request->cod_dimensao) { $planejamento = Planejamento::initQuery()->whereCodDimensao($request->cod_dimensao)->first(); @@ -145,10 +155,12 @@ class EnsinoOrientacaoController extends Controller $ch_min = $planejamento->ch_semanal; $ch_max = $planejamento->ch_maxima; - $cargaHoraria = new CargaHorariaValidation($ch_min, $ch_max); + $cargaHoraria = new CargaHorariaValidation($ch_min, $ch_max, ['field' => 'Qtd. Participantes', 'value' => $request->numero_orientandos]); + + $request->merge(['ch_semanal' => $request->ch_semanal * ($request->numero_orientandos?? 1)]); $validator = Validator::make( - $request->all(), + $request->all(), array_merge(EnsinoOrientacao::rules(), $cargaHoraria->rules()), array_merge(EnsinoOrientacao::messages(), $cargaHoraria->messages()) ); @@ -160,18 +172,19 @@ class EnsinoOrientacaoController extends Controller ); } - $model = EnsinoOrientacao::find($id); - $model->fill($request->all()); - $user_pad_id = $model->user_pad_id; if($validator->fails()) { + $request->merge(['ch_semanal' => $ch_semanal_temp]); return redirect() ->route('ensino_orientacao_index', ['user_pad_id' => $user_pad_id]) ->with('fail', 'Erro ao atualizar Atividade!'); } + $request->merge(['ch_semanal' => $ch_semanal_temp]); + $model->fill($request->all()); + if($model->save()) { return redirect()->route('ensino_orientacao_index', ['user_pad_id' => $user_pad_id]) ->with('success', 'Atualizado com sucesso!'); @@ -211,6 +224,8 @@ class EnsinoOrientacaoController extends Controller public function ajaxValidation(Request $request) { + $ch_semanal_temp = $request->ch_semanal; + if($request->cod_dimensao) { $planejamento = Planejamento::initQuery()->whereCodDimensao($request->cod_dimensao)->first(); @@ -218,10 +233,12 @@ class EnsinoOrientacaoController extends Controller $ch_min = $planejamento->ch_semanal; $ch_max = $planejamento->ch_maxima; - $cargaHoraria = new CargaHorariaValidation($ch_min, $ch_max); + $cargaHoraria = new CargaHorariaValidation($ch_min, $ch_max, ['field' => 'Qtd. Participantes', 'value' => $request->numero_orientandos]); + + $request->merge(['ch_semanal' => $request->ch_semanal * ($request->numero_orientandos?? 1)]); $validator = Validator::make( - $request->all(), + $request->all(), array_merge(EnsinoOrientacao::rules(), $cargaHoraria->rules()), array_merge(EnsinoOrientacao::messages(), $cargaHoraria->messages()) ); @@ -234,6 +251,7 @@ class EnsinoOrientacaoController extends Controller } if($validator->passes()) { + $request->merge(['ch_semanal' => $ch_semanal_temp]); return Response::json(['message' => true, 'status' => 200]); } diff --git a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoParticipacaoController.php b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoParticipacaoController.php index 706c8e8..0a521ee 100644 --- a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoParticipacaoController.php +++ b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoParticipacaoController.php @@ -32,7 +32,6 @@ class EnsinoParticipacaoController extends Controller $niveis = Nivel::listNivel(); - $modalidades = Modalidade::listModalidade(); $divs = PadTables::tablesEnsino($user_pad_id); return view('pad.components.templates.dimensao.ensino.participacao.form_create', [ @@ -40,7 +39,6 @@ class EnsinoParticipacaoController extends Controller 'divs' => $divs, 'niveis' => $niveis, - 'modalidades' => $modalidades, 'user_pad_id' => $user_pad_id, 'index_menu' => MenuItemsTeacher::PAD, ]); diff --git a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoProjetoController.php b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoProjetoController.php index cd82c46..b8cd469 100644 --- a/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoProjetoController.php +++ b/app/Http/Controllers/Dimensao/Tabelas/Ensino/EnsinoProjetoController.php @@ -11,8 +11,10 @@ use App\Models\UserPad; use App\Models\Util\Avaliacao as UtilAvaliacao; use App\Models\Util\CargaHorariaValidation; use App\Models\Util\Dimensao; +use App\Models\Util\Funcao; use App\Models\Util\MenuItemsTeacher; use App\Models\Util\Modalidade; +use App\Models\Util\Natureza; use App\Models\Util\Nivel; use App\Models\Util\PadTables; use App\Models\Util\Status; @@ -30,32 +32,31 @@ class EnsinoProjetoController extends Controller ->orderBy('cod_atividade') ->get(); - - $niveis = Nivel::listNivel(); - $modalidades = Modalidade::listModalidade(); + $naturezas = Natureza::listNatureza(); + $funcoes = Funcao::listFuncaoProjeto(); $divs = PadTables::tablesEnsino($user_pad_id); return view('pad.components.templates.dimensao.ensino.projeto.form_create', [ 'atividades' => $atividades, 'divs' => $divs, - 'niveis' => $niveis, - 'modalidades' => $modalidades, + 'funcoes' => $funcoes, + 'naturezas' => $naturezas, 'user_pad_id' => $user_pad_id, 'index_menu' => MenuItemsTeacher::PAD, ]); } - public function edit($id) { - + public function edit($id) + { $model = EnsinoProjeto::find($id); - $niveis = Nivel::listNivel(); - $modalidades = Modalidade::listModalidade(); + $naturezas = Natureza::listNatureza(); + $funcoes = Funcao::listFuncaoProjeto(); return view('pad.components.templates.dimensao.ensino.projeto.form_update', [ 'model' => $model, - 'niveis' => $niveis, - 'modalidades' => $modalidades + 'funcoes' => $funcoes, + 'naturezas' => $naturezas, ]); } diff --git a/app/Models/Tabelas/Ensino/EnsinoAtendimentoDiscente.php b/app/Models/Tabelas/Ensino/EnsinoAtendimentoDiscente.php index fed4af1..c24fc3e 100644 --- a/app/Models/Tabelas/Ensino/EnsinoAtendimentoDiscente.php +++ b/app/Models/Tabelas/Ensino/EnsinoAtendimentoDiscente.php @@ -26,6 +26,11 @@ class EnsinoAtendimentoDiscente extends Model */ protected $fillable = ['orientacao_id', 'user_pad_id', 'dimensao', 'cod_atividade', 'componente_curricular', 'curso', 'nivel', 'ch_semanal']; + public function nivelAsString() + { + return Nivel::listNivel($this->nivel); + } + public static function rules() { return [ diff --git a/app/Models/Tabelas/Ensino/EnsinoOrientacao.php b/app/Models/Tabelas/Ensino/EnsinoOrientacao.php index 376eea5..c932cff 100644 --- a/app/Models/Tabelas/Ensino/EnsinoOrientacao.php +++ b/app/Models/Tabelas/Ensino/EnsinoOrientacao.php @@ -23,7 +23,25 @@ class EnsinoOrientacao extends Model * * @var array */ - protected $fillable = ['orientacao_id', 'cod_dimensao', 'user_pad_id', 'dimensao', 'cod_atividade', 'atividade', 'curso_id', 'nivel', 'type_orientacao', 'numero_orientandos', 'ch_semanal', 'pad_id']; + protected $fillable = ['orientacao_id', 'cod_dimensao', 'user_pad_id', 'dimensao', 'cod_atividade', 'atividade', 'curso', 'nivel', 'type_orientacao', 'numero_orientandos', 'ch_semanal', 'pad_id']; + + /** @return string */ + public function nivelAsString() + { + return Nivel::listNivel($this->nivel); + } + + /** @return string */ + public function orientacaoAsString() + { + return Orientacao::listOrientacao($this->type_orientacao); + } + + /** @return string */ + public function chSemanal() + { + return sprintf('%s (x%s)', $this->ch_semanal, $this->numero_orientandos); + } /** * @return array @@ -36,7 +54,7 @@ class EnsinoOrientacao extends Model 'curso' => ['required', 'string', 'max:255'], 'nivel' => ['required', 'integer', Rule::in(array_keys(Nivel::listNivel()))], 'type_orientacao' => ['required', 'integer', Rule::in(array_keys(Orientacao::listOrientacao()))], - 'numero_orientandos' => ['integer'], + 'numero_orientandos' => ['required', 'integer', 'min:1'], 'cod_dimensao' => ['required', 'string', Rule::in(array_keys(self::listPlanejamentos()))], ]; } @@ -67,7 +85,9 @@ class EnsinoOrientacao extends Model 'type_orientacao.integer' => 'O campo "Orientação" deve cónter um inteiro!', //'numero_orientandos' - 'numero_orientandos' => 'O campo "Número de Orientandos" deve cónter um inteiro!', + 'numero_orientandos.required' => 'O campo "Qtd. Participantes" é obrigatório!', + 'numero_orientandos.integer' => 'O campo "Qtd. Participantes" deve cónter um inteiro!', + 'numero_orientandos.min' => 'O valor minímo de "Qtd. Participantes" é 1 (um) participante', //'cod_dimensao' 'cod_dimensao.required' => 'O campo "Resolução" é obrigatório', diff --git a/app/Models/Tabelas/Ensino/EnsinoParticipacao.php b/app/Models/Tabelas/Ensino/EnsinoParticipacao.php index 5a9dc05..36fc1c6 100644 --- a/app/Models/Tabelas/Ensino/EnsinoParticipacao.php +++ b/app/Models/Tabelas/Ensino/EnsinoParticipacao.php @@ -24,6 +24,13 @@ class EnsinoParticipacao extends Model */ protected $fillable = ['orientacao_id', 'user_pad_id', 'dimensao', 'cod_atividade', 'curso', 'nivel', 'ch_semanal']; + + /** @return string|array */ + public function nivelAsString() + { + return Nivel::listNivel($this->nivel); + } + public static function rules() { return [ @@ -40,12 +47,12 @@ class EnsinoParticipacao extends Model 'cod_atividade.required' => 'O campo "Cod. Atividade" é obrigatório!', //curso - 'curso.required' => 'O campo "Curso" é obrigatório!', + 'curso.required' => 'O campo "Nome do Curso" é obrigatório!', //nivel - 'nivel.required' => 'O campo "Nível" é obrigatório!', - 'nivel.in' => 'Selecione uma opção da lista de "Nível"!', - 'nivel.integer' => 'O campo "Nível" deve cónter um inteiro!', + 'nivel.required' => 'O campo "Nível do Curso" é obrigatório!', + 'nivel.in' => 'Selecione uma opção da lista de "Nível do Curso"!', + 'nivel.integer' => 'O campo "Nível do Curso" deve cónter um inteiro!', ]; } diff --git a/app/Models/Tabelas/Ensino/EnsinoProjeto.php b/app/Models/Tabelas/Ensino/EnsinoProjeto.php index 3393548..4b05f75 100644 --- a/app/Models/Tabelas/Ensino/EnsinoProjeto.php +++ b/app/Models/Tabelas/Ensino/EnsinoProjeto.php @@ -25,6 +25,18 @@ class EnsinoProjeto extends Model */ protected $fillable = ['orientacao_id', 'user_pad_id', 'dimensao', 'cod_atividade', 'titulo', 'curso', 'natureza', 'funcao', 'ch_semanal']; + /** @return string|array */ + public function naturezaAsString() + { + return Natureza::listNatureza($this->natureza); + } + + /** @return string|array */ + public function funcaoAsString() + { + return Funcao::listFuncaoProjeto($this->funcao); + } + public static function rules() { return [ @@ -43,7 +55,7 @@ class EnsinoProjeto extends Model 'cod_atividade.required' => 'O campo "Cod. Atividade" é obrigatório!', //titulo - 'titulo.required' => 'O campo "Componente Curricular" é obrigatório!', + 'titulo.required' => 'O campo "Título do Projeto" é obrigatório!', //curso 'curso.required' => 'O campo "Curso" é obrigatório!', diff --git a/app/Models/Util/CargaHorariaValidation.php b/app/Models/Util/CargaHorariaValidation.php index c69f328..5b40e4a 100644 --- a/app/Models/Util/CargaHorariaValidation.php +++ b/app/Models/Util/CargaHorariaValidation.php @@ -13,10 +13,14 @@ class CargaHorariaValidation /** @var integer|null */ public $ch_max; - public function __construct($ch_min, $ch_max) + /** @var array */ + public $multiplier; + + public function __construct($ch_min, $ch_max, $multiplier = []) { $this->ch_min = $ch_min; $this->ch_max = $ch_max; + $this->multiplier = $multiplier; } public function rules() @@ -35,6 +39,11 @@ class CargaHorariaValidation $ch_min = $this->ch_min !== null && $this->ch_min > 1 ? sprintf('"CH. Semanal" miníma é de %d Hora(s)!', $this->ch_min) : '"CH. Semanal" miníma é de 1 Hora(s)!'; $ch_max = $this->ch_max !== null ? sprintf('"CH. Semanal" máxima para o preenchimento é de %d Hora(s)!', $this->ch_max) : ''; + + if($this->ch_max !== null && isset($this->multiplier['value']) && (integer) $this->multiplier['value'] > 1) + { + $ch_max = sprintf('"CH. Semanal" máxima para o preenchimento é de %d Hora(s)! Valor multiplicado pelo campo "%s" está acima da "CH. Semanal" máxima!', $this->ch_max, $this->multiplier['field']); + } return [ 'ch_semanal.required' => 'O campo "CH. Semanal" é obrigatório!', diff --git a/app/Models/Util/Orientacao.php b/app/Models/Util/Orientacao.php index af74401..1dafa9a 100644 --- a/app/Models/Util/Orientacao.php +++ b/app/Models/Util/Orientacao.php @@ -2,7 +2,6 @@ namespace App\Models\Util; - class Orientacao { const GRUPO = 1; diff --git a/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_create.blade.php b/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_create.blade.php index 3e3e1ec..1c2c268 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_create.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_create.blade.php @@ -42,6 +42,50 @@ +
+ + + + @include('components.divs.errors', [ + 'field' => 'componente_curricular_create', + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'nivel_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_create' + ]) +
@@ -61,6 +105,10 @@ Cód + Componente Curricular + Curso + Nível + CH. Semanal @@ -68,6 +116,10 @@ @foreach($atividades as $atividade) {{ $atividade->cod_atividade }} + {{ $atividade->componente_curricular }} + {{ $atividade->curso }} + {{ $atividade->nivelAsString() }} + {{ $atividade->ch_semanal }} @include('components.buttons.btn-edit-task', [ 'btn_class' => 'btn-edit_ensino_atendimento_discente', @@ -76,7 +128,7 @@ @include('components.buttons.btn-delete', [ 'id' => $atividade->id, - 'route' => route('ensino_atendimento_discente_delete', ['id' => $ensinoAula->id]) + 'route' => route('ensino_atendimento_discente_delete', ['id' => $atividade->id]) ]) diff --git a/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_update.blade.php b/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_update.blade.php index 823628a..380eb19 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_update.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/atendimento_discente/form_update.blade.php @@ -14,6 +14,51 @@
+
+ + + + @include('components.divs.errors', [ + 'field' => 'componente_curricular_create', + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'nivel_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_create' + ]) +
+
diff --git a/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_create.blade.php b/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_create.blade.php index 1854898..2f8d96a 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_create.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_create.blade.php @@ -60,7 +60,7 @@ ])
-
+
@@ -95,6 +95,16 @@ 'field' => 'type_orientacao_create' ])
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'numero_orientandos_create' + ]) +
+
@@ -113,7 +123,7 @@ 'field' => 'cod_dimensao_create' ])
- +
@@ -122,6 +132,7 @@ 'field' => 'ch_semanal_create' ])
+
@@ -158,7 +169,7 @@ {{ $ensinoOrientacao->curso }} {{ $ensinoOrientacao->nivelAsString() }} {{ $ensinoOrientacao->orientacaoAsString() }} - {{ $ensinoOrientacao->ch_semanal }} + {{ $ensinoOrientacao->chSemanal() }} @include('components.buttons.btn-edit-task', [ 'btn_class' => 'btn-edit_ensino_orientacao', @@ -214,4 +225,7 @@ 'route' => route('view_ensino_orientacao_resolucao'), 'btn_class' => 'show_resolucao', ]) + + @include('pad.components.templates.dimensao.ensino.orientacao.numero_orientandos', ['form_id' => 'ensino_orientacao-form']) + @endsection diff --git a/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_update.blade.php b/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_update.blade.php index e69de29..d1abb1b 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_update.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/orientacao/form_update.blade.php @@ -0,0 +1,133 @@ + +
+
+
+

Ensino - Orientações

+
+
+ @csrf + +
+ +
+ + +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'atividade_update', + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'nivel_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'type_orientacao_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'numero_orientandos_update' + ]) +
+ + +
+ + + + @include('components.divs.errors', [ + 'field' => 'cod_dimensao_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_update' + ]) +
+ +
+ +
+ +
+ +
+
+ +
+ +@include('pad.components.scripts.ajaxValidation', [ + 'btn_submit_id' => 'btn-submit_ensino_orientacao-update', + 'form_id' => 'ensino_orientacao_update-form', + 'form_type' => 'update', + 'route' => route('ensino_orientacao_validate'), +]) + +@include('pad.components.templates.dimensao.ensino.orientacao.numero_orientandos', ['form_id' => 'ensino_orientacao_update-form']) diff --git a/resources/views/pad/components/templates/dimensao/ensino/orientacao/numero_orientandos.blade.php b/resources/views/pad/components/templates/dimensao/ensino/orientacao/numero_orientandos.blade.php new file mode 100644 index 0000000..6593e91 --- /dev/null +++ b/resources/views/pad/components/templates/dimensao/ensino/orientacao/numero_orientandos.blade.php @@ -0,0 +1,28 @@ +{{-- + @include('pad.components.templates.dimensao.ensino.orientacao.numero_orientandos', ['form_id' = '']) +--}} + +@php + use App\Models\Util\Orientacao; + + $orientacao_grupo = Orientacao::GRUPO; +@endphp + + \ No newline at end of file diff --git a/resources/views/pad/components/templates/dimensao/ensino/participacao/form_create.blade.php b/resources/views/pad/components/templates/dimensao/ensino/participacao/form_create.blade.php index 1797672..05411ee 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/participacao/form_create.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/participacao/form_create.blade.php @@ -42,6 +42,42 @@
+
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'nivel_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_create' + ]) +
+
@@ -61,6 +97,9 @@ Cód + Nome do Curso + Nível do Curso + CH. Semanal @@ -68,6 +107,9 @@ @foreach($atividades as $atividade) {{ $atividade->cod_atividade }} + {{ $atividade->curso }} + {{ $atividade->nivelAsString() }} + {{ $atividade->ch_semanal }} @include('components.buttons.btn-edit-task', [ 'btn_class' => 'btn-edit_ensino_participacao', @@ -76,7 +118,7 @@ @include('components.buttons.btn-delete', [ 'id' => $atividade->id, - 'route' => route('ensino_participacao_delete', ['id' => $ensinoAula->id]) + 'route' => route('ensino_participacao_delete', ['id' => $atividade->id]) ]) @@ -89,7 +131,7 @@ @include('components.modal', [ 'size' => 'modal-lg', - 'header' => 'Ensino - Membro Participação', + 'header' => '', ])
@endsection diff --git a/resources/views/pad/components/templates/dimensao/ensino/participacao/form_update.blade.php b/resources/views/pad/components/templates/dimensao/ensino/participacao/form_update.blade.php index 6e7e5d7..c3ff670 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/participacao/form_update.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/participacao/form_update.blade.php @@ -14,6 +14,41 @@ +
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'nivel_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_update' + ]) +
diff --git a/resources/views/pad/components/templates/dimensao/ensino/projeto/form_create.blade.php b/resources/views/pad/components/templates/dimensao/ensino/projeto/form_create.blade.php index 80cfc4f..1bf6ff1 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/projeto/form_create.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/projeto/form_create.blade.php @@ -42,6 +42,68 @@
+
+ + + + @include('components.divs.errors', [ + 'field' => 'titulo_create', + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'natureza_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'funcao_create' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_create' + ]) +
@@ -60,7 +122,12 @@ - Cód + Cód ´ + Título do Projeto + Curso + Natureza + Função + CH. Semanal @@ -68,6 +135,11 @@ @foreach($atividades as $atividade) {{ $atividade->cod_atividade }} + {{ $atividade->titulo }} + {{ $atividade->curso }} + {{ $atividade->naturezaAsString() }} + {{ $atividade->funcaoAsString() }} + {{ $atividade->ch_semanal }} @include('components.buttons.btn-edit-task', [ 'btn_class' => 'btn-edit_ensino_projeto', @@ -76,7 +148,7 @@ @include('components.buttons.btn-delete', [ 'id' => $atividade->id, - 'route' => route('ensino_projeto_delete', ['id' => $ensinoAula->id]) + 'route' => route('ensino_projeto_delete', ['id' => $atividade->id]) ]) @@ -89,7 +161,7 @@ @include('components.modal', [ 'size' => 'modal-lg', - 'header' => 'Ensino - Projeto', + 'header' => '', ])
@endsection diff --git a/resources/views/pad/components/templates/dimensao/ensino/projeto/form_update.blade.php b/resources/views/pad/components/templates/dimensao/ensino/projeto/form_update.blade.php index 77056aa..4689ba8 100644 --- a/resources/views/pad/components/templates/dimensao/ensino/projeto/form_update.blade.php +++ b/resources/views/pad/components/templates/dimensao/ensino/projeto/form_update.blade.php @@ -14,6 +14,69 @@ +
+ + + + @include('components.divs.errors', [ + 'field' => 'titulo_update', + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'curso_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'natureza_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'funcao_update' + ]) +
+ +
+ + + + @include('components.divs.errors', [ + 'field' => 'ch_semanal_update' + ]) +
+
-- GitLab