| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -2,191 +2,45 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@section('content') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					<div class="container mx-auto px-4 py-6"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <div class="max-w-lg mx-auto"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div class="bg-white rounded-lg shadow-lg overflow-hidden"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div class="p-6"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <!-- Encabezado del formulario --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <div class="flex items-center justify-between mb-6"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <h2 class="text-2xl font-bold text-gray-800"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        {{ isset($docente) ? 'Editar Docente' : 'Nuevo Docente' }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </h2> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div class="h-10 w-10 bg-blue-100 rounded-full flex items-center justify-center"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <i class="fas fa-user text-blue-600"></i> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <div class="bg-white rounded-lg shadow-lg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div class="p-4 border-b border-gray-200 flex justify-between items-center"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <h2 class="text-2xl font-bold">{{ isset($docente) ? 'Editar Docente' : 'Crear Docente' }}</h2> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div class="p-4"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <form action="{{ isset($docente) ? route('docentes.update', $docente->id) : route('docentes.store') }}" method="POST"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                @csrf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                @if(isset($docente)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    @method('PUT') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                @endif | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <div class="grid grid-cols-1 gap-6"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <label for="nombre" class="block text-sm font-medium text-gray-700">Nombre</label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <input type="text" name="nombre" id="nombre" value="{{ old('nombre', $docente->nombre ?? '') }}" class="mt-1 block w-full border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <!-- Mensajes de error --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                @if($errors->any()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <div class="mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded-r-lg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div class="flex items-center"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <i class="fas fa-exclamation-circle text-red-500 mr-3"></i> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div class="text-red-700"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <ul> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                @foreach($errors->all() as $error) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <li>{{ $error }}</li> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                @endforeach | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </ul> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <label for="telefono" class="block text-sm font-medium text-gray-700">Teléfono</label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <input type="text" name="telefono" id="telefono" value="{{ old('telefono', $docente->telefono ?? '') }}" class="mt-1 block w-full border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                @endif | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <!-- Formulario --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <form id="docenteForm" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      action="{{ isset($docente) ? route('docentes.update', $docente->id) : route('docentes.store') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                      method="POST"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    @csrf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    @if(isset($docente)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        @method('PUT') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    @endif | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div class="space-y-6"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <!-- Campo Nombre --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <label for="nombre" class="block text-sm font-medium text-gray-700 mb-2"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                Nombre del Docente | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <div class="relative rounded-md shadow-sm"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <i class="fas fa-user text-gray-400"></i> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <input type="text" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       name="nombre" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       id="nombre" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       value="{{ isset($docente) ? $docente->nombre : old('nombre') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       placeholder="Ingrese el nombre del docente" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       required> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            @error('nombre') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <p class="mt-1 text-sm text-red-600">{{ $message }}</p> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            @enderror | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <!-- Campo Teléfono --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <label for="telefono" class="block text-sm font-medium text-gray-700 mb-2"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                Teléfono | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <input type="text" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   name="telefono" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   id="telefono" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   class="block w-full border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   value="{{ isset($docente) ? $docente->telefono : old('telefono') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   placeholder="Ingrese el teléfono del docente" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   required> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <!-- Campo Correo --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <label for="correo" class="block text-sm font-medium text-gray-700 mb-2"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                Correo Electrónico | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <input type="email" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   name="correo" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   id="correo" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   class="block w-full border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   value="{{ isset($docente) ? $docente->correo : old('correo') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   placeholder="Ingrese el correo del docente" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   required> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <!-- Campo Tipo de Licencia --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <label for="tipo_licencia" class="block text-sm font-medium text-gray-700 mb-2"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                Tipo de Licencia | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <input type="text" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   name="tipo_licencia" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   id="tipo_licencia" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   class="block w-full border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   value="{{ isset($docente) ? $docente->tipo_licencia : old('tipo_licencia') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   placeholder="Ingrese el tipo de licencia del docente" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   required> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <!-- Campo Materia --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <label for="materia" class="block text-sm font-medium text-gray-700 mb-2"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                Materia | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <input type="text" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   name="materia" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   id="materia" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   class="block w-full border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   value="{{ isset($docente) ? $docente->materia : old('materia') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   placeholder="Ingrese la materia que imparte" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                   required> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <!-- Botones de acción --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div class="flex justify-end space-x-2 pt-4 border-t border-gray-200"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <a href="{{ route('docentes.index') }}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                               class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                Cancelar | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </a> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <button type="button" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    onclick="confirmarAccion()" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                {{ isset($docente) ? 'Actualizar' : 'Guardar' }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <label for="correo" class="block text-sm font-medium text-gray-700">Correo</label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <input type="email" name="correo" id="correo" value="{{ old('correo', $docente->correo ?? '') }}" class="mt-1 block w-full border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </form> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <label for="tipo_licencia" class="block text-sm font-medium text-gray-700">Tipo de Licencia</label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <input type="text" name="tipo_licencia" id="tipo_licencia" value="{{ old('tipo_licencia', $docente->tipo_licencia ?? '') }}" class="mt-1 block w-full border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <label for="materia" class="block text-sm font-medium text-gray-700">Materia</label> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <input type="text" name="materia" id="materia" value="{{ old('materia', $docente->materia ?? '') }}" class="mt-1 block w-full border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <div class="mt-6 flex justify-end"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        {{ isset($docente) ? 'Actualizar' : 'Crear' }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </form> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					<script> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					function confirmarAccion() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const esEdicion = {{ isset($docente) ? 'true' : 'false' }}; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const nombre = document.getElementById('nombre').value.trim(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (!nombre) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Swal.fire({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            title: 'Error', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            text: 'El nombre del docente es obligatorio', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            icon: 'error', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            confirmButtonColor: '#3085d6', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            confirmButtonText: 'Entendido' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    Swal.fire({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        title: esEdicion ? '¿Editar docente?' : '¿Guardar docente?', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        html: esEdicion ? | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              `¿Estás seguro de editar al docente:<br><strong>${nombre}</strong>?` : | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              `¿Estás seguro de guardar al docente:<br><strong>${nombre}</strong>?`, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        icon: 'question', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        showCancelButton: true, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        confirmButtonColor: '#3085d6', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        cancelButtonColor: '#d33', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        confirmButtonText: esEdicion ? 'Sí, editar' : 'Sí, guardar', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        cancelButtonText: 'Cancelar' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }).then((result) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (result.isConfirmed) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            document.getElementById('docenteForm').submit(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					// Prevenir envío del formulario con Enter | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					document.getElementById('docenteForm').addEventListener('keypress', function(e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (e.key === 'Enter') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        e.preventDefault(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        confirmarAccion(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					}); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					// Focus en el campo nombre al cargar la página | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					document.addEventListener('DOMContentLoaded', function() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    document.getElementById('nombre').focus(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					}); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					</script> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@endsection | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |