Guardar cambios consolidar grupos docentes y clave de grupo
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label>Seleccionar Carrera</label>
|
||||
<select class="form-control" name="plan_id">
|
||||
<label>Carrera</label>
|
||||
<select class="form-control" name="plan_id" disabled>
|
||||
<option value="">Seleccionar plan</option>
|
||||
@foreach ($plans as $nivel => $grupos)
|
||||
<optgroup label="{{ $nivel }}">
|
||||
@@ -43,7 +43,12 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>Seleccionar ciclo</label>
|
||||
<label>Clave</label>
|
||||
<input type="text" class="form-control" name="clave" value="{{ $grupo->clave }}" disabled>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>ciclo</label>
|
||||
<select class="form-control" name="ciclo">
|
||||
<option value="0">Seleccionar ciclo</option>
|
||||
@for ($i=1 ; $i <= $ciclos->duracion ; $i++)
|
||||
@@ -53,7 +58,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>Seleccionar turno</label>
|
||||
<label>turno</label>
|
||||
<select class="form-control" name="turno">
|
||||
<option value="0">Seleccionar turno</option>
|
||||
@foreach ($turnos as $turno)
|
||||
@@ -65,8 +70,8 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>Seleccionar plantel</label>
|
||||
<select class="form-control" name="plantel">
|
||||
<label>plantel</label>
|
||||
<select class="form-control" name="plantel" disabled>
|
||||
<option value="0">Seleccionar plantel</option>
|
||||
@foreach ($planteles as $plantel)
|
||||
<option value="{{ $plantel->id }}" {{ $plantel->id == $grupo->plantel ? 'selected' : '' }}>
|
||||
@@ -77,7 +82,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label>Seleccionar status</label>
|
||||
<label>status</label>
|
||||
<select class="form-control" name="status">
|
||||
<option value="1" {{ 1 == $grupo->status ? 'selected' : '' }}>Activo</option>
|
||||
<option value="0" {{ 0 == $grupo->status ? 'selected' : '' }}>Inactivo</option>
|
||||
@@ -113,36 +118,41 @@
|
||||
<div class="card-header py-3">
|
||||
<div class="d-sm-flex align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Alumnos</h6>
|
||||
@can('grupo.create')
|
||||
<button onclick="Livewire.dispatch('create-grupo')"
|
||||
class="d-sm-inline-block btn btn-sm btn-success shadow-sm">
|
||||
<i class="fas fa-plus fa-sm text-white-50"></i> Agregar alumno
|
||||
</button>
|
||||
@endcan
|
||||
@hasrole('Control escolar')
|
||||
<button onclick="Livewire.dispatch('create-grupo')"
|
||||
class="d-sm-inline-block btn btn-sm btn-success shadow-sm">
|
||||
<i class="fas fa-plus fa-sm text-white-50"></i> Agregar alumno
|
||||
</button>
|
||||
@endhasrole
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<table id="tcont2" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
|
||||
<table id="tcont" class="table table-striped table-bordered nowrap table-hover" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
{{-- <th>Id</th> --}}
|
||||
<th>Nombre</th>
|
||||
<th>Opciones</th>
|
||||
@hasrole('Control escolar')
|
||||
<th>Opciones</th>
|
||||
@endhasrole
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($grupo->alumnos as $alumno)
|
||||
<tr>
|
||||
<td>{{$alumno->id}}</td>
|
||||
{{-- <td>{{$alumno->id}}</td> --}}
|
||||
<td>
|
||||
{{$alumno->usuario->first()?->name}}
|
||||
{{$alumno->usuario->first()?->apellidoPaterno}}
|
||||
{{$alumno->usuario->first()?->apellidoMaterno}}
|
||||
{{$alumno->usuario->first()?->name}}
|
||||
</td>
|
||||
|
||||
@hasrole('Control escolar')
|
||||
<td>
|
||||
@can('grupo.destroy')
|
||||
|
||||
<form class="delete-form"
|
||||
action="{{route('grupo.destroy',$grupo->id)}}"
|
||||
method="POST">
|
||||
@@ -150,15 +160,17 @@
|
||||
@method('DELETE')
|
||||
<input class="d-none" name="alumno" value="{{$alumno->id}}">
|
||||
<button type="submit" style="border:none; background:none;">
|
||||
<i class="fa-solid fa-circle-xmark fa-xl"
|
||||
style="color:#e66565;"></i>
|
||||
<i class="fa-regular fa-circle-user-circle-minus fa-2xl" style="color: rgb(255, 0, 0);"></i>
|
||||
</button>
|
||||
</form>
|
||||
@endcan
|
||||
|
||||
</td>
|
||||
@endhasrole
|
||||
|
||||
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3">Sin alumnos.</td></tr>
|
||||
<tr>Sin alumnos.</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -185,50 +197,4 @@ document.addEventListener('livewire:init', () => {
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script> new DataTable('#tcont2', {
|
||||
responsive: true,
|
||||
language: {
|
||||
"decimal": "",
|
||||
"emptyTable": "No hay información",
|
||||
"info": "Mostrando _START_ a _END_ de _TOTAL_ Entradas",
|
||||
"infoEmpty": "Mostrando 0 to 0 of 0 Entradas",
|
||||
"infoFiltered": "(Filtrado de _MAX_ total entradas)",
|
||||
"infoPostFix": "",
|
||||
"thousands": ",",
|
||||
"lengthMenu": "Mostrar _MENU_ Entradas",
|
||||
"loadingRecords": "Cargando...",
|
||||
"processing": "Procesando...",
|
||||
"search": "Buscar:",
|
||||
"zeroRecords": "Sin resultados encontrados"
|
||||
},
|
||||
lengthMenu: [
|
||||
[10, 25, 50, -1],
|
||||
['10 filas', '25 filas', '50 filas', 'Todos']
|
||||
],
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: ['colvis', 'pageLength']
|
||||
},
|
||||
topEnd: ['search'],
|
||||
bottomStart: [{
|
||||
buttons: [{
|
||||
extend: 'excel',
|
||||
title: 'Excel'
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
title: 'PDF'
|
||||
},
|
||||
{
|
||||
extend: 'print'
|
||||
}
|
||||
]
|
||||
}, 'info'],
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#tcont2_wrapper").removeClass("form-inline");
|
||||
$("#tcont2_wrapper").addClass("w-100"); </script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user