Commit 7cb052c8 authored by alissonalbuquerque's avatar alissonalbuquerque
Browse files

add validacoes de horas dinamicas

parent 9334d0b6
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace App\Models\Tabelas\Gestao; namespace App\Models\Tabelas\Gestao;
use App\Models\Planejamento; use App\Models\Planejamento;
use App\Models\Util\CargaHoraria;
use App\Queries\Tabelas\Gestao\GestaoMembroComissaoQuery; use App\Queries\Tabelas\Gestao\GestaoMembroComissaoQuery;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace App\Models\Tabelas\Gestao; namespace App\Models\Tabelas\Gestao;
use App\Models\Planejamento; use App\Models\Planejamento;
use App\Models\Util\CargaHoraria;
use App\Queries\Tabelas\Gestao\GestaoMembroConselhoQuery; use App\Queries\Tabelas\Gestao\GestaoMembroConselhoQuery;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace App\Models\Tabelas\Gestao; namespace App\Models\Tabelas\Gestao;
use App\Models\Planejamento; use App\Models\Planejamento;
use App\Models\Util\CargaHoraria;
use App\Queries\Tabelas\Gestao\GestaoMembroTitularConselhoQuery; use App\Queries\Tabelas\Gestao\GestaoMembroTitularConselhoQuery;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace App\Models\Tabelas\Gestao; namespace App\Models\Tabelas\Gestao;
use App\Models\Planejamento; use App\Models\Planejamento;
use App\Models\Util\CargaHoraria;
use App\Queries\Tabelas\Gestao\GestaoRepresentanteUnidadeEducacaoQuery; use App\Queries\Tabelas\Gestao\GestaoRepresentanteUnidadeEducacaoQuery;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
......
...@@ -4,7 +4,6 @@ namespace App\Models\Tabelas\Pesquisa; ...@@ -4,7 +4,6 @@ namespace App\Models\Tabelas\Pesquisa;
use App\Models\Planejamento; use App\Models\Planejamento;
use App\Models\Tabelas\Constants; use App\Models\Tabelas\Constants;
use App\Models\Util\CargaHoraria;
use App\Queries\Tabelas\Pesquisa\PesquisaCoordenacaoQuery; use App\Queries\Tabelas\Pesquisa\PesquisaCoordenacaoQuery;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
......
...@@ -4,7 +4,6 @@ namespace App\Models\Tabelas\Pesquisa; ...@@ -4,7 +4,6 @@ namespace App\Models\Tabelas\Pesquisa;
use App\Models\Planejamento; use App\Models\Planejamento;
use App\Models\Tabelas\Constants; use App\Models\Tabelas\Constants;
use App\Models\Util\CargaHoraria;
use App\Queries\Tabelas\Pesquisa\PesquisaOrientacaoQuery; use App\Queries\Tabelas\Pesquisa\PesquisaOrientacaoQuery;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
......
...@@ -146,7 +146,6 @@ ...@@ -146,7 +146,6 @@
<th scope="col"> Nível </th> <th scope="col"> Nível </th>
<th scope="col"> Modalidade </th> <th scope="col"> Modalidade </th>
<th scope="col"> CH Semanal </th> <th scope="col"> CH Semanal </th>
<th scope="col"> CH Total </th>
<th scope="col"> Opções </th> <th scope="col"> Opções </th>
</tr> </tr>
</thead> </thead>
...@@ -160,7 +159,6 @@ ...@@ -160,7 +159,6 @@
<td>{{ $ensinoAula->nivelAsString() }}</td> <td>{{ $ensinoAula->nivelAsString() }}</td>
<td>{{ $ensinoAula->modalidadeAsString() }}</td> <td>{{ $ensinoAula->modalidadeAsString() }}</td>
<td>{{ $ensinoAula->ch_semanal }}</td> <td>{{ $ensinoAula->ch_semanal }}</td>
<td>{{ $ensinoAula->ch_total }}</td>
<td> <td>
@include('components.buttons.btn-edit-task', [ @include('components.buttons.btn-edit-task', [
'btn_class' => 'btn-edit_ensino_aula', 'btn_class' => 'btn-edit_ensino_aula',
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<select class="form-select @error('cod_dimensao') is-invalid @enderror ajax-errors" name="cod_dimensao" id="cod_dimensao" value="{{ old('cod_dimensao') }}"> <select class="form-select @error('cod_dimensao') is-invalid @enderror ajax-errors" name="cod_dimensao" id="cod_dimensao" value="{{ old('cod_dimensao') }}">
<option value="0">Selecione uma Resolução</option> <option value="0">Selecione uma Resolução</option>
@foreach($planejamentos as $value => $cod_dimensao) @foreach($planejamentos as $value => $cod_dimensao)
@if( $value == old('cod_dimensao') ) @if( $value == $model->cod_dimensao )
<option selected value="{{$value}}">{{$cod_dimensao}}</option> <option selected value="{{$value}}">{{$cod_dimensao}}</option>
@else @else
<option value="{{$value}}">{{$cod_dimensao}}</option> <option value="{{$value}}">{{$cod_dimensao}}</option>
......
...@@ -42,6 +42,50 @@ ...@@ -42,6 +42,50 @@
<input class="form-control @error('cod_atividade') is-invalid @enderror ajax-errors" type="text" name="cod_atividade" id="cod_atividade" readonly> <input class="form-control @error('cod_atividade') is-invalid @enderror ajax-errors" type="text" name="cod_atividade" id="cod_atividade" readonly>
</div> </div>
<div class="mb-3 col-sm-10">
<label class="form-label" for="nucleo">Nome do núcleo docente estruturante / estruturante assistencial</label>
<input class="form-control @error('nucleo') is-invalid @enderror ajax-errors" type="text" name="nucleo" id="nucleo" value="{{ old('nucleo') }}">
@include('components.divs.errors', [
'field' => 'nucleo_create'
])
</div>
<div class="mb-3 col-sm-12">
<label class="form-label" for="documento">Documento que o designa (Portaria, Ordem de serviço ou Outro)</label>
<input class="form-control @error('documento') is-invalid @enderror ajax-errors" type="text" name="documento" id="documento" value="{{ old('documento') }}">
@include('components.divs.errors', [
'field' => 'documento_create'
])
</div>
<div class="mb-3 col-sm-6">
<label class="form-label" for="funcao">Função</label>
<select class="form-select @error('funcao') is-invalid @enderror ajax-errors" name="funcao" id="funcao" value="{{ old('funcao') }}">
<option value="0">Selecione uma Função</option>
@foreach($funcoes as $value => $funcao)
@if( $value == old('funcao') )
<option selected value="{{$value}}">{{$funcao}}</option>
@else
<option value="{{$value}}">{{$funcao}}</option>
@endif
@endforeach
</select>
@include('components.divs.errors', [
'field' => 'funcao_create'
])
</div>
<div class="mb-3 col-sm-6">
<label class="form-label" for="ch_semanal">CH. Semanal</label>
<input class="form-control @error('ch_semanal') is-invalid @enderror ajax-errors" type="number" name="ch_semanal" id="ch_semanal" value="{{ old('ch_semanal') }}">
@include('components.divs.errors', [
'field' => 'ch_semanal_create'
])
</div>
</div> </div>
<div class="mt-1 text-end"> <div class="mt-1 text-end">
...@@ -61,6 +105,11 @@ ...@@ -61,6 +105,11 @@
<tr> <tr>
<!-- <th scole="col">#</th> --> <!-- <th scole="col">#</th> -->
<th scope="col"> Cód </th> <th scope="col"> Cód </th>
<th scope="col"> Nome do Núcleo </th>
<th scope="col"> Documento </th>
<th scope="col"> Função </th>
<th scope="col"> CH. Semanal </th>
<th scope="col"> Opções </th>
</tr> </tr>
</thead> </thead>
...@@ -68,6 +117,10 @@ ...@@ -68,6 +117,10 @@
@foreach($atividades as $atividade) @foreach($atividades as $atividade)
<tr> <tr>
<td>{{ $atividade->cod_atividade }}</td> <td>{{ $atividade->cod_atividade }}</td>
<td>{{ $atividade->nucleo }}</td>
<td>{{ $atividade->documento }}</td>
<td>{{ $atividade->funcaoAsString() }}</td>
<td>{{ $atividade->ch_semanal }}</td>
<td> <td>
@include('components.buttons.btn-edit-task', [ @include('components.buttons.btn-edit-task', [
'btn_class' => 'btn-edit_ensino_membro_docente', 'btn_class' => 'btn-edit_ensino_membro_docente',
...@@ -76,7 +129,7 @@ ...@@ -76,7 +129,7 @@
@include('components.buttons.btn-delete', [ @include('components.buttons.btn-delete', [
'id' => $atividade->id, 'id' => $atividade->id,
'route' => route('ensino_membro_docente_delete', ['id' => $ensinoAula->id]) 'route' => route('ensino_membro_docente_delete', ['id' => $atividade->id])
]) ])
</td> </td>
</tr> </tr>
...@@ -89,7 +142,7 @@ ...@@ -89,7 +142,7 @@
@include('components.modal', [ @include('components.modal', [
'size' => 'modal-lg', 'size' => 'modal-lg',
'header' => 'Ensino - Membro Docente', 'header' => ''
]) ])
</div> </div>
@endsection @endsection
......
...@@ -14,6 +14,51 @@ ...@@ -14,6 +14,51 @@
<input class="form-control @error('cod_atividade') is-invalid @enderror ajax-errors" type="text" name="cod_atividade" id="cod_atividade" value="{{$model->cod_atividade}}" readonly> <input class="form-control @error('cod_atividade') is-invalid @enderror ajax-errors" type="text" name="cod_atividade" id="cod_atividade" value="{{$model->cod_atividade}}" readonly>
</div> </div>
<div class="mb-3 col-sm-10">
<label class="form-label" for="nucleo">Nome do núcleo docente estruturante / estruturante assistencial</label>
<input class="form-control @error('nucleo') is-invalid @enderror ajax-errors" type="text" name="nucleo" id="nucleo" value="{{ $model->nucleo }}">
@include('components.divs.errors', [
'field' => 'nucleo_update'
])
</div>
<div class="mb-3 col-sm-12">
<label class="form-label" for="documento">Documento que o designa (Portaria, Ordem de serviço ou Outro)</label>
<input class="form-control @error('documento') is-invalid @enderror ajax-errors" type="text" name="documento" id="documento" value="{{ $model->documento }}">
@include('components.divs.errors', [
'field' => 'documento_update'
])
</div>
<div class="mb-3 col-sm-6">
<label class="form-label" for="funcao">Função</label>
<select class="form-select @error('funcao') is-invalid @enderror ajax-errors" name="funcao" id="funcao">
<option value="0">Selecione uma Função</option>
@foreach($funcoes as $value => $funcao)
@if( $value == $model->funcao )
<option selected value="{{$value}}">{{$funcao}}</option>
@else
<option value="{{$value}}">{{$funcao}}</option>
@endif
@endforeach
</select>
@include('components.divs.errors', [
'field' => 'funcao_update'
])
</div>
<div class="mb-3 col-sm-6">
<label class="form-label" for="ch_semanal">CH. Semanal</label>
<input class="form-control @error('ch_semanal') is-invalid @enderror ajax-errors" type="number" name="ch_semanal" id="ch_semanal" value="{{ $model->ch_semanal }}">
@include('components.divs.errors', [
'field' => 'ch_semanal_update'
])
</div>
</div> </div>
<div class="mt-1 text-end"> <div class="mt-1 text-end">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment